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

Building Custom Ammo - Having issues on effects

Scyclone

Refugee
Hello Everyone,

I have recently jumped into XML Mod development and have had some decent success thusfar. I decided to try and take things a step further and create 'flaming' 9 MM ammunition. I have tried several different options but none seem to work quite accurately enough.

Currently, I have the gun accepting the new type of ammo and allowing me to load the gun/reload/etc with it. It will also fire properly and deal damage like a normal bullet will. The issue is that it is purely functioning just as a regular ammo bullet as opposed to igniting the zombies on fire (similar to the flaming arrow mechanics I tried to copy into the item).

Any thoughts on what I may be doing wrong at the moment? 

-----------------

Code:
<item name="ammo9mmBulletFlaming">
	<property name="Extends" value="ammo9mmBulletBall"/>
	<property name="DisplayType" value="ammoBulletHP"/>
	<property name="EconomicValue" value="14"/>
	<property name="DescriptionKey" value="ammoHPGroupDesc"/>
	<property class="Action0">
		<property name="Class" value="Projectile"/>
		<property name="Explosion.ParticleIndex" value="0"/> <!-- no expl. -->
		<property name="FlyTime" value="0"/>
		<property name="Gravity" value="0"/>
		<property name="LifeTime" value="14"/>
	</property>
	<effect_group name="ammo9mmBulletFlaming" tiered="false"> <!-- ammoArrowFlaming -->
		<passive_effect name="EntityDamage" operation="base_set" value="32"/>
		<passive_effect name="BlockDamage" operation="base_set" value="6"/>
		<passive_effect name="DamageModifier" operation="perc_set" value=".1" tags="wood"/>
		<passive_effect name="DamageModifier" operation="perc_set" value="0" tags="earth,metal,cloth"/>
      
		<triggered_effect trigger="onProjectileImpact" action="ModifyCVar" target="other" cvar="$buffBurningFlamingArrowDuration" operation="set" value="14">
			<requirement name="ProgressionLevel" progression_name="perkFiremansAlmanacMolotov" operation="Equals" value="0"/></triggered_effect>
		<triggered_effect trigger="onProjectileImpact" action="ModifyCVar" target="other" cvar="$buffBurningFlamingArrowDuration" operation="set" value="15">
			<requirement name="ProgressionLevel" progression_name="perkFiremansAlmanacMolotov" operation="Equals" value="1"/></triggered_effect>
      
		<triggered_effect trigger="onProjectileImpact" action="AddBuff" target="other" buff="buffBurningFlamingArrow"/>

		<display_value name="dEntityDamageFire" value="60"/>
		<display_value name="dDuration" value="5"/>
	</effect_group>
</item>
 
Hello Everyone,

I have recently jumped into XML Mod development and have had some decent success thusfar. I decided to try and take things a step further and create 'flaming' 9 MM ammunition. I have tried several different options but none seem to work quite accurately enough.

Currently, I have the gun accepting the new type of ammo and allowing me to load the gun/reload/etc with it. It will also fire properly and deal damage like a normal bullet will. The issue is that it is purely functioning just as a regular ammo bullet as opposed to igniting the zombies on fire (similar to the flaming arrow mechanics I tried to copy into the item).

Any thoughts on what I may be doing wrong at the moment? 

-----------------

<item name="ammo9mmBulletFlaming">
<property name="Extends" value="ammo9mmBulletBall"/>
<property name="DisplayType" value="ammoBulletHP"/>
<property name="EconomicValue" value="14"/>
<property name="DescriptionKey" value="ammoHPGroupDesc"/>
<property class="Action0">
<property name="Class" value="Projectile"/>
<property name="Explosion.ParticleIndex" value="0"/> <!-- no expl. -->
<property name="FlyTime" value="0"/>
<property name="Gravity" value="0"/>
<property name="LifeTime" value="14"/>
</property>
<effect_group name="ammo9mmBulletFlaming" tiered="false"> <!-- ammoArrowFlaming -->
<passive_effect name="EntityDamage" operation="base_set" value="32"/>
<passive_effect name="BlockDamage" operation="base_set" value="6"/>
<passive_effect name="DamageModifier" operation="perc_set" value=".1" tags="wood"/>
<passive_effect name="DamageModifier" operation="perc_set" value="0" tags="earth,metal,cloth"/>

<triggered_effect trigger="onProjectileImpact" action="ModifyCVar" target="other" cvar="$buffBurningFlamingArrowDuration" operation="set" value="14">
<requirement name="ProgressionLevel" progression_name="perkFiremansAlmanacMolotov" operation="Equals" value="0"/></triggered_effect>
<triggered_effect trigger="onProjectileImpact" action="ModifyCVar" target="other" cvar="$buffBurningFlamingArrowDuration" operation="set" value="15">
<requirement name="ProgressionLevel" progression_name="perkFiremansAlmanacMolotov" operation="Equals" value="1"/></triggered_effect>

<triggered_effect trigger="onProjectileImpact" action="AddBuff" target="other" buff="buffBurningFlamingArrow"/>

<display_value name="dEntityDamageFire" value="60"/>
<display_value name="dDuration" value="5"/>
</effect_group>
</item>



Hi scyclone

Try adding this, it should work.

<triggered_effect trigger="onSelfAttackedOther" action="AddBuff" target="other" buff="buffBurningElement"/>

 
Last edited by a moderator:
Alrighty, Ill give that a shot. Would it make sense for me to replace the othered triggered effect pieces and enter in what you listed here?

I assume damage and such is provided within the buff.xml for Burning Element? :)

 
@Gouki - Just tried it out and it worked great, setting the zombies on fire when shot :).

Would there be any way I could modify the duration/damage of the fire debuff from the bullets by any chance?

In either case, thanks for the help :)

 
Could make a copy of buffBurningElement and edit its values. Just change its name and change it on your ammo so it points to your new buff. 

 
Back
Top