Damage Dampener help

Started by MGMURROW, September 13, 2025, 03:37:37 AM

Previous topic - Next topic

MGMURROW

Wanting to use a dampener system based on the total damage of a combo IE once a combo reaches a certain total the dampener kicks in.
Using two variables to track the total damage seems the most logical way but does this also include the damage given by helpers? 
i cannot figure out how to set the variable, any help would be appreciated

MGMURROW

XGargoyle

Generally speaking, you would use parentvaradd on the helper to increase the dampener. For the actual hitdef damage, use something like parent,var() but it all depends on how you have coded the actual dampener


XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!

MGMURROW

#2
From POTS and the code library

[State -2, Damage]
2. type = varset
3. triggerl = p2movetype != H
4. var (1) = p2life
5. ignorehitpause = 1

Figured this is a starting point but it looks like this only tracks where P2 life is before the damage starts. I'm needing help from this point
As for the helpers damage, I figure once I have the first part of this figured out the helpers damage won't be as complicated to implement.

Thanks CGargoyle for the response

MGMURROW

XGargoyle

That's just one part of the code. You still need a code that keeps track of the current hitcount and a way to add this damage modifiers to either the individual hitdefs or globally through Attackmulset


XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!

MGMURROW

So thinking about it variable 1 is p2 life before the combo, then would I need another variable to store the combo damage?
Like this

[State -2, Damage]
type = varset
trigger1= p2movetype != H
var (1) = p2life
ignorehitpause = 1

[State -2, Combo Damage]
type = varset
trigger1 = 1
var (2) = var(1)-p2life
ignorehitpause = 1

Just throwing this out there, not for sure if it correct

Thanks for any help

MGMURROW

XGargoyle

Why do you complicate yourself with such damage calculations when you can simply use GetHitVar(damage)


XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!

PlasmoidThunder

It only holds its value for 1f and doesn't factor in LifeAdd. It also plays up if multiple things hit on the same frame. Checking life difference between frames is the only real way to do it.

Quote from: Iced on July 24, 2013, 01:25:14 AM
Oh, I want a diagram. I fucking love diagrams.

Odb718

my immediate thought was that you'd probably want 3 variables to make sure everything is setting up correctly.
1 is life before the combo
2 is if the combo is on/off
3 is the total damage outside of mugen/ikemen's math. You'd use this to double check values. It might not be completely necessary but hiccups might occur. You could also do a division or comparison and get a solid, level =, number.


This is the combo damage dampener I use.
Spoiler (click to show)
;-----------------------------------------------------------------------------
;Soldats' Combo Counter

[State -2, Combo VarAdd]
type = VarAdd
trigger1 = (hitpausetime = 1) && (P2Movetype = H) && (MoveHit)
trigger2 = ProjHitTime(0) = 1
v = 20
value = 1
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = P2Movetype != H
v = 20
value = 0

;-----------------------------------------------------------------------------
;Combo tira menos sangue

[State -2, AttackMulSet 1]
type = AttackMulSet
triggerall = stateno > 3000
trigger2 = hitdefattr = SCA, HA, HP
trigger1 = Var(20) >= 0
value = 1

[State -2, AttackMulSet 1]
type = AttackMulSet
triggerall = stateno < 3000
trigger1 = Var(20) <= 0
value = 1

[State -2, AttackMulSet 2]
type = AttackMulSet
triggerall = stateno < 3000
trigger1 = Var(20) = [1,4] 
value = 0.5

[State -2, AttackMulSet 3]
type = AttackMulSet
triggerall = stateno < 3000
trigger1 = Var(20) = [5,8] 
value = 0.3

[State -2, AttackMulSet 4]
type = AttackMulSet
triggerall = stateno < 3000
trigger1 = Var(20) > 8
value = 0.2

;---------------------------------------------------------------------------------
You can see it uses Var 20 for the combo hit total. I also only use it for basics and specials. Ultras are full blast.
You'd want to set your var(1) watching for var 20

[State -2, VarSet]
type = VarSet
trigger1 = var(20) = 0
trigger1 = var(1) != p2life
v = 1
value = p2life
ignorehitpause = 1
You could set up var 20 my way, or make it keep track of the combo without adding total hits. But it's basically your on/off var.

[State -2, VarSet]
type = VarSet
trigger1 = var(20) != 0
trigger1 = var(1) != p2life
v = 3
value = var(1) - p2life
ignorehitpause = 1

then your attackmulset you'd look at var(3) instead of 20
so instead of
trigger1 = Var(20) = [5,8] 
you'd have something like
trigger1 = Var(3) = [50,80] 

you'd want to reset var 3 the same way var 20 is reset*
vVv Gouken718 vVv SabreTooth718 vVv