News:

MFG's Character of the Month: October 2026 Voting

Main Menu

AI problem

Started by ^^, July 26, 2008, 07:04:06 AM

Previous topic - Next topic

^^

Hi, I would like to fix Mukuro by M@ppy, Shao Kahn by Mike Obrecht, Tin's Gouki and David Demianoff's Kusanagi AI Problem. When I used these characters to fight certain AI characters, these characters I used's AI takes over. Anyone knows how do I fixed the problem?

Aadmi

Quote from: Rare-Akuma on July 26, 2008, 07:04:06 AM
Hi, I would like to fix Mukuro by M@ppy, Shao Kahn by Mike Obrecht, Tin's Gouki and David Demianoff's Kusanagi AI Problem. When I used these characters to fight certain AI characters, these characters I used's AI takes over. Anyone knows how do I fixed the problem?

Although i don't know the characters specifically i can tll you this....if when you fight certain Characters AI and only those Certain characters. either they have a cheap custom state that activates the AI of the opponent intentioanlly or the Author of these characters have made it so when fighting certain characters or when meeting certain conditions the Ai takes over.

You would need to search inside the character for a variable that activates during a match. most commonly var(59)

Cheers,RajaBoy

Shamrock

Don't touch Khan's you will mess up the second round harder A.I plus he's a boss why would you want to play as him?


^^

#3
rajaboy was right, especially shaokahn, when I was fighting sander's kyo, his AI automatically switch. some of the characters doesn't have var(59) so it is quite hard....I will post some which have less Ai coding:

Mukuro: His AI always activate when any opponent attack him especially AI opponent
cmd:

;-----------------------------------
;CPU only
[Command]
name = "cpu"
command = ~D,B,F,D,F,DF,B,DF,B,B,U,F, c
time = 1

[Command]
name = "cpu2"
command = ~D,B,F,D,F,DF,B,DF,B,B,F,B, c
time = 1

[Command]
name = "cpu3"
command = ~D,B,F,D,F,DF,B,DF,B,B,F,F, c
time = 1

[Command]
name = "cpu4"
command = ~D,B,F,D,B,DF,B,DF,B,B,U,B, c
time = 1

[Command]
name = "cpu5"
command = ~D,B,F,D,F,DF,B,DF,B,B,U,B, c
time = 1

[Command]
name = "cpu6"
command = ~D,B,F,D,F,DF,B,DF,B,B,D,F, c
time = 1

[Command]
name = "cpu7"
command = ~D,F,F,D,F,DF,B,DF,B,B,D,F, c
time = 1

[Command]
name = "cpu8"
command = ~D,F,F,D,F,DF,U,DF,B,B,D,F, c
time = 1

[Command]
name = "cpu9"
command = ~D,DF,B,BU,U,UF,F,DF,D,F, c
time = 1

[Command]
name = "cpu10"
command = ~D,DF,B,DB,U,UF,F,DF,D,F, c
time = 1

;---------------------------------------------------------------------------
;CPU only
;---------------------------------------------------------------------------
;'´‰œ‹` –À‹¢Ž€ŠE‹¥Ší
[State -1]
type = ChangeState
value = 2000
triggerall = power >= 2000
triggerall = command = "cpu"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 245)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 440)

;–³Žœ"ߎh,µ
[State -1]
type = ChangeState
value = 550
triggerall = p2bodydist x < 20
triggerall = command = "cpu2"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 245)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 440)

;"Øh_Žã
[State -1]
type = ChangeState
value = 1500
triggerall = command = "cpu3"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 245)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 440)

;"Øh_‹­
[State -1]
type = ChangeState
value = 1600
triggerall = command = "cpu4"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 245)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 440)

;Ža"÷Š™êŒ Žã
[State -1]
type = ChangeState
value = 950
triggerall = (command = "cpu5") || (command = "cpu9")
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 245)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 440)

;Ža"÷Š™êŒ ‹­
[State -1]
type = ChangeState
value = 991
triggerall = command = "cpu6"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 245)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 440)

;‰ô"]ŠÌ,¦,®,è Žã
[State -1]
type = ChangeState
value = 1000
triggerall = (command = "cpu7") || (command = "cpu10")
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 245)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 440)

;‰ô"]ŠÌ,¦,®,è ‹­
[State -1]
type = ChangeState
value = 1020
triggerall = command = "cpu8"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = movecontact && (stateno = 200)
trigger3 = movecontact && (stateno = 230)
trigger4 = movecontact && (stateno = 235)
trigger5 = movecontact && (stateno = 240)
trigger6 = movecontact && (stateno = 245)
trigger7 = movecontact && (stateno = 400)
trigger8 = movecontact && (stateno = 430)
trigger9 = movecontact && (stateno = 440)


cns:

;CPUƒ,[ƒhON
[State -2, 10]
type = Varset
triggerall = var(9) != 1
trigger1 = command = "cpu"
trigger2 = command = "cpu2"
trigger3 = command = "cpu3"
trigger4 = command = "cpu4"
trigger5 = command = "cpu5"
trigger6 = command = "cpu6"
trigger7 = command = "cpu7"
trigger8 = command = "cpu8"
trigger9 = command = "cpu9"
trigger10 = command = "cpu10"
var(9) = 1


Tin's Gouki
cmd:

[Command]
name = "cpu"
command =D,D,D,D,D,D,D,D
time = 0

[Command]
name = "cpu"
command =F,F,F,F,F,F,F
time = 0

[Command]
name = "cpu"
command =U,U,U,U,U,U,U,U
time = 0

[Command]
name = "cpu"
command = B,B,B,B,B,B,B
time = 0

[State -1]
type = varset
trigger1 = var(1) = 0 && fvar(24);&& var(2)
trigger1 = command = "cpu"
var(1) = 1


03s_Gouki.cns:

[State -3]
type = varset
trigger1 = var(1) = 0 && fvar(24);&& var(2)
trigger1 = command = "cpu"
var(1) = 1


I notice in Tin's Gouki, his AI will activate in the second round when player control him.
These are all the CPu coding I found on the characters. Now I doesn't find anything wrong with David's Kusanagi, if there are still problem in Kusanagi, I will post. Shaokahn's coding is too big. If anyone wants me to post it, I will post.

shamrock: well, shaokahn is my favourite boss character in mortal kombat series and I like to use him that is why I add him in.

^^

Anyway, I have already got the fixed for Tin'sGouki. I can't find any problem with David's Kusanagi actually :P Thanks to Kong, he guide me how to do, here is the code that are having problem:

Quote from: Kong on August 02, 2008, 10:01:49 AM
;///////////////////////////////////////////////////////////////
[STate -3]
type=varSet
trigger1=roundstate!=2
var(2)=0

[State -3]
type = null;Helper
triggerall = (Stateno = [190,193]) || stateno = 5900 || (Stateno = [10190,10198]) || (Stateno = [1920,1930])
trigger1 = Var(1) = 0 && fvar(24) = 1
trigger1 = NumHelper(5999)=0
name = "gouki_AI"
id = 5999
helpertype = normal
pos = 0,-9999
postype = p1
stateno = 5999
keyctrl = 1

The code is in 03s_Gouki.cns just search for the code, copy all the above codes and overwrite it then you are done  8)