Anniversary Edition/Framework: Difference between revisions

From OniGalore
Jump to navigation Jump to search
m (→‎XML patching: link fix)
Line 14: Line 14:
For each file that is to be patched, the AEI looks for the highest-numbered package which has such a .oni file in the same level number; in other words, patches go on top of all .oni mods, thus they have higher precedence than any package does by number -- regardless of the number of the package containing said patch. If there is no copy of that .oni file in any selected mod, the AEI extracts the .oni from the vanilla .dat of the appropriate level (stored in AE/AEInstaller/vanilla/).
For each file that is to be patched, the AEI looks for the highest-numbered package which has such a .oni file in the same level number; in other words, patches go on top of all .oni mods, thus they have higher precedence than any package does by number -- regardless of the number of the package containing said patch. If there is no copy of that .oni file in any selected mod, the AEI extracts the .oni from the vanilla .dat of the appropriate level (stored in AE/AEInstaller/vanilla/).


Once all the .oni files to be patched have been collected from either the other mods or vanilla .dats, the AEI makes a single temporary patch file which lists inside of it a series of commands to xmlTools to run each individual patch file on the .oni file named by that .oni-patch. This "master patch" is made for performance reasons and should not affect the modder who creates .oni-patches. Read the documentation for [[xmlTools]] to understand how the patch files are actually processed. The .oni files having been patched, their containing folder is then combined, along with the folders of unpatched .onis from the other selected mods, into .dats, as described in "Installation".
Once all the .oni files to be patched have been collected from either the other mods or vanilla .dats, the AEI makes a single temporary patch file which lists inside of it a series of commands to XmlTools to run each individual patch file on the .oni file named by that .oni-patch. This "master patch" is made for performance reasons and should not affect the modder who creates .oni-patches. Read the documentation for [[XmlTools]] to understand how the patch files are actually processed. The .oni files having been patched, their containing folder is then combined, along with the folders of unpatched .onis from the other selected mods, into .dats, as described in "Installation".


[[Category:Anniversary Edition]]
[[Category:Anniversary Edition]]

Revision as of 20:15, 3 February 2014

The Anniversary Edition Seven introduced a revised framework which installs from scratch, separate from any previous Editions. Following is a rundown of what the Installer is doing, from start to finish. To learn how to make your own mod package, which is required in order for the AE Installer to handle your mod properly, see Making a mod package. To understand the material below, you should first be familiar with Oni's .dat files on a general level, so OBD is recommended reading.

Initialization

When first running the Installer, this is a one-time process that uses OniSplit to break the .dat/.raw(/.sep) files in Oni's GDF and breaks them into their constituent resources, yielding thousands of .oni files. These files are stored in temporary folders, one for each level. Next, the Installer performs what is called globalization: in order to allow modders access to (nearly) all data in all levels, it moves the .onis from each game level's folder to level 0, discarding duplicates (for instance, instead of making all characters available globally, BWest would put the ONCCs in each level for the characters they needed, to save memory; this means that the same character data can occur many times throughout the game data). The exception to this globalization is each level's AKEV and all child resources, its title, fail and win screens, and its LSI. Finally, the Installer recombines those folders of .oni files into the .dat/.raw(/.sep) files for each level, in AE/AEInstaller/vanilla/. Note that no data has been modded yet, just reformatted.

Installation

After this, the user can choose some mods to install. When the Install button is clicked, the Installer starts off by deleting the existing .dat/.raw(/.sep) files in AE/GDF to start from a blank slate. It then iterates through each mod package you selected, and sends a command to OniSplit to combine the .dat for that level (in AEInstaller/vanilla/) with the .oni files from whichever packages have files meant for that level. The final .dat/.raw(/.sep) files are then created in AE/GDF.

When one package overlaps with another in some way, such as two packages that provide new textures for the same character, which one will take precedence? The answer is that the Installer goes in ascending order by package number. If five copies of the same .oni file are encountered one after another, only the last-encountered one will be used. Thus, a package numbered 11111 will override package 11110 wherever their files conflict, when they are both installed. Note that this is on a file-by-file basis, so package 11111 could be used intentionally to override only certain files in 11110, say, to improve or fix them. On the other hand, this might be an undesirable interaction. It's left as an exercise to the modders to be aware when there's an unwanted interaction and to mark their mod as being incompatible with the other one.

XML patching

To read about the purpose of XML patches, visit the page Making a patch mod. Here, we'll simply describe the process by which they are installed. XML patching takes place at the beginning of each mod installation, because the .oni files need to be patched before they are combined back into .dats. Therefore, when about to begin installing the user's selected mods, the Installer looks for any patches (.oni-patch files) in those mods. The .oni-patches are named according to the file they modify, e.g. TRAMKONCOMbk_fw_kick.oni-patch, and placed in numbered folders such as level2_Final/, just like mods with .oni files.

For each file that is to be patched, the AEI looks for the highest-numbered package which has such a .oni file in the same level number; in other words, patches go on top of all .oni mods, thus they have higher precedence than any package does by number -- regardless of the number of the package containing said patch. If there is no copy of that .oni file in any selected mod, the AEI extracts the .oni from the vanilla .dat of the appropriate level (stored in AE/AEInstaller/vanilla/).

Once all the .oni files to be patched have been collected from either the other mods or vanilla .dats, the AEI makes a single temporary patch file which lists inside of it a series of commands to XmlTools to run each individual patch file on the .oni file named by that .oni-patch. This "master patch" is made for performance reasons and should not affect the modder who creates .oni-patches. Read the documentation for XmlTools to understand how the patch files are actually processed. The .oni files having been patched, their containing folder is then combined, along with the folders of unpatched .onis from the other selected mods, into .dats, as described in "Installation".