======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===== ^Setting^Description^ |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 [[weapons|weapon]] using the "Attack Cooldown" setting in the [[Item Editor]].| |Attack Cooldown (NPC)|Default cooldown for real-time attacks for [[npc|NPCs]]. This can be overridden on a per [[character]] basis using the "Attack Cooldown" setting in the [[Voxel Editor]] or per [[weapons|weapon]] using the "Attack Cooldown" setting in the [[Item Editor]].| |Real-Time Fire Mode|Determines whether or not the player must trigger the "Attack" input action for each individual attack when no [[weapons|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 [[weapons|weapon]] is equipped, its "Real-Time Fire Mode" setting will override this.| |Damage Sound Effect|Allows you to override the default [[sound|sound effect]] that's played when a [[character]] takes damage, either with a custom [[sound|sound effect]] or none at all.| |Miss Sound Effect|Allows you to override the default [[sound|sound effect]] that's played when a [[character]] misses an attack, either with a custom [[sound|sound effect]] or none at all.| |Death Sound Effect|Allows you to override the default [[sound|sound effect]] that's played when a [[character]] is defeated, either with a custom [[sound|sound effect]] or none at all.| |Damage Shake/Flash|Determines whether or not the shake/flash effect is applied to a [[character|character's]] model when they take damage.| |Remove Defeated Enemies|Determines whether or not enemies are removed from the [[map]] upon being defeated.| |Pre-Battle Script|[[Script]] 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 [[character|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 Script|[[Script]] that will run at the end of a [[battle]] before returning to normal gameplay and any victory/defeat [[script|scripts]] are executed. The **$battle_name** variable will contain the name of the [[battle]] as a [[string]].| |Pre-Round Script|[[Script]] 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 Script|[[Script]] 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 Script|[[Script]] that will run at the beginning of each [[character|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 Script|[[Script]] that will run at the end of each [[character|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. ^Button^Description^ |Add|Adds a new item to the list.| |Rename|Renames the currently selected item in the list.| |Duplicate|Duplicates the currently selected item in the list.| |Delete|Deletes 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. ^Setting^Description^ |Battle Type|Type of battle to start. The currently supported types are "Tactical Turn-Based" and "Menu-Driven Turn-Based".| |Battle Map|[[Map]] in which the battle will take place. Only applicable to tactical turn-based battles.| |Player Spawn|Determines 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 [[groups|group]] name. A random [[tile]] will be selected from the [[groups|group]]. Only applicable to tactical turn-based battles.| |Spawn in Group|Available 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 [[groups|group]] name as defined in the [[Map Editor]].| |Victory Script|[[Script]] that will be triggered if the player wins the battle.| |Defeat Script|[[Script]] that will be triggered if the player loses the battle.| |Enemies in Battle|Determines 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. ^Setting^Description^ |Count|Number of the enemy to spawn (fixed or random number in a given range).| |Enemy Spawn|Determines 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 [[groups|group]] name. A random [[tile]] will be selected from the [[groups|group]]. Only applicable to tactical turn-based battles.| |Spawn in Group|Available 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 [[groups|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. ^Setting^Description^ |Model|The [[character]] model to use for the enemy.| |Loot Drop|The loot drop to give to the player upon being defeated. These are defined in the "Loot Drops" section described below.| |Experience Points|How many experience points to award the player upon being defeated.| =====Loot Drops===== The "Loot Drops" section lets you define [[item|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. ^Setting^Description^ |Item|The [[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 [[groups|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. ^Setting^Description^ |Possible Events|Possible 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. ^Setting^Description^ |Chance|The 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 [[groups|group]] in the [[Map Editor]]. Based on the configured settings, enemies will then spawn randomly on [[tile|tiles]] in that [[groups|group]]. If the enemy has a "spawn" animation defined, it will be triggered upon appearing. ^Setting^Description^ |Possible Events|Enemies 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. ^Setting^Description^ |Timer|The amount of time to wait between each possible spawning of an enemy occurring.| |Chance|The percentage change that an enemy will spawn each time the timer fires.| |Limit|The maximum number of enemies spawned from this event that can simultaneously exist.| ~~NOTOC~~