tesla1889tv / ControlValleyMod

Stardew Valley Support for Twitch Crowd Control
GNU Lesser General Public License v2.1
6 stars 2 forks source link

Spawn Effects not working #15

Closed jaku closed 2 years ago

jaku commented 3 years ago

The spawn effects aren't working for a user. Everything else works but running a spawn effect makes the mod disconnect.

The only thing that might be odd is that they have a swedish install of windows.

BambooleanLogic commented 2 years ago

I downloaded a bunch of Windows language packs and ran some experiments.

It appears that the problem is not fundamentally caused by your system language, but specifically which "Regional format" setting you use. Below are my findings:

BambooleanLogic commented 2 years ago

I can't claim to know the first thing about Stardew Valley modding, but I noticed something as I was digging through the code.

Assuming that this decompilation of Stardew Valley is sufficiently accurate, it seems like all the threads it creates contains the following line:

Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;

I'm also noticing that the threads created by this mod do not appear to contain similar assignments. I therefore posit that Stardew Valley itself might behave in unpredictable ways if called from threads that haven't had their cultures normalized.