YesNoOk
avatar

How to apply scaling to an already coded AI (Read 1668 times)

Started by QuickFist, September 03, 2020, 03:17:57 am
Share this topic:
How to apply scaling to an already coded AI
#1  September 03, 2020, 03:17:57 am
  • *****
    • Venezuela
    • Blacksight22@Yahoo.Com.Ve
    • Skype - sebastian.osio
I have a lot of JoJo's chars that are just impossible to beat. So I need to apply AI scaling to them. I know about the AILevel trigger but I don't know how to handle it

Re: How to apply scaling to an already coded AI
#2  September 03, 2020, 03:57:13 am
  • ***
  • In a few minutes, bitch
    • Germany
I'm no AI expert or anything like that, but I'll try to explain.

I'm guessing there's two ways. AI it's pretty much ChangeStates triggering under specific circumstances. I'll assume you know how "Random" works (if not, search around the forum, it's quite easy to understand). Let's take Jmorphman's Orochinagi:

Code:
[State -1, Orochinagi]
type = ChangeState
value = 3000
triggerAll = AILevel && NumEnemy
triggerAll = RoundState = 2 && StateType != A && !NumProjID(131035)
triggerAll = Power >= 1000 && var(20) <= 60
triggerAll = !var(39)
triggerAll = !var(16) && (var(15) < 1 || (StateNo = [1000,4999]))
triggerall = (P2BodyDist x = [0,175]) && (P2Dist y = [-120,0]) && (EnemyNear, StateType != L) && (EnemyNear, vel y >= 0)
trigger1 = (ctrl || StateNo = 52 || (StateNo = [100,101])) && Random < (10 * (AILevel ** 2 / 64.0))
trigger2 = var(7) && MoveHit && Random < (100 * (AILevel ** 2 / 64.0))
trigger2 = EnemyNear, GetHitVar(HitTime) >= 4

These two triggers are determining the part that corresponds with AI scaling:

Code:
trigger1 = (ctrl || StateNo = 52 || (StateNo = [100,101])) && Random < (10 * (AILevel ** 2 / 64.0))
trigger2 = var(7) && MoveHit && Random < (100 * (AILevel ** 2 / 64.0))

trigger1 refers to the character doing the move from neutral.
trigger2 refers to the character doing the move in a combo.

In both triggers, Kyo has a random chance of performing Orochinagi, which is determined by:

Code:
Random < (X* (AILevel ** 2 / 64.0))

The higher "X" is, the higher the chance of Kyo performing Orochinagi.

Now, you'll find that the impossible to beat JoJo characters are probably not using any sort of Random triggers that depend on AILevel; as the author probably designed the AI to always perform the optimal movements. You can apply what I explained to JoJo's characters by identifying the AI ChangeStates on them and adding these Random < (X* (AILevel ** 2 / 64.0)) to the triggers that matter. Keep in mind you'll need to get a good grasp of how the character system works, of course.
Re: How to apply scaling to an already coded AI
#3  September 03, 2020, 11:34:53 pm
  • *****
    • Venezuela
    • Blacksight22@Yahoo.Com.Ve
    • Skype - sebastian.osio
@KarmaCharmeleon: Does it not work if I put as a separate triggerall? Does it need to be in the trigger1/2?

Re: How to apply scaling to an already coded AI
#4  September 04, 2020, 12:17:41 am
  • ***
  • In a few minutes, bitch
    • Germany
It works if you put it as a separate triggerAll, yes! But have in mind that it will reduce the chances of the character performing the move under any circumstances (it will still tone down the AI).
Re: How to apply scaling to an already coded AI
#5  September 04, 2020, 11:52:18 am
  • ****
Hi
A character is impossible to beat usually is not because there AI is great but their move is too cheap.

what you need to do is make them fight fairly.
remove the invincible time for normal and specials
make hitbox fair
stop it recover from being hit will reduce the difficultly.

usually not AI is too good.