Page 1 of 1

Hotkey question

Posted: Fri Jul 06, 2018 10:20 pm
by mU$!c
[quote="crazyc"]Now you can set hotkeys similarly to how the input menu works. It doesn't let you set multiple mappings for one cheat (which wouldn't make much sense IMO) [strike]and doesn't currently give feedback when polling except the game freezes for a second[/strike]. Added a popmessage when to press the hotkey to set.[/quote]

Old, but awesome news! :) Which begs the question...how do I code a hotkey to for 2 different buttons to activate 2 different variable for the same cheat?

For Example:

https://i.imgur.com/qBv8lvb.png

https://i.imgur.com/QtSmSgi.png

This is the original cheat for mkla3:

<cheat desc="P1 Select Body Move Set">
<parameter>
<item value="0x00">Johnny Blade</item>
<item value="0x01">Kano</item>
<item value="0x02">Raiden</item>
<item value="0x03">Liu Kang</item>
<item value="0x04">Scorpion</item>
<item value="0x05">Sub-Zero</item>
<item value="0x06">Sonya Blade</item>
<item value="0x07">#Goro</item>
<item value="0x08">#Shang Tsung</item>
</parameter>
<script state="run">
<action>maincpu.pb@01014CF0=param</action>
<action>maincpu.pb@0101ABF0=param</action>
<action>maincpu.pb@0101D910=param</action>
<action>maincpu.pb@0101E030=param</action>
<action>maincpu.pb@0101E4F0=param</action>
<action>maincpu.pb@01020170=param</action>
<action>maincpu.pb@01021210=param</action>
<action>maincpu.pb@01022050=param</action>
</script>
</cheat>

I already tried creating a simplified version of the cheat and split it into 2 different Body Move Sets:

<cheat desc="P1 Reptile's Scorpion Body Move Set">
<parameter>
<item value="0x04">Scorpion</item>
</parameter>
<script state="run">
<action>maincpu.pb@0101E030=param</action>
</script>
</cheat>

<cheat desc="P1 Reptile's Sub-Zero Body Move Set">
<parameter>
<item value="0x05">Sub-Zero</item>
</parameter>
<script state="run">
<action>maincpu.pb@0101E4F0=param</action>
</script>
</cheat>

I assigned a different hotkey to each Body Move Set, but they don't activate in-game when i press the hotkeys. This was the only work-around I came up with. So, will have to come up with code to script to the mkla3_hotkeys.json file that will allow me to switch between 2 different Body Move Sets using hotkeys.

Re: cheat lua plugins

Posted: Sat Jul 07, 2018 8:09 pm
by crazyc
You might try instead

<cheat desc="P1 Reptile's Scorpion Body Move Set">
<script state="run">
<action>maincpu.pb@0101E030=4</action>
</script>
</cheat>

Re: cheat lua plugins

Posted: Mon Jul 09, 2018 4:21 am
by mU$!c
[quote="crazyc"]You might try instead

<cheat desc="P1 Reptile's Scorpion Body Move Set">
<script state="run">
<action>maincpu.pb@0101E030=4</action>
</script>
</cheat>[/quote]

Still can't switch between Body Move Sets. not working even when i activate one or the other in cheats
or both at once.

If I leave the cheats turned off, the hotkey won't turn the cheats on either. I need to write a script that will turn the each cheat on and off when the hotkey for the corresponding cheat is pressed. Even when I manually turn on the cheat, hotkey won't activate the cheat. The Body Move Sets won't change, won't switch on.

mkla3_hotkeys.json:

[{
"keys":"JOYCODE_1_BUTTON7",
"desc":"P1 Reptile's Scorpion Body Move Set"
},{
"keys":"JOYCODE_1_BUTTON8",
"desc":"P1 Reptile's Sub-Zero Body Move Set"
}]

Re: cheat lua plugins

Posted: Tue Jul 10, 2018 1:01 am
by Pugsy
Something like this should work...I used to use a similar method for tetris shape cheats when hotkeys used to work.

Code: Select all

  <cheat desc="P1 Rotate Through Body Move Sets">
    <script state="run">
      <output format="Body Move Set Selected == %02X">
        <argument count="1">temp0</argument>
      </output>
    </script>
    <script state="on">
      <action>temp0=1 + maincpu.pb@01014CF0</action>
      <action condition="temp0==09">temp0=0</action>
      <action>maincpu.pb@01014CF0=temp0</action>
      <action>maincpu.pb@0101ABF0=temp0</action>
      <action>maincpu.pb@0101D910=temp0</action>
      <action>maincpu.pb@0101E030=temp0</action>
      <action>maincpu.pb@0101E4F0=temp0</action>
      <action>maincpu.pb@01020170=temp0</action>
      <action>maincpu.pb@01021210=temp0</action>
      <action>maincpu.pb@01022050=temp0</action>
    </script>
  </cheat>
Alternatively just try what crazyc mentioned but use "on" rather than "run" otherwise you will need to make sure you disable the previous cheat before enabling the next one. Eg press x to change to bodyset 1, press x again to turn it off and then press y to select bodyset 2

Re: cheat lua plugins

Posted: Thu Jul 12, 2018 10:02 am
by mU$!c
Pugsy wrote:Something like this should work...I used to use a similar method for tetris shape cheats when hotkeys used to work.

