!help Equipment
!help Equipment
------------------------
------------------------
Equipment items are sorted in the customization screen in the order of the
filenames they are part of, then in the order of their appearance inside of said
xml files.
For that, they are given a hidden sortId number which is incremented for each
equipment.
To do custom ordering, a user can specify the sortId of the equipment like:
sortId="0" (using zero will make it show up first in the list).
If multiple items have the same sorting number, they'll be ordered by their names.
Modded equipment xml files will always be loaded last, after the stock game's
files, therefore will always show up last by default.
------------------------
------------------------
To make a weapon/equipment item show up in the customization of a certain
unit/class, you need to define:
<Bind eqp="Equipment name" to="Class name"/>
e.g. <Bind eqp="Breacher Shotgun" to="Assault"/>
These can be in separate files from the equipment, allowing you to add existing
weapons to new classes/units of troops.
Each <Bind> is additive, allowing you to add functionality (like new Ammo for
weapons) without breaking existing one.
This also works, to keep multiple bindings under a single parent item:
<Bind eqp="M9 Pistol">
<!-- all classes of the Rangers unit -->
<to name="Rangers"/>
In the example above, if you add a new class that needs the M9, you must only write
(in a custom equipment xml of yours):
<Bind eqp="M9 Pistol" to="MyNewClass">
If you want to add a new Scope to the M9:
<Bind eqp="M9 Pistol" to="MyNewScope">
If you want to add a new weapon, you must also add it to all existing classes to
which you want to bind it:
<Bind eqp="MyNewWeapon">
<to name="Assault">
<to name="Support">
<to name="919FMJM882_Handgun"/>
<to name="IronSights"/>
</Bind>
To add an equipment for all classes of a unit, specify the unit name in the 'to'
parameter
<Bind eqp="Frag Grenade" to="CIA"/>
------------------------
------------------------
Possible "inventory" field values:
- PrimaryWeapon
- SecondaryWeapon
- Armor
- UtilityPouch
- SupportGear1/2/3 - only SupportGear1 can be customized, for support that is
always equipped but doesn't show use SupportGear2/3 (like lockpicks)
- MountedGun
- Custom1 - reserved for mods
- Custom2 - reserved for mods
------------------------
------------------------
Possible "category" field values:
- pistol/rifle/shotgun/rpg
This is currently used to discern between weapon classes in code. Needed for
doctrine abilities and some actions, like we can only breach a door with shotguns.
We could also use them as some sorts of tagging system for modifiers.
------------------------
------------------------
Possible "damageType" field values:
- 0 (bullet, default)
- 1 (grenade)
- 2 (explosive)
For firearms, it's defined in Ammo.
For grenades, it's in <Projectile> -> <DamageEffect>
For explosives, it's in <ModifiableParams>
damageType also influences how entities get destroyed, where each entity defines on
what damage it breaks.
e.g. Doors will get destroyed only on damageType=2
------------------------
------------------------
Firearm <ModifiableParams>
----
You can add fovDegrees="xx" to ANY item in the <ModifiableParams> list in order to
modify the base FOV.
------------------------
------------------------
All time settings are in milliseconds, unless name says otherwise.
------------------------
------------------------
PROJECTILE PARAMS
If 'minVelocity' is defined and > 0, the projectile will be self propelled
(rocket). It will then accelerate with the defined 'acceleration' value towards
'maxVelocity'.
minVelocity/maxVelocity/acceleration are defined in meters per second.