Repository navigation
Conversation
…variant's A files mod that ships one of a variant's game data files does nothing at that frame rate. On ACNH at 60 fps, ACNH Combined's River Hopping stops at the bank; at Game owned it crosses. Cause: the variant's romfs goes first in DM_ROMFS_OVERLAY and the first root that has a file wins. The 60 fps variant ships Pack/StaticParam.pack, and so does River Hopping (one float in Param/Actor/PlayerActor.byml, 35 to 100), so the variant's copy hid the mod's whole file. Fix: the pack step keeps the originals the variant was made from in <pack>/<variant>/romfs-orig (romfs_rows.make orig_out, Pack.variantOriginals). At a start, dev.peanuts.mods.VariantMerge merges each enabled mod's copy into a copy of the variant's file, three ways against the original: a value the mod changed is written unless the variant changed it too. SARC entries are matched by name and BYML values by path, so a mod made from another game version still merges; other same-size data merges by changed runs. The merged files go first in the overlay, and each shared file gets a log line. Checks: test_pack_android_variants (VariantMergeJvm, Overlays), test_docs. On the real files (3.0.3 StaticParam.pack, the variant's, ACNH Combined's): 5 values merged in 66 ms on a PC JVM, none kept, none left out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What and why
A files mod that ships one of a frame rate variant's game data files does nothing at that frame rate, and the log says nothing. On Animal Crossing: New Horizons at 60 fps, ACNH Combined's River Hopping (hopping a river without a pole) stops at the bank. At Game owned, on the same save and route, it crosses.
Cause.
<pack>/<variant>/romfs) goes first inDM_ROMFS_OVERLAY, ahead of the mods. The first root that has a file wins (rom_overlay_path,hle_fs.c).Pack/StaticParam.pack. So does River Hopping, whose one change is a float inParam/Actor/PlayerActor.byml(the widest gap the player hops, 35 to 100). The variant's copy hid the mod's whole file.Change.
<pack>/<variant>/romfs-orig(romfs_rows.make'sorig_out,Pack.variantOriginals). Both "not offered" paths remove it.dev.peanuts.mods.VariantMergemerges each enabled mod's copy of one of the variant's files into a copy of the variant's file, three ways against that original. A value the mod changed is written unless the variant changed the same value. Then the variant's value stays, since its frame rate needs it.<files>/mods_stage/<title ID>/variant-romfs, first in the overlay. Each file a mod shares with the variant gets a line, e.g.[nxlaunch] mods: Pack/StaticParam.pack (the 60 variant's game data): ACNH-Combined: 5 values merged. A pack made before this change merges nothing and says the mod's copy is hidden and to prepare the game again.Reference entry:
docs/reference/packing.md, "A frame rate variant's game data hides a mod's copy of the same file (Android)". Game note:dm/games/01006F8002326000/README.md, 60 fps and Found on this game.Checked
python3 -m unittest discover -s dm/tools/testswithDM_GAME=01006F8002326000: 1682 tests, with 38 failures, 133 errors and 149 skipped. Upstreammainhas the same failures and errors, test for test, on this Windows PC (for examplepython3is not on PATH, andos.systempickles asnt.system). The branch runs one test more,VariantMergeJvm.test_pack_android_variantshas a new JVM test,VariantMergeJvm(javac -Xlint:all -Werror). It covers made-up SARC and BYML files: a value only the mod changes, one both change, a mod laid out differently (a rounded float, an added key), two mods, strings, same-size data, no originals, a mod file equal to the original, a file that does not parse, and another size. With the clash rule taken out, it fails.Overlayschecks the originals are written and removed.StaticParam.pack, the variant's made from it by the repo rows, which matches the phone's byte for byte, and ACNH Combined's; none of them in the change): 5 values merged in 66 ms, none kept, none left out. They are the hop gap and 4PlayerActorfloats that the mod's tool rounded (0.243165 to 0.24317). The game gets those at Game owned too.60/romfshops the river at 60 fps.Docs
docs/reference/<subsystem>.mdentry, andpython3 dm/tools/docs_symptoms.pywas run (the symptom index)dm/third_party/, no change todmsh_chain.lock; the branch starts from the currentmain