Skip to content

Commit 48cffb0

Browse files
committed
Minor changes
Added in additional checks to make sure that the address for whether the Debug Badge is equipped or not is handled properly, even when the Auto Action Commands code is disabled. Added some text to the user manual.
1 parent c9d6503 commit 48cffb0

File tree

3 files changed

+39
-17
lines changed

3 files changed

+39
-17
lines changed

USER_MANUAL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ This menu allows you to modify your entire inventory, including standard items,
4545
8. **Time Stop Text Storage** sets a specific value that causes Time Stop Text Storage to be active. A partner is required to be out for this code to have an effect.
4646
9. **Speed Up Mario** applies a large speed boost to Mario. The button combination must be held for this code to work.
4747
10. **Disable Non-Cutscene Battles** disables any battles in the field that are started by a cutscene. The button combination must be held for this code to work.
48-
11. **Auto Action Commands** automatically performs action commands for you, similar to how the Debug Badge works. This applies to most guards/superguards as well as for filling the run meter. The button combination must be held for this code to work.
48+
11. **Auto Action Commands** automatically performs action commands for you, the same way that the Debug Badge works. This applies to most guards/superguards as well as for filling the run meter. The button combination must be held for this code to work.
4949
12. **Infinite Item Usage** allows you to use any item without it being removed from the menu. You must hold the button combination when using the item for this code to work. The button combination must be held for this code to work.
5050
13. **Reload Room** reloads the current room. This cannot be used on the title screen nor on the file select screen.
5151
14. **Levitate** allows you to levitate in the air. The button combination must be held for this code to work.
@@ -72,6 +72,7 @@ This menu allows you to change the HP, Max HP, FP, Max FP, held items, and statu
7272
* The frame that you guarded/superguarded an attack out of the total amount of possible frames.
7373
* How many frames early you pressed A or B. It should be noted that nothing will be displayed if the button was pressed very early (more than 6 or so frames for guards, and more than 12 or so frames for superguards).
7474
* Whether you pressed too many buttons in a short period of time for the guard/superguard to be accepted.
75+
* Whether the attack can be superguarded or not (will only be displayed if you tried to superguard it).
7576
6. **Art Attack Hitboxes** displays boxes around enemies in battles when using Art Attack.
7677
7. **Yoshi Skip** displays various information about performing this skip. The main timer (labeled YST) is set to reset and start running once you leave a battle, and pauses once you press A. You can also manually reset this timer by holding Y for two seconds.
7778
8. **Palace Skip** displays various information about performing this skip. The main timer (labeled YST) is set to reset and start once you leave the pause menu, and pauses once you press X. You can also manually reset this timer by holding Y for two seconds. *PhaEmy* keeps track of the Y coordinate for the phantom ember, *ItemTimer* keeps track of the timer for the current item in the field, and *ParY* keeps track of your partner's Y coordinate.

ttyd-tools/rel/source/codes.cpp

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,22 @@ bool checkForArtAttackHitboxesBool()
7272

7373
void Mod::performBattleChecks()
7474
{
75-
// Check to see if the Auto Action Commands cheat is active or not
76-
if (Cheat[AUTO_ACTION_COMMANDS].Active)
75+
#ifdef TTYD_US
76+
const uint32_t DebugBadgeAddressOffset = 0x307;
77+
#elif defined TTYD_JP
78+
const uint32_t DebugBadgeAddressOffset = 0x303;
79+
#elif defined TTYD_EU
80+
const uint32_t DebugBadgeAddressOffset = 0x30B;
81+
#endif
82+
83+
uint32_t MarioBattlePointer = reinterpret_cast<uint32_t>(getMarioBattlePointer());
84+
uint32_t PartnerBattlePointer = reinterpret_cast<uint32_t>(getPartnerBattlePointer());
85+
86+
if (MarioBattlePointer != 0)
7787
{
78-
uint32_t MarioBattlePointer = reinterpret_cast<uint32_t>(getMarioBattlePointer());
79-
80-
if (MarioBattlePointer != 0)
88+
// Check to see if the Auto Action Commands cheat is active or not
89+
if (Cheat[AUTO_ACTION_COMMANDS].Active)
8190
{
82-
#ifdef TTYD_US
83-
const uint32_t DebugBadgeAddressOffset = 0x307;
84-
#elif defined TTYD_JP
85-
const uint32_t DebugBadgeAddressOffset = 0x303;
86-
#elif defined TTYD_EU
87-
const uint32_t DebugBadgeAddressOffset = 0x30B;
88-
#endif
89-
90-
uint32_t PartnerBattlePointer = reinterpret_cast<uint32_t>(getPartnerBattlePointer());
91-
9291
if (checkButtonComboEveryFrame(Cheat[AUTO_ACTION_COMMANDS].ButtonCombo) ||
9392
checkIfBadgeEquipped(DebugBadge))
9493
{
@@ -103,6 +102,28 @@ void Mod::performBattleChecks()
103102
{
104103
*reinterpret_cast<uint8_t *>(MarioBattlePointer + DebugBadgeAddressOffset) = 0;
105104

105+
if (PartnerBattlePointer != 0)
106+
{
107+
*reinterpret_cast<uint8_t *>(PartnerBattlePointer + DebugBadgeAddressOffset) = 0;
108+
}
109+
}
110+
}
111+
else
112+
{
113+
// Check if the Debug Badge is equipped or not
114+
if (checkIfBadgeEquipped(DebugBadge))
115+
{
116+
*reinterpret_cast<uint8_t *>(MarioBattlePointer + DebugBadgeAddressOffset) = 1;
117+
118+
if (PartnerBattlePointer != 0)
119+
{
120+
*reinterpret_cast<uint8_t *>(PartnerBattlePointer + DebugBadgeAddressOffset) = 1;
121+
}
122+
}
123+
else
124+
{
125+
*reinterpret_cast<uint8_t *>(MarioBattlePointer + DebugBadgeAddressOffset) = 0;
126+
106127
if (PartnerBattlePointer != 0)
107128
{
108129
*reinterpret_cast<uint8_t *>(PartnerBattlePointer + DebugBadgeAddressOffset) = 0;

ttyd-tools/rel/source/draw.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2750,7 +2750,7 @@ void drawTitleScreenInfo()
27502750
PosX += 108;
27512751
PosY -= 14;
27522752

2753-
const char *String = "Practice Codes v3.0.10\nCreated by Zephiles";
2753+
const char *String = "Practice Codes v3.0.11\nCreated by Zephiles";
27542754
drawText(String, PosX, PosY, Alpha, TextColor, Scale);
27552755
}
27562756

0 commit comments

Comments
 (0)