Since its release, I've continued to work on LeaderLib as I develop other mods, which has resulted in some new, interesting features:
Math ExtensionsA new
Math Extensions script was created to fill in the gap for missing math functions, such as:
- Factorials
- Power
- Sine
- Cosine
Recreating Sine/Cosine in Osiris was... Interesting, to say the least.
Follower SystemA new system was added for recruiting characters as "followers", which are basically permanent "summons" that can exist within the world. Simply by setting a flag, the system can be invoked and a character can be added to a player character as a follower.
This system was created while working on my new Mimicry mod, that adds a permanent follower you can recruit/dismiss at will.
New HelpersSeveral new helpers were added, including:
Combat HelpersThis system works similar to Larian's _Combat script, in that it tracks objects in combat, and information on the combat itself. Yet, it takes things a bit further by tracking/providing the following:
- How many rounds have passed in combat.
- Which object is active on that turn.
- What killed/destroyed what within combat (DB_LeaderLib_Combat_Casualties).
Skill HelpersSimply registering an entry in the following database provides a super easy way to have that skill toggle a status:
DB_LLLIB_Skills_StatusToggleSkills((STRING)_Skill, (STRING)_Status, (REAL)_Duration, (INTEGER)_Force)
Party HelpersA way to count the total number of characters in a party was added. A proc/query can be called to recount a specific party, or all parties, and that count is automatically updated when characters leave/join.
Timer HelpersSimilar in design to Larian's ProcObjectTimer, a set of timer procedures were added to simplify the act of needing a specific timer to run for an object, and having an event fire when done. Currently, the following timer helpers are:
- Object Timer (Anything with a GUIDSTRING). Calls a StoryEvent when done.
- Character Item Timer. Calls a CharacterItemEvent when done.
- Character Character Timer. Calls a CharacterCharacterEvent when done.
As someone who has had to constantly use StringConcatenate and databases to create unique timers for story scripts, I wish I had made these timer helpers sooner.
Behavior Script HelpersIn a desire to provide some functionality to behavior scripts that story has, a few events were added with behavior scripts in mind:
- "LeaderLib_EquipItem" (CharacterItemEvent) - Simply equips the item to the character passed in the CharacterItemEvent.
- "LeaderLib_UnequipItemInSlot" (CharacterEvent/StoryEvent) - Unequips whatever item is in the slot specified by the string variable "LeaderLib_ItemSlot".
Misc HelpersA few other miscellaneous helpers were added as needed, such as procedures for copying stats, abilities, and attributes between characters, procedures for unequipping weapons, unequipping everything, or "refreshing" equipment (unequipping it then equipping it after a delay).
__________________________________
Anyway, thanks to
RestingLichFace for steering me in the right direction for the sine/cosine formulas. Getting that working was a surprising success, as someone who has forgotten a large majority of math learned from school, haha.