Skip to content

Power Definitions

RyanDansie edited this page Apr 16, 2013 · 14 revisions

Power definitions are defined in mods/[mod-name]/powers/powers.txt

Common properties

id is a unique integer that a power will be referenced by. It must be the first component defined for each power and must be greater than 0.

type can be any of:

  • fixed - has a fixed position
  • missle - a single hazard moves towards a target
  • repeater - a sequence of hazards move towards a target
  • spawn - spawns a creature
  • transform - player transforms into a creatue
  • effect - a status effect that is attached to the target. It is never cast by itself, but is called from another power as a post_effect.

name is the display name

description is flavor-text for the tooltips in the Powers menu

icon is an integer id relating to an icon to display in the Powers menu or Actionbar. Icon ids start at 0 for the top-left corner of mods/[mod-name]/images/icons/icons.png. The ids are then counted from left-to-right, top-to-bottom.

new_state is for setting the caster's animation state:

  • swing - for melee attacks
  • shoot - for ranged bow attacks
  • cast - for magic attacks
  • block - for blocking
  • instant - no animation, power is effective immediately

face (boolean) If true, the caster will turn towards their target when using the power

source_type can be any of:

  • hero - can affect enemies, but not the player
  • neutral - can affect both enemies and the player
  • enemy - can affect the player, but not enemies

beacon is a boolean used for a special power that alerts nearby creatures. This special power is typically casted when a creature enters combat.

