DESCRIPTIONThis is a mod, containing some tables and template properties holders for all existing weapon resources.
Right now, I have many mods ("Custom Weapons Management", "Random Weapon Swap", "Loot mod", many) , that use pretty universal format of tables with information about weapons. Updating three (and possibly more in the future) mods every time new weapon comes out on the workshop is not very convenient, so I decided to cut out similar parts containing information about weapons into this separate mod, so I can only update one mod when I need to add another weapon.
If you're a modder, you can use this too for your mod. Read below for more detailed info.
Tables for Startup script are in "globals" table, and for world scripts are in "worldGlobals" table.
List of currently supported weapons: Pastebin.com
What tables are there:
globals/worldGlobals.DBWeapons - number-string table (array) containing internal names of all weapons included.
globals/worldGlobals.DBWeaponNames - string-string table, which returns common weapon name for given internal name. For example, worldGlobals.DBWeaponNames["AutoShotgun"] == "Devastator".
(tables without B at the end contain info about HD versions of weapons, with B - about BFE versions)
globals/worldGlobals.DBWeaponParamsPaths and DBWeaponParamsPathsB - string-string tables, which returns path to weapon parameters file for given internal name. For example, worldGlobals.DBWeaponParamsPaths["SingleShotgun"] == "Content/SeriousSamHD/Databases/Weapons/SingleShotgunWeapon.ep".
globals/worldGlobals.DBWeaponItemPaths and DBWeaponItemPathsB - string-string table, which returns path to weapon item parameters file for given internal name. If there is no weapon item for this weapon, returns nil.
For example, worldGlobals.DBWeaponItemPaths["SingleShotgun"] == "Content/SeriousSamHD/Databases/GenericItems/Weapons/SingleShotgun.ep".
globals/worldGlobals.DBWeaponAmmoPaths and DBWeaponAmmoPathsB - string-array table, which returns array, containing paths to weapon ammo parameters files for given internal name. If there are no ammo items for this weapon, returns nil.
For example, worldGlobals.DBWeaponAmmoPathsB["AssaultRifle"] == {"Content/SeriousSam3/Databases/Items/Ammo/Bullets.ep","Content/SeriousSam3/Databases/Items/Ammo/Bullets_Clip.ep","Content/SeriousSam3/Databases/Items/Ammo/Bullets_Closed.ep"},
globals/worldGlobals.DBWeaponAmmo and DBWeaponAmmoB - string-array table, which returns n-element array, containing information about weapon ammo type for given internal name. First element of the array is the amount of ammunition received when picking weapon item, (n-2)-th element of the array is the maximum ammo, (n-1)-th element is a string, characterizing ammo type of given weapon (this string is added manually and may not coincide with ammo type file name), n-th element is the "Shoot to reload" number (0 if weapon doesn't have reload).
Elements from second, to (n-3)-th specify the amount of ammunition received when picking ammo items listed in worldGlobals.DBWeaponAmmoPaths(B) table (in same order as they are listed in that table).
If weapon doesn't use ammo, then this table returns {-1,-1,-1,"",*} table.
For example, worldGlobals.DBWeaponAmmoB["bDoubleShotgun"] == {10,10,5,10,100,"bShells",0}.
This means, that BFE Double Shotgun uses ammo of type "bShells", that you receive 10 ammo on picking Double shotgun weapon, 10, 5 and 10 ammo on picking ammo items, it has 100 max ammo and no reloading.
There are also Template properties holders, located in "Content/SeriousSamFusion/Scripts/Templates/WeaponDatabase/"
Each template is named same as corresponding internal weapon name, and has up to two templates: weapon item with spawner and ammo item with spawner.