Open FanKud opened 1 year ago
Don't expect too much it's in alpha release.
You can't play the major expansions for now. spacecore and json assets don't work and content patcher ignoring a lot of mods.
the same here fails a lot content patcher and texture packs the vast majority of textures do not load, we can only wait for future updates
It's that (SAAT) mode isn't compatible yet but i tried other modes and they worked fine like better ranching. We just have to wait for zaneyork to fix it. And please be patient.
Make sure you upload your full SMAPI log and post the link here when reporting a mod which doesn't work. It has more info than the console (like why the mod isn't compatible).
If you're curious, here's how to see the technical reason in the log:
This isn't mine log, but it does include the SAAT error: https://smapi.io/log/f78e698820da437686ff439780966078
I tested Content Patch without any other mods, here the log: https://smapi.io/log/45dc0ff386454b5795c88cec8643c323 Hopefully it's helpful
Btw, I also tried Generic Mod Configuration Menu. You see the cog button on start, but can't click it. Inside the game, you can enter the settings, but scrollbars don't work, as well as scrolling in general. Checkboxes work, as well as saving changes
Since logs will expire after a few weeks, here's a summary of the logged errors so far:
Collection was modified; enumeration operation may not execute.
In .NET 5.0, you can edit a dictionary's values (but not keys) while enumerating it. Some PC mods do that to avoid copying the collection (which is expensive) or creating a separate list of edits (which is clunky). Unfortunately it seems Xamarin still has the old behavior. That might be tricky for SMAPI to rewrite; modders might need to avoid that optimization (at least when running on Android).
Broken code in CJBCheatsMenu.dll: reference to StardewModdingAPI.Framework.ModLoading.RewriteFacades.OptionsElementMethods.draw (no such method).
SMAPI automatically rewrites mods for compatibility with the current OS (e.g. Android), and 'rewrite facades' are one of the ways it does that. We probably just need to add the missing methods to SMAPI's rewrite facades.
InvalidProgramException: Invalid IL code in Pathoschild.Stardew.Common.CommonHelper:GetLocations (bool): IL_0000: callvirt 0x0a000063
SMAPI's rewriters may be producing broken code somehow, or .NET 5.0 code may need to be rewritten for Xamarin compatibility.
For many mods, this happens when they reference Game1.locations
, even if it's just assigned to a variable:
// works fine
IList<GameLocation> gameLocations = new List<GameLocation>();
this.CustomLocationManager.Apply(SaveGame.loaded?.locations, gameLocations);
// fails
IList<GameLocation> gameLocations = Game1.locations;
this.CustomLocationManager.Apply(SaveGame.loaded?.locations, gameLocations);
That field is IList<GameLocation>
on Windows but List<GameLocation>
on Android. So adding a rewriter to change Game1.location
references from IList
to List
might fix a lot of the still-broken mods, including Content Patcher.
MissingMethodException: Method not found: string[] System.Enum.GetNames<!0>()
Could probably be fixed with a rewrite facade in SMAPI?
InvalidProgramException: Invalid IL code in Pathoschild.Stardew.Common.CommonHelper:GetLocations (bool): IL_0000: callvirt 0x0a00003f
See common errors.
Broken code in CJBCheatsMenu.dll: reference to StardewModdingAPI.Framework.ModLoading.RewriteFacades.OptionsElementMethods.draw (no such method), reference to StardewModdingAPI.Framework.ModLoading.RewriteFacades.OptionsElementMethods..ctor (no matching constructor).
See common errors.
Collection was modified; enumeration operation may not execute.
See common errors.
InvalidProgramException: Invalid IL code in ContentPatcher.Framework.ScreenManager:OnLoadStageChanged (StardewModdingAPI.Enums.LoadStage,StardewModdingAPI.Enums.LoadStage): IL_0026: callvirt 0x06000910
InvalidProgramException: Invalid IL code in Pathoschild.Stardew.Common.CommonHelper:GetLocations (bool): IL_0000: callvirt 0x0a000063
See common errors.
InvalidProgramException: Invalid IL code in CustomCompanions.CustomCompanions:OnDayStarted (object,System.EventArgs): IL_0012: callvirt 0x0a00003a
See common errors.
BadImageFormatException: Image with invalid assemblyref token 0000000b. File name: 'DynamicReflections'
Possibly related to the .NET 5.0 → Xamarin rewrites?
InvalidProgramException: Invalid IL code in FarmTypeManager.ModEntry/Utility:GetAllLocationsFromName (string): IL_0048: callvirt 0x0a000209
See common errors.
Collection was modified; enumeration operation may not execute.
See common errors.
InvalidProgramException: Invalid IL code in ContentPatcher.Framework.ScreenManager:OnLoadStageChanged (StardewModdingAPI.Enums.LoadStage,StardewModdingAPI.Enums.LoadStage): IL_0026: callvirt 0x06000910
InvalidProgramException: Invalid IL code in Pathoschild.Stardew.Common.CommonHelper:GetLocations (bool): IL_0000: callvirt 0x0a000063
See common errors.
InvalidOperationException: Operation not called on UI thread. at Microsoft.Xna.Framework.Threading.EnsureUIThread () [0x00007] in <e20f96084554426fb05eaf55b19e7962>:0 at Microsoft.Xna.Framework.Graphics.Texture2D.PlatformGetData[T] (System.Int32 level, System.Int32 arraySlice, Microsoft.Xna.Framework.Rectangle rect, T[] data, System.Int32 startIndex, System.Int32 elementCount) [0x00000] in <e20f96084554426fb05eaf55b19e7962>:0 at Microsoft.Xna.Framework.Graphics.Texture2D.GetData[T] (System.Int32 level, System.Int32 arraySlice, System.Nullable`1[T] rect, T[] data, System.Int32 startIndex, System.Int32 elementCount) [0x00011] in <e20f96084554426fb05eaf55b19e7962>:0 at Microsoft.Xna.Framework.Graphics.Texture2D.GetData[T] (System.Int32 level, System.Nullable`1[T] rect, T[] data, System.Int32 startIndex, System.Int32 elementCount) [0x00000] in <e20f96084554426fb05eaf55b19e7962>:0 at MoreGrass.ModEntry.LoadDefaultGrass (Microsoft.Xna.Framework.Graphics.Texture2D grassTexture) [0x00189] in <90ddcc547fc64835b43bc4ff305b97f7>:0 at MoreGrass.ModEntry.Entry (StardewModdingAPI.IModHelper helper) [0x0006b] in <90ddcc547fc64835b43bc4ff305b97f7>:0 at StardewModdingAPI.Framework.SCore.LoadMods (StardewModdingAPI.Framework.IModMetadata[] mods, StardewModdingAPI.Toolkit.Serialization.JsonHelper jsonHelper, StardewModdingAPI.Framework.ContentCoordinator contentCore, StardewModdingAPI.Toolkit.Framework.ModData.ModDatabase modDatabase) [0x0045b] in <fc71efeda14b42148ec0e2d645008c20>:0
???
Broken code in NPCMapLocations.dll: reference to StardewModdingAPI.Framework.ModLoading.RewriteFacades.OptionsElementMethods.draw (no such method), reference to StardewModdingAPI.Framework.ModLoading.RewriteFacades.OptionsElementMethods..ctor (no matching constructor).
See common errors.
Skipped [...] because its DLL couldn't be loaded. (Error: Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Diagnostics.Debug, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x00074] in <ee112d265aad4e098cf6cf7bf2806b0e>:0 at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00007] in <ee112d265aad4e098cf6cf7bf2806b0e>:0 at ...
I guess System.Diagnostics.Debug
doesn't work on Android, or possibly SMAPI isn't rewriting it correctly?
Broken code in SAAT.API.dll: reference to StardewModdingAPI.Framework.ModLoading.RewriteFacades.ISoundBankMethods.GetCueDefinition (no such method), reference to StardewValley.ISoundBank.AddCue (no such method).
See common errors.
InvalidProgramException: Invalid IL code in StardewNotification.GeneralNotification:CheckForSpringOnions (StardewModdingAPI.ITranslationHelper): IL_0001: callvirt 0x0a000019
This seems like SMAPI's rewriters producing broken code somehow.
Same error as PyTK.
InvalidProgramException: Invalid IL code in Pathoschild.Stardew.TractorMod.ModEntry/<GetLocations>d__37:MoveNext (): IL_0047: callvirt 0x0a00003c
See common errors.
please help my mod keep showing this error https://smapi.io/log/248b41207c114560ac46265ab9ec50bf
I looked into the Content Patcher errors with an affected user.
The "invalid IL code" error happens when a mod references Game1.locations
, even if it's just assigned to a variable:
// works fine
IList<GameLocation> gameLocations = new List<GameLocation>();
this.CustomLocationManager.Apply(SaveGame.loaded?.locations, gameLocations);
// fails
IList<GameLocation> gameLocations = Game1.locations;
this.CustomLocationManager.Apply(SaveGame.loaded?.locations, gameLocations);
That field is IList<GameLocation>
on Windows but List<GameLocation>
on Android. So adding a rewriter to change Game1.location
references from IList
to List
might fix a lot of the still-broken mods, including Content Patcher.
Mods like json assets, saat, sve don't work.