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 | 9469 |
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
ConfigManager
toConfigCatalog
(was missed in 0.5.1) - Rename
EquipmentFrame.performEquipmentAction
toEquipmentFrame.performEquipmentActionServer
to improve transparency - Add
logbookModelParameters
andSetLogbookModelParameters
toEquipmentFrame
to mirrorItemFrame
- Make 'Quick Add' overload for
SingleItemDisplayFrame.Add
implicitly support Equipment Drones - Add
GSUtil.AllChildren
extension for transforms - Fix
GSUtil.SetupItemDisplay
setting material instead of shared material - Add
UpdateItemFollowerScaleDebug
to attach to item followers when creating item displays (ItemFollower
only sets scale once when instantiating the follower) - Fix
Configurable
attributes not applying to fields when within a module lacking aConfigurable
attribute itself
0.5.1
- Add
ArtifactActionCatalog
to handle artifact actions on enable/disable - Add
enabledAction
anddisabledAction
toArtifactFrame
- Rename
selectedIcon
anddeselectedIcon
toenabledIcon
anddisabledIcon
respectively inArtifactFrame
- Fix
ArtifactFrame.SetArtifactCode(Top/Middle/Bottom)Row
having no effect LazyAddressable
now defaults to not ensuring completion. I am still not 100% happy with lazy addressables and will continue to look at them- Add
ModelPanelParametersInfo
to represent general information aboutModelPanelParameters
- Add
logbookModelParameters
andSetLogbookModelParameters
toItemFrame
to mergeGSUtil.SetupModelPanelParameters
into the frame - Add more overloads to
GSUtil.SetupModelPanelParameters
- Rename
OverlayManager
andEarlyAchievementManager
andEliteTierManager
toOverlayCatalog
andEarlyAchievementCatalog
andEliteToTierManager
respectively EquipmentActionsCatalog
uses a function instead of a delegate to improve readability- Add
ArtifactCompounds
class toCommon
to represent vanillaArtifactCompoundDef
and int value information - Add
GSUtil.TryFindArtifactCompoundDef
andGSUtil.FindArtifactCompoundDef
to locate the appropriateArtifactCompoundDef
for a compound int value - Add
CopyToFormulaDisplay
method toArtifactCodeInfo
to setup aArtifactFormulaDisplay
component based on the code info - Remove
GSUtil.ModLoadedCached
because it really wasn't worth caching - Add support to
ModPlugin
for BepInEx incompatability, dependency, etc. attributes - Add
moddedDifficultyDefs
field toExtendedSerializableContentPack
0.5.0
- Early release