Skip to content

Commit 8976eeb

Browse files
committed
Added additional features
Added a display that allows the player to see the frame that they tried to guard/superguard. If they press the button early, then it'll say how many frames early, to a specific extent. Added a cheat that allows the player to walk through most objects. They will not be able to walk through NPCs.
1 parent 39110c2 commit 8976eeb

File tree

14 files changed

+445
-32
lines changed

14 files changed

+445
-32
lines changed

USER_MANUAL.md

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,24 @@ This menu allows you to modify your entire inventory, including standard items,
3636

3737
### Cheats
3838
1. **Change Sequence** allows you to change the current Sequence value, which is the value used to tell what part of the game you're currently at.
39-
2. **Save Coordinates** allows you to save Mario's and your partner's current positions and angles.
40-
3. **Load Coordinates** allows you to load the positions and angles saved from the previous code.
41-
4. **Spawn Item** allows you to spawn any item into the field.
42-
5. **Save Anywhere** allows you to save the game at any location, even if a save block is not present in the current room.
43-
6. **Text Storage** sets a specific value that causes Text Storage to be active. A partner is required to be out for this code to have an effect.
44-
7. **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.
45-
8. **Speed Up Mario** applies a large speed boost to Mario.
46-
9. **Disable Non-Cutscene Battles** disables any battles in the field that are started by a cutscene.
47-
10. **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.
48-
11. **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.
49-
12. **Reload Room** reloads the current room. This cannot be used on the title screen nor on the file select screen.
50-
13. **Levitate** allows you to levitate in the air. You must hold the button combination for this code to work.
51-
14. **Lock Mario's HP To Max** locks Mario's current HP to the max.
52-
15. **Allow Running From Any Battle** allows you to run from any battle, even if the battle would normally not allow this.
53-
16. **Bobbery Early** clears some values, which allows you to perform Bobbery Early more than once on a save file without the need to reload.
54-
17. **Force NPC Item Drop** forces any defeared enemy to drop a specified item. The item can be changed at will.
55-
18. **Clear Area Flags** allows you to clear most of the flags for a specified area. A confirmation message is displayed when trying to do so, to prevent accidently clearing flags.
39+
2. **Walk Through Most Objects** allows you to walk through most objects. It does now allow walking through NPCs. The button combination must be held for this code to work.
40+
3. **Save Coordinates** allows you to save Mario's and your partner's current positions and angles.
41+
4. **Load Coordinates** allows you to load the positions and angles saved from the previous code.
42+
5. **Spawn Item** allows you to spawn any item into the field.
43+
6. **Save Anywhere** allows you to save the game at any location, even if a save block is not present in the current room.
44+
7. **Text Storage** sets a specific value that causes Text Storage to be active. A partner is required to be out for this code to have an effect.
45+
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.
46+
9. **Speed Up Mario** applies a large speed boost to Mario. The button combination must be held for this code to work.
47+
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.
49+
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.
50+
13. **Reload Room** reloads the current room. This cannot be used on the title screen nor on the file select screen.
51+
14. **Levitate** allows you to levitate in the air. The button combination must be held for this code to work.
52+
15. **Lock Mario's HP To Max** locks Mario's current HP to the max.
53+
16. **Allow Running From Any Battle** allows you to run from any battle, even if the battle would normally not allow this.
54+
17. **Bobbery Early** clears some values, which allows you to perform Bobbery Early more than once on a save file without the need to reload.
55+
18. **Force NPC Item Drop** forces any defeared enemy to drop a specified item. The item can be changed at will.
56+
19. **Clear Area Flags** allows you to clear most of the flags for a specified area. A confirmation message is displayed when trying to do so, to prevent accidently clearing flags. The flags will be cleared on the next screen transition.
5657

