-
Notifications
You must be signed in to change notification settings - Fork 4
Skills Utilities
File path: scripts/config/msu/skills.nut
This page is about Skills Utilities in the ::MSU.Skills
namespace. For detailed features related to skills modding see the Skills page.
::MSU.Skills.addEvent( _name, _function = null, _update = true, _aliveOnly = false )
// _name is a string
// _function is a function
// _update is a boolean
// _aliveOnly is a boolean
The above code will create a new event function in skill.nut
and skill_container.nut
with the name of _name
. For details and an example, see creating a new skill event.
::MSU.Skills.addPreviewApplicableFunction( _name )
// _name is a string which is the name of a function in skill.nut
Makes this function subject to MSU's affordability preview modifications. This is essential, for example, for mods which may want to add new kinds of affordability calculation functions e.g. <skill>.isAffordableBasedOnMana()
etc. See Affordability Preview for details and an example.
For details on the automated resetting of fields to their base values see Skill Base Values.
::MSU.Skills.addToSoftReset( _field )
// _field is a key in the m table of skill.nut
Adds the _field
member of skill.m to the list of fields to be reset during every call to softReset()
. Does nothing if _field
is already in the list.
::MSU.Skills.removeFromSoftReset( _field )
// _field is a key in the m table of skill.nut
Removes the _field
member of skill.m from the list of fields be reset during every call to softReset()
. Does nothing if _field
does not exist in the list.
- NOTE: MSU guarantees backwards compatibility for documented features and code only. Undocumented features/code of MSU may be changed at any time without notice, so we advise against using/referencing such code in your projects.
- For bug reports or feature requests, please create issues.
- If you would like to join the team, write to us at msu.team@protonmail.com.