Version 3.04


  • New Actor properties:
    • position: When invoked, it returns the character's cell in the grid; when set, it adjusts their row and col values and swaps the contents of the destination cell.
    • loadBearing: Boolean. If a load-bearing character is defeated, the battle ends regardless of the state of their team members.
    • uncounted: Boolean. Uncounted characters are not counted towards the victory and defeat counters, and do not need to be defeated to end an encounter.
    • hasEffect: Returns Boolean based on if the character has the named effect. Can also test for multiple effects by passing an array (but will return true if the actor has any of the named effects).
  • Movement code has been simplified to take advantage of the position property.
  • Victory handler code has been tweaked; instead of instantly moving to victory or defeat screens if their conditions are met, they are added to a _destinationQueue variable. After all the code is done, the player will be forwarded to the first element in _destinationQueue if one exists. This should avoid issues with goto pileups.
    • Special deaths are also added to this queue, and will now take priority over the standard victory destinations.
  • pushAttack should now work with the new battle grid code.
  • The code for displaying the actor box container has now been compartmentalized into a passage, Actor Box Container, if customization without changing the surrounding actor box code is desired.
  • Enemies now have setters for xp and gp properties.
  • The code for the Bestiary class has been split into a separate file.
  • The code for battle widgets and setup has been split into a separate file, Battle Setup.tw.
  • The code for each hotkey has been compartmentalized into its own passage for greater modularity.
  • Adjusted the code for healCalc to make use of an action's formula property, if it has one, as well as compartmentalizing the default healing formula into a separate passage.
  • The action info popup now has a high z-index value, preventing it from being obscured by other page elements.
  • Added a new targeting parameter, "no effect". If included, the action will preferentially target characters that don't already have any of the action's effects (as specified in the effects property). This parameter is present for both ally and enemy targeting.
  • addEffect now records whether the effect was applied (and what blocked it, if not) as a property, effectApplied, of the calling Actor object. effectApplied is an object with effect names as keys and return values from testEffect as values.
  • Added event triggers on several common battle functions, in case you want to tie special events to them. Current events are:
    • :puppet-selected: triggered on puppet selection
    • :act-selected, :rest-selected, :item-selected, and :move-selected: triggered on selection of the respective command
    • :action-selected: triggered on action selected (also works if selected via hotkey)
    • :action-performed: triggered when action performed by puppet
    • :target-selected: triggered on target selection
    • :endturn-run: triggered upon execution of end-turn code.

Files

rpgengine source.zip 6.4 MB
Jun 13, 2021

Get Another RPG Engine

Leave a comment

Log in with itch.io to leave a comment.