If someone cares...May be the most easy mode to detect. As when the round start you're already full of power. (In training mode, the power grows at the beginning).So, to detect demo mode (to set AI->ON), go to the pre-intro state of your char (the [state 190], may be in mugen\data\common1.cns, and copy/paste it in your char.cns file. Then add only these lines :Code: [State 190, 4] ; AI in demo modetype = VarSettrigger1 = Power > 2990 ; This number has to be close to char's power max valuetrigger1 = Time = 0value = 1 ; <- The var value is set to 1v = 0 ; <- This is var(0)May be you can test :Code: trigger1 = Power = 3000This would work but as I don't know how the engine fill the power bar at this time... I prefered to put the version above.As far as I remember it's compatible with Winane's Activation code, where Var(0)=1 means AI is activated.AFAIK, Winane didn't add a special part for that demo mode.The good point here, is that we can be 100% sure* that AI is going to be activated even before the start of the show.* : Except may be if you add Winane's Training detection mode bonus : Code: ; ONLY if desired:[State -2, Start Full]...or some same stuffs...
Quotetrigger1 = Power > 2990 ... > const.powermax-10 or something that would more or less look like that (rarely touch anything about those consts - and don't even tell me about the new trigger shortcuts in WinMugen)That would be more universal, eh
True, you pointed some syntax I don't master yet, thxs. EDIT : fixed, and btw if anyone else (especially W. ) has some things to say to improve this code, be my guest. EDIT2 : disfixed
that will activate the a.i. if your simul mode partner starts the round already with powerand pre-intro state is 5900
P.o.t.S. said, February 22, 2005, 10:46:30 pmthat will activate the a.i. if your simul mode partner starts the round already with power??? Can you give more details ?In which mode ? with how many players ? CPUs ? in which round state/number ?P.o.t.S. said, February 22, 2005, 10:46:30 pmand pre-intro state is 5900 common1.cns said:;---------------------------------------------------------------------------; PREINTRO[Statedef 190]type = Sctrl = 0velset = 0,0[State 190, 1]type = ChangeAnimtrigger1 = SelfAnimExist(190)value = 190[State 190, 2] ;Go straight to intro.type = ChangeStatetrigger1 = Time = 0value = 1915900 (which is not "pre-intro" but "initialize") appears only at round 2 and 3 not at the first one AFAIK.Anyway, I add the feature to Pocket_Chun-li so you'll be able to test it on your own and if bug there is, please kick me violently ! Well in fact, feedback would be enough...
Actually, State 5900 does activate in round 1. We just don't see that because it goes strait into the characters intro state, 190, or 191.Code: ;---------------------------------------------------------------------------; Initialize (at the start of the round)[Statedef 5900]type = S[State 5900, 1] ;Clear all int variablestype = VarRangeSettrigger1 = roundsexisted = 0value = 0[State 5900, 2] ;Clear all float variablestype = VarRangeSettrigger1 = roundsexisted = 0fvalue = 0[State 5900, 3] ;Intro for round 1type = ChangeStatetrigger1 = roundno = 1value = 190
the docs said:------------------------------------------------------------PowerMax------------------------------------------------------------ Returns the maximum amount of power the player can have. This is normally 3000 (level 3).Format: PowerMaxArguments: noneReturn type: intError conditions: noneExample: trigger1 = power < powermax / 2 True if player has less than half his maximum power.There...WinMugen version, won't work with DOSI'm pretty sure there's something with const.data(power) or something like that (I still don't know) for DOSBut that'll still be more universal than power > 2990 for chars that have 2 or 9 powerbars (like, your own Pocket ChunLi ??)Kissu
I think I get what Phantom is pointing out...try putting Chun-Li in training mode, and tap F4: Demo Mode will kick on.
Black Dahlia Isis said, February 23, 2005, 09:24:47 amCan you give more details ?In which mode ? with how many players ? CPUs ? in which round state/number ?simul mode (with partner), any roundthere are chars that start with a full power bar (especially sfa3 and dbz chars), so trigger1 = Power > 2990 will activate the a.i.tested it alreadyadd this to any char other than chun-li:[State -2, power]type=poweraddtrigger1=1value=9999then play in simul mode, choosing chun-li and that other char as your teambam, a.i. activated EDIT: or add that piece of code in chun-li and play in any mode Quote5900 (which is not "pre-intro" but "initialize") appears only at round 2 and 3 not at the first one AFAIK.all the same5900 occurs every round, usually to reset the variablesQuoteAnyway, I add the feature to Pocket_Chun-li so you'll be able to test it on your own and if bug there is, please kick me violently ! and what k.f.m. said is also true
Short :this thread has no useful purpose.BDI, owned by the Guild. || Yes, I'm just teasing him around a bit V
Kung Fu Man said, February 23, 2005, 08:19:37 pmI think I get what Phantom is pointing out...try putting Chun-Li in training mode, and tap F4: Demo Mode will kick on.Damn ! your right... S.t.o.P. said, February 23, 2005, 11:40:07 pmsimul mode (with partner), any roundthere are chars that start with a full power bar (especially sfa3 and dbz chars), so trigger1 = Power > 2990 will activate the a.i.tested it alreadyadd this to any char other than chun-li:[State -2, power]type=poweraddtrigger1=1value=9999then play in simul mode, choosing chun-li and that other char as your teambam, a.i. activated Right ? ??? I'll have a look....Tested, and.. I guess I missed something because I didn't see any unwished demo mode activation ??? I added your code to a char, made him partner of Pocket Chun, and tested various Team mode with partnership set as "simul" and noticed nothing wrong... ???S.t.o.P. said, February 23, 2005, 11:40:07 pmEDIT: or add that piece of code in chun-li and play in any mode Mwahahaha this is a new mission for captain obvious ! Of course this works ONLY if your char doesn't start fighting with fullfilled power gauge... The thing I was ignoring was : S.t.o.P. said, February 23, 2005, 11:40:07 pmthere are chars that start with a full power bar (especially sfa3 and dbz chars)That. S.t.o.P. said, February 23, 2005, 11:40:07 pmall the same5900 occurs every round, usually to reset the variablesYeah you're right I was wrong, sorry. Byakko said, February 23, 2005, 11:57:23 pmShort :this thread has no useful purpose.BDI, owned by the Guild. Yeah, i need to be lashed on public place for that crappy attempt ! Kung Fu Man said, February 24, 2005, 01:26:11 amNot quite. The code is flawed, but not worthless Just needs to be adjusted.Damn KFM, you're too kind, kick me too !
oooh, soka.So may be this code is not as damn crappy shit as I though.Is F4 reinitialise gametime too ?may be that should be a keypoint to prevent this bug.
Black Dahlia Isis said, February 27, 2005, 03:28:52 pmIs F4 reinitialise gametime too ?may be that should be a keypoint to prevent this bug.yepjust add a var that says if those triggers were already readthat way if you press F4 the triggers won't work again
IIRC Faye managed to set up a code to achieve the same goal as yours, on Dev. Maybe should you ask her, or The Slipator?When you say "demo", you mean "training", correct? And "CPU mode" = "AI", right?Because if you want "to activate AI in that CPU mode", you only need to set "Dummy Control" to AI, wait, then put it back to "Cooperative" or "Manual": the opponent will now do the moves you've coded in his custom AI.
Faye's code was for the Training mode as far as I recall, not Demo. Difference is how fast power increases