YesNoOk
avatar

AI lol *shakes head*  (Read 1281 times)

Started by LaQuak, May 17, 2008, 03:23:17 am
Share this topic:
AI lol *shakes head*
#1  May 17, 2008, 03:23:17 am
  • ****
    • www.justnopoint.com/Masters/
Whats up guys hows it going. Yo ok I just had to try this. I set this up so dont laugh at me.

In -2 I did this lol.

[mcode][State -2, AI]
type = VarSet
trigger1 = 1
v = 59
value = 1[/mcode]

And in my CMD I did this lol.

[mcode][State -1, AI Combo]
type = ChangeState
value = 230
triggerall = var(59) = 1
triggerall = command "a"
triggerall = statetype != a
triggerall = !Win
triggerall = statetype = s
trigger1 = ctrl
trigger2 = stateno = 200 || stateno = 210 || stateno = 240 || stateno = 220
|| stateno = 250 || stateno = 215 || stateno = 8002 && movehit && random = 100[/mcode]

Thats has to be the most simplest combo my character can do..why cant the AI not do it. What is the significance with this backwardly coded system.

I get the same result with this as I would if I set up all those CPU only commands. Can some point me in the right direction please?
Re: AI lol *shakes head*
#2  May 17, 2008, 03:27:39 am
  • ****
  • Humanity can be so much more
    • Jamaica
    • Skype - gouken1987
    • www.mugenguild.com/mastergouken/
Remove command a...wait shouldn't that be = a? Anyway, if the first portion you posted was for activation, it's severely flawed since it will activate even if you attempt to use the character yourself. There's a tutorial on activation somewhere, you'll have to search for it though (too lazy to look).
Re: AI lol *shakes head*
#3  May 17, 2008, 03:29:58 am
  • ****
    • www.justnopoint.com/Masters/
Thats the thing man lol. It doesnt effect my character. I can still move and do everything with him like I normaly can, seriously lol. That varset has no effect on p1. I dont understand why its not working. Who coded this LOL.

Yeah I just tried those inmoppisble commands and that yeilded in doing nothing. I have an understanding where to begin its just I dont udnerstand why it doesn't do what I tell it to and I know im not stupid. I was thinking making a invisible helper in the background but that will probably slow Mugen down and Winanes is a invisible helper and I tried his and it dont work. Hell I don't even know if I am activating it. I test through FF and I press Cntrl + 2 and my mirror self p2 does what ever he wants. Hah.
Last Edit: May 17, 2008, 04:05:06 am by LaQuak
Re: AI lol *shakes head*
#4  May 17, 2008, 04:30:32 am
  • ******
  • [E]
    • Mexico

  • Online
You are doing it very wrong. That is what happens when you skip steps.
Re: AI lol *shakes head*
#5  May 17, 2008, 12:33:12 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
I could swear i told you not to do this...

AI works by setting an aside variable that only the PC will have access to, under the control of a human ai should never be activated.

Quote
[State -2, AI]
type = VarSet
trigger1 = 1
v = 59
value = 1
That, will always activate, ok for testing, good for nothing else.

This
[mcode][State -1, AI Combo]
type = ChangeState
value = 230
triggerall = var(59) = 1
triggerall = command "a"
triggerall = statetype != a
triggerall = !Win
triggerall = statetype = s
trigger1 = ctrl
trigger2 = stateno = 200 || stateno = 210 || stateno = 240 || stateno = 220
|| stateno = 250 || stateno = 215 || stateno = 8002 && movehit && random = 100[/mcode]
Is just a mess, and you should delete it RIGHT NOW and start again. So you know, random = 100 is a 1% chance to do anything. In this situation, that's not a lot. Your whole changestate is badly formatted. Go look at an existing 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.
Re: AI lol *shakes head*
#6  May 17, 2008, 06:55:08 pm
  • ****
    • www.justnopoint.com/Masters/
Yes I know you told me not to do that I know but I just had to test it like that anyway. I tried Winanes again and I got my character to parry like Gouken. But atleast I got that to work. Im taking baby steps I promise. Thanks for telling me how much % is random I know its from 1 to 999 because I read it in the docs. I just could not find out the % of it.

But say hypotheticaly that was right and that %1 did trigger. Would he have comboed or no?

