• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Attempting to remove block damage from bullets and guns

imeangay

New member
Hiya, sorry if this si the wrong spot, and blah blah.

I'm trying to remove block damage from guns and bullets and arrows, Mods available currently just make new bullets that do this and mess up loot, which I don't like, so I tried doing it myself.

<configs>
    
    <remove xpath="/items/item[starts-with(@name, 'ammo')]/effect_group/passive_effect[@name='BlockDamage']"/>
    <remove xpath="/items/item[starts-with(@name, 'gun')]/effect_group/passive_effect[@name='BlockDamage']"/>
    <remove xpath="/items/item[starts-with(@name, 'gun')]/effect_group/passive_effect[@name='ModPowerBonus']"/>
    
    
</configs>




While this removes the effects of block damage from all guns and bullets, the guns still deal 10 damage, This makes me reluctant to want to use guns. The damaged blocks bother me to no extent, I hate it sooo much- It pretty much makes it unplayable if I use guns because so many blocks get damaged.

 
Last edited by a moderator:
I think that without going into a DLL/Harmony mod, you can't get block damage below 1. The default block damage (if none is specified in XML) is 10, as you noticed. (Not so sure about this part actually.) You ought to just be able to set BlockDamage=0 for all ammo, and that will reduce the damage to 1. No need to change the guns. However if you want to be certain that future "base_add" effects don't muck things up, you can also change all of these to 0:

<passive_effect name="BlockDamage" operation="base_add" value="-2.1"

(They are currently all negative, which is why doing this is not strictly necessary...yet. If they change a gun to have a positive base_add, though, then it might bring the damage back above 1.)

 
Last edited by a moderator:
What is a DLL/Harmony mod? Like a Hard xml edit? 

I did set the values to 0, but the damage was still 10.

I wasn't sure how to change the base add adds.. I'm new to xpathing.

 
A DLL mod requires writing code in the C# programming language and is quite a bit more complex than XML/XPATH changes. The really big mods which add new zombies, new blocks, completely new behaviors, etc. are all using either DMT or Harmony-based DLL modifications. I have a programming background and it's...challenging...to get started with the DLL mods, but you really can make almost any change you can think of.

Let me test an XPATH change for ammo damage and I'll come back. It ought to be just a couple of lines to get you down to 1 damage anyway.

 
Were you testing using a shotgun? There are 10 "bullets" per shot so the minimum for a shotty is 10 (assuming all pellets hit the block). I think your XML edits were probably working fine. Here are the ones I tested; they're very similar. I think your line which removes effects from weapon mods also could be useful.

  <set xpath="/items/item[starts-with(@name,'ammo')]//passive_effect[@name='BlockDamage' and @operation='base_set']/@value">0</set>
  <set xpath="/items/item[starts-with(@name,'ammo')]//passive_effect[@name='BlockDamage' and @operation='base_add']/@value">0</set>
  <remove xpath="/items/item[starts-with(@name,'gun')]//passive_effect[@name='BlockDamage']" />

 
Ah I see yeah that makes sense.. haha I always use the shotgun for testing.. Unfortunate though, 1 damage is still damage I don't want.. I will feel the need to repair it if i see it's damaged which is why I wanted to be able to remove block damage all together but, thanks for your help either way, I guess ill use what I wrote prior.

 
I will feel the need to repair it if i see it's damaged which is why I wanted to be able to remove block damage all together


I hear you. I never know exactly how much horde base damage is from angry zombies vs. us pelting our own base with M60 fire. And my playing partner sure thinks its funny when I accidentally shoot the floor with my shotgun, blowing out the block and sending him into the basement.

 
Hi Imeangay

You could also check these modifiers that appear on the bullets.
Regards

      <passive_effect name="DamageModifier" operation="perc_add" value="-.8" tags="earth"/>
      <passive_effect name="DamageModifier" operation="perc_add" value="2" tags="wood"/>

 
Last edited by a moderator:
Back
Top