Code: Select all

  <cheat desc="P1 Rotate Through Body Move Sets">
    <script state="run">
      <output format="Body Move Set Selected == %02X">
        <argument count="1">temp0</argument>
      </output>
    </script>
    <script state="on">
      <action>temp0=1 + maincpu.pb@01014CF0</action>
      <action condition="temp0==09">temp0=0</action>
      <action>maincpu.pb@01014CF0=temp0</action>
      <action>maincpu.pb@0101ABF0=temp0</action>
      <action>maincpu.pb@0101D910=temp0</action>
      <action>maincpu.pb@0101E030=temp0</action>
      <action>maincpu.pb@0101E4F0=temp0</action>
      <action>maincpu.pb@01020170=temp0</action>
      <action>maincpu.pb@01021210=temp0</action>
      <action>maincpu.pb@01022050=temp0</action>
    </script>
  </cheat>
Alternatively just try what crazyc mentioned but use "on" rather than "run" otherwise you will need to make sure you disable the previous cheat before enabling the next one. Eg press x to change to bodyset 1, press x again to turn it off and then press y to select bodyset 2

^This code gives intended effect and works very well

I'm trying to convert this into a code that will only switch between

____________________________________________________________________________________

This won't work (won't even show the cheat when I change "run" to "on"):

UPDATE: Problem was I had an error 201, parsing. So, I grabbed a fresh 0.187 cheat.7z and all was well. These codes display in cheatlist, but they don't work.

Code: Select all

<cheat desc="P1 Reptile's Scorpion Body Move Set">
<script state="on">
<action>maincpu.pb@0101E030=4</action>
</script>
</cheat>

Code: Select all

<cheat desc="P1 Reptile's Sub-Zero Body Move Set">
<script state="on">
<action>maincpu.pb@0101E4F0=5</action>
</script>
</cheat>

Code: Select all

<cheat desc="P2 Reptile's Scorpion Body Move Set">
<script state="run">
<action>maincpu.pb@0101BA30=4</action>
</script>
</cheat>

Code: Select all

<cheat desc="P2 Reptile's Sub-Zero Body Move Set">
<script state="run">
<action>maincpu.pb@0101BEF0=5</action>
</script>
</cheat>
These ones no funciona correctamente for me.

no joy :(

UPDATE: Tested some more. @Pugsy Your code works, just cycles through all Body Move Sets (intended effect).

@Pugsy BTW...why can you use BBCode for

Code: Select all

 
and we can't?

Re: cheat lua plugins

Posted: Thu Jul 12, 2018 10:49 pm
by Pugsy
mU$!c wrote:
@Pugsy BTW...why can you use BBCode for

Code: Select all

 [/code ] and we can't?[/quote]

I don't know, you might need to enable bbcode in your User Control Panel?

Quick Link:-

http://www.mamecheat.co.uk/forums/ucp.php?i=ucp_prefs&mode=post

Re: Hotkey question

Posted: Fri Jul 13, 2018 11:33 pm
by crazyc
I could add support for this but I don't really know how the ui would work to set it to rotate the options with presses or to just set the one selected.

Re: cheat lua plugins

Posted: Sat Jul 14, 2018 7:59 am
by mU$!c
Pugsy wrote:
mU$!c wrote:
@Pugsy BTW...why can you use BBCode for

Code: Select all

 [/code ] and we can't?[/quote]

I don't know, you might need to enable bbcode in your User Control Panel?

Quick Link:-

http://www.mamecheat.co.uk/forums/ucp.php?i=ucp_prefs&mode=post[/quote]


:D LOL BBCode was already enabled, though. But everything's right on time now. Just like a swiss watch  8)

Re: Hotkey question

Posted: Fri Aug 10, 2018 9:11 pm
by Ruhab21
Is there any way that I can edit a cheat and be able to make my own in a
game. Such as I want to make a cheat code such as select control PL1 in
like street fighter games. I want to do this in mameui fx0122. Is there any
way possible.

Re: Hotkey question

Posted: Sun Aug 12, 2018 11:10 pm
by Pugsy
Ruhab21 wrote:Is there any way that I can edit a cheat and be able to make my own in a
game. Such as I want to make a cheat code such as select control PL1 in
like street fighter games. I want to do this in mameui fx0122. Is there any
way possible.
Don' t really understand the question or what it has to do with hotkeys....this seems a LOT off topic.

You can make any cheat with enough patience and perseverance, but personally I wouldn't use MAME 0.122( that's over 10 years old ). I'd update to a newer MAME version.

Re: Hotkey question

Posted: Tue Aug 14, 2018 10:21 pm
by Ruhab21
How do I post
I am unable to find New Topic Button

Re: Hotkey question

Posted: Tue Aug 14, 2018 10:21 pm
by Ruhab21
How do I post
I am unable to find New Topic Button

Re: Hotkey question

Posted: Tue Aug 14, 2018 11:13 pm
by Pugsy
Go to the subforum page, eg:-

viewforum.php?f=1

And look under M.A.M.E. "Arcade" Cheat Requests and you will see a New Topic button

Re: Hotkey question

Posted: Thu Mar 14, 2019 2:18 pm
by Ruhab21
Hi
Sorry if this is off Topic
But is there any way to add boss flag codes in Street Fighter games to play as boss versions of the bosses such as in Street Fighter Two Turbo. How do I add a boss flag code to enable me to play as CPU Akuma where he has an intro of raging demon bison and does lots of damage and throws two air fireballs