YesNoOk
avatar

Auto-playing AI [SOLVED] (Read 5475 times)

Started by Lord Mike, July 30, 2010, 04:27:01 pm
Share this topic:
Auto-playing AI [SOLVED]
New #1  July 30, 2010, 04:27:01 pm
  • ***
  • 見ろ! これが執念の力だ!
    • Somalia
Hello everyone.
I had hoped not to turn to this thread anymore, but i could really use some tips right about now.
I have recently downloaded an AI patch for one of my chars, which is great and challenging, but it has a huge problem, like the title of this topic says: it begins to auto-play all the times when he is on player 2 side, or even if i select him as player 1 and wait for him to play his intro.
Is there a trigger, a var/fvar or a command, something in the *.cns files that i can edit and help me solve this auto-play problem and make him only use the AI in arcade mode/watch mode/survival?
It's not a problem for P1 side because i just skip the intro and retain the control over the char, but when i go in vs mode to test some changes i'm implying to it, i get an AI vs AI fight and it is becoming really disturbing.
Thank you for your attention.
何故諦める必要がある? 何を迷うことがある奪い取れ。今は悪魔が微笑む時代なんだ。
Last Edit: July 31, 2010, 12:29:13 pm by lordmike
Re: Auto-playing AI
#2  July 30, 2010, 04:50:22 pm
  • avatar
  • ******
  • Palette God? Champion? AntiChrist? Something.
  • I AM THE KING OF PALETTES!!
    • USA
Mugen 1.0 has instant AI activation.  That is all I know on the matter. 

2OS

Re: Auto-playing AI
#3  July 30, 2010, 05:22:57 pm
  • ****
  • 608 Wannabe
  • Ich schicke dich zur HOELLE!! STIRB DU FEIGLING!!
    • Egypt
Mugen 1.0 has instant AI activation. And also makes use of the difficulty setting in options
What a dope feature[ s ]


Anyways your problem involves either re-coding or removing the AI entirely, cos, the only time ""properly"" coded AI should trigger in Arcade / Survival / Team / VS modes [ when player 1 ] is by pressing ctrl+1 [ for player 1 ], ctrl+2 [ for player 2 ], ctrl+3 [ ok I think you get the idea ]

If you wanna attempt to fix the problem yourself, posting the varset for the AI's activation and maybe a line or 2 of AI changestates would help me guide you to fixing it
Re: Auto-playing AI
#4  July 30, 2010, 06:29:22 pm
  • ***
  • 見ろ! これが執念の力だ!
    • Somalia

Anyways your problem involves either re-coding or removing the AI entirely, cos, the only time ""properly"" coded AI should trigger in Arcade / Survival / Team / VS modes [ when player 1 ] is by pressing ctrl+1 [ for player 1 ], ctrl+2 [ for player 2 ], ctrl+3 [ ok I think you get the idea ]

If you wanna attempt to fix the problem yourself, posting the varset for the AI's activation and maybe a line or 2 of AI changestates would help me guide you to fixing it

Here it is:

