Skip to content
This repository was archived by the owner on Sep 13, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
d0406d0
Add fix for painting warp cutscenes
MonsterDruide1 Jul 5, 2022
1deb82e
efun: Add VWEFUN (void WEFUN)
MonsterDruide1 Aug 15, 2022
01e6e44
"Add coins" cheat for 1.3
MonsterDruide1 Aug 15, 2022
c2694b4
debug: Add Current Entry Name
MonsterDruide1 Aug 15, 2022
d5f7026
Add Statistics page
MonsterDruide1 Aug 15, 2022
b02c3b8
Misc: Add Reload and Previous Scene
MonsterDruide1 Aug 15, 2022
f681bcd
ui: Add Camera info page
MonsterDruide1 Sep 7, 2022
d4cd318
Add angle of velocity to info
MonsterDruide1 Sep 9, 2022
a65c4c6
Misc: Fix Gravity/Previous scene selection
MonsterDruide1 Sep 21, 2022
0481dcf
Rework full input module
MonsterDruide1 Dec 27, 2022
9a1345c
UI: Allow underflow (1 -> last page)
MonsterDruide1 Dec 27, 2022
957c253
UI: Allow under/overflow of current line
MonsterDruide1 Dec 27, 2022
e55c762
Separate control and TAS inputs
MonsterDruide1 Dec 27, 2022
4e70330
UI: Show everywhere with HakoniwaSequence
MonsterDruide1 Dec 29, 2022
03d4407
Add option for enabling/disabling rendering
MonsterDruide1 Dec 29, 2022
da05ff8
Name: `drawWarpHoleCutsceneHook`->`tasDrawKitHook`
MonsterDruide1 Dec 29, 2022
4128fb6
TAS: Enable during DemoChangeWorldScene
MonsterDruide1 Dec 29, 2022
b79847e
Server: Simpler logging
MonsterDruide1 Dec 29, 2022
bd0fc22
Fix compiling (debugNum)
MonsterDruide1 Dec 30, 2022
356e3b9
Add InfoMighty to available pages
MonsterDruide1 Dec 30, 2022
547f80f
TAS: Restart playback on new script
MonsterDruide1 Dec 30, 2022
06337e8
FIx crash on page 4 during a capture
MonsterDruide1 Dec 30, 2022
0777b07
Update "About" page
MonsterDruide1 Dec 30, 2022
fc89257
Add stage descriptions.
Ontwikseltsaar Jun 2, 2022
b2d34b4
Change default build version to 1.3.0.
Ontwikseltsaar Jun 3, 2022
2b590d9
Change python command.
Ontwikseltsaar Jun 3, 2022
a6577b6
Update README.
Ontwikseltsaar Jun 3, 2022
0318efe
Change Features header in README.
Ontwikseltsaar Jun 3, 2022
73fc852
Restructure README and make some other small README changes.
Ontwikseltsaar Jun 3, 2022
d3924bd
Update Fruityloops's display name in README.
Ontwikseltsaar Jun 3, 2022
2f7fd98
Update practice mod version number.
Ontwikseltsaar Jun 3, 2022
ba64d3f
Update about page.
Ontwikseltsaar Jun 3, 2022
c41c0b0
Add v1.3.0 getRandom and isHalfProbability addresses for Wiggler patt…
Ontwikseltsaar Jun 5, 2022
cca7065
Add v1.3.0 addresses to inject wiggler pattern functions for Starligh…
Ontwikseltsaar Jun 5, 2022
f4cb268
Fix bug where not all Wiggler patterns could be generated due to cast…
Ontwikseltsaar Jun 5, 2022
917d785
Enable going left from the random wiggler pattern to the star pattern.
Ontwikseltsaar Jun 5, 2022
f2d5604
Enable scenario descriptions for Dark Side and Darker Side.
Ontwikseltsaar Jun 5, 2022
aca3b91
Various wording changes.
Ontwikseltsaar Jun 5, 2022
7f9d209
Prevent saving Mario's position when hiding the mod menu.
Ontwikseltsaar Jun 5, 2022
e16a976
Update practice mod version number.
Ontwikseltsaar Jun 5, 2022
9fc3426
Fix v1.3.0 functions used on the moon info page.
Ontwikseltsaar Jun 5, 2022
31d73f8
Enable the moon info page.
Ontwikseltsaar Jun 5, 2022
e6c58cb
Added info about what game version you have
FTSMO Jul 6, 2022
9554565
Added info about how to close the menu on 1.0
FTSMO Jul 6, 2022
086590d
Added left and right stick cartesian info
FTSMO Jul 7, 2022
e480e4c
Capitalize game version line.
Ontwikseltsaar Jul 11, 2022
12086d6
Corrected some scenarios
GamesJam82 Aug 3, 2022
9d2eb6b
1.3: Fix crashes
MonsterDruide1 Dec 30, 2022
63e6d0d
Remaining Frames (#1)
FTSMO Dec 30, 2022
b8c16d5
Add helper for getting nerves
MonsterDruide1 Mar 24, 2023
9132db6
misc: Add override for Bowser Hat Randomizer
MonsterDruide1 Mar 27, 2023
fe2e39b
options: Reload Scene with D-UP
MonsterDruide1 Mar 27, 2023
a07f4b7
Fix menu input on multiple controllers
MonsterDruide1 May 19, 2023
5d7cdcc
Fix Wiggler pattern line not being selectable
MonsterDruide1 May 20, 2023
c15c55f
Major rewrite of UI and TAS on 1.3
MonsterDruide1 Aug 19, 2023
7a67f9d
Possible fix for crash on timeout after script-pkg
MonsterDruide1 Oct 10, 2023
6a2b00b
Stop playback on ScriptInfo rather than ignoring
MonsterDruide1 Oct 10, 2023
e7ad980
Fix starting scripts with `go` on 1.3
MonsterDruide1 Oct 11, 2023
507412b
Fix crash on Shine List view
MonsterDruide1 Oct 11, 2023
890984f
Fix off-by-one error with scenario descriptions
MonsterDruide1 Oct 11, 2023
cd6a0a1
Update README
MonsterDruide1 Oct 11, 2023
bc3b53b
Enable Stage UI on 1.3
MonsterDruide1 Nov 1, 2023
438922e
Add override for Pipe Maze randomness (1.0)
MonsterDruide1 Feb 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ starlight:
starlight_patch_$(S2VER)/*.ips: patches/*.slpatch patches/configs/$(S2VER).config patches/maps/$(S2VER)/*.map \
build$(S2VER)/$(shell basename $(CURDIR))$(S2VER).map scripts/genPatch.py
@rm -f starlight_patch_$(S2VER)/*.ips
python3 scripts/genPatch.py $(S2VER)
python scripts/genPatch.py $(S2VER)

send: all
python3.7 scripts/sendPatch.py $(IP) $(S2ROMTYPE) $(S2VER)
python scripts/sendPatch.py $(IP) $(S2ROMTYPE) $(S2VER)

clean:
$(MAKE) clean -f MakefileNSO
Expand Down
137 changes: 94 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,64 +1,114 @@
# Practice Mod
# SMO Practice Mod

This is a mod for Super Mario Odyssey that adds different features that intend to aid in speedrun practice (but can also be used for other reasons)
This is a mod for Super Mario Odyssey that adds different features that intend to aid in speedrun practice (but can also be used for other reasons).

The mod is compatible with versions 1.0.0 and 1.3.0 of Super Mario Odyssey, note that the 1.0.0 version is more feature-complete than the 1.3.0 version
### Features
- Position saving and restoring
- Moon refreshing
- Toggle Autosaving on/off
- Stage warping
- Info display (player position, velocity, speed, etc.)
- TAS Script Player
- Other small features
The mod is compatible with versions 1.0.0 and 1.3.0 of Super Mario Odyssey.

This is a continuation of the [original version of this mod by fruityloops1](https://github.com/fruityloops1/smo-practice).

## Features

- Teleporting (position saving and restoring).
- Moon refreshing (collect the same moon multiple times without reloading).
- Turn autosaving on/off.
- Stage warping.
- Info display (player position, velocity, speed, etc.).
- TAS Script Player (v1.0.0 only).
- Other small features.

## Prerequisites

- [devkitPro](https://devkitpro.org/)
- Python 3
- The [Keystone-Engine](https://www.keystone-engine.org/) Python Module
- [devkitPro](https://devkitpro.org/).
- [Python 3](https://www.python.org/).
- The [Keystone](https://www.keystone-engine.org/) Python module.

## Building

Build has only been tested on Arch Linux
By default, the mod is compiled for the SMO version 1.0.0. To compile for 1.3.0, you can set
```
S2VER ?= 130
S2VERSTR ?= 1.3.0
```
in Makefile. Alternatively, you can follow platform-specific instructions below.

Build has been tested on Arch Linux and Windows 10.

### Arch Linux

Just run:

```
DEVKITPRO={path_to_devkitpro} make
```
devkitPro will be installed to `/opt/devkitpro` on most Unix-based systems

By default, the mod is compiled for the SMO `1.0.0` version.
To compile for the `1.3.0` version, you can run the following command.
devkitPro will be installed to `/opt/devkitpro` on most Unix-based systems. To compile for 1.3.0, run:

```
DEVKITPRO={path_to_devkitpro} make S2VER=130 S2VERSTR=1.3.0
```

## Installing (Atmosphère)
### Windows

After setting the environment variables for devkitPro, just run:

```
make
```

To compile for 1.3.0, run:

```
make S2VER=130 S2VERSTR=1.3.0
```

## Building and Installing Through FTP

If you want to install the mod on your Switch through FTP immediately upon building, make sure you add the Switch's local IP address in Makefile, e.g.:

```
IP ?= 192.168.0.2
```

If necessary, the password and username for the FTP connection should be added to sendPatch.py. Uncomment the following line (remove the #) and change the information accordingly:

```
#ftp.login(user="admin", passwd="admin")
```

Once this is set up, instead of `make`, run:

```
make send
```

## Installing

### Atmosphère

To install the prebuilt release version, copy the atmosphere folder to the root of your SD card.

If you have FTP set up on your Switch, see the previous section for instructions on how to send the files to your switch automatically upon building.

After a successful build, transfer:
Alternatively, after running `make` to build it, you can transfer the files manually as detailed below.

For the SMO version `1.0.0`,
For SMO version 1.0.0, transfer:

- `smo-practice100.nso` to `/atmosphere/contents/0100000000010000/exefs/subsdk1` (note: no extension)
- `starlight_patch_100/3CA12DFAAF9C82DA064D1698DF79CDA1.ips` to `/atmosphere/exefs_patches/starlight_patch_100/3CA12DFAAF9C82DA064D1698DF79CDA1.ips`
- `romfs` to `/atmosphere/contents/0100000000010000/romfs`
- `smo-practice100.nso` to `/atmosphere/contents/0100000000010000/exefs/subsdk1` (note: no extension).
- `starlight_patch_100/3CA12DFAAF9C82DA064D1698DF79CDA1.ips` to `/atmosphere/exefs_patches/starlight_patch_100/3CA12DFAAF9C82DA064D1698DF79CDA1.ips`.
- `romfs` to `/atmosphere/contents/0100000000010000/romfs`.

For the SMO version `1.3.0`,
For SMO version 1.3.0, transfer:

- `smo-practice130.nso` to `/atmosphere/contents/0100000000010000/exefs/subsdk1` (note: no extension)
- `starlight_patch_130/B424BE150A8E7D78701CBE7A439D9EBF.ips` to `/atmosphere/exefs_patches/starlight_patch_130/B424BE150A8E7D78701CBE7A439D9EBF.ips`
- `romfs` to `/atmosphere/contents/0100000000010000/romfs`
- `smo-practice130.nso` to `/atmosphere/contents/0100000000010000/exefs/subsdk1` (note: no extension).
- `starlight_patch_130/B424BE150A8E7D78701CBE7A439D9EBF.ips` to `/atmosphere/exefs_patches/starlight_patch_130/B424BE150A8E7D78701CBE7A439D9EBF.ips`.
- `romfs` to `/atmosphere/contents/0100000000010000/romfs`.

## Install (Yuzu)
### Yuzu

First open the Yuzu `Mod Data Location` for SMO.
It can be opened by right-clicking on the game in yuzu (alternatively `%YUZU_DIR%/load/0100000000010000`).
Then make a new folder for the practice mod and transfer the following files into the newly created folder.
- `smo-practice100.nso` to `<new-folder>/exefs/subsdk1` (note: no extension)
- `starlight_patch_100/3CA12DFAAF9C82DA064D1698DF79CDA1.ips` to `<new-folder>/exefs/3CA12DFAAF9C82DA064D1698DF79CDA1.ips`
- `romfs` to `<new-folder>/romfs`
First open the Yuzu `Mod Data Location` for SMO. It can be opened by right-clicking on the game in Yuzu (alternatively `%YUZU_DIR%/load/0100000000010000`). Then make a new folder for the practice mod and transfer the following files into the newly created folder:
- `smo-practice100.nso` to `<new-folder>/exefs/subsdk1` (note: no extension).
- `starlight_patch_100/3CA12DFAAF9C82DA064D1698DF79CDA1.ips` to `<new-folder>/exefs/3CA12DFAAF9C82DA064D1698DF79CDA1.ips`.
- `romfs` to `<new-folder>/romfs`.

After the file transfer, the new folder should have the following structure,

Expand All @@ -74,13 +124,13 @@ After the file transfer, the new folder should have the following structure,
│   └── ...
```

For SMO version `1.3.0`, transfer the `smo-practice130.nso` and `starlight_patch_130/B424BE150A8E7D78701CBE7A439D9EBF.ips` instead.
For SMO version 1.3.0, transfer `smo-practice130.nso` and `starlight_patch_130/B424BE150A8E7D78701CBE7A439D9EBF.ips` instead.

For more information, check out Yuzu's [official help page for game modding](https://yuzu-emu.org/help/feature/game-modding/).

## Building TAS Server
## Building TAS Server (v1.0.0)

Build has only been tested on Arch Linux, CMake is required
Build has only been tested on Arch Linux. CMake is required.

```
cd smo-tas-server
Expand All @@ -89,8 +139,9 @@ cmake ..
make
```

# Credits
- CraftyBoss - [work on TextWriter](https://github.com/CraftyBoss/Starlight-SMO-LayoutEditing)
- bryce_____ - [Example](https://github.com/brycewithfiveunderscores/Starlight-SMO-Example)
- devkitA64
- libnx - switch build rules
## Credits
- [Fruityloops](https://github.com/fruityloops1), for the [earlier versions of this mod](https://github.com/fruityloops1/smo-practice).
- [CraftyBoss](https://github.com/CraftyBoss), for his [work on TextWriter](https://github.com/CraftyBoss/Starlight-SMO-LayoutEditing).
- [bryce_____](https://github.com/brycewithfiveunderscores), for his [Starlight SMO example](https://github.com/brycewithfiveunderscores/Starlight-SMO-Example).
- devkitA64.
- [libnx](https://github.com/switchbrew/libnx), for the Switch build rules.
120 changes: 35 additions & 85 deletions exported.txt
Original file line number Diff line number Diff line change
@@ -1,99 +1,41 @@
{
global:
_Z21stageSceneControlHookv;
_Z18stageSceneKillHookv;
_Z14setupDebugMenuP10GameSystem;
_Z14setGotShineVar20GameDataHolderWriterPK9ShineInfo;
_Z13isGotShineVar22GameDataHolderAccessorPK9ShineInfo;
_Z25isEnableCheckpointWarpVarP9MapLayout;
_Z15isEnableSaveVarP10StageScene;
_Z19isDefeatKoopaLv1VarP10StageScene;
_Z20setPlayerJointUpdateP24PlayerJointControlKeeper;
_Z31isTriggerRollingRestartSwingVarP11PlayerInput;
_Z30setLoadDataSelectingCurrentVarv;
_Z30setLoadDataSelectingConfirmVarv;
_Z21setRepeatCapBounceVarv;
_Z23setRepeatRainbowSpinVarv;
_Z23setWallJumpCapBounceVarv;
_Z18storeActorInitInfov;
_Z18stageSceneCtorHookv;
_Z12setDamageVarP18PlayerHitPointData;
_Z21findUnlockShineNumVarP14GameDataHolderPbi;
_Z22isTriggerAmiiboModeVarPKN2al18IUseSceneObjHolderE;
_Z24isTriggerSnapShotModeVarPKN2al18IUseSceneObjHolderE;
_Z12drawMainHookP16HakoniwaSequencePN4sead8ViewportEPNS1_11DrawContextE;

_Z14fgetRightSticki;
_Z13fgetLeftSticki;

_Z14fisPadTriggerAi;
_Z14fisPadTriggerBi;
_Z14fisPadTriggerXi;
_Z14fisPadTriggerYi;
_Z14fisPadTriggerLi;
_Z14fisPadTriggerRi;
_Z15fisPadTriggerZLi;
_Z15fisPadTriggerZRi;
_Z28fisPadTriggerPressRightSticki;
_Z17fisPadTriggerPlusi;
_Z18fisPadTriggerMinusi;
_Z15fisPadTriggerUpi;
_Z18fisPadTriggerRighti;
_Z17fisPadTriggerDowni;
_Z17fisPadTriggerLefti;
_Z23fisPadTriggerUiCursorUpi;
_Z25fisPadTriggerUiCursorDowni;
_Z25fisPadTriggerUiCursorLefti;
_Z26fisPadTriggerUiCursorRighti;

_Z11fisPadHoldAi;
_Z11fisPadHoldBi;
_Z11fisPadHoldXi;
_Z11fisPadHoldYi;
_Z11fisPadHoldLi;
_Z11fisPadHoldRi;
_Z12fisPadHoldZLi;
_Z12fisPadHoldZRi;
_Z25fisPadHoldPressRightSticki;
_Z14fisPadHoldPlusi;
_Z15fisPadHoldMinusi;
_Z12fisPadHoldUpi;
_Z15fisPadHoldRighti;
_Z14fisPadHoldDowni;
_Z14fisPadHoldLefti;
_Z20fisPadHoldUiCursorUpi;
_Z22fisPadHoldUiCursorDowni;
_Z22fisPadHoldUiCursorLefti;
_Z23fisPadHoldUiCursorRighti;

_Z11fisPadHoldAi;
_Z11fisPadHoldBi;
_Z11fisPadHoldXi;
_Z11fisPadHoldYi;
_Z11fisPadHoldLi;
_Z11fisPadHoldRi;
_Z12fisPadHoldZLi;
_Z12fisPadHoldZRi;
_Z25fisPadHoldPressRightSticki;
_Z14fisPadHoldPlusi;
_Z15fisPadHoldMinusi;
_Z12fisPadHoldUpi;
_Z15fisPadHoldRighti;
_Z14fisPadHoldDowni;
_Z14fisPadHoldLefti;
_Z20fisPadHoldUiCursorUpi;
_Z22fisPadHoldUiCursorDowni;
_Z22fisPadHoldUiCursorLefti;
_Z23fisPadHoldUiCursorRighti;

_Z14fisPadReleaseAi;
_Z14fisPadReleaseBi;
_Z14fisPadReleaseXi;
_Z14fisPadReleaseYi;
_Z14fisPadReleaseLi;
_Z14fisPadReleaseRi;
_Z15fisPadReleaseZLi;
_Z15fisPadReleaseZRi;
_Z28fisPadReleasePressRightSticki;
_Z17fisPadReleasePlusi;
_Z18fisPadReleaseMinusi;
_Z15fisPadReleaseUpi;
_Z18fisPadReleaseRighti;
_Z17fisPadReleaseDowni;
_Z17fisPadReleaseLefti;
_Z23fisPadReleaseUiCursorUpi;
_Z25fisPadReleaseUiCursorDowni;
_Z25fisPadReleaseUiCursorLefti;
_Z26fisPadReleaseUiCursorRighti;

_Z12drawMainHookPN4sead8ViewportEPNS_11DrawContextEPNS_18LogicalFrameBufferEPN2al9LayoutKitE;
_Z16sequenceDrawHookPN2al8SequenceE;
_Z20nerveKeeperUpdateVarv;
_Z31setPlayerEnableToSeeOddSpaceVarPKN2al9LiveActorE;
_Z22executeDirectorDrawVarPKcS0_;
_Z26executeTableHolderDrawCtorPN2al22ExecuteTableHolderDrawE;
_Z29executeTableHolderDrawExecutePN2al22ExecuteTableHolderDrawE;
_Z9initActorPN2al9LiveActorERKNS_13ActorInitInfoEPN4sead14SafeStringBaseIcEES8_PKc;
_Z25shineListLayoutDecideHookP15ShineListLayout;

_Z22fgetNpadStatesHandheldPN2nn3hid17NpadHandheldStateEiRKj;
_Z18fgetNpadStatesDualPN2nn3hid16NpadJoyDualStateEiRKj;
_Z21fgetNpadStatesFullKeyPN2nn3hid16NpadFullKeyStateEiRKj;
_Z21fgetNpadStatesJoyLeftPN2nn3hid16NpadJoyLeftStateEiRKj;
_Z22fgetNpadStatesJoyRightPN2nn3hid17NpadJoyRightStateEiRKj;

_Z26fisModeDiverOrJungleGymRomv;
_Z15fisModeDiverRomv;
Expand All @@ -106,7 +48,15 @@
_Z28fgetPadAccelerationDeviceNumi;
_Z12motionUpdatePN2al23JoyPadAccelPoseAnalyzerE;

_Z14tasDrawKitHookPKN2al5SceneEPKc;

_Z22koopaHatRandomizerHookiiiPii;
_Z18koopaHatRandomHooki;

_Z14pipeRandomnessi;

_Z17getMofumofuTargeti;
_Z16isPatternReversev;
_Z17bgmStartSoundHookPN2nn3atk14SoundStartableEPNS0_11SoundHandleEPKcPKNS1_9StartInfoE;
local: *;
};
11 changes: 8 additions & 3 deletions include/al/LiveActor/LiveActor.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
#include "al/pose/ActorPoseKeeper.h"
#include "al/rail/RailKeeper.h"
#include "al/rail/RailRider.h"
#include "al/scene/SceneObjHolder.h"
#include "al/iuse/IUseSceneObjHolder.h"
#include "al/iuse/IUseStageSwitch.h"
#include "al/screen/ScreenPointKeeper.h"
#include "al/sensor/HitSensorKeeper.h"
#include "al/sensor/HitSensor.h"
Expand All @@ -25,6 +26,8 @@ namespace al
class SensorMsg;
class ScreenPointer;
class ScreenPointTarget;
class CollisionParts;
class ModelKeeper;
class LiveActor : public al::IUseNerve, public al::IUseEffectKeeper, public al::IUseAudioKeeper, public al::IUseStageSwitch, public al::IUseSceneObjHolder, public al::IUseAreaObj, public al::IUseCamera, public al::IUseCollision, public al::IUseRail, public al::IUseHioNode
{
public:
Expand Down Expand Up @@ -62,7 +65,9 @@ namespace al

const char* mActorName; // _48
al::ActorPoseKeeperBase* mPoseKeeper; // _50
char _58[0x90-0x58];
char _58[0x80-0x58];
al::CollisionParts* mCollisionParts;
al::ModelKeeper* mModelKeeper;
al::NerveKeeper* mNerveKeeper; // _90
al::HitSensorKeeper* mHitSensorKeeper; // _98
al::ScreenPointKeeper* mScreenPointKeeper; // _A0
Expand All @@ -72,4 +77,4 @@ namespace al
al::StageSwitchKeeper* mStageSwitchKeeper; // _C0
al::RailKeeper* mRailKeeper; // _C8
};
};
};
9 changes: 4 additions & 5 deletions include/al/LiveActor/LiveActorGroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ namespace al
LiveActorGroup(const char *, int);

virtual void registerActor(al::LiveActor *);
int calcAliveActorNum() const;

const char* mGroupName; // _8
int mMaxActorCount; // _10
int mActorCount; // _14
al::LiveActor** mActors; // _18
const char* mName;
sead::PtrArray<al::LiveActor> mActors;
};
};
};
Loading