A working dampener code?

Started by Loves Pachirisu, September 28, 2015, 01:08:04 PM

Previous topic - Next topic

Loves Pachirisu

The dampener used for a template I used for the characters I make didnt' work (which is damage = ceil(ifelse(fvar(11)*84<7, 7, fvar(11)*84)), 25) so I decided to ignore it until I can find a working dampener.  However, no dampeners seem to work. With or without that code. Even the simple version didn't work either.

Any ideas?

And this is the simple version by the way unedited.
; Simple
    [state -3, dampener]
    type = attackmulset
    trigger1 = numtarget >= 1
    value = 0.6 ** target, gethitvar(hitcount)
Pokecommunity account (Will start learning about romhacking): http://www.pokecommunity.com/member.php?u=553303

Why are there some people here trying to go into their ways into trying to ruin my Mugen hobby here and make me look like bad?



https://www.youtube.com/watch?v=3_TMrr6eqQc

Loves Pachirisu

Pokecommunity account (Will start learning about romhacking): http://www.pokecommunity.com/member.php?u=553303

Why are there some people here trying to go into their ways into trying to ruin my Mugen hobby here and make me look like bad?



https://www.youtube.com/watch?v=3_TMrr6eqQc

Felkazz

Using hitcount won't work...
The hitcount resets every time your char changes state...
You will need to use a var that will be added every time your char hits the enemy and use that to count the amount of hits, you will also need to reset it when the enemy MoveType is not H

Loves Pachirisu

Quote from: Thunderbert on September 29, 2015, 12:50:38 AM
Using hitcount won't work...
The hitcount resets every time your char changes state...
You will need to use a var that will be added every time your char hits the enemy and use that to count the amount of hits, you will also need to reset it when the enemy MoveType is not H

I follow what you are saying but don't know where to start... Can you provide a code for this?
Pokecommunity account (Will start learning about romhacking): http://www.pokecommunity.com/member.php?u=553303

Why are there some people here trying to go into their ways into trying to ruin my Mugen hobby here and make me look like bad?



https://www.youtube.com/watch?v=3_TMrr6eqQc

Sinnesloschen

Quote from: Alpaca-San on December 27, 2014, 08:50:31 AM
Is finding MUGEN to be more enjoyable to play when you're not wearing clothes an underrated opinion?

Felkazz

Basically, on your statedef -2, you will have to put this

;This part will define how much times we have hit the enemy
[State -2, hitting the enemy]
Type = VarAdd
Trigger1 = MoveHit = 1
V = X ;<-- Change this to a variable that is not already in use.
Value = 1

;This part will reset the variable when the enemy is not being hit anymore
[State -2, I have no target]
Type = VarSet
Trigger1 = Enemy,MoveType != H
V = X ;<-- Same from the code above
Value = 0

;This part will damp the damage
[State -2, Dampaner]
Type = AttackMulSet
Trigger1 = Var(X) > 0 ;<-- Same from the code above
Value = 0.6 ** Var(X) ;<-- Same from the code above.

Loves Pachirisu

Quote from: Thunderbert on September 29, 2015, 03:27:23 AM
Basically, on your statedef -2, you will have to put this

;This part will define how much times we have hit the enemy
[State -2, hitting the enemy]
Type = VarAdd
Trigger1 = MoveHit = 1
V = X ;<-- Change this to a variable that is not already in use.
Value = 1

;This part will reset the variable when the enemy is not being hit anymore
[State -2, I have no target]
Type = VarSet
Trigger1 = Enemy,MoveType != H
V = X ;<-- Same from the code above
Value = 0

;This part will damp the damage
[State -2, Dampaner]
Type = AttackMulSet
Trigger1 = Var(X) > 0 ;<-- Same from the code above
Value = 0.6 ** Var(X) ;<-- Same from the code above.


Still doing the same damage... Perhaps it only works when I am not hitting the opponent with the same attack over and over again?
Pokecommunity account (Will start learning about romhacking): http://www.pokecommunity.com/member.php?u=553303

Why are there some people here trying to go into their ways into trying to ruin my Mugen hobby here and make me look like bad?



https://www.youtube.com/watch?v=3_TMrr6eqQc

Felkazz

#7
I tested here and It worked... The only problem is that the damage does not come back to it's normal value, and I solved that adding this to statedef -2:

[State -2, Remove Dampaner]
Type = AttackMulSet
Trigger1 = Var(X) = 0 ;<-- Same from previous code.
Value = 1


EDIT:
I also managed to test it using only the same attack to combo the oponent and it worked...

Loves Pachirisu

Quote from: Thunderbert on September 29, 2015, 04:06:44 AM
I tested here and It worked... The only problem is that the damage does not come back to it's normal value, and I solved that adding this to statedef -2:

