YesNoOk
avatar

Power requirements for specials (Read 3172 times)

Started by AxilusPrime, June 16, 2018, 12:22:33 pm
Share this topic:
Power requirements for specials
#1  June 16, 2018, 12:22:33 pm
  • avatar
  • *
    • USA
I got a character who pays the power cost of his specials (if he's using certain forms) but can activate them even if he doesn't have sufficient power to do so. If he does, he'll drop to 0 power or stay at 0 power, but this still means he can infinitely spam specials.

Normally power requirements to use a super would be in the Commands section....but the power requirements outlined in Commands are what they should be at. He just ignores them.

Probably something done on purpose by the character's creator, but I wanna change it for balance. Can't seem to find where the code allowing them to be done with insufficient power is though, since it's not in the usual place.

The states for these specials are 35000, 35100, 35200, 35300, 35400, 35500, 37000, 37100, 37200, 37300, 37400, and 37500.
Re: Power requirements for specials
#2  June 17, 2018, 08:32:48 am
  • avatar
  • *
    • USA
So...trying to find out how to fix this so he can't activate specials without having the energy to pay their cost.
Re: Power requirements for specials
#3  June 17, 2018, 09:03:45 am
  • *****
  • Shame on you!
    • USA
I'm going to assume when you say he, you mean the AI ignores it? Check for those state numbers more than a few times with ctrl+F in fighter factory. You may be overlooking the AI section.

Use the find in fighter factory to search for those values in the cns files. It's possible there's a changestate with the triggers for the command in the cns. It's unlikely but possible.

Also, Make sure that the trigger Power >= check is a triggerall. If it's trigger1, and you can activate trigger2's group then it's going to skip checking the power level.
vVv Wheat Stage Released vVv
Re: Power requirements for specials
#4  June 17, 2018, 12:33:33 pm
  • avatar
  • *
    • USA
Oh. When I say he, I mean the playable character. Not sure if the AI ignores it, I've never seen the AI get that far up into the transformations. I did check the AI file for those state numbers too though. Strangely some of them are absent from the AI file.

It is a triggerall in the CMD. Here's the CMD code for every move that has this problem.

Spoiler, click to toggle visibilty

For some reason, the player can still activate the moves without enough energy to pay the costs. Any idea why that might be? I checked for every instance of these states in the AI file and the UI file (which governs both UI and MUI transformations) but didn't notice anything that was obviously the reason. I'm still new to this though, so I could have missed something.
Re: Power requirements for specials
#5  June 17, 2018, 01:12:13 pm
  • *****
  • Shame on you!
    • USA
Personally I'd just reorganize them. Mugen can get finicky with crap.

Code:
; Ultra Kiai
[State -1, Ki Liberation]
type = ChangeState
value = 35000
triggerall = var(2) = 6
triggerall = power >= 1000
triggerall = command = "SPECIAL 1"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = movecontact
I don't see much else that could be the problem. What's your var(2) used for? The UI MUI stuff?
vVv Wheat Stage Released vVv
Re: Power requirements for specials
#6  June 18, 2018, 03:23:34 am
  • avatar
  • *
    • USA
Reorganize them how? The order and formatting of this stuff is the same as the other transformations, but only UI and MUI have this problem. Worth noting I didn't make this character myself, I'm just modifying it.

That's what var(2) is, yeah. var(2), going from 1 to 7, refers to Super Saiyan 1, 2, 3, God, Blue, Ultra Instinct, and Mastered Ultra Instinct in order.
Re: Power requirements for specials
#7  June 18, 2018, 05:31:34 am
  • avatar
  • *
    • USA
Never mind, got it. A friend helped me find out where the problem was.

It was in the COMMON cns.
[State 0, HitOverride]
type = changestate
trigger1 = command = "SPECIAL 1"
value = ifelse(var(2)=6,35000,37000)
ctrl = 0
This section here basically meant that if he was walking (which he is considered to be because the specials work by a d, db, b or d, df, f input on the controls) the power requirement is 0. So a trigger has to be added.
[State 0, HitOverride]
type = changestate
trigger1 = command = "SPECIAL 1"
trigger1 = power >= 500
value = ifelse(var(2)=6,35000,37000)
ctrl = 0
Doing this completely fixes the issue. This was definitely intentional on the part of the creator since it only applied to 2 of the forms.
Re: Power requirements for specials
#8  June 18, 2018, 07:14:28 am
  • *****
  • Shame on you!
    • USA
Dont forget the solve/unsolve button at the bottom left.
vVv Wheat Stage Released vVv