count can either be:

  • the number of instances of a missle (e.g. 3 arrows for Flare's Multishot)
  • the length of a repeater (e.g. 10 chunks of ice for Flare's Freeze)

post_effect is the id an effect to apply to the target of a power, along with the magnitude and duration. For example, Blood Strike has post_effect=200,1,150. This means it applies power id 200 (Bleed in flare-game), with a magnitude of 1, for a duration of 150 frames (5 seconds).

passive (boolean) If true, the power is automatically activated if unlocked

passive_trigger makes a passive power only activate under these certain conditions:

  • on_block - When the caster is in a blocking state (hero only)
  • on_hit - When the caster is hit
  • on_halfdeath - When the caster's HP drops below 50%
  • on_joincombat - When the caster enters combat (enemy only)

Usage Requirements

requires_physical_weapon (boolean) If true, a melee weapon is needed.

requires_mental_weapon (boolean) If true, a magic weapon is needed.

requires_offense_weapon (boolean) If true, a ranged weapon needed.

requires_mp is the amount of MP required.

requires_hp is the amount of HP required.

sacrifice (boolean) If true, the caster can kill themselves with a power that requires HP.

requires_los (boolean) If true, the caster must be able to see their target.

requires_empty_target (boolean) If true, the target must be on an empty tile. This is typically used for teleportation powers to make sure there's a clean landing spot.

requires_item is the item id of the item the player must have in their inventory.

requires_targeting (boolean) If true, the power needs a target (e.g. can't use a Teleport scroll by right-clicking on it in the inventory).

cooldown is the number of frames that must pass before the power can be used again.

Visuals & Sound

animation is the filename (with extension) for the power's animation file. Power animation files are stored in mods/[mod-name]/animations/powers/.

sfx is the filename (with extension) for the sound effect that plays when cast. Power sounds are stored in mods/[mod-name]/soundfx/powers/.

directional (boolean) If true, animation is based on trajectory. Overrides visual_random and visual_option.

visual_random picks a random animation between 0 and this number (?). Overrides visual_option.

visual_option defines an animation "flavor" (e.g. the blast.png graphic in Flare has both fire and ice variants).

aim_assist (boolean) If true, add a y-offset to the target as defined in mods/[mod-name]/engine/misc.txt.

speed is the number of map units per frame the hazard(s) traverse.

lifespan is the number of frames the hazard exists for (?).

floor (boolean) If true, the animation is rendered below front objects to appear on the ground.

complete_animation (boolean) If true, let's the animation finish instead of abruptly ending after hitting a creature.

Hazard Traits

use_hazard (boolean) If true, the power creates a hazard. This is used for all attacking powers.

no_attack (boolean) If true, the hazard won't collide with or affect other creatures.

radius is of the effective hit circle of the power's hazard, measured in map units.

base_damage can be any of:

  • melee
  • ranged
  • ment

damage_multiplier is a percentage (default: 100%) of the total damage that would be done (power damage + weapon damage).

starting_pos can be any of:

  • source - starts at the caster's position
  • target - starts at the selected target
  • melee - starts at a target that depends on the caster's direction and melee range

multitarget allows the power to affect more than one creature with a single hazard.

trait_armor_penetration (boolean) If true, hazard ignores armor absorption.

trait_crits_impaired adds an additional percentage chance to get a critical hit when the target has impaired movement (immobilize/slow).

trait_elemental is the elemental type for the power. This should correspond to an element name in mods/[mod-name]/engine/elements.txt.

forced_move forces the victim to move in the direction they are facing. It takes two values, separated by a comma. The first is the speed in map units per frame. The second is the duration in frames.

range is the maximum number of map units away from the caster the power will reach.

target_party (boolean) If true, that hazard would effect party members and not enemies.

target_categories allows a comma separated list of categories to be specified. If specified, the hazard only affects enemies which have the same category.

modifier_accuracy allows the aggressors accuracy to be adjusted for the hazard hit change. In the format modifier_accuracy=mode,value,ignore avoidance. The mode can be any of the values multiply, add or absolute. Multiply causes the base accuracy to be multiplies by the specified amount, where 100 causes no change. Add causes the specified amount to be added to the base accuracy. Absolute causes the base accuracy to be replaced by the specified amount. The value in "ignore avoidance" is a boolean and determines whether the opponents avoidance stat is ignored. A modifier specified as modifier_accuracy=absolute,50,1 would mean that the hazard would have a 50% chance of hitting the target.

modifier_critical Same as modifier_accuracy except that it affects the critical hit rate and has no "ignore" boolean. Has the format modifier_critical=mode,value

modifier_damage Same as modifier_accuracy except that it allows both a minimum and maximum value to be specified. The maximum is only used if the mode specified is "absolute", however an integer is always expected by the parser. for any other mode, only the minimum is used as the adjustment value. The format is modifier_damage=mode,value(min),max value,ignore absorb. A modifier specified as modifier_damage=add,10,0,1 would mean that 10 would be added to the base damage and that the targets absorb value would be ignored.

Steal effects

hp_steal is a percentage of the damage done, returned as HP to the caster.

mp_steal is a percentage of the damage done, returned as MP to the caster.

Missile modifiers

missile_angle is the angle (in degrees) between each missle.

angle_variance is how many degrees can each missile be randomly off by.

speed_variance is how random each missile speed can vary.

Repeater modifiers

delay is the number of frames to delay each hazard

Pre/Post power effects

post_power is the id of an additional power that is activated when the hazard does damage to a creature. Flare uses this for fire/ice/blood "sparks".

wall_power is the id of additional power that is activated when a hazard hits a wall. Flare uses this to create arrows stuck to walls.

allow_power_mod (boolean) If true, allow a weapon's special power to be used alongside this power.

Spawn info

spawn_type is the name of a creature. For spawn powers, this is the creature that will be spawned. For transform powers, this is the creature that the caster will be transformed into.

target_neighbor is a range in map tiles. From the initial target, a random tile is picked from within that range as the new target.

spawn_limit controls the total number of creatures which may be spawned by a summon power. It has the format spawn_limit=mode,qty,every,stat. "mode" can be any of the values fixed, stat or unlimited. Fixed mode means that there is a fixed number of creatures allowed (requires qty to be specified), unlimited mode means that there is no limit (requires nothing more than the mode) and stat mode means that the maximum number is linked to the players stats (requires all parameters). For stat mode, the "qty" and "every" values control the number of summons for each stat point and the stat value determines which stat is used (physical, mental, offense or defense). A limit specified as spawn_limit=stat,1,2,mental would mean that there can be 1 creature spawned for every 2 points in the mental stat.

Buffs & Debuffs

buff (boolean) If true, allows a fixed power to also cast an effect.

buff_party (boolean) If true, allows a fixed power to also cast an effect on party members.

buff_party_power_id is the id of a spawn power. If specified, it means that buff_party only affects party members created by that spawn power.

buff_teleport (boolean) If true, power is a teleport spell.

manual_untransform (boolean) If true, allows manual player untransformation for transform powers.

transform_duration is the number of frames the target will be transformed.

Effects

effect_additive (boolean) If true, the effect's magnitude is cumulative of all identical effects. This is used for bouns_* effect types.

effect_type can be any of:

  • heal - Restore HP based on Mental damage stat.
  • shield - Create a damage absorbing barrier based on Mental damage stat.
  • hpot - HP restored per second
  • mpot - MP restored per second
  • immunity - Removes & prevents bleed, slow, stun, and immobilize
  • damage - Damage per second
  • stun - Can't move or attack. Being attacked breaks stun.
  • forced_move - Makes the target move in one direction at a certain speed.
  • speed - Changes movement speed. A magnitude of 100 is 100% speed (aka normal speed).
  • hp - Increase HP
  • hp_regen - Increase HP regeneration
  • mp - Increase MP
  • mp_regen - Increase HP regeneration
  • accuracy - Increase Accuracy %
  • avoidance - Increase Avoidance %
  • crit - Increase Crit %
  • offense - Increase Offense
  • defense - Increase Defense
  • physical - Increase Physical
  • mental - Increase Mental
  • xp - Increase XP gain rate %
  • gold - Increase Gold drop amount %
  • [element]_resist - Increase Resistance % to [element], where [element] is any found in engine/elements.txt. Example: fire_resist
  • convert - Causes an enemy or an ally to switch allegiance
  • death_sentence - Causes sudden death at the end of the effect duration
Clone this wiki locally