[State -2, Remove Dampaner]
Type = AttackMulSet
Trigger1 = Var(X) = 0 ;<-- Same from previous code.
Value = 1


EDIT:
I also managed to test it using only the same attack to combo the oponent and it worked...

Unless I am crazy, the damper doesn't seem to work on the character itself. CLP with 10 combo is still 70 damage.

Try it out yourself. It doesn't work that great.
https://www.mediafire.com/?eimfn7b6r4cizdw
Pokecommunity account (Will start learning about romhacking): http://www.pokecommunity.com/member.php?u=553303

Why are there some people here trying to go into their ways into trying to ruin my Mugen hobby here and make me look like bad?



https://www.youtube.com/watch?v=3_TMrr6eqQc

Felkazz

You used var(21) and that var is already in use, I found that Var(27) is not in use, so, you could use that one.

Also, I found another AttackMulSet in your code that is preventing the dampener to work

[State -2, MAX Mode Atk Up]
type = AttackMulSet
trigger1 = var(53) > 0
value = 1.10

[State -2, MAX Mode Atk Reset]
type = AttackMulSet
trigger1 = var(53) <= 0
value = 1

This way, if my code modifies the Attack Multiplier, this code will put it back to 1 or to 1.1

And, your previous dampener is also there

    [state -3, dampener]
    type = attackmulset
    trigger1 = numtarget >= 1
    value = 0.6 ** target, gethitvar(hitcount)


So, to fix these, remove the old dampener from statedef -3 and use only this part from my code

;This part will define how much times we have hit the enemy
[State -2, hitting the enemy]
Type = VarAdd
Trigger1 = MoveHit = 1
V = 27 ;<-- Change this to a variable that is not already in use.
Value = 1

;This part will reset the variable when the enemy is not being hit anymore
[State -2, I have no target]
Type = VarSet
Trigger1 = Enemy,MoveType != H
V = 27 ;<-- Same from the code above
Value = 0

Now, modify that MAX Mode Atk this way:

[State -2, MAX Mode Atk Up]
type = AttackMulSet
trigger1 = var(53) > 0
value = 1.10 * (0.6 ** Var(27))

[State -2, MAX Mode Atk Reset]
type = AttackMulSet
trigger1 = var(53) <= 0
value = 1 * (0.6 ** Var(27))

I just mixed my code with the MAX Mode Atk, now the dampener should work... It worked here xD

Loves Pachirisu

Quote from: Thunderbert on September 29, 2015, 04:42:13 AM
You used var(21) and that var is already in use, I found that Var(27) is not in use, so, you could use that one.

Also, I found another AttackMulSet in your code that is preventing the dampener to work

[State -2, MAX Mode Atk Up]
type = AttackMulSet
trigger1 = var(53) > 0
value = 1.10

[State -2, MAX Mode Atk Reset]
type = AttackMulSet
trigger1 = var(53) <= 0
value = 1

This way, if my code modifies the Attack Multiplier, this code will put it back to 1 or to 1.1

And, your previous dampener is also there

    [state -3, dampener]
    type = attackmulset
    trigger1 = numtarget >= 1
    value = 0.6 ** target, gethitvar(hitcount)


So, to fix these, remove the old dampener from statedef -3 and use only this part from my code

;This part will define how much times we have hit the enemy
[State -2, hitting the enemy]
Type = VarAdd
Trigger1 = MoveHit = 1
V = 27 ;<-- Change this to a variable that is not already in use.
Value = 1

;This part will reset the variable when the enemy is not being hit anymore
[State -2, I have no target]
Type = VarSet
Trigger1 = Enemy,MoveType != H
V = 27 ;<-- Same from the code above
Value = 0

Now, modify that MAX Mode Atk this way:

[State -2, MAX Mode Atk Up]
type = AttackMulSet
trigger1 = var(53) > 0
value = 1.10 * (0.6 ** Var(27))

[State -2, MAX Mode Atk Reset]
type = AttackMulSet
trigger1 = var(53) <= 0
value = 1 * (0.6 ** Var(27))

I just mixed my code with the MAX Mode Atk, now the dampener should work... It worked here xD

Strange that a useless feature in this template I am using is preventing a bunch of dampeners from working. Thanks. Character feels a little more better now. Victini will be into consideration though. It would kinda ruin the reference that Victini's power is a balanced 100 if I dampen its attacks.
Pokecommunity account (Will start learning about romhacking): http://www.pokecommunity.com/member.php?u=553303

Why are there some people here trying to go into their ways into trying to ruin my Mugen hobby here and make me look like bad?



https://www.youtube.com/watch?v=3_TMrr6eqQc