top of page

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!


0 comments

Related Posts

See All

Multiple Power Switches

This guide will show you how to implement multiple power switches, such as in Shangri-La, where there are two power switches that must be...

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...

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...

Comments


bottom of page