![]() This way you can reuse some asset that is used elsewhere in your mod, or even the base game. img:images/fancy) in an UpdateFeatureDef, it will first be looked for under the /News folder ( Mods/YourMod/News/images/fancy.png) and if not found, under the /Textures folder ( Mods/YourMod/Textures/images/fancy.png). Placing images under /News, however, results in them being loaded only when the update news window is opened, and unloaded after the window is closed. When it comes to update news images, 99 times out of 100 that is wasted memory and CPU time. While optional, this is a good idea, because images in the Textures folder are always loaded on game startup in their entirety. ![]() Mod Update News images should be moved under the /News folder The only way to reset a NeverVisible setting from the game is by using the Reset All button in the Mod Settings window. This also works for visible settings and disables their reset option via the right-click menu. If you want reset immunity, set SettingHandle.CanBeReset to false. Minor changes SettingHandle.NeverVisible no longer makes a setting immune to being reset Note: the original, non-lowercase, ModContentPack.PackageIdPlayerFacing, is used. You can still return false in ModBase.HarmonyAutoPatch and use your own identifier, if you like. This used to be HugsLib.ModIdentifier before, but the new package ids are a much better fit for a unique identifier. The Harmony ID for all automatically-patched HugsLib mods is now their PackageId News item images should also be moved to the /News folder- more on that below. I recommend copying, rather than moving, the def XML files there to allow your news to be displayed on both the 1.0 and 1.1 versions of your mod- assuming you are making use of the new versioned folders system. Mod Update News defs must be copied to another folder to be processedĭue to the update news system becoming available to non-HugsLib mods, all news defs must now be loaded from the /News folder in the root folder of your mod ( Rimworld/Mods/YourMod/News). See the Additions section below if you need to be notified of settings changes in any HugsLib mod, like before. As a reminder, SettingsChanged is called both when the Mod Settings window closes, as well as when settings are manually saved using ModSettingsManager.SaveChanges(). Ownership, in this case, means the ModBase instance that was given the ModSettingsPack (assigned to the ModBase.Settings property) from which the modified handles were created. ModBase.SettingsChanged is now only called for the mod that "owns" the modified setting handles Long story short- call SettingHandle.ForceSaveChanges() on the handle that contains your custom setting value type after making changes to it. This happens because SettingHandle has no way to detect changes in a reference-type value. This used to be the case before, but now simply calling ModSettingsManager.SaveChanges() will not save custom handle values- assuming no other setting values were modified. Harmony in standalone mod form can be downloaded here: Changes to SettingHandleConvertible values must be saved manually When publishing, it's not recommended to include the Harmony dll file with your mod, as it would not be used anyway. ![]() If your mod has a dependency on HugsLib, you can add another dependency on the Harmony mod, but that is not strictly necessary- HugsLib already takes care of that. Harmony is now available as a separate mod that must be installed by the players along with HugsLib. Critical changes Harmony no longer distributed with HugsLib, must be loaded as a separate modĭue to critical compatibility issues, the Harmony assembly file can no longer be distributed with HugsLib. The various HugsLib wiki pages will be updated with the new changes eventually, but for now this page should serve as a reference. Despite not breaking outright, to work correctly with the new version, mods may need minor changes- which I'd like to highlight in this document. This is a brief guide to ease the transition to HugsLib 7.0 for Rimworld 1.1.ĭespite the earlier warning about pending breaking changes, this HugsLib update should still be fully API-compatible with all dependent mods.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |