UsernameFodder / pmdsky-debug

Debug info for reverse engineering PMD: Explorers of Sky
GNU General Public License v3.0
37 stars 20 forks source link

Document script engine: Transfer Resarch from SkyTemple SSB Debugger & PsyCommando's notes #246

Open theCapypara opened 7 months ago

theCapypara commented 7 months ago

In early 2020 I made a lot of research based on Psy's research on the game's script engine. A lot of this made it into SkyTemple's script engine debugger and also pmdsky-debug.

Some of the most important undocumented things are related to the script engine thread state structs and other entities (actors, events, map, objects, performers, global script):

https://github.com/SkyTemple/skytemple-ssb-emulator/blob/main/src/script_runtime.rs https://github.com/SkyTemple/skytemple-ssb-debugger/blob/master/skytemple_ssb_debugger/model/script_runtime_struct.py https://github.com/SkyTemple/skytemple-ssb-debugger/blob/master/skytemple_ssb_debugger/model/ground_state/global_script.py https://github.com/SkyTemple/skytemple-ssb-debugger/blob/master/skytemple_ssb_debugger/model/ground_state/actor.py https://github.com/SkyTemple/skytemple-ssb-debugger/blob/master/skytemple_ssb_debugger/model/ground_state/event.py https://github.com/SkyTemple/skytemple-ssb-debugger/blob/master/skytemple_ssb_debugger/model/ground_state/map.py https://github.com/SkyTemple/skytemple-ssb-debugger/blob/master/skytemple_ssb_debugger/model/ground_state/object.py https://github.com/SkyTemple/skytemple-ssb-debugger/blob/master/skytemple_ssb_debugger/model/ground_state/performer.py

Additionally I took notes from Psy and made my own, mostly connecting the dots between his research and traces I did with the emulator integration.

I uploaded all my notes I have here: https://github.com/theCapypara/pmdsky-ground-state-notes

theCapypara commented 7 months ago

Some more notes start before and after here: https://discord.com/channels/710190644152369162/712341699292037121/1194771802916917331