itch.io is community of indie game creators and players

Devlogs

Version 5.00: Inventory Overhaul

Another RPG Engine
A browser game made in HTML5

This update contains a massive change to inventory structure, and as such will be incompatible with previous versions of the engine.

  • INVENTORY OVERHAUL: Inventory objects are now Arrays rather than Maps. This allows multiple instances of the same item to appear in an Inventory. This change is incompatible with earlier versions of the engine.
    • New Inventory property: size. Determines the maximum number of stacks an Inventory can hold. If 0 or less, the Inventory is considered limitless.
    • New Inventory method: clearItems. Removes all instances of the named item and returns them as an array.
    • Overhauled addItem and decItem to work with multiple item instances.
    • Removed the maxstock property and restock widget, because they were confusing and not how most RPGs handle items. (In the default engine, item restocking is now handled by cloning the inventory before battle and replacing player inventory with the clone after battle.)
    • Added a setter for stock that guards against non-integer values, negative values, and values exceeding the item's stackSize.
    • New Item property: uses. This works the same way it does for Actions.
    • New setup variables:
      • DUPLICATE_ITEMS: Boolean that determines if multiple stacks of the same item are allowed in Inventories.
      • REMOVE_ITEMS: Boolean that determines if items falling to 0 stock are removed from Inventories.
  • Equipment slots have also been restructured into an array, with corresponding tweaks to associated methods. This should (hopefully) make it easier to reference and modify equipment slots.
    • Equipment slots can now have the locked property, which prevents them from being unequipped without an unlock argument passed to unequip.
    • The slot property of Items has been renamed to slots, and can now be an array naming multiple valid slots. A getter for slots has been added to access this property easily and guard against invalid data types.
    • Multi-slot equipment is now governed by a Boolean multislot property in equippable.
    • Equipment is now applied by selecting the desired slot, rather than the character. This allows equipment to have multiple valid slots.
    • New Actor method: hasSlot. Checks if the named slot is present.
    • New Actor method: getEquipment. Returns the equipment in the named slot.
  • Element affinities are now stored in a generic object instead of a Map. This will make it easier to access and modify them.
  • New property for Action and Item classes: tags. This is an array that can be used to store any additional metadata you desire.
  • New Actor property: threatMod. This is a Stat against which a characters' chances of being targeted by attacks will be multiplied. (This replaces the old code for Firefly and Wallflower.)
  • Added and expanded comments for the Item and Inventory classes.
  • unequip now returns a value if the unequip failed due to sticky equipment.
  • Deleted "custom end of action effects", as it was now redundant with "custom postAction".
  • The in-battle "Item" command now generates a header reading "ITEMS" above the item list.
  • The in-battle item listing will now display an informative message if you have no usable items.
  • The part of the in-menu item display occupied by the use/equip buttons is now separated with a line and colored gray. This should hopefully reduce the perception of empty space for items that don't generate those buttons.
  • Tweaked the displays for actions and items. In uncompressed form they now have an upper border to better separate them within a list; item stock is now displayed more prominently; and equipment slots are now displayed in the same manner as action tags, below the description. In compressed form, actions now have solid borders to make each entry more distinct.
  • Character blocks in the "Party" tab of the menu will no longer display hidden stats.
  • The Skill stat now has defined minimums and maximums by default.
  • Fixed several graphical glitches involving listing items in battle.
  • Actor boxes will no longer attempt to display EN if the actor does not have any.
  • Characters will no longer have a Crisis section in their status menu if they have no Crisis abilities.
  • Long overdue fix: Folded core-enemies.js into database-enemies.js and core-effects.js into database-effects.js.
  • Calculations involving the Special stat have been moved from the core damage calculation program to the custom one. This avoids creating errors if the Special stat doesn't exist.
  • Action weight will now return 1 by default instead of 0, fixing the problem of zeroing any damage calculated if you neglected to set a weight. Not sure why I didn't do it that way to begin with.
  • The Evasion stat will now default to 0 for new Actors rather than the minimum defined Evasion.
  • Reorganized StoryInit to move most variables into the custom version of the file, and rearranged them into a more logical order. You should no longer have to jump back and forth between two files to figure out what has and hasn't been defined.
  • Reorganized and compartmentalized most of the party menu widgets so that they are now stored in the same file as the relevant passages.
  • Removed the B.targeting variable and replaced it with the action.target property.
  • Moved the formatting for in-battle status screens to a custom passage. Display code has been tweaked to better accommodate modular changes.

Files

  • rpgengine source.zip 6.5 MB
    Aug 07, 2022
Download Another RPG Engine
Leave a comment