News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

AI sequence

Started by BC, July 12, 2008, 09:03:40 PM

Previous topic - Next topic

BC

almost finished my character now, just coding his AI, i dont wanna make him too cheap tho, but i wanna code certain things, i already am aware of how to activate the AI and code most basic triggers for it, some intermediate my question is..

take reuben kee's evilryu for example, he has like a sequence combo, he'll jump fire 2 air projectiles(slow ones) then jump into the opponent with a kick then combo and mayb into a super move, and he repeats this often...how would i code such a sequence? id like to know as this would help alot, i know how to use things like stateno = [200,450] && movehit ect....but its like the jumping part and stuff and knowing when to jump...


also...sorry if this differs slightly but its regarding AI, p.ot.s characters seem to have immaculate accuracy in their attacks and never punch or kick when p2 isnt near...so i guess i would use (enemynear, p2movetype !=A)? and stuff like that?
Accepting commissions

Cyanide

More or less. The basics of AI is that it takes a lot of trial and error to get it how you want. Jump is still state 40, that's all you need to use to achieve a jump.

My personal opinion is AI becomes fairer when all you do is trigger specials. Allowing mugen to take care of movement that's not run, and the basic attacks seems to give something much more balanced.


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.

BC

QuoteThe basics of AI is that it takes a lot of trial and error to get it how you want

I defintaly agree with that.


QuoteMy personal opinion is AI becomes fairer when all you do is trigger specials. Allowing mugen to take care of movement that's not run, and the basic attacks seems to give something much more balanced.

i agree to some extent, but the only problem is the default AI is kinda not very intelligent, i left the default AI on the basics and it kinda like punches and kicks when p2 is nowhere near p1 which leaves them vunerable to a projectile attack. But i guess i could use a p2 distance trigger for the default AI.
Accepting commissions

Cyanide

Thats where using the AI on specials come in, far away is often when you DO use specials and using those will take priority over things like punches and kicks.

Did this in rikuo, it's made him rather intelligent without making him mr pain. Which would have been what happened if i'd done a full blown AI.


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.

BC

ah ok cool, didnt know they'd take priority over basics....thats actually quite helpful and time consuming lol

cheers.
Accepting commissions

Cyanide

Well the basics are triggered off mugens code and are completely random, if you have a situation where you want to use a special, you set it up and it's much more likely to happen than the basics.


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.

BC

#6
yea i just fought against your rikuo and he won so...lol  this method definatly is a cool more "balanced" way of coding AI. Shame alot of coders dont take this method on board.

i certainly will
Accepting commissions

Aadmi

interesting method, remove the var(59)!=1  from the normal moves abd functions , program Speacials seems, Less time consuming and Fairer.

hmmm.

Cheers,RajaBoy

BC

yea aparently mugen doesnt read anything to do with the moves that have for eg  triggerall = var(59)!=1 (assuming your using the variable 59 as an AI trigger)
where as if you remove it mugen will read the triggers as default AI? i think.
Accepting commissions

hjk

Quote from: Cyanide on July 13, 2008, 12:16:03 AM
More or less. The basics of AI is that it takes a lot of trial and error to get it how you want. Jump is still state 40, that's all you need to use to achieve a jump.
That's all you need to do to trigger the jump state, but you don't know which direction it will go in. Usually you'd have to set the sysvar to trigger a certain value using specific conditions.

