• Mods are now organized as resources. Use the Mods link above to browse for or submit a mod, tool, or prefab.

    The TFP Official Modding Forum Policy establishes the rules and guidelines for mod creators and mod users.

Bleeding Particles

TSBX

Forum Vigilante
Lots of particles that look good take time to develop and consider knives an experiment at this point. We might change them completely so doing special particles would be a waste of time right now. Once knives feel right we'll task some improvements on them such as particles, sounds, etc.
I just tossed the basic hit particle on the bleed effect and it looks okay for a placeholder. At least just to let players know, "Hey, that guy is bleeding you can probably focus on the other one." Bonus is that it works on the player too. Nothing says, "Use a bandage" Like seeing your blood squirt out in 4 different directions.

https://giant.gfycat.com/EachUnfinishedFireant.webm

Code:
<configs>
<append xpath="/buffs/buff[@name='buffInjuryBleeding']/effect_group">
		<triggered_effect trigger="onSelfBuffUpdate" action="AttachParticleEffectToEntity" particle="p_impact_metal_on_organic" local_offset="0,.25,0" parent_transform="Hips"/>
</append>
<insertBefore  xpath="/buffs/buff[@name='buffInjuryBleeding']/effect_group">
<update_rate value=".05"/>
</insertBefore >
</configs>
 
Last edited by a moderator:
https://7daystodie.com/forums/showthread.php?136323

I just tossed the basic hit particle on the bleed effect and it looks okay for a placeholder. At least just to let players know, "Hey, that guy is bleeding you can probably focus on the other one." Bonus is that it works on the player too. Nothing says, "Use a bandage" Like seeing your blood squirt out in 4 different directions.
https://giant.gfycat.com/EachUnfinishedFireant.webm

Code:
<configs>
<append xpath="/buffs/buff[@name='buffInjuryBleeding']/effect_group">
		<triggered_effect trigger="onSelfBuffUpdate" action="AttachParticleEffectToEntity" particle="p_impact_metal_on_organic" local_offset="0,.25,0" parent_transform="Hips"/>
</append>
<insertBefore  xpath="/buffs/buff[@name='buffInjuryBleeding']/effect_group">
<update_rate value=".05"/>
</insertBefore >
</configs>
That isn't bad, but AFAIK its 100% chance now? But yeah cool that isn't bad for now maybe Gazz can try it as a placeholder until art can do something cooler.

 
Can not recommend this unless you want the total bleed duration to be <1 sec instead of the regular 20s or bleeding to do 20x more damage or... something like that. Not even trying to debug that. =P

As a hack to demonstrate the feature it works...

 
Last edited by a moderator:
Can not recommend this unless you want the total bleed duration to be <1 sec instead of the regular 20s or bleeding to do 20x more damage or... something like that. Not even trying to debug that. =P
As a hack to demonstrate the feature it works...
It's just a particle added to the buff...What is there to debug?

- - - Updated - - -

Nah... small safes are the perfect size for stacks of cash and dukes, gold, silver, diamonds. Ammo is ok, but kinda common these days for a safe unless it's special ammo. C'mon... I know it's not exactly fun work, but a separate loot group for small safes is in order here.
I always thought that jewelry would be a good addition to safes, small ones in particular.

 
Can not recommend this unless you want the total bleed duration to be <1 sec instead of the regular 20s or bleeding to do 20x more damage or... something like that. Not even trying to debug that. =P
As a hack to demonstrate the feature it works...
Why would a visual cue necessitate 20x more damage? Or are you talking about TSBX's implementation doing this as a side effect?

 
To be fair I DID change the update rate to show the particle effect constantly instead of once every few seconds, but even so it plays just fine in game.

 
Because his implementation changes the frequency that the ENTIRE buff runs on. I don't know what will happen but it's not something you do casually...

 
Because his implementation changes the frequency that the ENTIRE buff runs on. I don't know what will happen but it's not something you do casually...
That's fair, I'm sure you guys can do far better than I can, was just providing a visual example and somebody asked about it so I obliged.

EDIT: Well In lieu of making an additional post to further irk Gazz I'm just going to say that Bleeding *SHOULD* have a visual effect regardless of how hacky my implementation within the confines of the current xml is.

 
Last edited by a moderator:
Like I said, it serves that purpose. Please move this to a modding topic if you want to tinker with that.

 
I see it more like this.

Code:
<buff name="buffInjuryBleeding" name_key="buffInjuryBleedingName" description_key="buffInjuryBleedingDesc" tooltip_key="buffInjuryBleedingTooltip" icon="ui_game_symbol_critical" icon_color="255,0,0" icon_blink="true">
...
	</effect_group>

	<effect_group>
		<triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffInjuryBleedingParticle"/>
	</effect_group>
</buff>

<buff name="buffInjuryBleedingParticle" name_key="buffInjuryBleedingParticleName" hidden="true">
	<duration value="0"/>
	<effect_group>
		<triggered_effect trigger="onSelfBuffStart" action="AttachParticleEffectToEntity" particle="p_impact_metal_on_organic" local_offset="0,.25,0" parent_transform="Hips"/>

		<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".buffInjuryBleedingParticleTimer" operation="set" value="0"/>
		<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffInjuryBleedingParticleTimer" operation="add" value="1"/>

		<triggered_effect trigger="onSelfBuffUpdate" action="AttachParticleEffectToEntity" particle="p_impact_metal_on_organic" local_offset="0,.25,0" parent_transform="Hips">
			<requirement name="CVarCompare" cvar=".buffInjuryBleedingParticleTimer" operation="GTE" value="4"/>
		</triggered_effect>
		<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar=".buffInjuryBleedingParticleTimer" operation="set" value="0">
			<requirement name="CVarCompare" cvar=".buffInjuryBleedingParticleTimer" operation="GTE" value="4"/>
		</triggered_effect>

		<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffInjuryBleedingParticle">
			<requirement name="NotHasBuff" buff="buffInjuryBleeding"/>
		</triggered_effect>

		<triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar=".buffInjuryBleedingParticleTimer" operation="set" value="0"/>
		<triggered_effect trigger="onSelfBuffRemove" action="RemoveParticleEffectFromEntity" particle="p_impact_metal_on_organic"/>
	</effect_group>
</buff>
Still hacky AF but it should not break anything. =P

 
Thanks, Gazz! Don't think mine broke anything but I'm by no means an XML Xpert like you are. :)

 
Most likely a small stab with a knife would have done 400 damage. Technically working, but...

 
I'll test it later but that didn't seem to be the case, had plenty of Z's live past a bleed.

 
My other motive was to make it easy to disable/remove. Even my version is definitely a hack. ;)

 
I'm a modder. It's how I got here.

Now I have to also look at the bigger picture and maintenance... and this one is something I will rip out later so it needs to be as stand-alone as possible. =)

 
But a visual cue for bleeding *IS* going to be baseline going forward, however it's implemented, yeah? I know you can do it right.

 
Back
Top