View Tags

October 1, 2015

Tutorial: Making a Telepath Tactics Campaign, Part 20

<< Continued from Part 19

A. Intro to making new attacks

And we’re back! Now it’s time to learn how to make your own custom attacks.

Telepath Tactics comes with a pretty wide variety of attacks, so it’s easy to get by without making your own custom attacks for the most part. Sooner or later, though, you’ll dream up an unconventional character with crazy abilities, and you’ll need to know how to actually make those abilities happen!

First thing’s first: open up Attacks.xml in your campaign’s main folder. You should see about 124 different attacks in there. Each <Atk> XML tag is a single attack; each attack contains 30 distinct attributes.

Here is a quick overview of the attributes you need to know to get started. (Note that Create and Move attacks are a little special, so we’ll ignore those for now):

  • elem – the attack’s element. The game uses this to decide which elemental resistance applies when the attack is launched. Make sure to capitalize the element’s name!
  • name – the attack’s name. Whatever you use here, the game will expect to find a 48 x 48 PNG icon with a transparent background with that name in Data > UI > Button Icons–if it doesn’t find one, it’ll just display a big question mark for the attack’s button when it appears in-game.
  • d – leave this alone; it’s a placeholder attribute that doesn’t do anything.
  • cst – the attack’s Energy cost. (If you don’t want an Energy cost, set this to 0.)
  • maxRng – the attack’s maximum range.
  • shkMag – this tells the game how strongly to shake the screen when an attack lands. I would recommend setting this between 0 and 5.
  • shkTim – how many frames to shake the screen for on impact.
  • strD – the first of three attributes for calculating base attack power; it adds strD times the attacker’s strength to the attacks’ damage.
  • powD – the second of three attributes for calculating base attack power; it adds powD times the attacker’s psy power to the attack’s damage.
  • defD – the third of three attributes for calculating base attack power; it adds defD times the attacker’s psy defense to the attack’s damage.
  • backstabFactor – the damage multiplier for a striking a character from behind. If this is set to 1 or less, there is no backstab bonus.
  • sidestabFactor – the damage multiplier for striking a character in the side. If this is set to 1 or less, there is no sidestab bonus.
  • selfHealFactor – a multiple of the attack damage dealt; the attacker gets this back as healing. If the character does not gain health from this attack, leave this at 0.
  • selfFocusFactor – a multiple of the attack damage dealt; the attacker gets this back as Energy. If the character does not gain Energy from this attack, leave this at 0.
    • Note: if selfFocusFactor is set below 0, the game will automatically include it as part of the attack’s up-front cost. For example: an attack will deal 6 damage, has a cost of 0, and has a selfFocusFactor of -1. Based on the damage, the game will treat the attack’s cost as 6 (i.e. 6 damage times the -1 selfFocusFactor plus 0).
  • accMod – an additive modifier to the attacker’s base accuracy with this particular attack.
  • statFX – the effect that you want the attack to confer. (Refer to the names of the status effects in Section E of the Rules in the manual for a reference.) You can have an attack impart multiple status effects by separating each with a forward slash (e.g. Stunned/Softened/Burning.) If you do not want a status effect, leave this as None.
  • affects – this tells the game what the attack affects. For most attacks, this will be Health. If you want an attack to affect a character’s Energy instead, set this to Energy.
  • afterAtk – this tells the game what to do after the attack is used. If the turn ends, use EndTurn; if the character can keep moving but cannot attack again, use CanMove; if the character can keep moving and use other attacks, use UseOnce; if the character can keep moving and use any attacks (including continuing to use this one), use Unlimited.
  • AOE – this tells the game what area-of-effect the attack has. Simply use the AOE reticle pattern you want from in AOEPatterns.xml. (Most attacks hit a single space, and thus use the AOE reticle pattern single.)
  • particles – this tells the game what particles to spray when the attack lands. Most attacks use Sparks; other options include Blood, Poison, Stone, Wood, Water, Smoke, Spray, and Heat.
  • targeting – this tells the game whether the attack is constrained to the four cardinal directions, or whether it can be targeted freely. Most attacks use constrained; to permit free targeting, set to free.
  • moveType – for attacks that move a character (e.g. via knockback), this tells the game what mode the character moves in. The three basic movement modes are Normal, Parabolic, and Teleport.
  • knockback – this tells the game how many spaces away to push the target when the attack lands. (A negative number tells the game to pull the character closer.) If you do not want knockback, leave this set to 0.
  • creates – for non-Create attacks, this tells the game to create something on the target’s space if the target dies. Place the charname (or classname, if a character with a charname of random) of the character being created here; if creating a destructible object, use the spritetype instead. Otherwise, leave this as none.
  • createdOnTeam – leave this blank unless this attack has something other than none in its creates parameter. Use MyTeam if the thing to be created should be part of the attacker’s army; use Objects if it should be created as a destructible object; or leave it blank to have it belong to the victim’s team!
  • dependsUpon – name a second attack; this makes the current attack unavailable to use unless the character has that second attack as well! (This is primarily used to keep characters from using advanced weapon skills without the appropriate weapon, with its associated base attack, equipped.)
  • impactFrame – an integer that indicates the frame where the attack actually lands. This tells the game exactly when to initiate screenshake, pop up the animated health bar, etc. Experiment with different numbers and see what matches up with the different character animations for best effect.
  • soundAndFX – this governs which sound effects and visual effects play during the attack, and when. This gets a little complex, so let’s just ignore it for now. (There’s detailed documentation on how to set this one up in the manual.)
  • desc – a short description of the attack that shows up in-game when mousing over the attack button.