Quote from: blackchaos07 on July 13, 2008, 04:18:02 AM
Quote from: RajaBoy on July 13, 2008, 03:50:43 AM
interesting method, remove the var(59)!=1  from the normal moves abd functions , program Speacials seems, Less time consuming and Fairer.
hmmm.
yea aparently mugen doesnt read anything to do with the moves that have for eg  triggerall = var(59)!=1 (assuming your using the variable 59 as an AI trigger)
where as if you remove it mugen will read the triggers as default AI? i think.
Raja was being sort of sarcastic.
I hate it when you do that (Raja). The poor man is trying to create here.  :(

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.

Aadmi

#10
i was not actually being sarcastic, it's pointless, to do that here, i was merely, posting the fact, that it's an interesting idea, and i was going to try it, no Sarcasm, at all.

Cheers,RajaBoy

also that is right, Blackchaos, if you have that, on all your moves and don't have any attacks without them Your character will most likely just jump around, and Glitch, the method, Cyanide suggested, leaves it to deault, becuase as i i've found the Ai does, combos from the regualar attack,,

you can fight one of Laquak characters, and let them hit you they will continue with randomly one of the movecontacts he has embeded in his character, mugen handles combo's as well, so you could just, basically, try it that way.

hjk

Quote from: RajaBoy on July 13, 2008, 10:36:40 AM
i was not actually being sarcastic, it's pointless, to do that here, i was merely, posting the fact, that it's an interesting idea, and i was going to try it, no Sarcasm, at all.
Interesting. I thought you were kidding because removing the var(59) from a set of triggers would mean the player would have no control over the char.
Second (2nd interpretation) even if you were to remove the full set of commands, you'd be removing the AI.
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.

Aadmi

Quote from: Klavier Galvein on July 14, 2008, 02:16:59 AM
Quote from: RajaBoy on July 13, 2008, 10:36:40 AM
i was not actually being sarcastic, it's pointless, to do that here, i was merely, posting the fact, that it's an interesting idea, and i was going to try it, no Sarcasm, at all.
Interesting. I thought you were kidding because removing the var(59) from a set of triggers would mean the player would have no control over the char.
Second (2nd interpretation) even if you were to remove the full set of commands, you'd be removing the AI.

thats was the point, reomve the var from normal functions, like punch and Kick, like Cyandie suggested...so mugens default AI can controll it and only add var(59) to the speacials. ::)

yeah, i'm finished.

Cheers,RajaBoy ;)

Cheers,RajaBoy

hjk

Quote from: RajaBoy on July 14, 2008, 05:08:47 AM
thats was the point, reomve the var from normal functions, like punch and Kick, like Cyandie suggested...so mugens default AI can controll it and only add var(59) to the speacials. ::)
yeah, i'm finished.
Spoiler (click to show)
Dude I'm not trying to hold you to anything, and I know  this is something my other personality would have done, but, What did you just say?

Removing the var from a set of triggers (correct me if I'm wrong) will just make the move trigger all the time. The var is only there to make sure so and so is active during a specific period of time as opposed to all the time.
I don't recall Cyanide saying something similar to what you did, but I think what you meant to say was put the var(59) into the triggers involving "commands."

*Hold On, I'm still trying to make sense out of your post. Give me a minute.*

I got 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.

BC

;air hadouken super
[State -1, air hadouken super]
type = ChangeState
value = 7000
triggerall = command = "air hadouken super"
triggerall = power >= 1000
trigger1 = statetype = A && ctrl
trigger2 = stateno = 3200 && movecontact
trigger3 = anim = 1101 && animelemtime(5)>=0

;air hadouken super
[State -1, air hadouken super]
type = ChangeState
value = 7000
triggerall = var(7)=1 && roundstate = 2 && power >= 1000
triggerall =  ctrl && statetype = A && anim = 41 && animelemtime(3) = 5
trigger1 = statetype = A && ctrl && p2bodydist x > 120
trigger2 = stateno = 3200 && movecontact
trigger3 = anim = 1101 && animelemtime(5)>=0 && random < 100

he means like this, the first code has no var(7) = 1 (which is the ai trigger) so the default ai would read these triggers......the one underneath is custom AI because it has the AI trigger variable. and if on the first code you add var(7)!=1 mugen would not read any of those atall not even the default AI
Accepting commissions

hjk

Quote from: blackchaos07 on July 15, 2008, 01:07:26 AM
he means like this, the first code has no var(7) = 1 (which is the ai trigger) so the default ai would read these triggers......the one underneath is custom AI because it has the AI trigger variable. and if on the first code you add var(7)!=1 mugen would not read any of those atall not even the default AI
I know dude.
I just have trouble understanding my good friend above you sometimes.
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.