ZaneYork / SMAPI-Android-Installer

SMAPI Installer for Android
GNU Lesser General Public License v3.0
729 stars 67 forks source link

Content Patcher rejecting all non-boolean values #379

Open DKqwerty opened 1 year ago

DKqwerty commented 1 year ago

Hello, so glad to have SMAPI on Android, even if it's incomplete and a bit fragile.

I do think an urgent matter that need to be addressed is Content Patcher compatibility because of how extensively this mod is used by other mods: currently, any value which is not boolean is rejected by CP with a warning resembling "… invalid values ( spring); expected one of Spring, Summer, Fall, Winter". (To be clear, this doesn't appear to be a case-sensitivity issue as I unified all variables to title case and it still throws warnings.)

These failures—in which there is a warning that it unexpectedly found exactly what it was looking for—apply to ConfigSchema (and their names), default declarations, and "when" conditions. And they seem to also generate (or perhaps are a symptom of) DLL errors resembling "This mod failed in the GameLoop. … operation exception … StardewModding.API.framework…"

This is my log after running the game with CP, Config Menu, [CP] Vibrant Pastoral Recolor (which has massive dependencies on either custom schema or environmental variables), and [CP] Niko's Portraits (all currently up-to-date).

Any attention to this matter in upcoming Android SMAPI releases is greatly appreciated! — DK

DKqwerty commented 1 year ago

Some more info: CP also balks at certain asset replacements.

I was modifying sheets for a recolor: everything was going fine with all assets replacing under boolean conditions. Then I innocently tried to modify "springobjects" and CP started throwing warnings. If I set to "false" in config, no problem; it's only when it attempts to modify "springobjects" that the warnings occur (I don't know much about CP's load logic, so maybe it's just an order of operation thing).

Not sure why "springobjects" would fail while others like "spring_town" and "treeX_spring" work fine. But hopefully the info might help track down the larger issue in Android SMAPI implementation.

DKqwerty commented 1 year ago

So I think any asset which is loaded prior to loading the game save (intro movie sprites, menu tiles, etc.) requires a cache invalidation for CP to be able to alter it (i.e. replace with modified data whatever the game's bootstrap cached) but is currently incapable of doing so via Android SMAPI implementation. This is my estimated cause of the issue regarding "springobjects" because cache invalidation attempts by CP are always immediately followed by a handful of DLL errors.

Again, just sharing info (maybe to no one, but whatever).