ok i officialy HATE coding AI lolsome methods were working as far as triggers were concerned, it just seems moves are getting repeated too frequently no matter how much of a low percentage i make it random.but obv theres something wrong in my code.the most noticable move was the hadouken(strong)[mcode][State -1, AI Gou Hadoken Strong]type = ChangeStatevalue = 1002triggerall = var(7) && roundstate = 2triggerall = StateType != Atriggerall = StateType = Strigger1 = p2dist X > 100 && random < 20trigger2 = !inguarddist && random < 20trigger3 = p2movetype !=A && random < 35[/mcode]now i cant find what it is in the code, but when watching my character he uses hadouken strong like constantly till p2 dies....i also forgot to add in numproj = 0 but thats not whats causing the prob.any tips and suggestions on my code and what to add or replace?help much apreciated
QuoteUse my methodhavent seen your method, do you have a link?Quotetrigger = ctrlah yes so i did lol.....would that be a triggerall or a trigger?
if you want to use movecontacts in the future for your attacks it's best to place it under the triggers that will not be a combo. triggerall will disable fluent combos.but if you don't plan on ever using a combo for a specific attack, then trigerall is the way to go. ifelse just use single triggersCheers,RajaBoy
Quoteif you want to use movecontacts in the future for your attacks it's best to place it under the triggers that will not be a combo. triggerall will disable fluent combos.but if you don't plan on ever using a combo for a specific attack, then trigerall is the way to go. ifelse just use single triggersok cheers dude.anyone got a link for satou's method?
Quotestudy ishida uryu's kim's ai. It's the only public char with that method implemented.ok had a good read through, from what i understand,...correct me if im wrongyou create a helper....then code it in the cns that controls various custom states and situations like crouching near and crouching far, and gives triggeralls for them scenarios.then in the cmd, where the helper is created use your AI trigger and the helper number (the one you created) and the stateno of the scenario in the helper eg 101330 which is used for crouching light punchtriggeralls are read from the custom state therefore doesnt read the triggers in the cmd? please tell me i atleast have some idea lol i been reading it a good while now.what im not sure of is how does the var(59) interact with the helper(100000)?offtopic..........what does enemynear(0) mean? im guessing but does it mean when p2 is near and doesnt have ctrl?
you got most of it.the helper states are used as triggers in the cmd in teh same way the commands are, that makes sure that the char won't break any rules while ai controlled.enemy(0) is almost the same as p2, it is used to check what i player 2 doing.var59 does not really need to interact with the helper, var59 =1 means that the ai is active, so in the triggeralls, if the ai is active, the trigger checks for the helper, is the ai is not active, it checks for commands.
cool, thats what i thought you just explained it better than me lol i really like this method, im looking to release my character (akuma) soon, but i want to get his AI right and i may as well try this out, like i said ive tried many methods but havent been happy with them and not always had the best working triggers to suit the move.thanks again
whilst looking at your method that was used on kim i noticed something that i didnt understand,in the variable list generated by fighter factory(under float variables) i noticed it didnt have any float variables used for the character but in one of the AI helper states triggers i noticed the line.......trigger1 = time>( 5 * fvar(0) )which is used fairly often? and i noticed this line...triggerall = time>=Ceil( 5 * fvar(0) )could you or someone explain what that trigger means(i have an idea but prob not right)and (to [E])where is this variable defined?i didnt see a varset for it.my character is using a fvar(12) but its been defined.just wondering about fvar(0)
fighter factory does that sometimes especially if the varset is in the command.triggerall = time>=Ceil( 5 * fvar(0) )this means trigger when, time = fvar(0)*5 rounded up to the highest closest intergerfor example say if fvar(0)=.4.4*5=.20 since it's .20 it will round it up to 1, it's triggered like this because time has to be a positive interger, not a float which is why ceil is a necessity here.
makes sense nowbut what im unsure of is what fvar(0) = i realise its fvar(0) * 5and in the Example you said say if fvar(0) = .4im unsure of what the value of it actually is.
blackchaos07 said, July 20, 2008, 03:39:44 pmmakes sense nowbut what im unsure of is what fvar(0) = i realise its fvar(0) * 5and in the Example you said say if fvar(0) = .4im unsure of what the value of it actually is.diplay to clip boarduse %F instead of %d for floats
im completely new to DisplayToClipboardlooking through kims files this was used[mcode][State -2]Type = DisplayToClipboardtrigger1 = 1Text = "MoveSpam = %d, P2 Dead = %d, Slam = %d, FED = %d, BED = %d"Params = Var(0), Var(11), Var(16), frontedgebodydist, backedgebodydistignorehitpause = 1[/mcode]and in the .cmd this was used;debug[State cpb]Type = DisplayToClipboardtrigger1 = IsHelper(100000)Text = "parent ai %d , stateno %d, pos X %f, parentposx %f, reaction time %f"Params = (parent, movecontact), stateno, Pos X, (Parent, Pos X), (Parent, P2bodydist X);fvar(0)*5ignorehitpause = 1;(Parent, Var(59) )where does it display it?EDIT: i think i found it.......its set in the cmd file.........[mcode];value of 1.0 means 100% reaction time, 2.0 200% reaction time (slower), 0.5 50% reaction time (two times as fast).[State reaction time]type = VarSettrigger1 = IsHelper(100000);fvar(0)= 0.1;1.0fvar(0)= 1.0001 - ((1000 - Parent,Life)/1000.0);fvar(0)= 1.0001 - ((P2Life - Parent,Life)/1000.0);fvar(0)= (Parent,Life)/1500.0[/mcode]
fvar(5) is the difficulty or speed of reaction var, since the ai is basedon changestates, it controls how fast they take to happen, to test your ai in potimal conditions set it to 0.1, the varset is in the cmd file.
Quotefvar(5) is the difficulty or speed of reaction var, since the ai is basedon changestates, it controls how fast they take to happen, to test your ai in potimal conditions set it to 0.1, the varset is in the cmd file.thank you.but ive come to a decision, although i understand your method, im not sure i want to make the AI as complicated as that, ive tried it out, but i prefer a more basic way.....although its a really cool method you have.im glad to say im giving him a more basic method and its working alright so far.... i have a questionwhats the difference between these 2 pieces of code and which one would be more effective[mcode][State -1, sgs]type = ChangeStatevalue = 4000triggerall = var(7) && statetype !=A && ctrl && power >= 3000trigger1 = enemynear, p2movetype != A && random <= 70trigger2 = enemynear, p2statetype != L && random <= 30trigger3 = enemynear, movetype != H && random <= 25trigger4 = p2bodydist X < 250[/mcode]adding no random condition to the triggerall but with random on the triggersor adding a random condition to the triggerall and leaving triggers without random[mcode][State -1, sgs]type = ChangeStatevalue = 4000triggerall = var(7) && statetype !=A && ctrl && power >= 3000 && random <= 70trigger1 = enemynear, p2movetype != Atrigger2 = enemynear, p2statetype != Ltrigger3 = enemynear, movetype != Htrigger4 = p2bodydist X < 250[/mcode]EDIT: well i just tried them out, using debug and f3 to give them full power, and it seems the code with the random on the triggerall happens less frequently than the code with the randoms on the triggerswhich is what i want.......what happens when you add persistent = 0?
persistent won't do much in the negative statedefs they are being atciveted continously, persistent is wasted in any of them.
[mcode];dragon punch strong[State -1, dragon punch strong]type = ChangeStatevalue = 1100triggerall= Var(7) && statetype !=A && ctrl && p2statetype != Ltrigger1 = stateno = 235 && movecontact && random <= 300trigger2 = p2stateno = 42 && p2bodydist X >= 100 && random <= 100trigger3 = enemynear, p2movetype !=A && random <= 30trigger4 = enemynear, p2statetype !=A && random <= 20trigger5 = enemynear, p2statetype != C && random <= 10[/mcode]im using this code for strong shoryuukenbut it keeps repeating too often and its annoying to watch when he is doing the move like 10 mayb more times per round, is there anyway i can ammend this
instead of haveing ll the trigger seperated, put them as 1i assume you want all the trigger conditons to apply for him to do the attack?you have them seperated so he will defenitly do a dragon punch if the enemynear, isn't crouching/ i aswered your random question at infantrytrigger1 = stateno = 235 && movecontact trigger1 = random <= 300trigger2 = p2stateno = 42 enemynear,vel y <1&&enemynear,vel x >1trigger2 = p2bodydist X >= 100 trigger2 = enemynear, p2movetype !=Atrigger2 = enemynear, p2statetype !=A trigger2 = random<=75thats more understandabledon't be stingy with the triggers, you will need to specify each trigger carefully, haveing on triggers with a random activated ll the time wil have frequency to repeat, while as if you expand the conditions you should be good.
you may also want to control that p2bodydist x, dragon punch shouldn't have that reach, you should give it a decent range to work fromhe'll just do it when the opponent is far for nothingtryp2bodydist x =[0,75]or inguarddist
seems to work well thanks.....although he's still repeating just a little too much, so i could cut down the random valuesor like you said add more triggers,some characters AI like thor by loganir dont have many triggers for certain moves and they work fine.i think the problem with me is i dont know what a smart trigger to add would be, i have my own playing style when i fight the computer, and adding triggers in certain conditions i find difficult