MelonLoader

MelonLoader

242 Downloads

[Bug]: Initializing VersionText.cfg and ProgressText.cgf due to regional settings

Largorate opened this issue ยท 3 comments

commented

All of the following criteria must be met

  • All Requirements must be installed.
  • Full Latest.log file included. If no file exists then leave this unchecked and state so.

All of the following are optional to answer

  • Tried reinstalling the Game.
  • Tried reinstalling MelonLoader.
  • Tried restarting PC.
  • Was able to see the Start Screen.

Describe the issue.

In Denmark the regional setting for decimal seperator is comma (,) instead of point (.). This breaks the defailt values float values for Scale and LineSpacing in VersionText.cfg and VersionText.cfg.

When changing the decimal seperator to point, the start screens loads without exceptions.

E.g. in Dependencies/MelonStartScreen/UI/UI_Theme.cs

[TomlPrecedingComment("Scale of the Text")]
internal float Scale = 1f;
[12:13:16.656] [MelonStartScreen] Initializing...
[12:13:16.697] [MelonStartScreen] Using Start Screen Theme: "Default"
[12:13:16.729] Error while Loading Preferences from C:\Program Files (x86)\Steam\steamapps\common\BloonsTD6\UserData\MelonStartScreen\Themes\Default\ProgressText.cfg: Tomlet.Exceptions.TomlMissingNewlineException: Expecting a newline character at the end of a statement on line 9, but found an unexpected ','
   at Tomlet.TomlParser.Parse(String input) in /_/Tomlet/TomlParser.cs:line 91
   at Tomlet.TomlParser.ParseFile(String filePath) in /_/Tomlet/TomlParser.cs:line 29
   at MelonLoader.Preferences.IO.File.Load() in D:\a\MelonLoader\MelonLoader\MelonLoader\Preferences\IO\File.cs:line 84
   at MelonLoader.MelonPreferences.LoadFileAndRefreshCategories(File file, Boolean printmsg) in D:\a\MelonLoader\MelonLoader\MelonLoader\Preferences\MelonPreferences.cs:line 313
[12:13:16.730] Defaulting C:\Program Files (x86)\Steam\steamapps\common\BloonsTD6\UserData\MelonStartScreen\Themes\Default\ProgressText.cfg to Fallback Functionality to further avoid File Corruption...
[12:13:16.736] Error while Loading Preferences from C:\Program Files (x86)\Steam\steamapps\common\BloonsTD6\UserData\MelonStartScreen\Themes\Default\VersionText.cfg: Tomlet.Exceptions.TomlMissingNewlineException: Expecting a newline character at the end of a statement on line 14, but found an unexpected ','
   at Tomlet.TomlParser.Parse(String input) in /_/Tomlet/TomlParser.cs:line 91
   at Tomlet.TomlParser.ParseFile(String filePath) in /_/Tomlet/TomlParser.cs:line 29
   at MelonLoader.Preferences.IO.File.Load() in D:\a\MelonLoader\MelonLoader\MelonLoader\Preferences\IO\File.cs:line 84
   at MelonLoader.MelonPreferences.LoadFileAndRefreshCategories(File file, Boolean printmsg) in D:\a\MelonLoader\MelonLoader\MelonLoader\Preferences\MelonPreferences.cs:line 313
[12:13:16.736] Defaulting C:\Program Files (x86)\Steam\steamapps\common\BloonsTD6\UserData\MelonStartScreen\Themes\Default\VersionText.cfg to Fallback Functionality to further avoid File Corruption...

Did you attach your log file?

  • Yes, I attached my log file to the text box above.
  • No, I could not find a log file at {Game_Directory}\MelonLoader\Latest.log
commented

Aleks

commented
[VersionText]
Is_ALPHA_PreRelease = true
# UnityEngine.FontStyle of the Text  ( "Normal" | "Bold" | "Italic" | "BoldAndItalic" )
Style = "Bold"
# Is this Rich Text  ( true | false )
RichText = true
# Size of the Text
TextSize = 24
# Scale of the Text
Scale = 1,0
# Font of the Text
Font = "Arial"
# Scale of Line Spacing of the Text
LineSpacing = 1,0
# RGBA Color of the Text
TextColor = [ 255,0, 255,0, 255,0, 255,0, ]
# Text to be Displayed
Text = "<loaderName/> v<loaderVersion/> Open-Beta"
# Toggles the Element  ( true | false )
Enabled = true
# Position of the Element
Position = [ 0, 16, ]
# Size of the Element
Size = [ 0, 0, ]
# Anchor of the Text relative to Itself  ( "None" | "UpperLeft" | "UpperCenter" | "UpperRight" | "MiddleLeft" | "MiddleCenter" | "MiddleRight" | "LowerLeft" | "LowerCenter" | "LowerRight" )
Anchor = "MiddleCenter"
# Anchor of the Text relative to the Screen  ( "None" | "UpperLeft" | "UpperCenter" | "UpperRight" | "MiddleLeft" | "MiddleCenter" | "MiddleRight" | "LowerLeft" | "LowerCenter" | "LowerRight" )
ScreenAnchor = "MiddleCenter"
commented

I believe this is fixed in 0.6.1