Version 2.00: Effect manager overhaul!


Happy new year! For this version, I decided to finally bite the bullet and convert addeffect into a JavaScript function. It's now a lot more intuitive and easily customizable. However, this required completely restructuring the code for effect applications throughout the engine, so this version will not be compatible with earlier code.

  • Added a new file in javascript/custom: mods.js. This file is designed as a catch-all for any miscellaneous code the user wants to add to the JavaScript. It consists of a function, customMods, which is run at the end of StoryInit. (This placement is to ensure any relevant setup variables are defined first.) Currently, the code for Puppets' Energy- and Crisis-related attributes have been moved there, along with XPtoNext and initialThreat. This way, you can easily modify the specific functions you need without needing to edit the class definition.
  • The addeffect widget has been depreciated, and its code has been moved to Actor.addEffect.
    • "effect adder custom blocks" has been depreciated, and its functionality is now handled through properties of Effect objects: block, blockCondition, and blockText. Block effects now have a priority attribute as well to determine the order in which they resolve.
    • applyEffect has been completely redone to better mesh with this change. It is now much simpler and is only capable of applying unmodified effects to a single target. For more complicated behavior, just use addEffect directly.
    • Actions have been edited to comply with the above change. Let me know if any bugs occur.
  • Puppet.getStatCost has been depreciated.
  • Indirect damage will no longer trigger shield effects.
  • EN cost is now deducted before actions execute, rather than after. This also allows Focus to work as intended without any additional code.
  • Effect duration is now capped at a number specified by DURATION_MAX, set as part of setup.
  • Shield effects should now block status ailments. Additionally, if a damaging attack is blocked or dodged, status effects inflicted by the attack will also be blocked.
  • Future applications of the same effect will now add to the effect's duration instead of resetting it.
  • Fixed a glitch in Thorns (and any similar effects) where the original target would still take damage. Shield effects that inflict damage on someone else should no longer have data bleed leading to unusual behavior.

Files

rpgengine source.zip 6.3 MB
Jan 01, 2021

Get Another RPG Engine

Leave a comment

Log in with itch.io to leave a comment.