YesNoOk
avatar

How do I change the damage on a move if inputed differently (Read 21494 times)

Started by Kenten1993, September 08, 2022, 06:23:49 am
Share this topic:
How do I change the damage on a move if inputed differently
#1  September 08, 2022, 06:23:49 am
  • *
    • USA
    • Gabryeldevelasco@yahoo.com
Hello there, I am trying to edit the damage of my Ryu's Hadoken move if it were inputted differently. Basically what I would like to achieve is being able to input the quarter circle command of the Hadoken but use Medium or Hard Punch for more of a hard hitting Hadoken. I am using Mugen 1.0 with the Evil Ryu made by vyn. And this is his Hadoken state section. If anybody could help me that would be awesome!  Thank you.


;--------------------------------------------------------------------
;hadoken
[StateDef 1000]
type = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 1000
poweradd=45

[State 900]
type = VarSet
trigger1 = time = 0
v = 10
value = ifelse(command = "QCF_z",2,ifelse(command = "QCF_y",1,0))

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1000,0
channel = -1

[State 1000, Dust]
type = Explod
trigger1 = animelem = 5
anim = 10000
ID = 10000
pos = 10,2
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = -.5,0
accel = 0,0
random = 0,0
removetime = -2
supermove = 9999
pausemove = 9999
scale = .5,.8
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 1
persistent =0

[State 0, Helper]
type = Helper
trigger1 = animelem = 5
helpertype = normal ;player
name = "hadouken"
ID = 1000
stateno = 10090
pos = 75,-68
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
sprpriority = 5
supermove = 9999
pausemove = 9999
size.xscale = 1.1
size.yscale = 1.1

[State 1000, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;--------------------------------------------------------------------
;air hadoken
[StateDef 1005]
type = A
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 1005
poweradd = 50

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1000,0
channel = -1

[State 900]
type = VarSet
trigger1 = time = 0
v = 10
value = ifelse(command = "QCF_z",2,ifelse(command = "QCF_y",1,0))

[State 900]
type = VarSet
trigger1 = time = 0
trigger1 = var(59)>=1
v = 10
value = 2

[State 0, Helper]
type = Helper
trigger1 = animelem = 4
helpertype = normal ;player
name = "hadouken"
ID = 1000
stateno = 10090
pos = 78,-79
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
sprpriority = 5
supermove
pausemove
size.xscale = 1.1
size.yscale = 1.1

[State 0, Gravity]
type = Gravity
trigger1 = time >= 25
;ignorehitpause =
;persistent =

[State 1200, 22]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
;-------------------------------------------------------------
;gou air hadouken
[StateDef 1060]
type = A
movetype= A
physics = A
juggle  = 0
;velset = 0,0
ctrl = 0
anim = 1060
poweradd = 50

[State 0, Width]
type = Width
trigger1 = time = 1
player = 15,0

[State 0, VelAdd]
type = VelAdd
trigger1 =  time = 0
y = -1.5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = S3,2
channel = -1

[State 900]
type = VarSet
trigger1 = time = 0
v = 10
value = ifelse(command = "QCB_z",2,ifelse(command = "QCB_y",1,0))

[State 0, HitDef]
type = HitDef
Trigger1 = !time
sparkno = -1
guard.sparkno = -1
sparkxy = -10,0
attr = S, NA
damage = 80,5
animtype = hard
getpower = 80
guardflag = MA
hitflag = MAF
pausetime = 4,4
ground.type = high
ground.slidetime = 24
ground.hittime = 24
ground.velocity = -6
air.velocity = -3.3, -4
guard.ctrltime = 40
airguard.velocity = -3, -1.5
fall.recover = 0
sparkno = 9999
guard.sparkno = 41
hitsound = -1;s1,9
guardsound = -1;s2,1
fall.recover = 0
envshake.time = 16
envshake.freq = 60
envshake.ampl = 4
fall = 1

[State 0, Helper]
type = Helper
trigger1 = animelem = 6
helpertype = normal ;player
name = "gou hadouken"
ID = 1061
stateno = 1061
pos = 38,-65
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
sprpriority = 5
supermove
pausemove

[State 1200, 22]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
Re: How do I change the damage on a move if inputed differently
#2  September 09, 2022, 08:12:42 am
  • **
Strength of Hadouken's already stored in var 10 so you'd only need to condition the damage in the helpers hitdef with that variable.
Re: How do I change the damage on a move if inputed differently
#3  September 15, 2022, 02:41:07 am
  • *
    • USA
    • Gabryeldevelasco@yahoo.com
Hey there Steel, so I have been trying to figure out what you mean by "Already stored in Var 10" But I stumbled upon something that I have never seen before, and wanted to raise the question of, Can a command not have a hitdef? Because if I am not mistaken, this Hadoken should have a hit def, but it doesn't.
Re: How do I change the damage on a move if inputed differently
#4  September 15, 2022, 09:45:08 am
  • **
Hey there Steel, so I have been trying to figure out what you mean by "Already stored in Var 10" But I stumbled upon something that I have never seen before, and wanted to raise the question of, Can a command not have a hitdef? Because if I am not mistaken, this Hadoken should have a hit def, but it doesn't.

All the Hitdefs are defined in the helper's states, not the players .  This is very common for projectiles.
So for e.g, in [statedef 1000], The actual Hadouken  is called on in this code:

[State 0, Helper]
type = Helper
trigger1 = animelem = 5
helpertype = normal ;player
name = "hadouken"
ID = 1000
stateno = 10090
pos = 75,-68
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
sprpriority = 5
supermove = 9999
pausemove = 9999
size.xscale = 1.1
size.yscale = 1.1 

The hitdef is set in stateno = 10090, which is the state that defines the behaviour of the Hadouken.

There's a few ways to do what you want but the most direct would just be to replace the damage value in the Hitdef of [statedef 10090].  You'd need a conditional branch statement using either the 'ifelse' or 'cond' triggers with var(10) as the condition.
Re: How do I change the damage on a move if inputed differently
#5  September 29, 2022, 06:14:17 am
  • *
    • USA
    • Gabryeldevelasco@yahoo.com
Hey there, thanks Steel for the reply and sorry for coming back to this post sooo soo late. In any case, I am not to sure what you mean, but I can always try and find my research on it. What would conditional branch statement with the ifelse look like if you don't mind me asking?