Adding Custom Weapon Tables

NOTE

Why do custom weapon tables? This prevents the rare bug on /map_restart that breaks the weapon table, causing all weapons to cost 0 points.


Also, we don't need to add this to our mapname folder, and keep it all in share/raw/gamedata/weapons/zm. Do it once, and never again.




SCRIPT

Create a copy of zm_levelcommon_weapons.csv inside of "share\raw\gamedata\weapons\zm" and name it whatever you want. Say you want only Cold War weapons here, name it "t9_weapons"


Open it and edit it to your liking.


Next, make a copy of zm_usermap.gsc inside of "share\raw\scripts\zm" and place it in your mapname scripts folder - "usermaps\zm_mapname\scripts\zm"


Open it up and find the following line:

zm_weapons::load_weapon_spec_from_table("gamedata/weapons/zm/zm_levelcommon_weapons.csv", 1);

Change "gamedata/weapons/zm/zm_levelcommon_weapons.csv" to the name of your new table.


Next, open your mapname.gsc AND mapname.csc. Find the following line in both of these files:

zm_weapons::load_weapon_spec_from_table("gamedata/weapons/zm/zm_levelcommon_weapons.csv", 1);

Change "gamedata/weapons/zm/zm_levelcommon_weapons.csv" to the name of your new table.


Finally, open up your mapname.zone inside of "usermaps\zm_mapname\zone_source" and add the following line somewhere:

stringtable,gamedata/weapons/zm/WEAPON_TABLE_NAME.csv

Change "WEAPON_TABLE_NAME" to your table name.


That's it!


Related Posts

See All

ZM Stats

NOTE This is a comprehensive list of all stats that are tracked in zombies. These are the variables that go within the quotations when using self.pers[""] in script. Example: deaths = player.pers["de

Avoiding Power Lag

NOTE Using these in your maps will avoid the lag players experience for a few seconds after turning on the power. The lag is caused because the game is trying to load in all of the hintstrings from al

Shi No Numa Styled Random Perk Locations

NOTE This tutorial and script were made by ZombieKid164 & HarryBo21. All credits go to them. Shi No Numa styled means that once you open a door, the Perk Machine spawns in the air and floats down, cy