B. Shield attacks

Use the Shield element for healing abilities and buffs: this clues the AI in to the fact that it’s an ability meant to be used on allies, and it will visibly turn the targeting reticle blue for the player so they don’t accidentally use it on the wrong target.

Shield abilities reverse the normal damage formula: a positive damage value on a Shield ability will heal the target for that amount instead of harming it. Therefore, stay away from negative values for strD, powD and defD here.

For buffs, it is recommended that you use positive statFX (like Lucid, Hardened, Shining, or Move Bonus) rather than changing affects, as status effects will eventually wear off–stats buffed via the affects parameter will last for the entire battle, and can be exploited by turtling players.

C. Create attacks

Create attacks aren’t really attacks–they’re skills that spawn an object or character on the battlefield. Place Snare Trap, Decoy, and nearly every single Engineer skill is of the element Create.

There are a few things to keep in mind with these:

  • Create attacks never deal damage, so it doesn’t really matter what you put for the attributes related to damage-dealing.
  • If you make a Create attack’s AOE anything other than single, it will produce one copy of the thing-to-be-created per targeting reticle!
  • movetype – this has special meaning with a Create attack: it tells the game what sorts of tiles the character is permitted to select for the attack. Use CharPlacement, ObjPlacement, or BridgePlacement, depending on whether the attack is creating a character, a non-bridge destructible object, or a bridge tile.
  • creates – just place the charname or classname (if a character with a charname of random) of the character being created here. If creating a destructible object in this way, use the spritetype instead. Refer to CharClasses.xml or ObjClasses.xml as appropriate.
  • createdOnTeam – as above, this tells the game whether the thing being created is added to the attacker’s team, or whether it is an object without a team. If the former, set this to MyTeam; if the latter, set this to Objects.

D. Move attacks

These move the user to whatever space was targeted.

  • Move attacks should always use the single AOE pattern for AOE.
  • The moveType attribute is especially relevant for Move attacks, as it determines how the user will move. If set to Normal, the user will move in a straight line and be blocked by anything that blocks their normal movement; if Parabolic, they’ll move in a visible arc and bypass any obstacle that isn’t a wall; and if Teleport, they will disappear and then reappear 8 frames later, ignoring any obstacle (up to and including walls).


That’s about it! There are more details to be had in the manual if you’re curious, but mostly I suggest you learn by experimenting.

Now, for our next tutorial, I’m going to do something a little unorthodox: one of the fans has requested that I write not just how to make a campaign, but “how to make a campaign interesting, challenging, and fun.” Well! I actually don’t think I’ve ever written one on level design specifically, so this is good–it’ll force me to distill my level design philosophy into something concrete. So that’s that: next time, we’ll talk about how to really design a campaign so that it’s satisfying to play.

See you in the next tutorial!

Part 21 coming soon!