-

So I am reading winanes 3 variable method and In that read me it said to make top of .cmd exactely how his is correct? That would mean I have to get rid of alot of what I have. I have button remaping and default values and his read me doesn't. I also have this.

Quote
;-| Hold Dir |--------------------------------------------------------------
[Command]
name = "holdfwd"
command = /$F
time = 1

[Command]
name = "holddownfwd"
command = /$DF
time = 1

[Command]
name = "holddown"
command = /$D
time = 1

[Command]
name = "holddownback"
command = /$DB
time = 1

[Command]
name = "holdback"
command = /$B
time = 1

[Command]
name = "holdupback"
command = /$UB
time = 1

[Command]
name = "holdup"
command = /$U
time = 1

[Command]
name = "holdupfwd"
command = /$UF
time = 1

where winanes read me has only these.

Quote
;-| Hold Dir |--------------------------------------------------------------
[Command]
name = "holdfwd";Required (do not remove)
command = /$F
time = 1

[Command]
name = "holdback";Required (do not remove)
command = /$B
time = 1

[Command]
name = "holdup" ;Required (do not remove)
command = /$U
time = 1

[Command]
name = "holddown";Required (do not remove)
command = /$D
time = 1

Something tells me not to change mine but I guess I have to follow his way yes?
Now I dont understand is the variable used in this method 58 or 59?
Last Edit: May 17, 2008, 08:19:42 pm by LaQuak
Re: AI lol *shakes head*
#7  May 17, 2008, 08:41:48 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
i not extremely completely sure LaQuak but i don,t think you need the /$DF, /$DB.. etc.....
because with the single direction pressing commands they go diagonal without the diagonal commands,  i experimaented myself sometime ago..


you can try..an example the default jumping forward doesn,t use these commands, although that is a diagaonal jump..check it out.. you'll see.


also the AI variable would be whatever you want aslong as you set it right ofcourse evryone or almost everyone uses, var(59) .

just trying to help..

also i've been meaning to ask you how do you make the movies for mugen like you did for your Yun?. just Curious. i'm think i'm almost ready to let out my Dhalsim i've been working on
Re: AI lol *shakes head*
#8  May 17, 2008, 09:38:43 pm
  • ****
    • www.justnopoint.com/Masters/
i not extremely completely sure LaQuak but i don,t think you need the /$DF, /$DB.. etc.....
because with the single direction pressing commands they go diagonal without the diagonal commands,  i experimaented myself sometime ago..


you can try..an example the default jumping forward doesn,t use these commands, although that is a diagaonal jump..check it out.. you'll see.


also the AI variable would be whatever you want aslong as you set it right ofcourse evryone or almost everyone uses, var(59) .

just trying to help..

also i've been meaning to ask you how do you make the movies for mugen like you did for your Yun?. just Curious. i'm think i'm almost ready to let out my Dhalsim i've been working on

I am using Winanes and I did everything how his notepad states but the explanation in there is not that clear to me because of politicaly correct/incorrect reasons haha. He has nothing in there about var59 although I can change it in the code but I can try using var 58. I going to try now but I feel a 99.99% failure.

I use Camtasia to record. I leave mugen in window mode on 480x640 and I use default settings when I produce thats why my video are crisp I think. 9 minute video can be 200 mb and I think thats pretty good as I hate compressing and all that stuff.

http://www.mininova.org/tor/1325832

That should be the program with the serial keys. You need BitTorrent to download.

Blast this. I wish I had better stuff to do lol.

Can somebody tell me what generates a Random trigger to work. Like say a ranom = 500 but what triggers it. It must be tied to something. The only thing I can do right now is make his parry spam and if p2 is close he throws or grabs that I dont mind. But when it comes to things like Genei Jin and comboing he just does not do it. Maybe it can get fun later on but right now its horrible lol. Its to a point where its not even fair anymore.
Last Edit: May 17, 2008, 11:01:15 pm by LaQuak
Re: AI lol *shakes head*
#9  May 18, 2008, 12:56:19 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
random = 100 is a specific in the same way time = 10 is a specific. The trigger will happen at that point and not at any other.

random < 100 is a 10% chance, and in fact almost guaranteed to happen once per second.

