The Way to update Gargoyle AI coding from DOS2WIN

Started by hjk, January 27, 2007, 08:22:04 PM

Previous topic - Next topic

hjk

All credit here goes to Gargoyle (for creating the chars), Dante of Borg... Cat, SPO Flandre, and Baiken/Byakko (for clarifying the rules for me and enabling me to make this post)

OK so after a few days of PMing I finally got my answers as to if this is legitimate or not, and recieved answers saying that if these are just INSTRUCTIONS they are OK

Spoiler (click to show)
Here is what to do:

For Gargoyle's CvS Evil Ryu and Geese:

Open up the CNS file and find these lines

[State 2000, Turn]                 
type = Turn             
trigger1 = Facing != Parent, Facing

[State 2000, AI Detect]                       
type = ParentVarSet               
triggerall = RoundState = 2
trigger1 = Parent, Command = "x"           
trigger2 = Parent, Command = "y"
trigger3 = Parent, Command = "z"
trigger4 = Parent, Command = "a"
trigger5 = Parent, Command = "b"
trigger6 = Parent, Command = "c"
trigger7 = Parent, Command = "start"
trigger8 = Parent, Command = "holdfwd"
trigger9 = Parent, Command = "holdback"
trigger10 = Parent, Command = "holdup"
trigger11 = Parent, Command = "holddown"
var(7) = 1
persistent = 0

[State 2000, AI Detect]                       
type = ParentVarSet               
triggerall = Parent, Var(7)
triggerall = RoundState = 2
trigger1 = (Command = "x" && Parent, Command = "x")
trigger2 = (Command = "y" && Parent, Command = "y")
trigger3 = (Command = "z" && Parent, Command = "z")
trigger4 = (Command = "a" && Parent, Command = "a")
trigger5 = (Command = "b" && Parent, Command = "b")
trigger6 = (Command = "c" && Parent, Command = "c")
trigger7 = (Command = "start" && Parent, Command = "start")
trigger8 = (Command = "holdfwd" && Parent, Command = "holdfwd")
trigger9 = (Command = "holdback" && Parent, Command = "holdback")
trigger10 = (Command = "holdup" && Parent, Command = "holdup")
trigger11 = (Command = "holddown" && Parent, Command = "holddown")
var(7) = 0



Every Time you see the word PARENT (except in Parentvarset) replace it with the word ROOT

The trigger AI command should now look like this:

[State 2000, Turn]                 
type = Turn             
trigger1 = Facing != Root, Facing

[State 2000, AI Detect]                       
type = ParentVarSet               
triggerall = RoundState = 2
trigger1 = Root, Command = "x"           
trigger2 = Root, Command = "y"
trigger3 = Root, Command = "z"
trigger4 = Root, Command = "a"
trigger5 = Root, Command = "b"
trigger6 = Root, Command = "c"
trigger7 = Root, Command = "start"
trigger8 = Root, Command = "holdfwd"
trigger9 = Root, Command = "holdback"
trigger10 = Root, Command = "holdup"
trigger11 = Root, Command = "holddown"
var(7) = 1
persistent = 0

[State 2000, AI Detect]                       
type = ParentVarSet               
triggerall = Root, Var(7)
triggerall = RoundState = 2
trigger1 = (Command = "x" && Root, Command = "x")
trigger2 = (Command = "y" && Root, Command = "y")
trigger3 = (Command = "z" && Root, Command = "z")
trigger4 = (Command = "a" && Root, Command = "a")
trigger5 = (Command = "b" && Root, Command = "b")
trigger6 = (Command = "c" && Root, Command = "c")
trigger7 = (Command = "start" && Root, Command = "start")
trigger8 = (Command = "holdfwd" && Root, Command = "holdfwd")
trigger9 = (Command = "holdback" && Root, Command = "holdback")
trigger10 = (Command = "holdup" && Root, Command = "holdup")
trigger11 = (Command = "holddown" && Root, Command = "holddown")
var(7) = 0


That's it for CvS Geese and Evil Ryu



Bison/Vega however is slightly different, for him what you do is:

Open his CNS file and find these lines:

[State 2000, Turn]                 
type = Turn             
trigger1 = Facing != Parent, Facing

