JustNoPoint Forum
May 22, 2013, 02:41:31 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Members Login Register  
Pages: [1]
  Print  
Author Topic: Damage Reduction.  (Read 1415 times)
LaQuak
ﺝﮗ Oriental Lord
Administrator
*****
Offline Offline

Posts: 903



View Profile WWW Email
« on: October 13, 2008, 01:34:02 PM »

This type of damage reduction is very different from common damage dampners found in many creations today. I ran the idea of reducing overall damage in characters that are really high in comboing to M:Ken and with that a simple peice of codework was made from my idea and his methods.

How this works is that you 1st attack will always do its normal damage as specified by the damage value in your HitDefs, but if you start chaining the damage reduction will trigger. Whats good about this is that its a one time reduce damage value instead of a damage dampening over time that will ultimately yield in your hits doing 1-3 damage a hit if you keep at it.

So this is done in your [Statedef -2] where you simply make:

Code:
[State -2, Normal Attacks Damage Reduction] <- Damage Reduction
type = AttackMulSet  <- AttackMulSet sctrl makes your damage higher or lower.
trigger1 = Var(32) = 1 <- It will be triggered by a Variable 32 and it will = 1
value = .5 <- Actual reduction. .5 means 1/2 damage. Lower the number for lower damage.

[State -2, Damage Reduction Reset] <- Damage Reduction Resets
type = VarSet <- VarSet sctrl
trigger1 = MoveType = I <- Triggered when your character is Idle, or standing and/or not doing anything, thus not attacking.
v = 32 <- Variable 32 that we set up for it to do 1/2 damage up there when it is = 1
value = 0 <- Will be = 0 making it not = 1 thus, reseting the damage reduction.

[State -2, Reset to Normal Damage] <- Returning to normal damage so your character goes back to doing its set damage values.
type = AttackMulSet  <- AttackMulSet Sctrl.
trigger1 = Var(32) = 0 <- Triggered by Varible 32 when it is = 0, as explained above.
value = 1 <- Damage values are brought back to 1 (normal/defaut damage) from .5 (1/2 damage)

Those 3 Sctrls set up the damage reduction. Now we need to make your attack states have them. Best way is to give all of your normal, specials and supers this peice of code.

Go to your normal attacks states and put this inside the state:

Code:
[State #, VarSet]
type = VarSet  <- VarSet sctrl
trigger1 = Time = 0 <- Activates as soon as youre in this state of an attack.
v = 32 <- Variable 32, our damage reduction variable.
value = 1 <- with a value = 1 which means that its turned on for Normal Attacks Damage Reduction part of the code

I do this for all my normal attacks and for my Specials and Hypers I want them to do its full damage so I simply have:

Code:
[State #, VarSet]
type = VarSet <- VarSet sctrl
trigger1 = Time = 0 <- Activates as soon as youre in this state of an attack.
v = 32 <- Variable 32, our damage reduction variable.
value = 0 <- with a value = 0 which means that Normal Attacks Damage Reduction part of the code will not do its reduced damage for special moves

And thats it. I have Variable32 because its just a # that I picked out of random it can be whatever number you want. Also by toying with the value of the first AttackMulSet will increase or decrease damage. This type of damage reduction is really good on characters that like to combo alot and if the damage values for your normals, specials and supers in your HitDefs are balanced good with the value of the first AttackMulSet then this will balance your damage input for Mugen life settings of 100% (Normal Life Settings)

Enjoy.
« Last Edit: October 13, 2008, 01:35:47 PM by LaQuak » Logged

dark-shade
I'm Awesome
*
Offline Offline

Posts: 32


Guile goes Advanced


View Profile
« Reply #1 on: October 13, 2008, 02:54:47 PM »

Hi LaQuak,
I have coded an similar Dampener on your version.

Code:
[Statedef -2]

;Damage Dampener System
[State -2, Damage Dampener normal Hits]
type = AttackMulSet
trigger1 = var(28)=1
value = ifelse(p2statetype = A,.35,ifelse(p2statetype = S,.3,ifelse(p2statetype = C,.2,.1)))
ignorehitpause = 1

This is for different Player 2 State-Types, like A = Air, S = Standing, C = Crouching. You can set up now a specific Number for each State, to decrease the damage for specific states, if you want.

Code:
[State -2, Damage Dampener Reset]
type = VarSet
triggerall = p2movetype != H
trigger1 = movetype = I
v = 28
value = 0
ignorehitpause = 1

I've included the p2movetype != H, the dampener can not be reset when you hit the Enemy.

Code:
[State -2, Damage Reset]
type = AttackMulSet
trigger1 = var(28)=0
value = 1
ignorehitpause = 1

The same Reset-Setup but I have choosed Var(28). ^^
Logged

LaQuak
ﺝﮗ Oriental Lord
Administrator
*****
Offline Offline

Posts: 903



View Profile WWW Email
« Reply #2 on: October 13, 2008, 08:01:06 PM »

IfElsing for each statetype is a good idea aswell but this part of the code confuses me.

Code:
[State -2, Damage Dampener Reset]
type = VarSet
triggerall = p2movetype != H
trigger1 = movetype = I
v = 28
value = 0
ignorehitpause = 1

Quote
triggerall = p2movetype != H
Is saying that it will reset you the opponent is not getting hit and is valid 1st.
Quote
trigger1 = movetype = I
Is saying that it will reset when you are not attacking your opponent and is valid after triggerall since a triggerall needs to be true so all your triggers after it are valid.

When opponent is not getting hit that means you are most likely idling. Both triggers work but they are doing the same thing really.
Logged

dark-shade
I'm Awesome
*
Offline Offline

Posts: 32


Guile goes Advanced


View Profile
« Reply #3 on: October 14, 2008, 02:56:48 PM »

Ok, than is the Triggerall useless...

Btw: you can include a StrengthVariable for different move setups in the Statedef of your Moves.

Like this:

Code:
[State 1000, VarSet]
type = VarSet
trigger1 = Command="cdua"
v = 5
value = 1

[State 1000, VarSet]
type = VarSet
trigger1 = Command="cdub"
v = 5
value = 2

[State 1000, VarSet]
type = VarSet
trigger1 = Command="cduc"
v = 5
value = 3

so you can make an Ifelse trigger for different dampen settings for different are Move Strength.

Or you can make on Variable for a Hyper Query (<- Hope this word is right )

Like Var(6)=1 is normal Attacks, Var(6)=2 is Special Attacks and Var(6)=3 is Hyper Combos.

Code:
;Sonic Break
[Statedef 3000]
type    = A
movetype = A
physics = N
juggle  = 1
poweradd= -1000
ctrl = 0
velset = 0,0
anim = 3000
sprpriority=2
facep2=1

[State 3000, VarSet]
type = VarSet
trigger1 = time = 0
v = 28
value = 2 <- This is my Dampen Setting

[State 3000, VarSet]
type = VarSet
trigger1 = Anim = 3000 && AnimElem = 2
v = 5
value = 5 <- This is my Strength Setting for Hypers

This makes your Dampener very customizable.

Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!