-
Notifications
You must be signed in to change notification settings - Fork 11
Weapons
This is file is used for everything related to weapons. In short, it...
... defines weapon materials ... defines weapon types ... links the defined weapon types and materials to the actual in-game weapons
If you want to alter a weapon's damage, speed, reach, or its meltdown behaviour, or the perk you need to temper it, this is the correct place.
Weapons.xml has five sections:
weapon_settings weapon_types weapon_type_bindings weapon_materials weapon_material_bindings
Let's start with weapon_settings. <weapon_settings> true 5 12 8 1.0 1.0 1.0 </weapon_settings>
appendTypeToName: Either "true" or "false". If "true", and if a weapon's displayed name does not already contain its type (for example, "Ebony Blade" does not yet contain "Nodachi"), the weapon type gets appended to the name.
The rest are variables used in the weapon damage formula. For example, the damage of a weapon categorized as "light weapon" is calculated the following way:
(baseDamageLightWeaponry + damageBase (from linked weapon_type) + damageModifier (from linked weapon_material)) * damageFactorLightWeaponry
weapon_types define how different weapon types behave. An example entry looks like this:
<weapon_type>
<identifier>Bastard Sword</identifier>
<baseWeaponType>BASTARDSWORD</baseWeaponType>
<damageBase>5.0</damageBase>
<reachBase>1.0</reachBase>
<speedBase>0.85</speedBase>
<critDamageFactor>1.2</critDamageFactor>
<meltdownOutput>2</meltdownOutput>
<meltdownInput>1</meltdownInput>
<bleedTier>THREE</bleedTier>
<debuffTier>TWO</debuffTier>
<staggerTier>THREE</staggerTier>
<weaponClass>BLADE</weaponClass>
</weapon_type>
identifier: This is an identifier string used to reference a weapon type. It should be unique - no two types with the same identifier.
baseWeaponType: The TNBT base weapon type this weapon type is mapped to; influences perk support. Valid values are: DAGGER, CROSSBOW, LONGBOW, SHORTBOW, KATANA, NODACHI, TANTO, WAKIZASHI, SHORTSWORD, SCIMITAR, SABRE, BATTLESTAFF, SHORTSPEAR, BASTARDSWORD, CLUB, LONGMACE, LONGSWORD, HALBERD, PARTISAN, ARMINGSWORD, HATCHET, MAUL, MACE, WARAXE, WARHAMMER, GREATSWORD, BATTLEAXE, FIST
damageBase: Determines weapon damage, together with the weapons material and a factor defined in the general weapon settings
reachBase: Weapon reach; also influenced by material
speedBase: Weapon speed, also influenced by material
critDamageFactor: this * calculated weapon damage = critical damage
meltdownOutput: If you melt this down, this is the number of resources you get
meltdownInput: This is the number of weapons you need to melt down in one swoop to get something
bleedTier: A higher tier means more bleeding damage per hit. Valid values: ZERO, ONE, TWO, THREE
debuffTier: A higher tier means stronger debuffs per hit Valid values: ZERO, ONE, TWO, THREE
staggerTier: A higher tier means the weapon can stagger in shorter intervals Valid values: ZERO, ONE, TWO, THREE
With those "tiers", I usually went with a sum of 4 for regular light weapons, 3 for dagger/tanto, and 6+ for heavy weapons. If you go by that, stuff should stay balanced - but that doesn't mean it's the only way. For example, one could introduce a slow, weak weapon that gets a horrendous amount of bleeding and debuffs...
weaponClass: A more generic weapon descriptor Valid values: BLUNT, BLADE, PIERCING, NONE, BLUNT_BLADE, BLUNT_PIERCING, BLADE_PIERCING, ALL
BLUNT for blunt stuff, BLADE for blades, PIERCING for stuff like spears - or bows. More complex values mean that a weapon has multiple classes.
weapon_type_binding entries link the in-game weapons to the types you defined under weapon_types. These entries are simple:
<weapon_type_binding>
<substringWeapon>Dawnbreaker</substringWeapon>
<identifierType>Longsword</identifierType>
</weapon_type_binding>
substringWeapon: The substring to search for in a weapon's displayed name
identifierType: The reference to a type defined in weapon_types
This entry makes Dawnbreaker behave like a longsword. Fairly straightforward.
If a weapon contains substrings from multiple substringWeapon fields, the longest match counts.
weapon_material entries define.... weapon materials.
<weapon_material>
<damageModifier>-1</damageModifier>
<identifier>Wood</identifier>
<materialMeltdown>WOOD</materialMeltdown>
<materialTemper>WOOD</materialTemper>
<reachModifier>0.0</reachModifier>
<speedModifier>0.02</speedModifier>
</weapon_material>
identifier: As above, a unique identifier.
damageModifier: See damage formula.
materialMeltdown: This means, when determining the outcome of a meltdown and the required perk, this is what the material behaves like. Valid values: NONE, IRON, STEEL, DWARVEN, FALMER, ORCISH, EBONY, DRAGONPLATE, DAEDRIC, ELVEN, GLASS, DRAGONSCALE, STALHRIM, WOOD, ADVANCED, SILVER, DRAUGR, GOLD, CHITIN, BONEMOLD_HEAVY
"NONE" means you can't melt it down.
materialTemper: Determines the perk you need to temper the weapon. Valid values are the same as for "materialMeltdown". "NONE" means that no perk is needed to temper the weapon.
reachModifier: How the material influences weapon reach.
speedModifier: How the material influences weapon speed.
The ReProccer didn't have functionality to let the material influence speed and reach. I generally gave heavy materials high damage growth, but lowered speed. Light materials get minimal damage growth, but they do get extra peed with each tier.
Finally, weapon_material_binding entries look like this:
<weapon_material_binding>
<identifierMaterial>Iron</identifierMaterial>
<substringWeapon>Iron</substringWeapon>
</weapon_material_binding>
As you might have guessed, they work just like weapon_type_binding entries. If a weapon's displayed name contains substringWeapon, it is linked to the material with identifier identifierMaterial.
As above, the longest match counts.
A final, important note: Everything is case-sensitive. WOOD is not wood. Keep that in mind.
TODO: TExt about weapon modifiers (work like armor modifiers and ammunition modifiers)
EXAMPLES
1|
You have a "Razor Sword" that you want to behave like a bastard sword mostly, but with a lower debuff rank and more damage in exchange.
First, copy-paste the bastard sword weapon_type entry, then edit debuff rank, damage, and give it a new identifier. The result might look like:
<weapon_type>
<identifier>Razor Sword</identifier>
<baseWeaponType>BASTARDSWORD</baseWeaponType>
<damageBase>7.0</damageBase>
<reachBase>1.0</reachBase>
<speedBase>0.85</speedBase>
<critDamageFactor>1.2</critDamageFactor>
<meltdownOutput>2</meltdownOutput>
<meltdownInput>1</meltdownInput>
<bleedTier>THREE</bleedTier>
<debuffTier>ONE</debuffTier>
<staggerTier>THREE</staggerTier>
<weaponClass>BLADE</weaponClass>
</weapon_type>
Then, create a weapon_type_binding that links the Rezor Sword to your new weapon_type. It will likely look like this:
<weapon_type_binding>
<substringWeapon>Razor Sword</substringWeapon>
<identifierType>Razor Sword</identifierType>
</weapon_type_binding>
Done.
2|
A mod adds "Ironburn" weapons. You want ironburn weapons to behave exactly like regular... steel weapons.
This is very easy. Create a weapon_material_binding that links the "Ironburn" weapon to the same material regular steel weapons use. Here's the entry:
<weapon_material_binding>
<identifierMaterial>Steel</identifierMaterial>
<substringWeapon>Ironburn</substringWeapon>
</weapon_material_binding>