Combat Updates in v1.1
RPG in a Box v1.1 brings many exciting new features and improvements to the combat system! Combined with all of the updates to the skill and stat systems, this will open up many more possibilities for your games! Continue reading below for a brief overview of some of the major updates included.
Battle, Round, and Turn Scripts
Several new options were added to the Combat Editor to allow much more customization around what happens during tactical turn-based and menu-driven turn-based battles! All of the scripts listed below have access to the name of the battle ($battle_name
) and an array of characters participating in the battle ($characters
).
- Pre-Battle Script: Ran before the first round of a battle (i.e. before any combat has taken place).
- Post-Battle Script: Ran at the end of a battle before returning to normal gameplay and any victory/defeat scripts are triggered.
- Pre-Round Script: Ran at the start of each round of a battle. The
$round
variable will contain a numeric value corresponding to the current round number, starting with 1.
- Post-Round Script: Ran at the end of each round of a battle. The
$round
variable will contain a numeric value corresponding to the current round number, starting with 1.
- Pre-Turn Script: Ran at the start of each character's turn during a battle, with the
self
built-in variable referencing the current character. The $round
variable will contain a numeric value corresponding to the current round number, starting with 1.
- Post-Turn Script: Ran at the end of each character's turn during a battle, with the
self
built-in variable referencing the current character. The $round
variable will contain a numeric value corresponding to the current round number, starting with 1.

Weapons and Projectiles
- Free Attacking in Grid-Based: When using the grid-based movement system, the player can now freely attack at any time instead of needing to directly interact with an enemy, similar to free movement. This is bound to the Ctrl key by default and can be changed in your project's input bindings.
- Projectile Items: The Item Editor now includes a "Projectile" toggle option for indicating that the item is a projectile. This functionality is used with the "Fire Projectile" function and turrets, with settings for damage, speed, range, on hit script, and sound effect.
- Weapon Sound Effects: A new "Sound Effect" setting is available for items configured as weapons in the Item Editor. The assigned sound effect will automatically play when a character attacks with that weapon equipped.
- Ammo/Energy for Melee Weapons: Melee weapons can now use the "Ammo/Energy Required" setting in the Item Editor to support options beyond unlimited use (i.e. single use, items by ID, and items by tag).
- Character Stat Consumption: Weapons can now require consumption of a character's stat in order to attack with it. This option is available when using the "Ammo/Energy Required" setting in the Item Editor.
Scripting
From a general scripting perspective, this update brings a few new features to Bauxite. This includes a "Fire Projectile" function, retrieving a character's equipment or the count of a particular item in a character's inventory, and a new "team" property in preparation for future functionality.
- Fire Projectile Function: Fires a projectile from a source entity or coordinate towards a target using an item set up as a projectile in the Item Editor (e.g.
fire_projectile("ITEM_0001", entity["source"], player, "projectile_id")
). If the source is an entity and no target is specified, the projectile will be fired in the direction in which the entity is currently facing.
- Character Equipment: A character's equipment can now be retrieved via script using the new
<character>.equipment
Bauxite property. This will give a codex containing the equipment, where the keys are the equipment slot IDs (e.g. $right_hand_item = player.equipment["right_hand"]
).
- Inventory Item Count: The number of a specific item in a character's inventory can now be retrieved via script using the new
<character>.get_item_count(<item_id>)
Bauxite function. This will give the total count of a specific item in a character's inventory (e.g. $count = player.get_item_count("ITEM_0001")
).
- Character Team: A character's team can be retrieved or changed via script using the new
<character>.team
Bauxite property, with supported values of "player"
, "enemy"
, and null
. This only affects characters with the "Attackable in Real-Time" behavior setting enabled. Further improvements and functionality around this will be coming in future updates.

Other Updates
While there are too many changes to mention everything in this post, here are just a few additional improvements related to combat worth mentioning:
- Projectile Improvements in Grid-Based: When using the grid-based movement system, projectiles now move independently instead of remembering their target (i.e. hitting their target even if it has moved away). This means characters can now dodge projectiles and will only be hit if they make physical contact with them.
- Stack Count for Default Equipment: When assigning default equipment to a character in the Voxel Editor, you can now specify an initial stack count if the weapon item is stackable (e.g. throwing daggers).
- On Hit Script Change: Ranged weapons will now also trigger their on hit scripts when hitting tiles, objects, and non-attackable characters (in addition to attackable characters).
- Custom Currencies in Loot Drops: When setting up loot drops in the Combat Editor, you can now include custom currencies. The "Add Currency" button will display a popup menu of all available currencies.

Check out the full release notes for v1.1 here:
https://rpginabox.com/forum/d/254-release-notes-for-v11