Code: Select all
// Weapon <classname> <menuname> <defaultorder> <menuorder> [replaces <replaceclassname>]
// Section <menuname> <count> <menuorder>
// e.g. if we replace SuperShotgun with WBSuperShotgun and specify it's replaceclassname,
// then CVar called PWO.Doom.SuperShotgun will be used, not PWO.Doom.WBSuperShotgun.
Weapon command adds a weapon to PWO table:
classname — DECORATE class name of a weapon. Also used in CVar name.
menuname — PWO menu description (ex.: "Super Shotgun").
defaultorder — default PWO setting.
menuorder — PWO menu weight (to add weapons between existing ones).
Any weapon directive may end with 'replaces "X"'. X should be class name of already defined weapon. Weapon that replaces it will appear on same menu position and will use same CVar (name can still be different though).
Section command adds a weapon section to PWO table (to be not confused with config sections, these are used just for readability):
menuname — section name (ex.: "Skulltag weapons").
count — count of subsequent
Weapon definitions.
menuorder — PWO menu weight.
Works same way as weapons' weight, but controls entire section.
Weapons inside a section will still be ordered exactly as defined; for such weapons, menu weight is ignored.
You may not add weapons to existing section (todo: fix?)
Also there is
Clear command that doesn't define anything but erases all weapon definitions previously loaded. This is for mods that completely replace existing weaponry.
Note that it is only command that's valid in config root (i.e. before first config section begins).
[spoiler]Example from generic definitions:
Code: Select all
[VanillaDoom]
Game Doom
Weapon "Fist" "Fist" 0.1 0
Weapon "Chainsaw" "Chainsaw" 0.2 10
Weapon "Pistol" "Pistol" 0.3 20
Weapon "Shotgun" "Shotgun" 0.8 30
...
Example of replaced weapons:
Code: Select all
[DeathBall]
Game Doom
Weapon "Fist~" "Fist" 0.1 0 replaces "Fist"
Weapon "Chainsaw~" "Chainsaw" 0.2 10 replaces "Chainsaw"
Weapon "Pistol~" "Pistol" 0.3 20 replaces "Pistol"
Weapon "Shotgun~" "Shotgun" 0.8 30 replaces "Shotgun"
...
Also for weapons that have Power Level 2 (like Heretic ones): they should be defined with 'replaces "Level1ClassName"':
Code: Select all
Weapon "GauntletsPowered" "Necromancer Gauntlets" 0.2 10 replaces "Gauntlets"
Example of section definition:
Code: Select all
[Skulltag]
Game Doom
Section "Skulltag weapons" 4 90
Weapon "Railgun" "Railgun" 0.55 0
Weapon "BFG10K" "BFG-10000" 0.75 0
Weapon "Minigun" "Minigun" 0.85 0
Weapon "GrenadeLauncher" "Grenade Launcher" 0.45 0
[/spoiler]