;AI
;---------------------------------------------------------------------------
[Statedef -3]
;AIƒXƒCƒbƒ`
[State -3, AI]
Type = VarSet
TriggerAll=!ishelper
TriggerAll = ((Var(38) < 1) && (RoundState != 3))
TriggerAll = var(38) < 1
Trigger1 = Command = "AI_00" || Command = "AI_01" || Command = "AI_02" || Command = "AI_03" || Command = "AI_04"
Trigger2 = Command = "AI_05" || Command = "AI_06" || Command = "AI_07" || Command = "AI_08" || Command = "AI_09"
Trigger3 = Command = "AI_10" || Command = "AI_11" || Command = "AI_12" || Command = "AI_13" || Command = "AI_14"
Trigger4 = Command = "AI_15" || Command = "AI_16" || Command = "AI_17" || Command = "AI_18" || Command = "AI_19"
Trigger5 = Command = "AI_20" || Command = "AI_21" || Command = "AI_22" || Command = "AI_23" || Command = "AI_24"
Trigger6 = Command = "AI_25" || Command = "AI_26" || Command = "AI_27" || Command = "AI_28" || Command = "AI_29"
Trigger7 = Command = "AI_30" || Command = "AI_31" || Command = "AI_32" || Command = "AI_33" || Command = "AI_34"
Trigger8 = Command = "AI_35" || Command = "AI_36" || Command = "AI_37" || Command = "AI_38" || Command = "AI_39"
Trigger9 = Command = "AI_40" || Command = "AI_41" || Command = "AI_42" || Command = "AI_43" || Command = "AI_44"
Trigger9 = Command = "AI_45" || Command = "AI_46" || Command = "AI_47" || Command = "AI_48" || Command = "AI_49"
Trigger9 = Command = "AI_50"
Trigger10 = var(38) < 1
Trigger10 = NumHelper(10000+ID)
Trigger10 = Helper(10000+ID),var(38) > 0
Trigger11 = var(38) = 0
Trigger11 = RoundState = 2
IgnoreHitPause = 1
V = 38
Value = 4 ;AILv1`5‚܂Őݒè‰Â”\iŒ»Ý‚Í4‚܂Łj

[State -3];ƒfƒoƒbƒN‰ðœ
type = Varset
trigger1 = var(38) > 0 && var(25) > 0
var(25) = 0

;“–gƒXƒCƒbƒ`
[State -3, AI]
Type = VarSet
TriggerAll = Time = 1
Trigger1 = Time = 1
V = 33
Value = 1     ;‚±‚±‚Őݒè
;---------------------------------------------------------------------------
;0‚Å–³Žg—p
;1‚ÅŽ©•ªƒ‰ƒCƒt‚ª‘ŠŽèƒ‰ƒCƒt‚æ‚è’á‚¢ŽžŽg—p
;---------------------------------------------------------------------------

[State -3]
Type = VarSet
Trigger1 = Win
Trigger1 = !fvar(39)
Fv = 39
Value = 1
IgnoreHitPause = 1

;ƒ‰ƒEƒ“ƒhI—¹ŒãAAIƒXƒCƒbƒ`OFF
[State -3, AI]
Type = VarSet
TriggerAll = Var(38) = [1,4]
Trigger1 = Win = 1
Trigger2 = Lose = 1
Trigger3 = DrawGame = 1
Trigger4 = RoundState = 4
V = 38
Value = -Var(38)
IgnoreHitPause = 1

