spacechase0 / StardewValleyMods

New home for my stardew valley mod source code
Other
116 stars 142 forks source link

[GenericModConfigMenu] How to enable real time mod config changing in game? #450

Closed WuZhuoran closed 5 months ago

WuZhuoran commented 5 months ago

Hi Author,

Thank you for your mod. Currently I already used your mod and it works fine. The only issue is that it only suppot changing config at title screen.

If I changed config in game, it will not take effect. After reload the game (go back to title screen), it will work.

How to resolve this issue?

Thank you

WuZhuoran commented 5 months ago

Hi, after discussing with modder in Stardew Valley Dicord group. I found the issue. In this GMCM, I set value to all the config to my config. But in my code, I will import config when loading save only once. Then my code will use the private variables that imported from config.

This could be resolved when it actually changed the variables that mod used.