I have no idea why you're using Winanes method of activation right now when you don't really get AI as it is.


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: AI lol *shakes head*
#10  May 18, 2008, 02:04:01 am
  • ****
    • www.justnopoint.com/Masters/
random = 100 is a specific in the same way time = 10 is a specific. The trigger will happen at that point and not at any other.

random < 100 is a 10% chance, and in fact almost guaranteed to happen once per second.

I have no idea why you're using Winanes method of activation right now when you don't really get AI as it is.

Winanes method worked. I was able to have my character parry at given points and I was able to trigger supers moves and throws and attack. I don't know how to combo them. I understand AI. AI is nothing more then p2bodydists, randoms and p2statetypesets and movetypes ect. All i want is to know how I can set up combos for some reason I can't get it to work. To be honest I don't know what happens when AI activates and I don't know whats supposed to happen. Everytime it feel like its just default Mugen AI.
Re: AI lol *shakes head*
#11  May 18, 2008, 02:43:12 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
I see.

Combo's are done 100% the same as they're done when you set them up. Just without the command

pseudocode

changestate
trigger1 = ctrl
value = 200

changestate
trigger1 = state = 200 && movecontact
value = 210

changestate
trigger1 = state 210 && hits
value = 220

etc. Your previous trigger is too messy and infrequent for the small range it had to work with.

random = 500 would be a 1% chance as well. 1% every tick. But you don't have the full 60 ticks to achieve an effective 60% chance in your trigger.


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: AI lol *shakes head*
#12  May 18, 2008, 06:50:14 pm
  • ****
    • www.justnopoint.com/Masters/
Trying man. Trying. vyn started me off I was able to do 15 hit combo but that random trigger is still a mystery to me. I dunno where it gets the random # crunch from lol. 0 to 999 it says in docs *shrugs* Why cant it be random 1% to 100% so I just type random = 34% HAHAHAHA. Wont that be much much easier lol. Gota get his ass to jump combos now.

See the thing is man my character is not automatic. Hes manual use. I have 25 single button presses. I have to define each hit of each combo hence I have to have atlest 25 change states then you know my runs. backflip, supers and such. To explain it better..Say a 15 hit combo right. Within that 15 combo input you can do 3 or 7 or 13 you know what I mean. What is the best way to randomize this. Because I can get him to do one combo over and over rather good now but again that cheap and a no no. Im guessing I define one combo through say trigger1..2nd variation can be trigger2 and so on yes?


Re: AI lol *shakes head*
#13  May 18, 2008, 07:20:52 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
Quote
What is the best way to randomize this. Because I can get him to do one combo over and over rather good now but again that cheap and a no no. Im guessing I define one combo through say trigger1..2nd variation can be trigger2 and so on yes?


well to try and help again....im coding a Helper AI right now and it is defenitly, more difficult in my opinion, to get things done, literally one mistake with the changestates and boom an infiite loop, its careful coding and taking a test after every code is extremely neccassary, well for begininners at it i guess.  back on topic what i was going to say i if you have so many combos maybe you can use VarRandom to determine which one to use 25 you say, well try a range fo 0-24 and assign them

example...put the var random in the state -2 i guess for you...then  in the command assign the var randoms puting a bigger range for
combos you want to appear more frequently..or you could just use random = [200,300] or something like that which is sort of an equivalent.. again im a begginner at codin AI just like you so of course im not sure if this works i just though of it off the top of my head
Quote


[State 0, VarRandom]
type = VarRandom
trigger1 = time = 0
v = 2
range = 0,3

[State 0, Turn]
type = Turn
trigger1 = p2bodydist x < -5

[State 0, turn]
type = ChangeAnim
trigger1 = p2bodydist x < 0
value = 8005

[State 0, crouch]
type = ChangeState
trigger1 = p2statetype = L
value = 8010

[State 0, walk Fwd]
type = ChangeState
trigger1 = var(2) = [0,3]
trigger1 = p2dist x > 100
value = 8020
ctrl = 0

[State 0, walk back]
type = ChangeState
trigger1 = var(2) = [0,3]
trigger1 = enemynear,vel x > 0
trigger1 = p2movetype != H
value = 8021
ctrl = 0

