User Tools

Site Tools


combat_editor

Combat Editor


Overview

The Combat Editor allows you to set up various combat-related components, like battles, enemies, loot drops, random encounters, and enemy spawns. See Combat Systems for visual examples of each combat type.

General

SettingDescription
Attack Cooldown (Player)Default cooldown for real-time attacks for the player character. This can be overridden on a per character basis using the “Attack Cooldown” setting in the Voxel Editor or per weapon using the “Attack Cooldown” setting in the Item Editor.
Attack Cooldown (NPC)Default cooldown for real-time attacks for NPCs. This can be overridden on a per character basis using the “Attack Cooldown” setting in the Voxel Editor or per weapon using the “Attack Cooldown” setting in the Item Editor.
Real-Time Fire ModeDetermines whether or not the player must trigger the “Attack” input action for each individual attack when no weapon is equipped. When “Single” is used, the player must trigger the “Attack” input action for each attack, while “Automatic” allows them to hold the input down to attack repeatedly (once their attack cooldown has been reached). If a weapon is equipped, its “Real-Time Fire Mode” setting will override this.
Damage Sound EffectAllows you to override the default sound effect that's played when a character takes damage, either with a custom sound effect or none at all.
Miss Sound EffectAllows you to override the default sound effect that's played when a character misses an attack, either with a custom sound effect or none at all.
Death Sound EffectAllows you to override the default sound effect that's played when a character is defeated, either with a custom sound effect or none at all.
Damage Shake/FlashDetermines whether or not the shake/flash effect is applied to a character's model when they take damage.
Remove Defeated EnemiesDetermines whether or not enemies are removed from the map upon being defeated.
Pre-Battle ScriptScript that will run at the beginning of a battle before the first round of combat takes place. The $battle_name variable will contain the name of the battle as a string. The $characters variable will contain a list of characters participating in the battle as an array. This includes both the player's party and any enemies, sorted in the order in which their turns will be taken.
Post-Battle ScriptScript that will run at the end of a battle before returning to normal gameplay and any victory/defeat scripts are executed. The $battle_name variable will contain the name of the battle as a string.
Pre-Round ScriptScript that will run at the beginning of each round of a battle. The $round variable will contain the round number (e.g. 1, 2, 3, etc.). The $battle_name and $characters variables are also available (see pre-battle script and post-battle script details).
Post-Round ScriptScript that will run at the end of each round of a battle. The $round variable will contain the round number (e.g. 1, 2, 3, etc.). The $battle_name and $characters variables are also available (see pre-battle script and post-battle script details).
Pre-Turn ScriptScript that will run at the beginning of each character's turn during a battle. The self built-in variable will reference the character whose turn it is. The $battle_name, $characters, and $round variables are also available (see battle/round script details above).
Post-Turn ScriptScript that will run at the end of each character's turn during a battle. The self built-in variable will reference the character whose turn it is. The $battle_name, $characters, and $round variables are also available (see battle/round script details above).

Common Toolbars

Each of the sections within the Combat Editor (Battles, Enemies, etc.) contains a list on the left side with all of the currently defined items of that type. For example, in the Battles section this lists any battles that you've set up for your game. To the right of these lists is a set of buttons for performing various actions, which are described below. In these descriptions, the term “item” is used to refer to whatever sort of component is maintained in a particular section, for example a battle or enemy.

ButtonDescription
AddAdds a new item to the list.
RenameRenames the currently selected item in the list.
DuplicateDuplicates the currently selected item in the list.
DeleteDeletes the currently selected item in the list.

Battles

Battles can be triggered using the Start Battle scripting function or via random encounters. The name supplied to the Start Battle function should match the battle name defined in the Combat Editor and is case-sensitive.

SettingDescription
Battle TypeType of battle to start. The currently supported types are “Tactical Turn-Based” and “Menu-Driven Turn-Based”.
Battle MapMap in which the battle will take place. Only applicable to tactical turn-based battles.
Player SpawnDetermines where the player characters will spawn. “Random Tile” will choose a random tile from the entire map, while “Random Tile in Group” lets you limit the potential spawn area by entering a group name. A random tile will be selected from the group. Only applicable to tactical turn-based battles.
Spawn in GroupAvailable when “Random Tile in Group” is selected for the setting above. This defines the potential area in which the player characters can spawn. The name should match the group name as defined in the Map Editor.
Victory ScriptScript that will be triggered if the player wins the battle.
Defeat ScriptScript that will be triggered if the player loses the battle.
Enemies in BattleDetermines the enemies that can spawn at the start of the battle. To add an enemy, drag and drop one from the “Enemies” list onto this list.

The “Enemy Details” section allows you to customize how many of the selected enemy will potentially spawn at the start of the battle and where they can spawn.

SettingDescription
CountNumber of the enemy to spawn (fixed or random number in a given range).
Enemy SpawnDetermines where the enemy will spawn. “Random Tile” will choose a random tile from the entire map, while “Random Tile in Group” lets you limit the potential spawn area by entering a group name. A random tile will be selected from the group. Only applicable to tactical turn-based battles.
Spawn in GroupAvailable when “Random Tile in Group” is selected for the setting above. This defines the potential area in which the enemy can spawn. The name should match the group name as defined in the Map Editor.

Enemies

Enemies are used by other sections within the Combat Editor, specifically “Battles” and “Enemy Spawns”. They can be dragged and dropped onto applicable lists, for example to add an enemy to a battle or spawn.

SettingDescription
ModelThe character model to use for the enemy.
Loot DropThe loot drop to give to the player upon being defeated. These are defined in the “Loot Drops” section described below.
Experience PointsHow many experience points to award the player upon being defeated.

Loot Drops

The “Loot Drops” section lets you define items that will be rewarded to the player when defeating an enemy during a battle. A loot drop can be assigned to an enemy in the “Enemies” list by selecting the enemy and choosing the desired loot drop from the “Loot Drop” dropdown.

SettingDescription
ItemThe item that will be given to the player.

Random Encounters

Random encounters provide a way to trigger battles randomly as the player moves around a map. Once a random encounter has been created, you can assign it to a group in the Map Editor. Whenever the player enters a tile in that group, a battle for this encounter may trigger based on its configured chance.

SettingDescription
Possible EventsPossible battles that can occur for this encounter. Drag and drop a battle from the “Battles” section onto this list to add it as a possible event.

The “Event Details” section allows you to customize various settings for the selected random encounter.

SettingDescription
ChanceThe percentage chance that the event will occur.

Enemy Spawns

Enemy spawns provide a way to dynamically spawn enemies into a map. Once an enemy spawn has been created, you can assign it to a group in the Map Editor. Based on the configured settings, enemies will then spawn randomly on tiles in that group. If the enemy has a “spawn” animation defined, it will be triggered upon appearing.

SettingDescription
Possible EventsEnemies that can potentially appear for this spawn. Drag and drop an enemy from the “Enemies” section onto this list to add it as a possible event.

The “Event Details” section allows you to customize various settings for the selected enemy spawn.

SettingDescription
TimerThe amount of time to wait between each possible spawning of an enemy occurring.
ChanceThe percentage change that an enemy will spawn each time the timer fires.
LimitThe maximum number of enemies spawned from this event that can simultaneously exist.
combat_editor.txt · Last modified: 2024/02/18 18:18 by justin