[State 2000, AI Detect]                       
type = ParentVarSet               
triggerall = RoundState = 2
triggerall = Time > 0 && Parent, MoveType = I
trigger1 = Parent, Command = "x"           
trigger2 = Parent, Command = "y"
trigger3 = Parent, Command = "z"
trigger4 = Parent, Command = "a"
trigger5 = Parent, Command = "b"
trigger6 = Parent, Command = "c"
trigger7 = Parent, Command = "start"
trigger8 = Parent, Command = "holdfwd"
trigger9 = Parent, Command = "holdback"
trigger10 = Parent, Command = "holdup"
trigger11 = Parent, Command = "holddown"
var(7) = ifelse (Command = "x" || Command = "y" || Command = "z" || Command = "a" || Command = "b" || Command = "c" || Command = "start" || Command = "holdfwd" || Command = "holdback" || Command = "holdup" || Command = "holddown",0,1)


Now just replace them with these

[State 2000, Turn]                 
type = Turn             
trigger1 = Facing != Root, Facing

[State 2000, AI Detect]                       
type = ParentVarSet               
triggerall = RoundState = 2
trigger1 = Root, Command = "x"           
trigger2 = Root, Command = "y"
trigger3 = Root, Command = "z"
trigger4 = Root, Command = "a"
trigger5 = Root, Command = "b"
trigger6 = Root, Command = "c"
trigger7 = Root, Command = "start"
trigger8 = Root, Command = "holdfwd"
trigger9 = Root, Command = "holdback"
trigger10 = Root, Command = "holdup"
trigger11 = Root, Command = "holddown"
var(7) = 1
persistent = 0

[State 2000, AI Detect]                       
type = ParentVarSet               
triggerall = Root, Var(7)
triggerall = RoundState = 2
trigger1 = (Command = "x" && Root, Command = "x")
trigger2 = (Command = "y" && Root, Command = "y")
trigger3 = (Command = "z" && Root, Command = "z")
trigger4 = (Command = "a" && Root, Command = "a")
trigger5 = (Command = "b" && Root, Command = "b")
trigger6 = (Command = "c" && Root, Command = "c")
trigger7 = (Command = "start" && Root, Command = "start")
trigger8 = (Command = "holdfwd" && Root, Command = "holdfwd")
trigger9 = (Command = "holdback" && Root, Command = "holdback")
trigger10 = (Command = "holdup" && Root, Command = "holdup")
trigger11 = (Command = "holddown" && Root, Command = "holddown")
var(7) = 0



That's it, have fun guys


ALL of what is within that spoiler is wrong.

When I activated the AI, I overlooked one major detail. I accidentily added a "triggerall = var(7)" into the second set of code for eah charcters (copying and pasting) and that's why the AI was activating.








BTW you may not be able to play as these chars so you'll have to put them in your char select twice, once without the replacements and once with.

-----------------------------------------------------------------------------------------------------

Here's pretty much how they should play (minor patches)

Gargoyle's Geese - MY FAVORITE CHAR  - patch progress 70% - more accuracy, specific timing, certain moves added in to increase combos

http://www.youtube.com/watch?v=IYKyqTZu7V8


Gagoyle's Evil Ryu - patch patch progress 65% - more accuracy, specific timing

http://www.youtube.com/watch?v=7qSDsq8kV0A


Gargoyle's Bison - patch progress 40% - more accuracy in combos, eliminated that little stand still when opponnt charge (not necessarily a good thing)

http://www.youtube.com/watch?v=eeDdJKesncw

----------------------------------------------------------------------------------------

http://www.youtube.com/watch?v=rzgMzFGvG7s

http://www.youtube.com/watch?v=N-gtNLgWujw

http://www.youtube.com/watch?v=4M6-HKmHnvk


Ahhh, I was hoping for some comments  :'(


LOL, Caddie's the man!! ;)

I'm as real as the runnin, I just happen to rap, Nigaas London, Japan, and i'm scared of dat tap.

I suggest extending my banning, cuz when I come back, it's gonna be hell. You think I was annoying before, oh man, it's on now :)
hjk vs. 99% of MFG. I will win.

