View Tags

February 25, 2015

Tutorial: Making a Telepath Tactics Campaign, Part 2

<< Continued from Part 1

A. Create a playable character

So! We now have a campaign with a basic narrative introduction. We’re going to want to create a battle, but first we need to give the player a roster of characters that she can use in the battle–and we can’t do that until we create some characters!

Luckily, creating characters is pretty easy. Open up CharClasses.xml in your campaign’s main folder. You should see a few example characters already sitting in the file: Ann Veal, Generic Blandit, and a couple of villagers.

Notice that every single character sits inside of a Char tag filled with attributes: charname, spritetype, portrait, race, and so on. Some of them also have child tags inside of <Char>, like <StartingInv> and <LevelUp>. These tell the game to give the character a starting inventory and how to improve the character upon leveling up, respectively. Each character consists of everything between <Char and </Char>, whether they have child tags or not.

To create a new character, just copy one of the existing characters (Ann Veal for a playable character, Generic Blandit for an enemy, or one of the villagers for a non-combat NPC) and paste it, then start editing the Char tag’s attributes. Let’s copy-paste Ann Veal to create a new playable character.

B. Edit the playable character

We’re now going to go through the steps of creating a new playable character, so you can follow along. Just for fun, let’s make a crossbowman named Tobias Funke.

We copied Ann Veal, then pasted a couple of lines down. In our newly pasted character, delete the text in between <StartingInv> and </StartingInv>, and <OnLevelUp> and </OnLevelUp>. Then change the charname in each of the tags from Ann/Veal to Tobias/Funke:

<Char charname=”Tobias/Funke” … pushable=”true” tags=””>
<StartingInv charname=”Tobias/Funke“></StartingInv>
<OnLevelUp charname=”Tobias/Funke” hp=”3″ … shRes=”0″></OnLevelUp>

Next, change Tobias’s spritetype from Swordsman_F to Crossbowman_M and his portrait from Swordsman_F to Crossbowman_M. This will affect how he looks in-game, and corresponds to the sprite sheets the game will pull out of Telepath Tactics > Data > Characters for him, as well as the portrait it’ll use from Telepath Tactics > Data > Characters > _Portraits.

With that done, change his sex from Female to Male and his classname from Hero to Crossbowman. Changing his classname is particularly important, since that affects what weapons he can use–and thus, what attacks he can employ! Finally, change his ctr from Sword to Crossbow, and his defaultAtkAnim from Motivate to Bayonet.

Those are all the truly essential changes to make in <Char>; the rest is all just tweaking his stats to make him a little more distinct from Ann. (Less health? More Strength? Lower counter limit? Different resistances? And so on.) Here is an overview of all the stat-related attributes you can tweak and what they do:

  • move – movement type; can be either land or flying.
  • atk1 through atk8 – defines a starting attack that the character knows whether or not she has a weapon equipped that gives her the attack. Use the name of an attack that exists in Attacks.xml. There are eight slots for these; leave unused slots blank.
  • hp – maximum health. Use a number here.
  • en – maximum energy. Use a number here.
  • spd – speed; the maximum number of spaces the character can normally move per turn.
  • ctrLimit – counter limit; the maximum number of counterattacks a character can launch before the start of its next turn.
  • dodge – percentage chance to dodge non-Mental attacks; out of 100.
  • str – physical strength. Use a number here.
  • per – perception. Use a number here.
  • psyP – psy power; strength of character’s offensive psy. Use a number here.
  • psyD – psy defense; strength of character’s defensive psy. Use a number here.
  • prcRes – pierce resistance; out of 100.
  • slshRes – slash resistance; out of 100.
  • crshRes – crush resistance; out of 100.
  • mnRes – mental resistance; out of 100.
  • htRes – heat resistance; out of 100.
  • cdRes – cold resistance; out of 100.
  • ltRes – light resistance; out of 100.
  • shRes – shadow resistance; out of 100.
  • poiRes – poison resistance; out of 100.
  • acc – accuracy; base percentage chance to land the character’s attacks (i.e. assuming that the target has 0 dodge, attacks have no accMod, and the attacker is not blinded). Out of 100.
  • lvl – the character’s level; 0 or higher. (Affects experience scaling and item restrictions.)
  • exp – the character’s experience points; out of 100.
  • pushable – whether knockback abilities can move the character or object. Can be either true or false.

Ignore all the other attributes for now. (Also: it will cause problems if you delete any of the character attributes or change their order. Don’t do that.)

Tutorial 2B - Edited Character
One last change and we’ll move on: we want to give Tobias some equipment. Since he has no natural attacks, it’s particularly important that we give him a weapon. An Iron Crossbow ought to do the trick; stick an -E- right after it to tell the game that he comes equipped with it. If you want to give Tobias another item, just stick in a forward slash, then type the name of another item from ItemClasses.xml. You can give him as many items as you want in this way!

All right; there’s more to character creation, but that’s enough for one post. We’ll cover character leveling schemes in the next part.

Continued in Part 3 >>