Slime rancher builder mod

broken image
broken image

You can find this method by looking through the game code which will take some experience and analyzing.įor this particular scenario this method is not the best to use. This method uses only Unity Scripting and the game's own code to modify the max health value. MyFirstSRMod.Log('Error loading mod settings: ' + e.Message + '(' + e.InnerException?.Message + ')') MyFirstSRMod.Log('Finished loading settings.') MaxHealth = cfg.Read('MaxHealth', new UMFConfigInt(999, 1, 9999), 'This is the player's max health.') MyFirstSRMod.Log('Finished UMF Settings.') cfg.Write('MaxVersion', new UMFConfigString('9.99999')) //Uncomment if you think your mod may break with the next major UMF release.Ĭfg.Write('UpdateURL', new UMFConfigString('')) Ĭfg.Write('ConfigVersion', new UMFConfigString(configVersion))

cfg.Write('SupportsHotLoading', new UMFConfigBool(false)) //Uncomment if your mod can't be loaded once the game has started.Ĭfg.Read('LoadPriority', new UMFConfigString('Normal')) Ĭfg.Write('MinVersion', new UMFConfigString('0.52.1')) MyFirstSRMod.Log('The config file was outdated and has been deleted. If (cfgVer != string.Empty & cfgVer != configVersion) String cfgVer = cfg.Read('ConfigVersion', new UMFConfigString()) Private static readonly string configVersion = '1.0' Your config class should now look something like this: using System