ppmdu icon indicating copy to clipboard operation
ppmdu copied to clipboard

Integrate changes to the XML configuration from SkyTemple

Open theCapypara opened this issue 4 years ago • 0 comments

Here are finally all the changes I made to the XML files for SkyTemple so far :)

I'm open for feedback! If you feel like something should be done different, let me know.

Here's a list of changes to each file:

pmd2data.xml

Binaries

  • Added new "types": "Fn" is for specifying functions (works the same as "Block"), and "Pointer" is the address of a single pointer (has no "end").
  • Added pointers and functions related to the script engine (NA and EU only)

PatchesDir / Patches

I changed this a bit to integrate it into SkyTemple. Since you haven't added support to ppmdu yet to apply the patches, I hope this is okay. I think the way I set it up now works better overall. I can explain in more detail how it works, if you want.

  • PatchesDir: Changed how this works: In addition to the path directory, an "entrypoint" stub file can be configured, which can be different for every region
  • Replaced LvlLstLdr and ActorLoader with a single ActorAndLevelLoader
  • Removed the stub files, because they are now specified in PatchesDir.

External

  • Added pmd2dungeondata.xml.

pmd2scriptdata.xml

GameVariablesTable / GameVariablesTableExtended

  • Renamed unk3 to nbvalues
  • "Fixed" the memory offsets for GameVariablesTableExtened entries. It should be noted that LOCAL2 and LOCAL3 can not be used, because they overflow into other memory.

MenuIds

  • Added all the menus I could find
  • Renamed "DungeonResult?" to "DungeonInitializeTeam", this is the name it's described as on T00P01.

BackgroundMusicIDs

  • Added, contains a list of all BGM ids.

OpCodes

  • Added: A list of all Opcodes and their parameters, with arguments.

GroundStateStructs

  • Added, contains some information about how the script engine's RAM structs for the different entities are set up.

EU: LevelList

  • Fixed the mapid

pmd2dungeondata.xml

I added this file, it will be extended with more dungeon related information later, if needed. For now it contains this:

DungeonBinFiles

Contains a list of file ranges. Each of these ranges has a filename pattern that can be used to access the files. For example index 3 is specified via the first range supplied (idxfirst="0" idxlast="169") and because of the name pattern dungeon%i.dpla it can be accessed as dungeon3.dpla.
The file ranges also have a file type definition, which is based on the file type handlers of SkyTemple, but I think you could probably also map those to your file format handlers.

theCapypara avatar Jul 12 '20 11:07 theCapypara