GrooveSharedUtils
A RoR2 utilities pack focused on runtime content creation.
| Date uploaded | a year ago |
| Version | 0.5.2 |
| Download link | Groove_Salad-GrooveSharedUtils-0.5.2.zip |
| Downloads | 9153 |
| Dependency string | Groove_Salad-GrooveSharedUtils-0.5.2 |
This mod requires the following mods to function
bbepis-BepInExPack
Unified BepInEx all-in-one modding pack - plugin framework, detour library
Preferred version: 5.4.2103README
GrooveSharedUtils
A RoR2 utilities pack to streamline mod setup, development, and organization. GrooveSharedUtils focuses on runtime-based content creation.

Key Features
Groove's Shared Utils can be used individually in most cases, with cross compatibility between features.
Mod Plugins and Modules
A ModPlugin inherits from BepInEx's BaseUnityPlugin; each assembly is limited to a single ModPlugin. Your mod plugin servers as both a BepInEx plugin and a content pack, and additionally instantiates and manages classes that inherit from ModModule in your assembly. Mod modules are mono behaviours with a LoadContent method that is iterated over when your plugin is populating its content pack. Assets yielded during LoadContent will be mapped to their appropriate locations (ItemDefs and EquipmentDefs to the content pack, ModdedDotDefs to DoTAPI, etc.). ModPlugin<T> and ModModule<T> provide access to the class instances.
Asset Display Cases
The AssetDisplayCase attribute can be applied to any class, and indicates that static fields in the class and its nested classes can serve as holders for your mod's assets (think RoR2Content). Assets can be displayed at any time with AssetDisplayCaseAttribute.TryDisplayAsset, and assets yielded while a module is loading content will be automatically displayed. Displayed assets will be mapped to any asset display case fields, matched by type and name.
Frames
Frames are helper classes to assist with a specific runtime task. For example an ItemFrame wraps RoR2's ItemDef, creating the scriptable object while exposing relevant fields to the user. Frames can be built directly or yielded as an IEnumerator such as during ModModule.LoadContent. Your assembly's frames can be customized through the Frame.Settings assembly attribute and the Frame.DefaultExpansionDef attribute applied to any ExpansionDef field, method, or property. GrooveSharedUtil's library of frames is never complete, please reach out with suggestions for new frames!
Configurable Attribute
Configurable can be applied to any static field or mod module. The attribute's config file name, section, default value, etc. can be set manually, but they will also be inferred from the field/module and, if present, your assembly's ConfiguableAttribute.Settings attribute.
Load Asset Bundle Attribute
This one is pretty self-explanatory...add the LoadAssetBundle attribute to any AssetBundle field to assign its value to the loaded asset bundle file and optionally swap all stubbed shaders in the bundle. The bundle name will be inferred from the field name, but can be explicitly assigned in the attribute alongside the path to the bundle's folder. Use the LoadAssetBundleAttribute.Settings assembly attribute to assign a default asset bundle folder assembly wide.
Language Collections
A LanguageCollection is designed to mirror a traditional language file. Language collections are discovered with the LanguageCollectionProvider attribute applied to a static method returning a LanguageCollection. Strings in a language collection are easy to dynamically modify, as they are a part of your project. Language collections keep your mod's language organized and translatable as a text file.
GSUtil and Common
GSUtil contains many helpful methods for general mod development. Common contains frequently used assets and events.
And More!
Well, not that much more...but it's still an early release.
Contact
You can find me in the Spikestrip Modding Server @Groove_Salad#7700
With special thanks to...
- literallyeurope and SteamStream for feedback on WIP builds.
- Nebby
- TeamMoonstorm for MoonstormSharedUtils' stubbed shaders
MSU License
Copyright © 2022 TeamMoonstorm
Permission is hereby granted, free of charge, to any person depending on this software and associated documentation files (the "Software") to deal in the software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense.
Other software can reuse portions of the code as long as this License alongside a "Thanks" message is included on the using software's readme
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the software
All rights are reserved.
CHANGELOG
0.5.2
- Rename
ConfigManagertoConfigCatalog(was missed in 0.5.1) - Rename
EquipmentFrame.performEquipmentActiontoEquipmentFrame.performEquipmentActionServerto improve transparency - Add
logbookModelParametersandSetLogbookModelParameterstoEquipmentFrameto mirrorItemFrame - Make 'Quick Add' overload for
SingleItemDisplayFrame.Addimplicitly support Equipment Drones - Add
GSUtil.AllChildrenextension for transforms - Fix
GSUtil.SetupItemDisplaysetting material instead of shared material - Add
UpdateItemFollowerScaleDebugto attach to item followers when creating item displays (ItemFolloweronly sets scale once when instantiating the follower) - Fix
Configurableattributes not applying to fields when within a module lacking aConfigurableattribute itself
0.5.1
- Add
ArtifactActionCatalogto handle artifact actions on enable/disable - Add
enabledActionanddisabledActiontoArtifactFrame - Rename
selectedIconanddeselectedIcontoenabledIconanddisabledIconrespectively inArtifactFrame - Fix
ArtifactFrame.SetArtifactCode(Top/Middle/Bottom)Rowhaving no effect LazyAddressablenow defaults to not ensuring completion. I am still not 100% happy with lazy addressables and will continue to look at them- Add
ModelPanelParametersInfoto represent general information aboutModelPanelParameters - Add
logbookModelParametersandSetLogbookModelParameterstoItemFrameto mergeGSUtil.SetupModelPanelParametersinto the frame - Add more overloads to
GSUtil.SetupModelPanelParameters - Rename
OverlayManagerandEarlyAchievementManagerandEliteTierManagertoOverlayCatalogandEarlyAchievementCatalogandEliteToTierManagerrespectively EquipmentActionsCataloguses a function instead of a delegate to improve readability- Add
ArtifactCompoundsclass toCommonto represent vanillaArtifactCompoundDefand int value information - Add
GSUtil.TryFindArtifactCompoundDefandGSUtil.FindArtifactCompoundDefto locate the appropriateArtifactCompoundDeffor a compound int value - Add
CopyToFormulaDisplaymethod toArtifactCodeInfoto setup aArtifactFormulaDisplaycomponent based on the code info - Remove
GSUtil.ModLoadedCachedbecause it really wasn't worth caching - Add support to
ModPluginfor BepInEx incompatability, dependency, etc. attributes - Add
moddedDifficultyDefsfield toExtendedSerializableContentPack
0.5.0
- Early release