5758
### Stats
5859
This menu allows you to modify Mario's stats, all of your partner's stats, whether or not partners are enabled or not, whether a partner is out or not, and whether or not a follower is out or not.
@@ -66,9 +67,13 @@ This menu allows you to change the HP, Max HP, FP, Max FP, and statuses of anyon
6667
2. **Mario's Coordinates** displays Mario's coordinates at the bottom-left of the screen. If the On-Screen Timer is active, then the position of Mario's Coordinates will be shifted upwards.
6768
3. **Jump Storage** displays a value that determines whether you have Jump Storage or not. The value will be 0 when you don't have it, and 1 when you have it. While this display is active, you can press Y three times in succession to manually give yourself Jump Storage.
6869
4. **Button Input Display** displays which buttons are pressed at the bottom-left of the screen. When this display is active, the other displays that are placed at the bottom-left of the screen are shifted upwards.
69-
5. **Art Attack Hitboxes** displays boxes around enemies in battles when using Art Attack.
70-
6. **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.
71-
7. **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.
70+
5. **Guard/Superguard Timings** displays the following:
71+
* The frame that you guarded/superguarded an attack out of the total amount of possible frames.
72+
* 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).
73+
* Whether you pressed too many buttons in a short period of time for the guard/superguard to be accepted.
74+
6. **Art Attack Hitboxes** displays boxes around enemies in battles when using Art Attack.
75+
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.
76+
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.
7277

7378
### Warps
7479
This menu allows you to warp to various places around the game. A description for each option is displayed when the cursor is over one.

ttyd-tools/rel/include/codes.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace mod {
66

7+
void walkThroughMostObjects();
78
void saveMarioAndPartnerPositions();
89
void loadMarioAndPartnerPositions();
910
void saveAnywhere();
@@ -16,6 +17,7 @@ void levitate();
1617
void lockMarioHPToMax();
1718
void bobberyEarly();
1819
void spawnItem();
20+
void checkIfAreaFlagsShouldBeCleared();
1921

2022
void displaySequenceInPauseMenu();
2123
void displayOnScreenTimer();
@@ -24,6 +26,8 @@ void displayJumpStorageDetails();
2426
void displayButtonInputs();
2527
void displayYoshiSkipDetails();
2628
void displayPalaceSkipDetails();
29+
void actionCommandsTimingsInit();
30+
void displayActionCommandsTiming();
2731

2832
int32_t warpToMap(uint32_t value);
2933

ttyd-tools/rel/include/draw.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ void drawJumpStorageDetails();
8989
void drawButtonInputs();
9090
void drawYoshiSkipDetails();
9191
void drawPalaceSkipDetails();
92+
void drawActionCommandsTiming();
9293

9394
void drawTitleScreenInfo();
9495
void drawFileSelectScreenInfo();

ttyd-tools/rel/include/global.h

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ enum INVENTORY_SELECTION_ERRORS
5555
enum CHEATS_OPTIONS
5656
{
5757
CHANGE_SEQUENCE = 0,
58+
WALK_THROUGH_WALLS,
5859
SAVE_COORDINATES,
5960
LOAD_COORDINATES,
6061
SPAWN_ITEM,
@@ -211,6 +212,7 @@ enum DISPLAYS_OPTIONS
211212
MARIO_COORDINATES,
212213
JUMP_STORAGE,
213214
BUTTON_INPUT_DISPLAY,
215+
GUARD_SUPERGUARD_TIMINGS,
214216
ART_ATTACK_HITBOXES,
215217
YOSHI_SKIP,
216218
PALACE_SKIP,
@@ -399,6 +401,13 @@ struct SpawnItems
399401
bool InAdjustableValueMenu;
400402
};
401403

404+
struct ClearAreaFlagsStruct
405+
{
406+
uint8_t CurrentOption;
407+
bool FlagsShouldBeCleared;
408+
bool StartClearingFlags;
409+
};
410+
402411
struct TrickDisplay
403412
{
404413
uint32_t MainTimer;
@@ -424,9 +433,18 @@ struct OnScreenTimerDisplay
424433
}
425434
};
426435

436+
struct DisplayActionCommandTiming
437+
{
438+
int32_t (*Trampoline)(void *, void *);
439+
uint16_t DisplayTimer;
440+
int8_t TypeToDraw;
441+
int8_t Last_A_Frame;
442+
int8_t Last_B_Frame;
443+
};
444+
427445
extern Menus Menu[20];
428-
extern Cheats Cheat[17];
429-
extern bool Displays[7];
446+
extern Cheats Cheat[18];
447+
extern bool Displays[8];
430448
extern char DisplayBuffer[256];
431449

