YesNoOk
avatar

Training Mode Detector (Read 26566 times)

Started by 2OS, August 24, 2012, 10:13:41 pm
Share this topic:

2OS

Training Mode Detector
#1  August 24, 2012, 10:13:41 pm
  • ****
  • 608 Wannabe
  • Ich schicke dich zur HOELLE!! STIRB DU FEIGLING!!
    • Egypt
Spoiler: Old (click to see content)

Code:
[Statedef -2]

[State ]
type=null
trigger1=stateno=5900&&time<=2
trigger1=var(59):=0
trigger2=var(59)<3
trigger2=var(59):=var(59)+1
ignorehitpause=1

[State ]
type=assertspecial
trigger1=var(59)=1
flag=noko
ignorehitpause=1

[State ]
type=lifeset
trigger1=var(59)<=2
value=lifemax*(var(59)=2)
ignorehitpause=1

[State ]
type=null
trigger1=var(59)=1
trigger1=var(58):=life
ignorehitpause=1

[State ]
type=displaytoclipboard
trigger1=1
text="Training Mode=%d 0=No 1=Yes"
params=var(58)
ignorehitpause=1
Last Edit: October 30, 2016, 10:59:21 am by 2OS
Re: Training Mode Detector
#2  August 25, 2012, 08:21:18 am
  • ****
    • Hungary
    • seravy.x10.mx/Wordpress
So, that means there is a hardcoded state change from 5150 to 5120 when in training mode? Nice to know.
I guess this is a safer and better method than checking the powerbar during intro.

2OS

Re: Training Mode Detector
#3  August 25, 2012, 08:42:00 am
  • ****
  • 608 Wannabe
  • Ich schicke dich zur HOELLE!! STIRB DU FEIGLING!!
    • Egypt
that pretty much sums it up yes.

it'll work if the intro is or is not skipped. the only ( not so major ) downside is it takes roughly 100 ticks upon spawn.
Re: Training Mode Detector
#4  August 27, 2012, 04:06:36 pm
  • ******
  • Limited time to use Infinite power !
    • France
    • network.mugenguild.com/cybaster/
I know this is kind of trivial for someone who's intending to use this type of code, but you could use the [ code ] tags and a short intro/comment each time :
- Create the helper in state XXX.
- This is the code for the helper itself : ...
- This line does this, this state does that.
- Put this in state -2 to display blabla.

This would make the tutorials much more understandable and easy to read. ;)
Re: Training Mode Detector
#5  August 28, 2012, 03:14:32 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Well it is the code library rather than tutorials. But explaining what is happening is always useful so if you want to tweak it you don't need to work out what bits of the code do.


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: Training Mode Detector
#6  November 17, 2012, 02:08:09 am
  • ******
  • Video Game Veteran
  • Can you do it? SUREYOUCAN!
    • USA
    • gcnmario.free.fr
that pretty much sums it up yes.

it'll work if the intro is or is not skipped. the only ( not so major ) downside is it takes roughly 100 ticks upon spawn.

Hate to bring this back up, but I wanted to say something about this.
I think you're saying 100 ticks upon respawn because that is what is written in the code. If you wanted to change the time, couldn't you say something like 50, 10, or time > 0 instead? Or does it really need exactly 100 game ticks for this code to work?

Also, why 5150? I thought that was already used for something. Is it not? Wait.... Isn't 5150 the dead KO state?
Can it be any state number, or does it have to be 5150?

"You must defeat my flaming
dragon punch to stand a chance."
Re: Training Mode Detector
#7  November 17, 2012, 02:14:24 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Training mode forces a state change from 5150 to 5120, that is clear enough isn't it? Because of the way mugen works it takes 100 ticks to achieve this.

And of course you can't use another state. That's obviously not how this works.

If you have further questions redirect them to the dev help forum not here.


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: Training Mode Detector
#8  November 06, 2014, 05:39:00 am
  • avatar
  • ****
  • Ya me dio cosa...
    • Mexico
This work for me

Code:
[State -3];Demo mode
type=Varset
triggerall=!Var(10)
trigger1= (Stateno=190||Stateno=5900) && roundno=1 && Power>=1000 && Ailevel!=0 ;<--Mugen1.0+
v=10
value=1
[State -3];Demo mode error ;<--Only for same characters/fullgame+
type=Varset
triggerall=Var(10)
trigger1=Roundstate=2 && Enemy,var(10)=0
v=14
value=0
Re: Training Mode Detector
#9  November 06, 2014, 01:25:17 pm
  • ****
  • Target Acquired.
    • Ukraine
    • mugencoder.com
Dude, what's with the necro?

Also, your method isn't exclusively going to pin-point demo mode. Your conditions would be true for any character ready to do a standard, 1-bar super.

-[Все слова это только слова.]-

2OS

Re: Training Mode Detector
#10  October 30, 2016, 05:28:12 am
  • ****
  • 608 Wannabe
  • Ich schicke dich zur HOELLE!! STIRB DU FEIGLING!!
    • Egypt
I know this is kind of trivial for someone who's intending to use this type of code, but you could use the [ code ] tags and a short intro/comment each time :
- Create the helper in state XXX.
- This is the code for the helper itself : ...
- This line does this, this state does that.
- Put this in state -2 to display blabla.

This would make the tutorials much more understandable and easy to read. ;)
Well it is the code library rather than tutorials. But explaining what is happening is always useful so if you want to tweak it you don't need to work out what bits of the code do.

i generally don't elaborate on things that utilize weird engine behavior. there's essentially nothing to tweak here or learn other than there's, well, weird engine behavior.

in this rare case i do in fact find it ideal for people to simply copy and paste it.


i updated the first post with a simpler detector that works instantaneously as each round starts.
Re: Training Mode Detector
#11  October 30, 2016, 09:38:03 am
  • ***
  • I hate coding helpers.
    • Brazil
The new detector indeed works, but I applied it in a vanilla KFM and his life immediately refills to lifemax after taking a hit :(

2OS

Re: Training Mode Detector
#12  October 30, 2016, 11:00:07 am
  • ****
  • 608 Wannabe
  • Ich schicke dich zur HOELLE!! STIRB DU FEIGLING!!
    • Egypt
fixed
Re: Training Mode Detector
#13  October 30, 2016, 11:40:09 am
  • ***
  • I hate coding helpers.
    • Brazil
It works perfectly, huge thanks. I used the previous method in my chars for a long time and I was pretty satisfied with it. Now they will feel even more solid with your new nethod.