XML/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>
 <appendTypeToName>true</appendTypeToName>
 <baseDamageLightWeaponry>5</baseDamageLightWeaponry>
 <baseDamageLightWeaponry>12</baseDamageLightWeaponry>
 <baseDamageLightWeaponry>8</baseDamageLightWeaponry>
 <damageFactorHeavyWeaponry>1.0</damageFactorHeavyWeaponry>
 <damageFactorLightWeaponry>1.0</damageFactorLightWeaponry>
 <damageFactorRangedWeaponry>1.0</damageFactorRangedWeaponry>
</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

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.

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>

```