Skip to content

Commit 16b78fc

Browse files
committed
Version 3.0 Release
1 parent 8ea0744 commit 16b78fc

File tree

107 files changed

+15583
-3666
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+15583
-3666
lines changed

README.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
1-
This contains the practice codes that I have made for Paper Mario: The Thousand-Year Door. The initial code for this project came from PistonMiner's work. https://github.com/PistonMiner/ttyd-tools
1+
## Credits
2+
* **PistonMiner** for their work on the TTYD scripting disassembly, the initial code for the rel framework, and the elf2rel, gcipack, and rellink utilities. (GitHub repo for these tools [here](https://github.com/PistonMiner/ttyd-tools).)
3+
* **Jdaster64** for their work on the Shufflizer. (GitHub repo for the Shufflizer [here](https://github.com/jdaster64/shufflizer).)
24

3-
The codes are stored on the save files (gci files) listed on the releases page. You must use the proper file for your version of the game.
4-
G8ME = US, G8MJ = JP, G8MP = EU
5-
https://github.com/Zephiles/ttyd-tools/releases
5+
## Overview
6+
These are practice codes that I have made for Paper Mario: The Thousand-Year Door.
67

7-
To use them on console, you need to use a homebrew app to move the save file onto your memory card, and then use the provided gct files with your prefered homebrew app.
8-
https://github.com/Zephiles/ttyd-tools/tree/master/ttyd-tools/relloader-ttyd/REL_Loader/GCT
8+
## Download
9+
The latest release can be found on the [releases page](https://github.com/Zephiles/TTYD-Practice-Codes/releases).
910

10-
To use them on an emulator such as Dolphin, you need to either import the save file onto the virtual memory card used by the emulator, or move the file into the GCI folder (this is a Dolphin thing). You must then use either the provided Action Replay code or the provided Gecko code. The Gecko code is shorter, so that is the prefered code to use. The Action Replay code is provided mainly for people who happen to be using the old Action Replay discs, or for people who are having issues applying Gecko codes in Dolphin.
11-
https://github.com/Zephiles/ttyd-tools/tree/master/ttyd-tools/relloader-ttyd/REL_Loader/Action_Replay
12-
https://github.com/Zephiles/ttyd-tools/tree/master/ttyd-tools/relloader-ttyd/REL_Loader/Gecko
11+
## Usage
12+
See the [user manual](https://github.com/Zephiles/TTYD-Practice-Codes/blob/master/USER_MANUAL.md).
13+
14+
## Prerequisites
15+
To build this, you need to have devkitPPC installed. Instructions for doing so can be found [here](https://devkitpro.org/wiki/Getting_Started). You also need to place **elf2rel.exe** in the **bin** folder. This file can either be compiled manually, or downloaded from [here](https://github.com/PistonMiner/ttyd-tools/releases/download/v2.4/elf2rel.exe).
16+
17+
## Building
18+
To build, navigate to the root directory of the repository (the folder with the makefile in it) and run `make`. Any combination of rules can be applied to this.
19+
`make us`
20+
`make jp eu`
21+
`make us eu`
22+
23+
## Special Thanks
24+
* **PistonMiner** for helping me with many C++ questions, and overall providing a ton of in-depth technical assistance.
25+
* **Jdaster64** for helping me with various formulas, providing logic about guard/superguard timing, and other C++ related help.
26+
* **Gibstack** for testing out the menu, and for confirming many battle actor names.

USER_MANUAL.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# User manual
2+
3+
## Table of contents
4+
- [Setup](#setup)
5+
- [Menus](#menus)
6+
- [Inventory](#inventory)
7+
- [Cheats](#cheats)
8+
- [Stats](#stats)
9+
- [Battles](#battles)
10+
- [Displays](#displays)
11+
- [Warps](#warps)
12+
- [Misc](#misc)
13+
14+
## Setup
15+
* Download the GCI from the most recent release (found [here](https://github.com/Zephiles/TTYD-Practice-Codes/releases)).
16+
* Copy the GCI containing the Practice Codes to the memory card. (This file contains only code required to run the Practice codes. It has no relation to the standard TTYD save file.)
17+
* For **Dolphin** users:
18+
* Use the memcard manager located in **Tools > Memcard Manager (GC)** to import the GCI into the file Dolphin is using for a memory card.
19+
* Alternatively, select "GCI Folder" for the format of the memory card in Slot A (in **Config dialog > GameCube > Device settings**), and copy the .gci file directly into the folder, located by default at **{Dolphin directory}/GC/<Region>/Card A**. *<Region>* will either be USA, JAP, or EUR depending on the region of the game that you're using.
20+
* For **Nintendont** or other console users:
21+
* Use the appropriate homebrew apps / folders, etc. to copy the file from your SD card to your GC memory card or virtual memory card.
22+
* Use the Gecko loader cheat code in the "relloader-ttyd" directory to make the game load the Practice Codes GCI.
23+
* For **Dolphin** users:
24+
* Right-click your TTYD game in the games list and go to **Properties > Gecko Codes**, and add the appropriate Gecko loader code for the region of the game you are using (found [here](https://github.com/Zephiles/TTYD-Practice-Codes/tree/master/ttyd-tools/relloader-ttyd/REL_Loader/Gecko)).
25+
* (For older revisions of Dolphin v5, instead go to **Properties > Edit Config**, and copy the text code into the Gecko codes section of the "G8ME01.ini" file that opens, marked by the text **[Gecko]**; if the section doesn't exist, add it.)
26+
* Enable cheats in **Config dialog > General**, and enable the loader code in **Properties > Gecko Codes** for TTYD.
27+
* For **Nintendont** users:
28+
* Copy the loader GCT (found [here](https://github.com/Zephiles/TTYD-Practice-Codes/tree/master/ttyd-tools/relloader-ttyd/REL_Loader/GCT)) onto your SD card, either to **/codes/** or into the folder with your TTYD ISO.
29+
* Note: It is important that you **do not** right click to save the GCT, or it will be saved incorrectly. You must download it via the **Download** button.
30+
* Enable cheats in Nintendont's settings before booting the game.
31+
* Alternatively, you can use the Action Replay loader code (e.g., if you have a physical Action Replay disc).
32+
33+
## Menus
34+
### Inventory
35+
This menu allows you to modify your entire inventory, including standard items, important items, badges, and stored items.
36+
37+
### Cheats
38+
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.
56+
57+
### Stats
58+
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.
59+
60+
### Battles
61+
This menu allows you to change the HP, Max HP, FP, Max FP, and statuses of anyone in a battle (refered to as Actors).
62+
* Note: This menu can only be used while in a battle.
63+
64+
### Displays
65+
1. **On-Screen Timer** displays a timer at the bottom-right of the screen. This timer is set to run at the current FPS, and therefore will count from 0 to 59 (0 to 49 for EU at 50hz) before reaching one second.
66+
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.
67+
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.
68+
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.
72+
73+
### Warps
74+
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.
75+
76+
## Misc
77+
There are several other changes that have been made outside of the menu:
78+
1. The current Sequence value is displayed in the pause menu next to Mario's stats.
79+
2. The sound effects for pausing, unpausing, bringing up the Z menu, and closing the Z menu are disabled.
80+
3. The unused Mega badges can be used in battles without the need for a boot/hammer upgrade.

ttyd-tools/bin/readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Place elf2rel.exe in this folder.

ttyd-tools/rel/include/buttons.h

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#pragma once
2+
3+
#include <cstdint>
4+
5+
namespace clearcache {
6+
7+
void clear_DC_IC_Cache(void *ptr, uint32_t size);
8+
9+
}

ttyd-tools/rel/include/codes.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#pragma once
2+
3+
#include <cstdint>
4+
5+
namespace mod {
6+
7+
void saveMarioAndPartnerPositions();
8+
void loadMarioAndPartnerPositions();
9+
void saveAnywhere();
10+
void setTextStorage();
11+
void setTimeStopTextStorage();
12+
void speedUpMario();
13+
void reloadRoomMain();
14+
void reloadRoom();
15+
void levitate();
16+
void lockMarioHPToMax();
17+
void bobberyEarly();
18+
void spawnItem();
19+
20+
void displaySequenceInPauseMenu();
21+
void displayOnScreenTimer();
22+
void displayMarioCoordinatesBoolCheck();
23+
void displayJumpStorageDetails();
24+
void displayButtonInputs();
25+
void displayYoshiSkipDetails();
26+
void displayPalaceSkipDetails();
27+
28+
int32_t warpToMap(uint32_t value);
29+
30+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#pragma once
2+
3+
#include <ttyd/seqdrv.h>
4+
5+
#include <cstdint>
6+
7+
namespace mod {
8+
9+
bool checkButtonCombo(uint16_t combo);
10+
bool checkButtonComboEveryFrame(uint16_t combo);
11+
bool checkForSpecificSeq(ttyd::seqdrv::SeqIndex wantedSeq);
12+
bool checkIfInGame();
13+
void *getBattlePointer();
14+
void *getMarioBattlePointer();
15+
void *getPartnerBattlePointer();
16+
void *getActorPointer(uint32_t slot);
17+
uint32_t secondsToFrames(uint32_t seconds);
18+
uint32_t getSequencePosition();
19+
void setSequencePosition(uint32_t value);
20+
void setNextMap(const char *map);
21+
void setNextBero(const char *bero);
22+
bool compareStrings(const char *str1, const char *str2);
23+
bool compareStringsSize(const char *str1, const char *str2, uint32_t size);
24+
uint32_t getSystemLevel();
25+
void setSystemLevel(uint32_t value);
26+
void setSeq(const char *map, const char *bero);
27+
void setSpecificSeq(ttyd::seqdrv::SeqIndex seq, const char *map, const char *bero);
28+
void *clearMemory(void *destination, uint32_t size);
29+
int32_t getPartnerID();
30+
int32_t getFollowerID();
31+
void *getPartnerPointer();
32+
void *getFollowerPointer();
33+
void removePartnerFromOverworld();
34+
void removeFollowerFromOverworld();
35+
bool checkIfBadgeEquipped(int16_t badge);
36+
void recheckJumpAndHammerLevels();
37+
uint32_t getCurrentPitFloor();
38+
39+
}

ttyd-tools/rel/include/draw.h

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
#pragma once
2+
3+
#include <cstdint>
4+
5+
namespace mod {
6+
7+
void drawFunctionOnDebugLayer(void (*func)());
8+
void drawFunctionOn2DLayer(void (*func)());
9+
10+
void drawMenuWindow();
11+
12+
void drawWindow(uint32_t color, int32_t x, int32_t y, int32_t width,
13+
int32_t height, int32_t curve);
14+
15+
int32_t *drawIcon(int32_t position[3], int16_t iconNum, float scale);
16+
int32_t *drawIconFromItem(int32_t position[3], int16_t itemNum, float scale);
17+
void drawStringMultiline(float x, float y, const char *text);
18+
void startDrawString(uint8_t alpha, uint32_t color, float scale);
19+
20+
void drawText(const char *text, int32_t x, int32_t y, uint8_t alpha,
21+
uint32_t color, float scale);
22+
23+
void drawTextWithWindow(const char *text, int32_t textPosX, int32_t textPosY, uint8_t alpha,
24+
uint32_t textColor, float textScale, int32_t windowWidth, uint32_t windowColor, float windowCurve);
25+
26+
void drawSingleColumnMain();
27+
void drawSingleColumn(uint32_t maxOptionsPerPage, uint32_t currentPage);
28+
29+
void drawMultipleColumnsVertical(int32_t posX, int32_t posY, uint32_t currentMenuOption,
30+
uint32_t currentPage, uint32_t size, uint32_t maxOptionsPerPage,
31+
uint32_t maxOptionsPerRow, bool showCurrentOption,
32+
uint32_t posXIncrementAmount, const char **lines);
33+
34+
void drawInventoryIconAndTextColumns();
35+
36+
void drawItemIconsColumn(uint32_t indexStart, uint32_t indexIncrement, uint32_t size,
37+
int32_t posX, int32_t posY, uint32_t address, float scale);
38+
39+
void drawItemTextColumn(uint32_t indexStart, uint32_t indexIncrement, uint32_t size,
40+
int32_t posX, int32_t posY, uint32_t address, uint8_t alpha, float scale);
41+
42+
void drawMarioSpecialMovesOptions();
43+
void drawFollowersOptions();
44+
void drawMarioStats();
45+
void drawPartnerStats();
46+
void drawBattlesActorStats();
47+
void drawCurrentFollowerOut();
48+
void drawBattlesActorsList();
49+
void drawBattlesStatusesList();
50+
51+
void drawErrorWindow(const char *text, int32_t textPosX, int32_t windowWidth);
52+
void drawErrorMessage(const char *line);
53+
void drawWarpsErrorMessage();
54+
void drawPartnerFollowerMessage(const char *message);
55+
void drawPartnerErrorMessage();
56+
void drawFollowersErrorMessage();
57+
void drawNotInBattleErrorMessage();
58+
void drawConfirmationWindow(const char *message);
59+
60+
void drawSingleLineFromArray(int32_t posX, int32_t posY,
61+
int32_t currentMenuOption, const char **line);
62+
63+
void drawSingleLineFromStringAndValue(int32_t posX, int32_t posY,
64+
const char *line, int32_t value);
65+
66+
void drawSingleLineFromStringAndArray(int32_t posX, int32_t posY,
67+
int32_t currentMenuOption, const char *string, const char **line);
68+
69+
void drawAdjustableValueSpawnItem();
70+
void drawAdjustableValue(bool changingItem, uint32_t currentMenu);
71+
void drawAddByIconMain(uint32_t currentMenu);
72+
void drawAddByIcon(uint32_t currentMenu);
73+
void drawAddById(uint32_t currentMenu);
74+
75+
void drawPageNumber(int32_t posX, int32_t posY, uint32_t currentPage);
76+
void drawBoolOnOrOff(bool tempBool, const char *currentLine, int32_t posY);
77+
void drawCheatsBool(int32_t posY);
78+
void drawButtonCombo(uint16_t buttonCombo, int32_t posY, const char *description);
79+
void drawChangeButtonCombo(uint16_t &currentButtonCombo);
80+
void drawCheatsForcedDropItem();
81+
void drawCheatsClearArea();
82+
void drawWarpsOptions();
83+
void drawOnScreenTimerButtonCombos();
84+
85+
void drawOnScreenTimer();
86+
void drawSequenceInPauseMenu();
87+
void drawMarioCoordinates();
88+
void drawJumpStorageDetails();
89+
void drawButtonInputs();
90+
void drawYoshiSkipDetails();
91+
void drawPalaceSkipDetails();
92+
93+
void drawTitleScreenInfo();
94+
void drawFileSelectScreenInfo();
95+
96+
}

ttyd-tools/rel/include/drawstring.h

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)