Content Patcher

Content Patcher

378k Downloads

[Content Patcher] add load context token

Pathoschild opened this issue ยท 1 comments

commented

Stardew Valley Expanded has a conditional map replacement, which means it can't load a fallback version of the map before the conditions become available for debris spawning and NPC pathing. (Currently it replaces the XNB file to do that.)

Add a token so mods can make changes before the other tokens are available.

commented

Content Patcher 1.7 now supports tokens in dynamic token values. That lets you have fallback values if the tokens you need aren't available:

{
    "Format": "1.7",
    "DynamicTokens": [
        {
            "Name": "UseSeason",
            "Value": "spring" // default if season token not ready yet
        },
        {
            "Name": "UseSeason",
            "Value": "{{season}}"
        }
    ],
    "Changes": [
        {
            "Target": "Maps/Town",
            "FromFile": "assets/{{useSeason}}_town.tbin"
        }
    ]
}