Skip to content
clintbellanger edited this page Jul 20, 2011 · 1 revision

This guide explains options in the Power Definitions file -- powers.txt in resources/powers/

For version v0.13 (Out of Date)

Main Info

  • id - powers get loaded into an array, this is the int array index. Other files refer to this id (e.g. when slotting powers in the enemy definition files). This must be the first value when creating a new power list; the other values can be listed in any order. Current valid ids are 0-127. Currently, ids 0-19 represent the hero's Power tree. (required)
  • name - The short name/title of a power. Usually only displayed when used by the hero. (default "")
  • type - The primary movement/animation style of the power. E.g. effect, missile. There is a function dedicated to handling each base type. More of these to come. (effect, missile. required)
  • description - Long description of the power. Typically seen in the Powers menu on mouse hover. (default "")
  • icon - The index on the icon sheet. This only matters for powers usable by the hero. (default -1 for "no icon")

Power Requirements

  • requires_ammo - Must have a ranged weapon equipped to use this power (true, false. default false)
  • requires_mana - Must not be out of mana to use this power (true, false. default false)
  • requires_los - Must be Line Of Sight between the user and the target (true, false. default false)
  • requires_empty_target - The target tile must not contain a wall or obstacle (true, false. default false)

Animation Info

  • new_state - The new avatar animation state when using this power (swing, shoot, cast, block. required)
  • face - When using this power, does the character turn to face the cursor? (true, false. default false)
  • gfx - The image file name that contains this power's art, must be located in images/powers (default no gfx used)
  • sfx - The audio file name that contains this power's sound effect, must be located in soundfx/powers. Auto-played upon power use. (default no sfx used)
  • rendered - This hazard uses an animation. Set it to false to create hazards without art (true, false, default false)
  • directional - Sprite sheet contains 8 rows, one for each direction for this animation (true, false, default false)
  • visual_random - Sprite sheet contains X rows, random options for this animation (default 0)
  • visual_option - Sprite sheet contains rows of visual options. Use this specific option for the animation (default 0)
  • aim_assist - Translate a mouse click this many pixels down screen before converting to map coordinates. This is typically used for aiming missiles which travel above the floor. (default 0)
  • speed - This moving hazard travels this many map units per frame (default 0)
  • lifespan - This hazard is alive for this many frames (default 0)
  • frame_loop - When the hazard's frame count reaches this frame, reset to frame count 0. (default 1)
  • frame_duration - Each animation frame lasts this many screen frames (default 1)
  • frame_size - Each animation frame on the sprite sheet is (x,y) pixels in size (default 0,0)
  • frame_offset - Draw each animation frame on the screen (x,y) pixels away from the hazard's centerpoint on the floor (default 0,0)
  • floor - Draw this animation over the floor layer but under the object layer (default false)
  • active_frame - The hazard only performs collision on this screen frame number (default -1, means hazard is active every frame)

Hazard Info

  • use_hazard - Some powers create hazards, which are temporary art+collision entities. If the power has no animation and does not hit enemies, no hazard is needed. (true, false, default false)
  • no_attack - You can use this to create hazards without collision. This essentially turns a "hazard" into a simple animation. (true, false, default false)
  • radius - The collision radius of this hazard (default 0)
  • base_damage - Damage is derived from the equipped weapon (melee, magic, ranged. default none)
  • starting_pos - The hazard begins on top of the user, on top of the user's target, or just in front of the user and towards the target -- melee-distance units away (source, target, melee. default source)
  • multitarget - Most hazards become inert after successfully hitting one enemy. Turn this option on to allow a hazard to hit as many enemies as possible. (true, false. default false)
  • trait_armor_penetration - This hazard ignores Absorption when calculating damage (true, false. default false)
  • trait_elemental - This hazard is elemental, and is affected by resistance of this type (wood, metal, wind, water, earth, fire, shadow, light. default no element)
  • bleed_duration - On hit, this hazard causes the target to Bleed for X frames. Bleed does 1 automatic damage per second. (default 0)
  • stun_duration - On hit, this hazard causes the target to be Stunned for X frames. Stunned creatures cannot move or use powers. Any attack (even misses) on a stunned creature breaks stun. (default 0)
  • slow_duration - On hit, this hazard causes the target to be Slowed for X frames. Slowed creatures move at half speed. (default 0)
  • immobilize_duration - On hit, this hazard causes the target to be Immobilized for X frames. Immobilized creatures cannot move but can still use powers. (default 0)

Buffs

  • immunity_duration - The user of this power is granted Immunity for X frames. Immune creatures are not affected by new bleed/stun/slow/immobilize effects. (default 0)
  • buff_heal - The user regains health according to the magic weapon they have equipped. (true, false. default false)
  • buff_shield - The user gains a damage-soaking shield. It soaks damage equal to the max damage of the magic weapon they have equipped. (true, false. default false)
  • buff_teleport - The user is teleported to the target location. (true, false. default false)
  • buff_immunity - All existing bleed/stun/slow/immobilize durations on the user are removed. (true, false. default false)

Chained Effects

  • post_power - When the power strikes an enemy it spawns this new power. Currently used for blood spurts and elemental spark animations. Refers to another power id. (default no post power)
  • wall_power - When the power strikes a wall it spawns this new power. Currently used for elemental sparks and arrows sticking to walls. Refers to another power id. (default no wall power)
Clone this wiki locally