Example implementation of a Custom Qounter addon for Qounters-.
- codegen
- custom-types
- questui
- qounters-minus
- Create a custom type extending QountersMinus::Qounter
- Set up your Qounter elements in a
void Start
method. The parent GameObject will be available asthis->gameObject
- Two helpers are available,
CreateBasicTitle(std::string)
andCreateBasicText(std::string)
. The basicText element is stored in thethis->basicText
instance variable and can be updated later from other methods.
- Two helpers are available,
- If any of the following event handler methods are specified, they will be called automatically at the appropriate moments during gameplay:
OnNoteCut(NoteData* data, NoteCutInfo* info)
OnNoteMiss(NoteData* data)
OnScoreUpdated(int modifiedScore)
OnMaxScoreUpdated(int maxModifiedScore)
OnSwingRatingFinished(NoteCutInfo* info, ISaberSwingRatingCounter* swingRatingCounter)
- References to some commonly-used game components are stored in
this->refs
(see InjectedComponents) - All other UnityEngine.MonoBehaviour methods can be defined
- Set up your Qounter elements in a
- For configuration, specify your configurable variables as static fields on your custom type
- The following configs must be defined as static fields on your class:
bool Enabled, int Position, int Distance
. However, they do not need to be Registered.
- The following configs must be defined as static fields on your class:
- In your mod's
load()
entry point:- Ensure Qounters- is loaded by calling
Modloader::requireMod("qounters-minus", QOUNTERS_MINUS_VERSION);
- Register with custom-types
custom_types::Register::RegisterType<YourCustomQounterType>();
- Register your Qounter
QountersMinus::QounterRegistry::Register<YourCustomQounterType>(std::string shortName, std::string fullName, std::string configKey)
- Register your configuration with
QountersMinus::QounterRegistry::RegisterConfig<YourCustomQounterType>(configMetadata)
(see QounterRegistry.hpp for all options, or browse through the base Qounters- Qounters for examples)
- Ensure Qounters- is loaded by calling
- zoller27osu, Sc2ad and jakibaki - beatsaber-hook
- raftario
- Lauriethefish and danrouse for this template