Moonstorm Shared Utils
-
Moonstorm Shared Utils (Abreviated as MSU) is a library mod with the intention to help ease the creation of mods, mainly ones that are developed trough Thunderkit. It is a library mod used by the members of Team Moonstorm.
-
Contains both classes for mod making and an assembly for Editor utilities.
-
Classes for mod making include a modular system using abstract classes, alongside abstract content classes. Taking heavy use off the ItemBehavior class found inside the CharacterBody.
Features
Documentation & Sourcecode
- The Documentation and Sourcecode can be found in MoonstormSharedUtil's Github Repository, which can be found here
Some things to note...
The Repository might have some disparaties between the current release of MSU and the repo itself, this is because it's not the real repository where the development happens
we'll try to keep this repository up to date at any cost.
-
MoonstormSharedUtils now has a Wiki, filled with introductions and explanations on how the systems work.
-
For now, you can find an example on how to use the mod in Lost In Transit's Github repository, which can be found here
Changelog
(Old Changelog can be found here)
'0.6.0'
-
Changes:
- MSU no longer has any kind of dependency on AspectAbilities
- MSU no longer handles the implementation of an aspect ability by itself
- Removed dependency on Microsoft.Csharp
- Event Director:
- No longer should gain negative amounts of credits on custom difficulties with indexes on the negatives.
-
Additions
- Interfaces:
- Added IBodyStatArgModifier Interface
- Used for interacting with R2Api's RecalculateStatsAPI
- Unlockables:
- Added an Unlockables Module
- Unlockables module handles the implementation of UnlockableDefs and the creation of AchievementDefs
- UnlockableDefs and Achievementdefs are made inside the MSUnlockableDef class
- Unlockables are registered inside UnlockableBase classes. the norm is also having it's related Achievement as a nested class
- Unlockables can have dependencies on other ContentBases
- If a dependency is not enabled, the unlockable will not be added to the game
- In case the dependency is a custom made content base, you can override OnFailedToCheck() method to handle it.
- Interactables:
- Added an Interactables Module
- Interactable Module handles the implementation of custom Interactables to the game
- Interactables are created from the MSInteractableDirectorCard, which itself inherits from the InteractableSpawnCard
- Interactablkes are automatically added to stages via DirectorAPI
'0.5.1'
'0.5.0'
* Additions:
* Added Event system API (*Look, I normally don't do this, okay? I don't really know what else has been done , but this is Starstorm 2's Event API, forcefully ripped out and put in a place where YOU can use it. There is NO documentation. I don't even know if it works. But you can (probably) use it to do cool stuff!
...I hope Nebby forgives me for this one.)
No, I do not.
Actual changelog:
- Additions:
- Added the ability to extend from the MoonstormItemManager component.
- Extending from the manager requires you to extend from the "ManagerExtension" component.
- Immediate References to the characterBody attatched to the manager extension, the manager itself as well.
- Virtual methods for GetInterfaces, CheckForItems and CheckForBuffs.
- Added the EventAPI from Starstorm2Nightly into MSU.
- The Event API itself is not documented and very much WIP.
- EventAPI should have everything to add custom events.
- EventAPI works via a custom director, events themselves are simply entity states.
- All Events should inherit from the GenericEvent entitystate, which is found in the EntityStates.Events namespace.
- Changes
- Artifact Content Base:
- Added OnArtifactEnabled() and OnArtifactDisabled() abstract methods, subscribe and unsuscribe from hooks in these methods. System closely resembles how the Artifact Managers of RoR2 Work.
- Added an Abstract field for an ArtifactCode from R2API's ArtifactCodeAPI, can be left null.
- Artifact Module Base:
- Added some actual hooks onto the RunArtifactManager.
- Pickups Module Base: Added an Event when the ItemManager is added.
- Material Tester:
- Can no longer be spawned outside of runs
- Renderer is no longer null by default
- Can now be destroyed easily by enabling the "DestroyOnEnable" component.
'0.4.1'
- Additions:
- Added the StageModuleBase & StageBase
- Used for handling custom stages
- Compatible with ROS
- Changes:
- Marked the MSAspectAbilityDataHolder as Deprecated, will be removed on the next major update.
- Now Dependant on Microsoft CSharp
- Changed how Elite Equipments get initialized
- This Retroactively fixes an issue where, if the Elite Equipment Base overrides the AddItemBehavior method, but its not fully initialized (like disabling it from a config) it would add the item behavior regardless ((Example on the issue)[https://github.com/swuff-star/LostInTransit/issues/2])
- Completely Revamped the Dynamic Description attribute.
- Now called the "TokenModifier" attribute.
- Used on Fields that are public & static
- Requires the following arguments
- String: the Token to modify
- StatType: Used for modifying the value held in the field
- Default: No changes are made
- Percentage: The value on the field is multiplied by 100
- DivideBy2: The value on the field is divided by 2
- If you need a specific stat type, ask it in the starstorm discord and we might add it.
- FormatIndex: the index used for formatting.
- Should technically work with any mod.
- Not usable on mods that load their language via LanguageAPI (Due to languageAPI's string by tokens dictionaries being private.)
- Bug Fixes:
- Fixed an issue where moonstorm dependant mods would try to access MSUtil on the Moonstorm.Utilities namespace despite being on the Moonstorm namespace
'0.4.0'
- Added ConfigurableField attribute
- Used for automatically creating config options for fields.
- Added DynamicDescription attribute
- Used for dynamically modifying the description of an item via the use of formatting, and provided fields.