[State 0, Jump]
type = ChangeState
trigger1 = var(2) = 1
value = 8040
ctrl = 0

again just trying to help.  ::)
Re: AI lol *shakes head*
#14  May 18, 2008, 07:57:33 pm
  • ****
    • www.justnopoint.com/Masters/
Haha I know you're trying to help and I appretiate it but if I cant understand how a regular random trigger get a number out of nowhere Im definately not going to get VarRandom. Var and Random in one sentance for me right now its an accident waiting to happen. HAHAHAHA. Ill post what I have in a bit so you guys can laugh at me.  :sugoi:
Re: AI lol *shakes head*
#15  May 19, 2008, 02:33:36 am
  • **
what randoms make is that it picks one number for 0 to 999, so having random <=400... it means that it will trigger when the random number is from 0 to 400..... also if you are trying to make combos, don't use the same value of random, because it will not work, for example if 2 states has the same triggers and both randoms are equal, it will always activate the first that is coded....use differentes (random number) ranges, for combos
Re: AI lol *shakes head*
#16  May 19, 2008, 03:06:12 am
  • ****
    • www.justnopoint.com/Masters/
I can get different combos to show. Unfortunately slowly, but perhaps surely I can make do soon. This is this character relies on being relatively close to p2 to perform his major combos. Alot of has to do with p2bodydist. I can debug the position with display to clipboard but in the end I end up having to make p2bodydist of x relatively close to the others. What I've done was break up combos into parts and I am triggering them by the 1st hit of the combo. i.e. low kick or medium kick its just in the end my character ends up close to p2 because of the elbow and the jumping down kick that leads to ground chains (its just how I coded it there is no ways around it). I've already achieved cheap AI but Im not going to go for it. Come to think of it when I look back at evil ryu or evil ken or dragon claw im like whoa I've followed in their footsteps you know. What is another alternative I can use other then random trigger. If its the only way to randomize what I am trying to do I cant argue. Im just confused as how it can pick a number out of nowhere and trigger it.
Re: AI lol *shakes head*
#17  May 19, 2008, 05:04:43 am
  • **
The random its used not only to ave different attacks, its used to limit the frequency of the attack....it doesn't take it from nowhere, think like if the system its all the time just randomizing numbers, and what your code does, its comparing the numbers and when your number is the one picked, your code works....thatswhy its better using a range than just a number, if you only use  one number, you will have 1 out of 1000 possibilities
Re: AI lol *shakes head*
#18  May 19, 2008, 07:33:33 am
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
what randoms make is that it picks one number for 0 to 999, so having random <=400... it means that it will trigger when the random number is from 0 to 400..... also if you are trying to make combos, don't use the same value of random, because it will not work, for example if 2 states has the same triggers and both randoms are equal, it will always activate the first that is coded....use differentes (random number) ranges, for combos

is this statement true for Var Randoms too?
Re: AI lol *shakes head*
#19  May 19, 2008, 07:41:38 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
No. Varrandom is set within a range you set.

If you give it the range 0-1 it will be randomising between those 2 numbers so it'll be something usable 100% of the time in one way or another.

random as said is 0-999 and will pick any one of those on each tick. If you evaluate many at once

[mcode]type = displaytoclipboard
trigger1 = gametime%10 = 0
params = random,random,random
text = "%d %d %d"[/mcode]
You'll get 3 different values. You can use the same range for all your commands if you like, it won't make that much difference. PotS showed this exact piece of code in action, and i used it in practice with Rikuo so it does work fine.


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: AI lol *shakes head*
#20  May 19, 2008, 07:47:52 am
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
Quote
No. Varrandom is set within a range you set.

If you give it the range 0-1 it will be randomising between those 2 numbers so it'll be something usable 100% of the time in one way or another.

random as said is 0-999 and will pick any one of those on each tick. If you evaluate many at once

whoa was just wondering bwcause  i used so many thngs triggered by VarRandom....Thanks For the confirmation ;D
Re: AI lol *shakes head*
#21  May 19, 2008, 08:31:52 am
  • ****
    • www.justnopoint.com/Masters/
I see thanks for clearning it up. I guess I just have to find a rather medium dist between p2 because I know the variety work I just don't see it because all my attack always end up being in p2 face.