;‚Qƒ‰ƒEƒ“ƒh–ÚŠJŽnŒãAAIƒXƒCƒbƒ`ON
[State -3, AI]
Type = VarSet
Trigger1 = Var(38) = [-4,-1]
Trigger1 = RoundState = 2
V = 38
Value = -Var(38)
IgnoreHitPause = 1

;ƒgƒŠƒK[EnemyNear‚Ì”»•ʐ؂è‘Ö‚¦—p
[State -3, AI]
Type = VarSet
Trigger1 = NumEnemy = 1
Trigger2 = NumEnemy = 2
Trigger2 = EnemyNear,Life > 0
V = 53
Value = 0
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999

;ƒgƒŠƒK[EnemyNear‚Ì”»•ʐ؂è‘Ö‚¦—p
[State -3, AI]
Type = VarSet
Trigger1 = NumEnemy > 1
Trigger1 = EnemyNear,Life = 0
V = 53
Value = 1               ;simulí—p‚ÉEnemyNear‚̐؂è‘Ö‚¦‚ð‚³‚¹‚鏈—‚Å‚·
                        ;EnemyNear(Var(53))‚Æ‹Lq‚·‚邱‚ƂŎ©“®”»•Ê‚µ‚Ü‚·
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999

;s“®•ªŠò
[State -3, AI]
Type = VarRandom
TriggerAll = Var(38) = [1,9]
TriggerAll = StateNo != 120
Trigger1 = Time = 1
Trigger2 = Time %60= 1
Trigger2 = MoveType = I
Trigger3 = Time %10= 1
Trigger3 = MoveType != I
V = 54
Range = 0,99               ;AI‚ð‘g‚ñ‚¾ŒãA‚±‚̏ˆ—‚ð‚ ‚é’ö“x—‰ð‚µ‚½‚ç
                           ;ƒgƒŠƒK[“™‚ð•ύX‚µ‚Ă݂ĉº‚³‚¢A‚±‚ꂾ‚¯‚Å‚àŒ€“I‚ÉAI‚Ì“®‚«‚ª•Ï‚í‚è‚Ü‚·
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999


;ŠJ–‹s“®‘O—p
[State -2]
Type = VarSet
TriggerAll = RoundState = 0
Trigger1 = FVar(28) = 0
FV = 28
Value = 1

[State -2]
Type = VarSet
Trigger1 = FVar(28) = 1
Trigger1 = RoundState = 2
FV = 28
Value = 2

[State -2, AI]
Type = ChangeState
Value = 8700
TriggerAll = Var(38) = 4
TriggerAll = FVar(28) = 2
TriggerAll = Var(24) = [4,6]
triggerall = var(48) >= 33 || var(26) >= 2
Trigger1 = Ctrl
Trigger1 = StateNo = 0

[State -2]
Type = VarSet
TriggerAll = FVar(28) = 2 || FVar(28) = -1
TriggerAll = RoundState = 2
Trigger1 = Ctrl
Trigger2 = MoveType != I
Trigger3 = StateNo = 8700
FV = 28
Value = 0
;Trigger3ˆÈ~‚ÉAI‚É‚â‚点‚és“®‚ÌStateNo‚ð’ljÁ
;—á‚̏ꍇATrigger3 = StateNo = 105‚ð’ljÁ



That segment of code covers all of AI's VarSets. I've looked at it a couple of times before deciding to post it here, but i have no clue on what to change/add/fix.
何故諦める必要がある? 何を迷うことがある奪い取れ。今は悪魔が微笑む時代なんだ。
Last Edit: July 30, 2010, 06:33:48 pm by lordmike
Re: Auto-playing AI
#5  July 31, 2010, 12:00:24 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Quote
Trigger11 = var(38) = 0
Trigger11 = RoundState = 2
Probably that. Var(38) is initialised to 0 unless you set otherwise in state 5900. Therefore trigger11 is kicking in and instantly turning on AI.

Whoever coded this didn't test it and the character itself probably isn't worth having as a result.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

2OS

Re: Auto-playing AI
#6  July 31, 2010, 08:18:52 am
  • ****
  • 608 Wannabe
  • Ich schicke dich zur HOELLE!! STIRB DU FEIGLING!!
    • Egypt
Quote
Trigger11 = var(38) = 0
Trigger11 = RoundState = 2
Probably that. Var(38) is initialised to 0 unless you set otherwise in state 5900. Therefore trigger11 is kicking in and instantly turning on AI.

Whoever coded this didn't test it and the character itself probably isn't worth having as a result.
In addition to all that bullshit isn't even necessary for an AI, all that code JUST for it's SETTING and it DOESN'T EVEN WORK RIGHT

And no I think you mean the patch isn't worth having, not the whole char e_e
Re: Auto-playing AI
#7  July 31, 2010, 08:29:13 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Missed that, yeah, just re-extract the original, trash the patch. It probably breaks all the rules the character has like when it can cancel and how much power it actually takes to do things.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Auto-playing AI
New #8  July 31, 2010, 10:42:33 am
  • ***
  • 見ろ! これが執念の力だ!
    • Somalia
Missed that, yeah, just re-extract the original, trash the patch. It probably breaks all the rules the character has like when it can cancel and how much power it actually takes to do things.
Very well put. Indeed it reacts somehow unnatural, he has infinite priorities on almost every attack while the char at it's origin did not have (priorities were changed from "2, miss" to "8, hit").
I suppose i'll have to remove it having read the explanations above.
Those two triggers were the key. I've gotten rid of them and now it behaves as it should.
Thank you for your help&time!
何故諦める必要がある? 何を迷うことがある奪い取れ。今は悪魔が微笑む時代なんだ。
Last Edit: July 31, 2010, 12:28:50 pm by lordmike