7 Days to Die

7 Days to Die

View Stats:
D.A.R.K. Feb 1, 2021 @ 5:05am
How to Add Mods To A Weapon?
I want to add Burning Shaft Mod, Barbed Wire Mod and Metal Spike Mod to stun baton, I searched in items.xml file to see if I can find something on stun baton, I found something, but I don't know if it's the right thing. Any idea how to do it?
< >
Showing 1-2 of 2 comments
D.A.R.K. Feb 1, 2021 @ 5:46am 
In item_modifiers.xml I found the mods that I want to add to stun baton: "modMeleeClubBarbedWire", "modMeleeClubBurningShaft", and "modMeleeClubMetalSpikes", along with it a list of items that we can add those mods on, ok? Hold that intel.

In item.xml I found a lot of versions of the stun baton, if you search for "meleewpnstun" you will see there are 3 versions of the Stun Baton: "T1JunkBaton", "T2StunBaton", and "T3PLasmaBaton". Which of those are the real Stun Baton ingame?

Looking back to item_modifiers.xml it seems we choose the item the mod will go for, and the effect it will have. Those are the values that we have for the burning sharf mod for the baseball bat:

<item_property_overrides name="meleeWpnClubT1BaseballBat">
<property name="FlameEffect" value="ItemModEffects/mod_bat_flamePrefab"/>
</item_property_overrides>

Assuming the first entry is the item that this mod can go in, I can replace the baseball bat name to the stun baton name, which I'm not sure since we have 3, it would be something like this:

<item_property_overrides name="meleeWpnStunT1JunkBaton">
<item_property_overrides name="meleeWpnStunT2StunBaton">
<item_property_overrides name="meleeWpnStunT3PLasmaBaton">

Assuming the second entry is the effect that the item will have once we apply this mod on it, in this case, the flaming effect. If we choose something that doesn't match with the stun baton, the flaming effect won't be in the weapon, but in the air, out of sync, so I should use the club or baseball bat, the one that fits better (I need to check each weapon animation to see which one is better)

In the end, the entry would be something like this, assuming I'm doing right: (I'm using the baseball bat effect because I'm doing Ctrl C+ V to be easier for me to explain)

<item_property_overrides name="meleeWpnStunT1JunkBaton">
<property name="FlameEffect" value="ItemModEffects/mod_bat_flamePrefab"/>
</item_property_overrides>

<item_property_overrides name="meleeWpnStunT2StunBaton">
<property name="FlameEffect" value="ItemModEffects/mod_bat_flamePrefab"/>
</item_property_overrides>

<item_property_overrides name="meleeWpnStunT3PLasmaBaton">
<property name="FlameEffect" value="ItemModEffects/mod_bat_flamePrefab"/>
</item_property_overrides>

Any idea if this is right? I'm open for suggestions, it looks like it should work.
Last edited by D.A.R.K.; Feb 2, 2021 @ 5:33pm
D.A.R.K. Feb 2, 2021 @ 5:33pm 
up
< >
Showing 1-2 of 2 comments
Per page: 1530 50

Date Posted: Feb 1, 2021 @ 5:05am
Posts: 2