Jump to content

Anniversary Edition/Framework: Difference between revisions

first stab at describing how XML patching works; unanswered questions are how the AEI handles conflicting patches and how exactly patched .onis get put back into the mix to be combined into .dats
(first stab at describing how XML patching works; unanswered questions are how the AEI handles conflicting patches and how exactly patched .onis get put back into the mix to be combined into .dats)
Line 1: Line 1:
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]].
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==
==Initialization==
Line 6: Line 6:
==Installation==
==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.
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==
==XML patching==
Coming soon.
To read about the purpose of XML patches, visit the page [[Making a mod package]]. Here, we'll simply describe the process by which they are installed. XML patching takes place <u>before</u> 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. For each file to be patched, the AEI then finds the highest-numbered package which has such a .oni file (in other words, patches have higher priority 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 level named by the patch (like .onis, .oni-patch files are to be placed in the folder level''X''_Final, with ''X'' being the number of the level whose resources are added to or replaced). Once all the .oni files to be patched have been collected from mods and vanilla .dats, the patching instructions found in the .oni-patches are combined into one temporary file for performance reasons, and this file is passed to xmlTools. The .oni files having been patched, they are then combined along with the unpatched .onis from the selected mods into .dats, as described above.
 
==Package numbering==
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 by the number at the front of the name of the package folder. A package numbered 11111 will override package 11110 when they are installed into Oni.
 


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