1 DMG-Bug when chaning gun ammo in a mod

Version
v2.1 & V2.0
Platform
Windows
With the following line inside the items.xml of my mod I'm changing the PipeMachinneGun to use 9mm ammo and being a SMG like the Model it suggests (that small magazine would never fit a 7.63 x39 Round in but 9mm should fit fine ;))
XML:
    <setattribute xpath="/items/item[@name='gunMGT0PipeMachineGun']/effect_group/passive_effect[@name='MagazineSize' and @operation='base_set']" name="value">25</setattribute>
    <!-- Why only 1 DMG with 9mmAmmo ??? -->
    <setattribute xpath="/items/item[@name='gunMGT0PipeMachineGun']/property/property[@name='Magazine_items']" name="value">ammo9mmBulletBall,ammo9mmBulletHP,ammo9mmBulletAP,ammo9mmBulletFMJINC</setattribute>

    <append xpath="/items/item[@name='gunMGT0PipeMachineGun']/effect_group">
        <passive_effect name="EntityDamage" operation="perc_add" value="-.13" tags="perkMachineGunner"/>
    </append>
    <setattribute xpath="/items/item[@name='gunMGT0PipeMachineGun']/effect_group/passive_effect[@name='RoundsPerMinute' and @operation='base_set']" name="value">450</setattribute>
    <setattribute xpath="/items/item[@name='gunMGT0PipeMachineGun']/effect_group/passive_effect[@name='ReloadSpeedMultiplier']" name="value">1,1.33</setattribute>
    <setattribute xpath="/items/item[@name='gunMGT0PipeMachineGun']/effect_group/passive_effect[@name='ReloadSpeedMultiplier']" name="tier">1,6</setattribute>

Similar To that I also change the LeverAction to use .44Mag and it das have the same bug.

Even though the Game UI shows the correct calculated Entity Damage, when I shoot a Zombie, I only do 1 HP Damage to the Zombie instead of 76,5 like shown in the Game UI.

You can find the whole mod on my GitHub if you want to reproduce it.
 
Not really a bug. You have to add the correct tags to the ammo/gun if you wanna swap it like this. As an example, I swapped the lever action rifle to use .44 ammo, so I added a line to the ammos:
XML:
<passive_effect name="EntityDamage" operation="base_set" value="55" tags="perkDeadEye"/>
This line will only apply to weapons with the perkDeadEye tag. You could add the tag the ammo already has, such as perkGunslinger, to whatever weapon you want to use the ammo and that may also fix it, but that could allow other perk/book type bonuses to apply, so I just did it this way instead.
 
OK.

Let me try this I know for sure that that exact mod worked fine for the LeverAction using .44Magnum in V1. But yeah I'll try that.

WOW Thanks for that hint.
What I changed: I added the Perk of the Gun to the Ammunition I want to use in those guns.

Now I can chase my dream to build an in game GunMod to convert Caliber. I changed all weapons to a Damage buff or debuff depending on their barrel length so technically I could interchange every Caliber with every gun to make more or less damage. Just creating that Modifier is not working like I hoped.
Basically, I want an Item like the DrumMag but instead of increasing Magazine size ist changing magazine Items. I doubt this is possible, but I'll always try XD

This "Bug" can be marked as solved as the Bug was in my mod not in the game.

Again thank you really much for pointing me in the right direction
 
Last edited:
Back
Top