RIP Poo Bear Tell my Dead Homie isson, for the year my partner.

☠Guardian Angel★☃

#1
 ;P Don't worry dude. It's just that your A.I. stuff is scary.
But keep on going with it.
Nobody says it, but a person in charge of A.I. is very needed.
Most people leave it for last stages of creation, maybe hoping someone will take charge.

Why don't you keep learning about it dude?, then you may offer to help creators here an there about it sometimes, so what happened with gargoyle's chars can be avoided here and there too.
I remeber there were some A.I tournaments a while ago. Maybe it will happen again and you can sign up among with someone.

Do you think one of Gargoyle's chars can beat Warusaki's Cvs Ryo now? I can't with my favs. :P
Edit, Wow, now I saw the video with Warusaki's Ryo, is that the last update of him? That's when he really fights.

hjk

Well really I'm going to have to let you find that out

Just read from the credits (at the top of the first post) and read from "Here is what to do" (basically replace what you find in the CNS file that matches what's in red with what's in green)
LOL, Caddie's the man!! ;)

I'm as real as the runnin, I just happen to rap, Nigaas London, Japan, and i'm scared of dat tap.

I suggest extending my banning, cuz when I come back, it's gonna be hell. You think I was annoying before, oh man, it's on now :)
hjk vs. 99% of MFG. I will win.

RIP Poo Bear Tell my Dead Homie isson, for the year my partner.

☠Guardian Angel★☃

Hmm, copyandpastecodeWTF
:book2:
Well, to be honest, I could've sworn this was harder to perform. All those activating triggers in those moves are quite easy, like command "forward", "x" "y" and alike.
So if I add the var to it's respective move, the char might somewhat get more agressive, without too much tweaking.
I know these are for Gargoyle's but, Boy, gotta try. But at it's right time.

Ifelsevarwtf

hjk

Hmm, I never thought of this being confusing

I may upload a video of this when I get a microphone but for now I'll try to explain it to you like this.

- Highlight and copy (ctrl+c) everything that you see in the first GREEN segment "[State 2000 ... var(7) = 0"  (reworded: starting from ""[State 2000 all the way through to the end which says var(7) = 0"

- Now open up the CNS ffile of Gargoyle's char and find and highlight everything matching what is in the first RED segment "[State 2000 ... var(7) = 0"  Now press ctrl + v to replace the text and now save it.

Put your updated char in WIN Mugen and run it and select them in watch mode to see the AI activate
LOL, Caddie's the man!! ;)

I'm as real as the runnin, I just happen to rap, Nigaas London, Japan, and i'm scared of dat tap.

I suggest extending my banning, cuz when I come back, it's gonna be hell. You think I was annoying before, oh man, it's on now :)
hjk vs. 99% of MFG. I will win.

RIP Poo Bear Tell my Dead Homie isson, for the year my partner.

Laxxe23

damn talk about capcom boss syndrom
as an added note I HATE BEING COLORBLIND mind maybe using a different color?
unless there was no difference and you just said red and green just to mess people up
oh god the paranoia...

ok now that is all set aside

mind explaining what each change does so i can get a better understanding as to how i can beat my friends even though im not to great with fighting games

i mean mind making a guide on how to update ai (and yes im too lazy to use search to see if others have made tutorials)

....TACOS!!!!!
Shades 2 site:Shades of Manhattan

☠Guardian Angel★☃

Quote from: hjk on January 29, 2007, 03:04:16 AM
Hmm, I never thought of this being intimidating

Lol :book2:
No , that's not it, I understand your explanation quite well. it couldn't be easier than this.
What I meant it's that I could study it for make it work similar in other chars besides Gargoyle's.
I really thought handling an Ai would be harder, but seeing this... I understood it's just a matter of adding Vasets to moves in the cns. Thanks dude.

hjk

@laxxe23 Wow, didn't think of that:

OK in essence all you are doing is this:

- Open up the CNS file of Gargoyle's geese and Evil Ryu
- Hit ctrl+f and type in: parent
- It should take you to this line: trigger1 = Facing != Parent, Facing
- Now replace where you see the word parent with: root

- Now go down and replace everywhere you see the word parent with the word root (except for in "parentvarset").

You should be starting with the line: trigger1 = Parent, Command = "x" and changing it to trigger1 = root, Command = "x"

You should end with the line trigger11 = (Command = "holddown" && Parent, Command = "holddown") and changing it to trigger11 = (Command = "holddown" && root, Command = "holddown")
LOL, Caddie's the man!! ;)

I'm as real as the runnin, I just happen to rap, Nigaas London, Japan, and i'm scared of dat tap.

I suggest extending my banning, cuz when I come back, it's gonna be hell. You think I was annoying before, oh man, it's on now :)
hjk vs. 99% of MFG. I will win.

