Add XML definitions for all textures that are auto-generated by ZAPD #3161
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds dedicated texture definitions to all resource files so that we can control the output names that get used in the resulting OTR files. The goal is to align texture names across roms so that texture packs do not have to provide duplicate textures to cover all possible roms.
Without definitions, ZAPD will auto-detect these texture resources when referenced by a DList and assign them a name based on the resource file and the offset value. Since offset values are not guaranteed to be the same across different roms, this resulted in names that aren't the same. Although this doesn't cause extraction issues and running the game works fine, it makes managing and using texture packs more annoying.
To achieve this I have written a python script that will leverage ZAPD's output to add new definitions to the XMLs so that these textures now have a hard coded output name. The hard coded names will be taken from the MQ debug rom definitions as decomp is based on the MQ debug and existing hard coded names follow this pattern.
The script achieves this by doing a few things:
(listfiles)
from each OTREssentially only PAL1.1 needed to utilize SSIM recognition due to the gerudo symbol changes, and only about ~20 files needed to be manually verified in those cases. Outside of that, there was about 10 textures that could not have the TLUT information automated (ZAPD bug I guess), so these were also handled manually by looking at the DList in decomp. Technically the TLUT information is only necessary for outputting to files from ZAPD, but I think it is best to set this information if we have it available rather than losing it.
I have confirmed these changes by using retro to compare the manifest between PAL1.1 and MQ debug, and only the expected files (gerudo symbol, texture screen, button prompts, etc) had different hash values, otherwise all scenes were identical. I also prepared a custom OoT-Reloaded pack that only uses the mq version of the texture files (copied over to nonmq) and all textures were changed in game when running the PAL1.1 rom.
Attached is the outputs from the different stages and the final list of replacements for each rom. The replacements are comma delimited where the left value is the old name, and the right value is the new name. These can be used for texture pack makers to automate the renames. But if they have an MQ set of textures, then copying those over to nonmq should be sufficient 😉
outputs.zip
Fixes #3024
Build Artifacts