Version 4.00


Changes introduced in this version are incompatible with previous versions due to changing the names of essential passages and variables. Apologies, but these changes will vastly improve usability going forward.
  • The isDone property has been renamed to active and its logic has been flipped, e.g. situations that would have set isDone to true now set active to false. Apologies for any problems this causes, but it will make code clearer going forward for other initiative models.
  • Battle passages have been renamed for greater clarity and consistency. "Battle!" is now "Player Phase", "Preparation" is now "Battle Preparation", "end of round" is now "RoundEnd", and all phases are now capitalized.
  • The endOfRound widget has been renamed to "endTurn" for consistency with newTurn. The existing endturn widget has been renamed to "endRound" for clarity.
  • Code used in newTurn and endTurn have been compartmentalized into additional widgets to reduce code redundancy. This will also allow you to more easily implement these features in other contexts.
  • Characters will no longer regenerate HP if they are under a healBlock effect.
  • Energy stats have been made default properties of the Actor constructor, but they will only be defined if an en property is defined in the corresponding database entry. Default values can also be provided through the setup variables MAX_EN and EN_REGEN.
  • Energy regeneration has been added as part of the core newTurn widget. If you want to opt out, simply delete MAX_EN in your custom StoryInit section.
  • New action function: cancelAction. It will remove the target's readied action if they have one.
  • New Actor properties:
    • noENregen: Similar to healBlock, it will return true if the character has an effect with the same property, and will disable Energy regeneration in newTurn. It will also return true if the character is dead or has no en property. The core effects "Winded" and "Petrified" have been modified to use this property.
    • interruptGuard: Checks if character has an effect with the same property. If true, protects against cancelAction.
    • Corresponding property getters have been added to the Effect class.
  • Action execution code has been compartmentalized for greater modularity. Pre-action code can now be found under the preAction passage, and post-action code under the postAction passage. custom end of action effects has been renamed postAction custom for readability and consistency with other custom passages.
  • Selecting an action now forwards the player to an "Action Handler" passage instead of directly to the action phase. This allows you to perform pre-processing and rerouting before executing the action itself. Currently, it exists to check for actions with waitTime under the timeline model, and otherwise forwards the player straight to the action phase.
  • New Action property: base. This is a flat value added to an action's damage output, and is 0 by default.
  • Default damage formulas have been adjusted to incorporate base damage, and a new formula has been added that just uses base damage with no other fluff.
  • Action tooltips have been redone with snazzy images to convey important information. Images were taken from The Noun Project, with attributions listed on the game's page.
  • The damage formula switch now converts the input to lower case before reading it. This avoids potential errors arising from mixed case.
  • Stat names have been standardized as part of a STAT_NAMES object, which is part of setup.
  • Stat minimums and maximums have been implemented. These can be defined in StoryInit as part of the STAT_MIN and STAT_MAX objects. Returned stat values will be clamped between these two values.
    • If exceptions are necessary, such as e.g. the Forsaken effect, a new Actor property has been added: noMinimum. This is initialized as an empty array for all new Actors, and will ignore STAT_MIN for any stat names included within. In the core code, Forsaken has been modified to use this property instead of a forsaken flag.
  • Shorthand functions have been created for accessing STAT_NAMES, STAT_MIN, and STAT_MAX. See support_functions.js for details.
  • The functionality of the "Protector" effect has now been generalized to a property, "guard", that can be enabled in effect definitions. If true, the target of the ability will be flagged as protected by the subject.
  • Instead of manually checking in both damage and effects, protection is now checked only once, in the "action effects" passage before an action is executed.
  • Accuracy, shield, and multiple hit logic have been changed. An action's act function is now executed once for every hit property (default 1), and accuracy and shields are checked on every iteration. As a result, the multihit action function has been depreciated.
    • Spread and noRedundant behavior have been changed to Action properties instead.
  • New Action properties:
    • finisher: Function that executes only on the final hit of an action. Emulates multihit's previous rule for extensions (running only after all hits have been executed). Note that this finisher occurs instead of the regular act function.
    • onMiss: Function that excecutes if an action misses. Increase the risk to your reward. Perhaps if your character attempts a bombastic jumping attack but misses, they land poorly and sprain an ankle?
  • Fixed an error in Effect.calculatePower.

Files

rpgengine source.zip 6 MB
Dec 31, 2021

Get Another RPG Engine

Leave a comment

Log in with itch.io to leave a comment.