The Player Action Padlock, makes the player move with predetermined actions, such as jumping or covering, so that you can practice and train.
Thanks to the excellent documentation that I found in this forum, and to the guide of our friend POF that he left written in his blog, I was able to complete this contribution, since searching on the Internet I did not find any training mode for SF2CE. This Cheat XML has been tested without problems in Mame 0.215. Although the script still has some errors in the "fierce throw", since the player is not yet able to grab, so if someone found a solution I would be very grateful. A big SF2CE fan says goodbye.
Best regards
Code: Select all
<cheat desc="SF2CE Training Mode"/> <comment>Based in POF SSF2 training mode and adapted for sf2ce by yacsha</comment> </cheat>
<cheat desc="Padlock P1 (Action)">
<parameter>
<item value="0x00">Neutral (Stand)</item>
<item value="0xfd">Block Everything</item>
<item value="0xfc">Block Ground Attacks</item>
<item value="0x08">Up (Jump)</item>
<item value="0x09">Up-Right</item>
<item value="0x0A">Up-Left</item>
<item value="0x04">Down (Crouch)</item>
<item value="0x05">Down-Right</item>
<item value="0x06">Down-Left</item>
<item value="0x01">Right</item>
<item value="0x02">Left</item>
<item value="0xff">Throw-Right (fierce throw)</item>
<item value="0xfe">Throw-Left (fierce throw)</item>
</parameter>
<script state="on">
<action>maincpu.mw@379F4=4E71</action>
<action>maincpu.mw@20EA=4E71,maincpu.mw@20EC=4E71,maincpu.mw@20EE=4E71</action>
</script>
<script state="run">
<action>maincpu.mw@379F4=4E71</action>
<action condition="param == 0xff and frame % 2 == 0">maincpu.pw@FF8650=0001</action>
<action condition="param == 0xff and frame % 2 != 0">maincpu.pw@FF8650=0041</action>
<action condition="param == 0xfe and frame % 2 == 0">maincpu.pw@FF8650=0002</action>
<action condition="param == 0xfe and frame % 2 != 0">maincpu.pw@FF8650=0042</action>
<action condition="param lt 0x0f">maincpu.pb@FF8651=param</action>
<!-- block ground attacks -->
<action condition="param == 0xfc and maincpu.pb@FF86C1==0">maincpu.pw@FF8650=0000</action> <!-- neutral when opponent is neutral -->
<action condition="param == 0xfc and (maincpu.pb@FF86C1==A or maincpu.pb@FF86C1==C) and (maincpu.pb@FF8951 band 4) == 4 and maincpu.pb@FF857C==0">maincpu.pw@FF8650=0005</action> <!-- if opponent attacking and pressing down, block low (on P1 side) -->
<action condition="param == 0xfc and (maincpu.pb@FF86C1==A or maincpu.pb@FF86C1==C) and (maincpu.pb@FF8951 band 4) == 4 and maincpu.pb@FF857C==1">maincpu.pw@FF8650=0006</action> <!-- if opponent attacking and pressing down, block low (on P2 side) -->
<action condition="param == 0xfc and (maincpu.pb@FF86C1==A or maincpu.pb@FF86C1==C) and (maincpu.pb@FF8951 band 4) != 4 and maincpu.pb@FF857C==0">maincpu.pw@FF8650=0001</action> <!-- if opponent attacking and not pressing down, block high (on P1 side) -->
<action condition="param == 0xfc and (maincpu.pb@FF86C1==A or maincpu.pb@FF86C1==C) and (maincpu.pb@FF8951 band 4) != 4 and maincpu.pb@FF857C==1">maincpu.pw@FF8650=0002</action> <!-- if opponent attacking and not pressing down, block high (on P2 side) -->
<!-- block everything: -->
<action condition="param == 0xfd and maincpu.pb@FF86C1==0">maincpu.pw@FF8650=0000</action> <!-- neutral when opponent is neutral -->
<action condition="param == 0xfd and (maincpu.pb@FF86C1==A or maincpu.pb@FF86C1==C) and (maincpu.pb@FF8951 band 4) == 4 and maincpu.pb@FF857C==0">maincpu.pw@FF8650=0005</action> <!-- if opponent attacking and pressing down, block low (on P1 side) -->
<action condition="param == 0xfd and (maincpu.pb@FF86C1==A or maincpu.pb@FF86C1==C) and (maincpu.pb@FF8951 band 4) == 4 and maincpu.pb@FF857C==1">maincpu.pw@FF8650=0006</action> <!-- if opponent attacking and pressing down, block low (on P2 side) -->
<action condition="param == 0xfd and (maincpu.pb@FF86C1==A or maincpu.pb@FF86C1==C) and (maincpu.pb@FF8951 band 4) != 4 and maincpu.pb@FF857C==0">maincpu.pw@FF8650=0001</action> <!-- if opponent attacking and not pressing down, block high (on P1 side) -->
<action condition="param == 0xfd and (maincpu.pb@FF86C1==A or maincpu.pb@FF86C1==C) and (maincpu.pb@FF8951 band 4) != 4 and maincpu.pb@FF857C==1">maincpu.pw@FF8650=0002</action> <!-- if opponent attacking and not pressing down, block high (on P2 side) -->
<!-- jump attacks (FF86C1==4) -->
<action condition="param == 0xfd and maincpu.pb@FF86C1==4 and (maincpu.pw@FF83C4-maincpu.pw@FF86C4 lt F) and maincpu.pb@FF857C==0">maincpu.pw@FF8650=0001</action> <!-- block high if the opponent is at close range (<0xF) on P1 side -->
<action condition="param == 0xfd and maincpu.pb@FF86C1==4 and (maincpu.pw@FF86C4-maincpu.pw@FF83C4 lt F) and maincpu.pb@FF857C==1">maincpu.pw@FF8650=0002</action> <!-- block high if the opponent is at close range (<0xF) on P2 side -->
<action condition="param == 0xfd and maincpu.pb@FF86C1==4 and (maincpu.pw@FF83C4-maincpu.pw@FF86C4 > 20) and maincpu.pb@FF857C==0">maincpu.pw@FF8650=0000</action> <!-- stop blocking if the opponent is farther than 0x20 on P1 side -->
<action condition="param == 0xfd and maincpu.pb@FF86C1==4 and (maincpu.pw@FF86C4-maincpu.pw@FF83C4 > 20) and maincpu.pb@FF857C==1">maincpu.pw@FF8650=0000</action> <!-- stop blocking if the opponent is farther than 0x20 on P2 side -->
<!-- ... except if: the opponent hits any kick or punch button -->
<action condition="param == 0xfd and maincpu.pb@FF86C1==4 and (maincpu.pw@FF8950 band ~000F) != 0 and maincpu.pb@FF857C==0">maincpu.pw@FF8650=0001</action>
<action condition="param == 0xfd and maincpu.pb@FF86C1==4 and (maincpu.pw@FF8950 band ~000F) != 0 and maincpu.pb@FF857C==1">maincpu.pw@FF8650=0002</action>
<!-- ... and do not block when the opponent is so far that he can't reach us with a jumping normal attack -->
<action condition="param == 0xfd and maincpu.pb@FF86C1==4 and (maincpu.pw@FF83C4-maincpu.pw@FF86C4 > 70) and maincpu.pb@FF857C==0">maincpu.pw@FF8650=0000</action>
<action condition="param == 0xfd and maincpu.pb@FF86C1==4 and (maincpu.pw@FF86C4-maincpu.pw@FF83C4 > 70) and maincpu.pb@FF857C==1">maincpu.pw@FF8650=0000</action>
</script>
<script state="off">
<action>maincpu.pw@FF8650=0</action>
<action>maincpu.mw@379F4=6710</action>
<action>maincpu.mw@20EA=3BD6,maincpu.mw@20EC=007A,maincpu.mw@20EE=0650</action>
</script>
</cheat>
<cheat desc="Padlock P2 (Action)">
<parameter>
<item value="0x00">Neutral (Stand)</item>
<item value="0xfd">Block everything</item>
<item value="0xfc">Block ground normals</item>
<item value="0x08">Up (Jump)</item>
<item value="0x09">Up-Right</item>
<item value="0x0A">Up-Left</item>
<item value="0x04">Down (Crouch)</item>
<item value="0x05">Down-Right</item>
<item value="0x06">Down-Left</item>
<item value="0x01">Right</item>
<item value="0x02">Left</item>
<item value="0xff">Throw-Right (fierce throw)</item>
<item value="0xfe">Throw-Left (fierce throw)</item>
</parameter>
<script state="on">
<action>maincpu.mw@379F4=4E71</action>
<action>maincpu.mw@20F0=4E71,maincpu.mw@20F2=4E71,maincpu.mw@20F4=4E71</action>
</script>
<script state="run">
<action>maincpu.mw@379F4=4E71</action>
<action condition="param == 0xff and frame % 2 == 0">maincpu.pw@FF8950=0001</action>
<action condition="param == 0xff and frame % 2 != 0">maincpu.pw@FF8950=0041</action>
<action condition="param == 0xfe and frame % 2 == 0">maincpu.pw@FF8950=0002</action>
<action condition="param == 0xfe and frame % 2 != 0">maincpu.pw@FF8950=0042</action>
<action condition="param lt 0x0f">maincpu.pb@FF8951=param</action>
<!-- block ground attacks -->
<action condition="param == 0xfc and maincpu.pb@FF83C1==0">maincpu.pw@FF8950=0000</action> <!-- neutral when opponent is neutral -->
<action condition="param == 0xfc and (maincpu.pb@FF83C1==A or maincpu.pb@FF83C1==C) and (maincpu.pb@FF8651 band 4) == 4 and maincpu.pb@FF887C==0">maincpu.pw@FF8950=0005</action> <!-- if opponent attacking and pressing down, block low (on P1 side) -->
<action condition="param == 0xfc and (maincpu.pb@FF83C1==A or maincpu.pb@FF83C1==C) and (maincpu.pb@FF8651 band 4) == 4 and maincpu.pb@FF887C==1">maincpu.pw@FF8950=0006</action> <!-- if opponent attacking and pressing down, block low (on P2 side) -->
<action condition="param == 0xfc and (maincpu.pb@FF83C1==A or maincpu.pb@FF83C1==C) and (maincpu.pb@FF8651 band 4) != 4 and maincpu.pb@FF887C==0">maincpu.pw@FF8950=0001</action> <!-- if opponent attacking and not pressing down, block high (on P1 side) -->
<action condition="param == 0xfc and (maincpu.pb@FF83C1==A or maincpu.pb@FF83C1==C) and (maincpu.pb@FF8651 band 4) != 4 and maincpu.pb@FF887C==1">maincpu.pw@FF8950=0002</action> <!-- if opponent attacking and not pressing down, block high (on P2 side) -->
<!-- block everything: -->
<action condition="param == 0xfd and maincpu.pb@FF83C1==0">maincpu.pw@FF8950=0000</action> <!-- neutral when opponent is neutral -->
<action condition="param == 0xfd and (maincpu.pb@FF83C1==A or maincpu.pb@FF83C1==C) and (maincpu.pb@FF8651 band 4) == 4 and maincpu.pb@FF887C==0">maincpu.pw@FF8950=0005</action> <!-- if opponent attacking and pressing down, block low (on P1 side) -->
<action condition="param == 0xfd and (maincpu.pb@FF83C1==A or maincpu.pb@FF83C1==C) and (maincpu.pb@FF8651 band 4) == 4 and maincpu.pb@FF887C==1">maincpu.pw@FF8950=0006</action> <!-- if opponent attacking and pressing down, block low (on P2 side) -->
<action condition="param == 0xfd and (maincpu.pb@FF83C1==A or maincpu.pb@FF83C1==C) and (maincpu.pb@FF8651 band 4) != 4 and maincpu.pb@FF887C==0">maincpu.pw@FF8950=0001</action> <!-- if opponent attacking and not pressing down, block high (on P1 side) -->
<action condition="param == 0xfd and (maincpu.pb@FF83C1==A or maincpu.pb@FF83C1==C) and (maincpu.pb@FF8651 band 4) != 4 and maincpu.pb@FF887C==1">maincpu.pw@FF8950=0002</action> <!-- if opponent attacking and not pressing down, block high (on P2 side) -->
<!-- jump attacks (FF83C1==4) -->
<action condition="param == 0xfd and maincpu.pb@FF83C1==4 and (maincpu.pw@FF86C4-maincpu.pw@FF83C4 lt F) and maincpu.pb@FF887C==0">maincpu.pw@FF8950=0001</action> <!-- block high if the opponent is at close range (<0xF) on P1 side -->
<action condition="param == 0xfd and maincpu.pb@FF83C1==4 and (maincpu.pw@FF83C4-maincpu.pw@FF86C4 lt F) and maincpu.pb@FF887C==1">maincpu.pw@FF8950=0002</action> <!-- block high if the opponent is at close range (<0xF) on P2 side -->
<action condition="param == 0xfd and maincpu.pb@FF83C1==4 and (maincpu.pw@FF86C4-maincpu.pw@FF83C4 > 20) and maincpu.pb@FF887C==0">maincpu.pw@FF8950=0000</action> <!-- stop blocking if the opponent is farther than 0x20 on P1 side -->
<action condition="param == 0xfd and maincpu.pb@FF83C1==4 and (maincpu.pw@FF83C4-maincpu.pw@FF86C4 > 20) and maincpu.pb@FF887C==1">maincpu.pw@FF8950=0000</action> <!-- stop blocking if the opponent is farther than 0x20 on P2 side -->
<!-- ... except if: the opponent hits any kick or punch button -->
<action condition="param == 0xfd and maincpu.pb@FF83C1==4 and (maincpu.pw@FF8650 band ~000F) != 0 and maincpu.pb@FF887C==0">maincpu.pw@FF8950=0001</action>
<action condition="param == 0xfd and maincpu.pb@FF83C1==4 and (maincpu.pw@FF8650 band ~000F) != 0 and maincpu.pb@FF887C==1">maincpu.pw@FF8950=0002</action>
<!-- ... and do not block when the opponent is so far that he can't reach us with a jumping normal attack -->
<action condition="param == 0xfd and maincpu.pb@FF83C1==4 and (maincpu.pw@FF86C4-maincpu.pw@FF83C4 > 70) and maincpu.pb@FF887C==0">maincpu.pw@FF8950=0000</action>
<action condition="param == 0xfd and maincpu.pb@FF83C1==4 and (maincpu.pw@FF83C4-maincpu.pw@FF86C4 > 70) and maincpu.pb@FF887C==1">maincpu.pw@FF8950=0000</action>
</script>
<script state="off">
<action>maincpu.pw@FF8950=0</action>
<action>maincpu.mw@379F4=6710</action>
<action>maincpu.mw@20F0=3BD6,maincpu.mw@20F2=007E,maincpu.mw@20F4=0950</action>
</script>
</cheat>