RIP Poo Bear Tell my Dead Homie isson, for the year my partner.

hjk

@ Blue Wolfmage - I didn't mean to word it like that, I thought my language was messed up again as it usually is. I'm usually really bad at explaining things


@ laxxe23
The post above was meant for you - hope it helps

I made seperate post to make sure you both saw the ones intended for you
LOL, Caddie's the man!! ;)

I'm as real as the runnin, I just happen to rap, Nigaas London, Japan, and i'm scared of dat tap.

I suggest extending my banning, cuz when I come back, it's gonna be hell. You think I was annoying before, oh man, it's on now :)
hjk vs. 99% of MFG. I will win.

RIP Poo Bear Tell my Dead Homie isson, for the year my partner.

Laxxe23

ok thanks but also what exactly does the change to root do?
like what does it tell the ai to do exactly?
Shades 2 site:Shades of Manhattan

hjk

I figured out that WIN apparently doesn't accept a value of "parent" so to replace parent I had to use "ROOT" to make the AI activate

That's really all it does - allows WIN to read the command so that the AI activates
LOL, Caddie's the man!! ;)

I'm as real as the runnin, I just happen to rap, Nigaas London, Japan, and i'm scared of dat tap.

I suggest extending my banning, cuz when I come back, it's gonna be hell. You think I was annoying before, oh man, it's on now :)
hjk vs. 99% of MFG. I will win.

RIP Poo Bear Tell my Dead Homie isson, for the year my partner.

Laxxe23

Shades 2 site:Shades of Manhattan

hjk

#12
Oh it isn't my bad.

I'll make a post there as well.

I didn't think it should be in the Discussion section because I didn't think it was a Discussion.

Thanks CCI Kung Fu Man

This was the post that was edited - (reference: my later comments)
LOL, Caddie's the man!! ;)

I'm as real as the runnin, I just happen to rap, Nigaas London, Japan, and i'm scared of dat tap.

I suggest extending my banning, cuz when I come back, it's gonna be hell. You think I was annoying before, oh man, it's on now :)
hjk vs. 99% of MFG. I will win.

RIP Poo Bear Tell my Dead Homie isson, for the year my partner.

hjk

#13
I'm sure I'll ultimately end up moving it

I want to consult Baiken/Byakko first because he made a post here that I thought legitmized my placement

http://mugenguild.com/forumx/index.php?topic=49299.0


I can understand what you mean by saying it's not much of a tutorial. It's really meant to reveal how to update (I guess specifically gargoyle's char but it didn't seem to work on Angel Ryu which is wierd because 'reportedly' Angel Ryu uses elements from Gargoyle's Ryu.



Hey wait - A mod changed my original post two above this in reply to your comment- ROFL
CCI Kung Fu Man, please notice how much my tone changed, I am rarely 'stern of voice' - LOL

LOL, Caddie's the man!! ;)

I'm as real as the runnin, I just happen to rap, Nigaas London, Japan, and i'm scared of dat tap.

I suggest extending my banning, cuz when I come back, it's gonna be hell. You think I was annoying before, oh man, it's on now :)
hjk vs. 99% of MFG. I will win.

RIP Poo Bear Tell my Dead Homie isson, for the year my partner.

psicoso

You made a big ugly post just to tell people to change out one motherfucking word?  And by ugly, I mean, holy shit my eyes...

hjk

#15
Quote from: Drottning Morda on January 29, 2007, 09:13:14 AM
You made a big ugly post just to tell people to change out one motherfucking word?  And by ugly, I mean, holy shit my eyes...

