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!
Comments