432450
extern AutoIncrement AdjustableValueMenu;
@@ -435,9 +453,11 @@ extern MarioPartnerPositionsStruct MarioPartnerPositions;
435453
extern SaveAnywhereStruct SaveAnywhere;
436454
extern ReloadRoomStruct ReloadRoom;
437455
extern SpawnItems SpawnItem;
456+
extern ClearAreaFlagsStruct ClearAreaFlags;
438457
extern TrickDisplay YoshiSkip;
439458
extern TrickDisplay PalaceSkip;
440459
extern OnScreenTimerDisplay OnScreenTimer;
460+
extern DisplayActionCommandTiming DisplayActionCommands;
441461

442462
extern const char *CheatsLines[];
443463
extern const char *CheatsForceItemDropAreas[];
@@ -487,6 +507,8 @@ extern char *NextBero;
487507
extern char *NextMap;
488508
extern char *NextArea;
489509
extern ItemData *ItemDataTable;
510+
extern int8_t *GuardFrames;
511+
extern int8_t *SuperguardFrames;
490512
extern uint32_t PauseMenuStartAddress;
491513
extern uint32_t wp_fadedrv_Address;
492514
extern uint32_t _mapEntAddress;
@@ -499,6 +521,7 @@ extern uint32_t FieldItemsAddressesStart;
499521
extern uint32_t GlobalWorkPointer;
500522
extern uint32_t titleMainAddress;
501523

524+
extern bool ResetMarioProperties;
502525
extern int16_t ForcedNPCItemDrop;
503526
extern bool MarioFreeze;
504527
extern uint16_t JumpStorageSetCounter;

ttyd-tools/rel/include/menufunctions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void setAddByIconValue(void *address);
4949
void duplicateCurrentItem(void *address);
5050
void deleteItem();
5151
int32_t changeItem();
52-
void cheatClearAreaFlags();
52+
void cheatClearAreaFlags(uint32_t currentMenuOption);
5353

5454
// uint8_t *getButtonsPressedDynamic(uint8_t *buttonArray, uint16_t currentButtonCombo);
5555
uint8_t *getButtonsPressed(uint8_t *buttonArray, uint16_t currentButtonCombo);

ttyd-tools/rel/include/ttyd.eu.lst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,27 @@
810810
// 800F9EA8:battleSeqEndCheck
811811
// 800F9EB8:battleMain
812812

813+
// battle_ac.o
814+
// 800F9F00:BattleAcGaugeSeDelete
815+
// 800F9F44:BattleAcGaugeSeUpdate
816+
// 800F9FBC:BattleAcGaugeSeInit
817+
// 800F9FFC:BattleAcDrawGauge
818+
// 800FAD10:BattleACGetButtonIcon
819+
// 800FAF54:BattleActionCommandGetPrizeLv
820+
// 800FAF98:BattleActionCommandSetDifficulty
821+
800FAFC8:BattleActionCommandGetDifficulty
822+
// 800FAFD0:BattleActionCommandResetDefenceResult
823+
// 800FB000:BattleActionCommandGetDefenceResult
824+
800FB00C:BattleACPadCheckRecordTrigger
825+
800FB024:BattleActionCommandCheckDefence
826+
// 800FB28C:BattleActionCommandStop
827+
// 800FB2BC:BattleActionCommandStart
828+
// 800FB2C8:BattleActionCommandSetup
829+
// 800FB35C:BattleActionCommandDeclareACResult
830+
// 800FB3E0:BattleActionCommandResult
831+
// 800FB41C:BattleActionCommandManager
832+
// 800FB498:BattleActionCommandManagerInit
833+
813834
// battle_disp.o
814835
// 801010C4:_btlStockExpDisp
815836
// 801012C8:BattleStockExpDisp

ttyd-tools/rel/include/ttyd.jp.lst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,27 @@
804804
// 800F40EC:battleSeqEndCheck
805805
// 800F40FC:battleMain
806806