If you're responding the post in reply to KFM's first comment, to try to bring me down a level please know that my tone is barely ever stern or absolute, and that wasn't my original post but a mod edit.


If you are actually talking about the first post, I made sure to address that in each comment I made on the topic and only created the big ugly one if someone wanted more clarification as to how to do it.
LOL, Caddie's the man!! ;)

I'm as real as the runnin, I just happen to rap, Nigaas London, Japan, and i'm scared of dat tap.

I suggest extending my banning, cuz when I come back, it's gonna be hell. You think I was annoying before, oh man, it's on now :)
hjk vs. 99% of MFG. I will win.

RIP Poo Bear Tell my Dead Homie isson, for the year my partner.

walt

My eyes hurt too, you could have used Spoilers / Quotes / MCode tags

You used the worst way possible to post such a long ass code  :ninja:

Winane

What the...?

Dude.  When the helper was spawned by the root (as is the case here), "Root," is synonymous with "Parent,".  The "fix" you've described accomplishes nothing, other than very slightly reducing the size of the code files.
Display var(7) (Gargoyle's AI variable) to the clipboard, and you'll see that it does not remain set for more than a very brief time, if at all.


Quote from: hjk on January 29, 2007, 04:10:31 AM
I figured out that WIN apparently doesn't accept a value of "parent"
This is incorrect.
Still quite busy.

(Yes, I intend to deal with that stuff eventually, but kinda can't just yet, sorry. :/ )

hjk

#18
Quote from: Winane on February 11, 2007, 08:23:25 AM
Display var(7) (Gargoyle's AI variable) to the clipboard, and you'll see that it does not remain set for more than a very brief time, if at all.

scratches head, can't undrestand?

Evey time I watch the char after the edit the cpu always activates which was not the case when it was unedited. What i did to figure this out was to use POTS Shin Gouki as a reference and to view the differences between his and Gargoyle's AI Code Activation.

Quote from: Winane on February 11, 2007, 08:23:25 AM
Quote from: hjk on January 29, 2007, 04:10:31 AM
I figured out that WIN apparently doesn't accept a value of "parent"
This is incorrect.

You are very right. What I meant to say there after i did other codes for other chars such as Warusaki3's Terry was that in terms of Gargoyle's AI Activation code in WIN it never activates when "parent" is put into thse lines but it does when "root" is replaces it. This however could still be wrong

Winane, being that you are THE WINANE, could you please correct me because if you say it then i don't fully understand what's happening here but for some reason teh edits creates a success but you would better be able to identify just why than I.
LOL, Caddie's the man!! ;)

I'm as real as the runnin, I just happen to rap, Nigaas London, Japan, and i'm scared of dat tap.

I suggest extending my banning, cuz when I come back, it's gonna be hell. You think I was annoying before, oh man, it's on now :)
hjk vs. 99% of MFG. I will win.

RIP Poo Bear Tell my Dead Homie isson, for the year my partner.

Winane

#19
Quote from: hjk on February 11, 2007, 10:13:04 AM
scratches head, can't understand?
Debug mode +

[State -2, DTC]
type = DisplayToClipboard
trigger1 = 1
ignorehitpause = 1
text = "AI: %d"
params = var(7)

:P


Quote from: hjk on February 11, 2007, 10:13:04 AM
This however could still be wrong
It is.  Here's the actual basic explanation for why Gargoyle's code stopped working:
In DOS Mugen, KeyCtrl helpers never detect CPU commands, but this is no longer the case in *inMugen.  In post-DOS Mugens, I'd very roughly estimate that KeyCtrl helpers detect maybe about 10% or less of CPU-issued non-hold commands, and about 99% of CPU-issued hold commands.  So Gargoyle's AI activation code mistakes those CPU-issued commands for human-issued commands, and disables the AI accordingly.


My guess is that you made some other code modification in addition to what you've described above, and it's that other forgotten or overlooked modification that's actually responsible for the results you've observed.  That might also help account for this:
Quote from: hjk on January 27, 2007, 08:22:04 PM
BTW you may not be able to play as these chars so you'll have to put them in your char select twice, once without the replacements and once with.
Still quite busy.

(Yes, I intend to deal with that stuff eventually, but kinda can't just yet, sorry. :/ )