# galaxypad
![Custom Cosmic Spirit in Freezy Flake Galaxy](https://raw.githubusercontent.com/SunakazeKun/galaxypad/master/SCREENSHOT.png)
**galaxypad** is a Python command-line tool to record input playback files (PAD files) for [Tip Networks](https://www.mariowiki.com/Tip_Network) and [Cosmic Spirits](https://www.mariowiki.com/Cosmic_Spirit) in **Super Mario Galaxy 2**. The tool reads relevant information from [Dolphin Emulator](https://dolphin-emu.org/)'s emulated game memory and automatically produces a PAD file after recording stopped. The tool requires at least **Python 3.10**. It should also work with 3.11 and newer versions, but this hasn't been tested. Furthermore, it uses [py-dolphin-memory-engine](https://github.com/henriquegemignani/py-dolphin-memory-engine) to interact with Dolphin's game memory. In order to record player input during gameplay, [Syati](https://github.com/SunakazeKun/Syati)'s *PadRecord* code is required to supply the information from the game to this tool.
It is available on PyPI, meaning that you can easily install it with pip:
```
pip install galaxypad
```
# Limitations
There are gameplay-related aspects that Tip Networks and Cosmic Spirits don't account for. Keep these in mind when you want to record and play inputs!
- You should only record playback when playing as Mario. Both objects will be disabled when playing as Luigi.
- Both objects disable the Star Pointer completely. Thus, Mario can't interact with objects that require the Star Pointer, for example Pull Stars and Grapple Flowers.
# Usage
In this section, it is assumed that the game you want to record player input in already uses Syati's *PadRecord* code. The general usage is this:
```
usage: galaxypad [-h] [-address [ADDRESS]] output_folder_path
Record PAD playback in SMG2 from Dolphin memory.
positional arguments:
output_folder_path folder to save PAD files to
options:
-h, --help show this help message and exit
-address [ADDRESS] address from which the tool retrieves PadRecordInfo*
```
The ``-address`` option is not required, as the tool assumes ``PadRecordInfo*`` is supplied at ``0x80003FFC`` by default.
# Recording
Before you can record playback, you need to add the following things in your galaxy first:
1. A player spawn point from which the recording should start. This spawn point should be used by Tip Networks and Cosmic Spirits too.
2. A ``PadRecordHelper`` object in the same zone as the previously added spawn point. Its Obj_arg0 has to be set to the added spawn point's MarioNo value.
Now you are ready to use the tool:
1. Launch the modded game in Dolphin and start this command-line tool like explained in previous sections.
3. While the game is running, pay attention to the tool's console output to verify that everything is running correctly.
4. Once you are in the desired galaxy, go to where you placed PadRecordHelper. It doesn't use a model, but an A button icon will be displayed on the screen when you are close to it.
5. Once you press A, the scene will reset. After the scene has reloaded, the recording will start.
6. If you desire to stop recording, press 2 on the first player's Wiimote.
The tool keeps you informed about its current state, and it should inform you when something goes wrong. Here's an example from one of my tests:
```
Waiting for Dolphin...
Hooked to Dolphin, game ID is SB4P!
Searching for PadRecorderInfo* at 0x80003FFC...
Waiting for PadRecordHelper...
Started recording for spawn ID 0 in RedBlueExGalaxy!
Stopped recording!
Dumped 3075 KPAD frames (approx. 51 seconds) to '.\RedBlueExGalaxy\Dreamer0.pad'.
```
After recording, you can build a Ghost.arc containing the PAD file. However, this is beyond the scope of this tool. In final releases of your levels, you don't want players to interact with PadRecordHelper objects, so make sure to remove them once they are not needed anymore.
## Synchronization Error
If the recording process terminates due to a synchronization error, you should try the following things before recording again:
- Close unnecessary programs and processes.
- Give the galaxypad process a higher priority.
- Reduce the emulation's execution speed (less than 100%).
If the error persists, try cutting down the emulator's execution speed even further.
Raw data
{
"_id": null,
"home_page": "https://github.com/SunakazeKun/galaxypad",
"name": "galaxypad",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "",
"keywords": "nintendo,super-mario-galaxy-2,pad,dolphin,modding",
"author": "Aurum",
"author_email": "",
"download_url": "",
"platform": null,
"description": "# galaxypad\r\n![Custom Cosmic Spirit in Freezy Flake Galaxy](https://raw.githubusercontent.com/SunakazeKun/galaxypad/master/SCREENSHOT.png)\r\n\r\n**galaxypad** is a Python command-line tool to record input playback files (PAD files) for [Tip Networks](https://www.mariowiki.com/Tip_Network) and [Cosmic Spirits](https://www.mariowiki.com/Cosmic_Spirit) in **Super Mario Galaxy 2**. The tool reads relevant information from [Dolphin Emulator](https://dolphin-emu.org/)'s emulated game memory and automatically produces a PAD file after recording stopped. The tool requires at least **Python 3.10**. It should also work with 3.11 and newer versions, but this hasn't been tested. Furthermore, it uses [py-dolphin-memory-engine](https://github.com/henriquegemignani/py-dolphin-memory-engine) to interact with Dolphin's game memory. In order to record player input during gameplay, [Syati](https://github.com/SunakazeKun/Syati)'s *PadRecord* code is required to supply the information from the game to this tool.\r\n\r\nIt is available on PyPI, meaning that you can easily install it with pip:\r\n```\r\npip install galaxypad\r\n```\r\n\r\n# Limitations\r\nThere are gameplay-related aspects that Tip Networks and Cosmic Spirits don't account for. Keep these in mind when you want to record and play inputs!\r\n\r\n- You should only record playback when playing as Mario. Both objects will be disabled when playing as Luigi.\r\n- Both objects disable the Star Pointer completely. Thus, Mario can't interact with objects that require the Star Pointer, for example Pull Stars and Grapple Flowers.\r\n\r\n# Usage\r\nIn this section, it is assumed that the game you want to record player input in already uses Syati's *PadRecord* code. The general usage is this:\r\n```\r\nusage: galaxypad [-h] [-address [ADDRESS]] output_folder_path\r\n\r\nRecord PAD playback in SMG2 from Dolphin memory.\r\n\r\npositional arguments:\r\n output_folder_path folder to save PAD files to\r\n\r\noptions:\r\n -h, --help show this help message and exit\r\n -address [ADDRESS] address from which the tool retrieves PadRecordInfo*\r\n```\r\n\r\nThe ``-address`` option is not required, as the tool assumes ``PadRecordInfo*`` is supplied at ``0x80003FFC`` by default.\r\n\r\n# Recording\r\nBefore you can record playback, you need to add the following things in your galaxy first:\r\n\r\n1. A player spawn point from which the recording should start. This spawn point should be used by Tip Networks and Cosmic Spirits too.\r\n2. A ``PadRecordHelper`` object in the same zone as the previously added spawn point. Its Obj_arg0 has to be set to the added spawn point's MarioNo value.\r\n\r\nNow you are ready to use the tool:\r\n\r\n1. Launch the modded game in Dolphin and start this command-line tool like explained in previous sections.\r\n3. While the game is running, pay attention to the tool's console output to verify that everything is running correctly.\r\n4. Once you are in the desired galaxy, go to where you placed PadRecordHelper. It doesn't use a model, but an A button icon will be displayed on the screen when you are close to it.\r\n5. Once you press A, the scene will reset. After the scene has reloaded, the recording will start.\r\n6. If you desire to stop recording, press 2 on the first player's Wiimote.\r\n\r\nThe tool keeps you informed about its current state, and it should inform you when something goes wrong. Here's an example from one of my tests:\r\n```\r\nWaiting for Dolphin...\r\nHooked to Dolphin, game ID is SB4P!\r\nSearching for PadRecorderInfo* at 0x80003FFC...\r\nWaiting for PadRecordHelper...\r\nStarted recording for spawn ID 0 in RedBlueExGalaxy!\r\nStopped recording!\r\nDumped 3075 KPAD frames (approx. 51 seconds) to '.\\RedBlueExGalaxy\\Dreamer0.pad'.\r\n```\r\n\r\nAfter recording, you can build a Ghost.arc containing the PAD file. However, this is beyond the scope of this tool. In final releases of your levels, you don't want players to interact with PadRecordHelper objects, so make sure to remove them once they are not needed anymore.\r\n\r\n## Synchronization Error\r\nIf the recording process terminates due to a synchronization error, you should try the following things before recording again:\r\n- Close unnecessary programs and processes.\r\n- Give the galaxypad process a higher priority.\r\n- Reduce the emulation's execution speed (less than 100%).\r\n\r\nIf the error persists, try cutting down the emulator's execution speed even further.\r\n",
"bugtrack_url": null,
"license": "gpl-3.0",
"summary": "Python tool to record PAD playback for Super Mario Galaxy 2",
"version": "1.0.4",
"project_urls": {
"Homepage": "https://github.com/SunakazeKun/galaxypad"
},
"split_keywords": [
"nintendo",
"super-mario-galaxy-2",
"pad",
"dolphin",
"modding"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b3da20ba7dcb28d4b1d0f3917b9d1b4f6146e2ec98abc74e066a52d525016d1d",
"md5": "a43bbe936bd01bc5197c047381c17f32",
"sha256": "732556da2e5138092a42f36bfd032be4ae9b757d630079557bb2ee6c6dff533b"
},
"downloads": -1,
"filename": "galaxypad-1.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a43bbe936bd01bc5197c047381c17f32",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 8149,
"upload_time": "2023-08-04T17:14:22",
"upload_time_iso_8601": "2023-08-04T17:14:22.092177Z",
"url": "https://files.pythonhosted.org/packages/b3/da/20ba7dcb28d4b1d0f3917b9d1b4f6146e2ec98abc74e066a52d525016d1d/galaxypad-1.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-04 17:14:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "SunakazeKun",
"github_project": "galaxypad",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "galaxypad"
}