![]() ![]() If (!timeDirector.HasPauser()) timeDirector.Pause() Log("MyFirstSRMod v" + UMFMod.GetModVersion().ToString(), true) Using (UMFLog log = new UMFLog()) log.Log(text, clean) Internal static void Log(string text, bool clean = false) //Set this to the number of harmony patches in your mod. Your MyFirstSRMod.cs should now look something like this: using UnityEngine ![]() So to ensure the maxHealth is always set after those we can apply it using Unity Scripting's Update function, which require some extra checks to ensure we are in the game. However we have to set this in a way that it is done after ApplyUpgrade and Reset which is why the other methods are normally better for this case. This would set maxHealth to whatever the config value is set to, in the default case 999. ().maxHealth = MyFirstSRModConfig.MaxHealth We can set this value directly using the following line: ![]() In Slime Rancher the PlayerModel class instance can be accessed through the GameModel instance class which in turn can be retrieved from the SceneContext using the SRSingleton class. 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" All slimes except for Puddle, Fire, Lucky, Quicksilver, Glitch, Tarr and Twinkle slimes can be converted into Largo Slimes to increase production even further.Īll standard farmable slimes are subject to hunger and agitation, and can experience fear under certain circumstances.Your config class should now look something like this: using System Nearly all pure slimes are capable of stacking.Įach Slime-except the Pink, Ringtail, Puddle, Fire, Saber, Lucky, Quicksilver, Glitch, Tarr, and Twinkle Slimes-has a unique favorite food, which when fed to the appropriate Slime doubles the plorts they produce. Their faces when fed and their high pitched voices, each type of slime has a unique trait that is used to identify it. Though their most common features are the permanent happy expressions they have on There are several different species of slimes, each found in certain locations on the Far, Far Range. They are a key element within the game since they are responsible for the production of plorts that are used to make money, create gadgets, and unlock areas in the game. Slimes are gelatinous, ball-shaped, adorable alien creatures that live on the far away planet called the Far, Far Range. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |