SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

971k Downloads

Content API Invalidation Issue

Sakorona opened this issue ยท 7 comments

commented

TownInterior.xnb apparently cannot be invalidated by any mods, so it's not clearing static references?

commented

@JohnsonNicholas Can you attach a sample mod which reproduces the issue?

commented

https://rd.nexusmods.com/stardewvalley/mods/1573 when loaded with XnbLoader (it's a fairly common statement actually on these mods now)

commented

@JohnsonNicholas This seems to work normally in the upcoming SMAPI 2.2.

  • I inverted townInterior.xnb and loaded it via XNB Loader, which worked fine:

  • To eliminate confounding factors, I wrote a simple mod which inverts the townInterior.xnb colors using IAssetLoader or IAssetEditor, which worked fine:

    Cache invalidation also worked for townInterior:

    [20:23:04 TRACE Test content mod] Requested cache invalidation for 'townInterior'.
    [20:23:04 TRACE SMAPI] Invalidated 1 asset names: townInterior. Reloaded 0 core assets.

    Note that SMAPI doesn't automatically reload map tilesheets when they're invalidated from the cache, but that shouldn't affect XNB Loader since it loads overrides during Entry (before townInteriors is loaded).

Can you reproduce this issue yourself? If so, I'll send you a test build of SMAPI 2.2 to try.

commented

That's odd, I couldn't.

My repro steps:

  1. Delete the content folder, drag over the clean one from my steam install
  2. Enter a town interior

??? It's working now?

commented

@JohnsonNicholas Was that with SMAPI 2.1?

commented

Yes. But oddly, it didn't work before. I wonder if force clearing my content folder fixed it.

commented

Thanks! I'll close this then.