807+
// battle_ac.o
808+
// 800F4144:BattleAcGaugeSeDelete
809+
// 800F4188:BattleAcGaugeSeUpdate
810+
// 800F4200:BattleAcGaugeSeInit
811+
// 800F4240:BattleAcDrawGauge
812+
// 800F4F54:BattleACGetButtonIcon
813+
// 800F5198:BattleActionCommandGetPrizeLv
814+
// 800F51DC:BattleActionCommandSetDifficulty
815+
800F520C:BattleActionCommandGetDifficulty
816+
// 800F5214:BattleActionCommandResetDefenceResult
817+
// 800F5244:BattleActionCommandGetDefenceResult
818+
800F5250:BattleACPadCheckRecordTrigger
819+
800F5268:BattleActionCommandCheckDefence
820+
// 800F54D0:BattleActionCommandStop
821+
// 800F5500:BattleActionCommandStart
822+
// 800F550C:BattleActionCommandSetup
823+
// 800F55A0:BattleActionCommandDeclareACResult
824+
// 800F5624:BattleActionCommandResult
825+
// 800F5660:BattleActionCommandManager
826+
// 800F56DC:BattleActionCommandManagerInit
827+
807828
// battle_disp.o
808829
// 800FB2D8:_btlStockExpDisp
809830
// 800FB4DC:BattleStockExpDisp

ttyd-tools/rel/include/ttyd.us.lst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,27 @@
809809
// 800F903C:battleSeqEndCheck
810810
// 800F904C:battleMain
811811

812+
// battle_ac.o
813+
// 800F9094:BattleAcGaugeSeDelete
814+
// 800F90D8:BattleAcGaugeSeUpdate
815+
// 800F9150:BattleAcGaugeSeInit
816+
// 800F9190:BattleAcDrawGauge
817+
// 800F9EA4:BattleACGetButtonIcon
818+
// 800FA0E8:BattleActionCommandGetPrizeLv
819+
// 800FA12C:BattleActionCommandSetDifficulty
820+
800FA15C:BattleActionCommandGetDifficulty
821+
// 800FA164:BattleActionCommandResetDefenceResult
822+
// 800FA194:BattleActionCommandGetDefenceResult
823+
800FA1A0:BattleACPadCheckRecordTrigger
824+
800FA1B8:BattleActionCommandCheckDefence
825+
// 800FA420:BattleActionCommandStop
826+
// 800FA450:BattleActionCommandStart
827+
// 800FA45C:BattleActionCommandSetup
828+
// 800FA4F0:BattleActionCommandDeclareACResult
829+
// 800FA574:BattleActionCommandResult
830+
// 800FA5B0:BattleActionCommandManager
831+
// 800FA62C:BattleActionCommandManagerInit
832+
812833
// battle_disp.o
813834
// 80100258:_btlStockExpDisp
814835
// 8010045C:BattleStockExpDisp
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#pragma once
2+
3+
#include <cstdint>
4+
5+
namespace ttyd::battle_ac {
6+
7+
extern "C" {
8+
9+
// BattleAcGaugeSeDelete
10+
// BattleAcGaugeSeUpdate
11+
// BattleAcGaugeSeInit
12+
// BattleAcDrawGauge
13+
// BattleACGetButtonIcon
14+
// BattleActionCommandGetPrizeLv
15+
// BattleActionCommandSetDifficulty
16+
int8_t BattleActionCommandGetDifficulty(void *battlePointer);
17+
// BattleActionCommandResetDefenceResult
18+
// BattleActionCommandGetDefenceResult
19+
uint32_t BattleACPadCheckRecordTrigger(uint32_t frame, uint32_t button);
20+
int32_t BattleActionCommandCheckDefence(void *battle_unit, void *attack_params);
21+
// BattleActionCommandStop
22+
// BattleActionCommandStart
23+
// BattleActionCommandSetup
24+
// BattleActionCommandDeclareACResult
25+
// BattleActionCommandResult
26+
// BattleActionCommandManager
27+
// BattleActionCommandManagerInit
28+
29+
}
30+
31+
}

0 commit comments

Comments
 (0)