News:

Welcome to the new Sinister Design forums!

Main Menu

Developer's Log

Started by CraigStern, February 11, 2013, 07:19:44 PM

Previous topic - Next topic

CraigStern

New portraits: the Cavaliers! ;)

CraigStern

I've added three new (optional) parameters to AddPortrait: palette, Y and X. These swap the violet for whatever army color you designate, and offset the portrait's starting position by however many pixels you specify.

Also, I fixed some bugs last night, and we have new portraits: bowmen! :D

CraigStern

I've ditched PlacePortrait (which is now covered with the new, optional variables in AddPortrait) and have replaced it with MovePortrait, which lets you move a portrait across the screen in any direction you like.

Three parameters: Y to move, X to move, and Frames to take moving the defined distance.

CraigStern

I stayed up late last night reworking code in the combat engine to support animated movement abilities.

For most attacks, the game doesn't produce any character movement until the attack "hits" near the conclusion of the animation; this is to produce knockback effects and such. For movement abilities, however, the game now moves the character simultaneously with its movement animation.

Teleportation abilities are a special case; when teleporting, a character now moves instantly 8 animation frames short of the end of the animation. (Meaning that all teleportation animations need to be at least 9 frames long, with 8 frames reserved for the "reappear" portion.)

In the process, I integrated the assassin's Leap animation and the shadowling's Shadowport animation into the game; needless to say, they look awesome.

Crucially, I also fixed a bug that was causing the game to sometimes miscount the number of frames in an attack animation; so there should no longer be any problems with mistimed attacks or animations getting cut short.

Finally, I added portraits into most of the Kovit campaign to test them out. So far, so good!

The installers have been updated.

CraigStern

#94
I've now added support for Fire Emblem-style weapon degradation in Telepath Tactics! Just set an equippable weapon's consumedAfter attribute to any number above 0; the weapon will be useable for exactly that number of strikes before it breaks. (If you keep consumedAfter at 0, the weapon will not degrade with use.)

I won't be using this in multiplayer or in the Kovit mini-campaign, but you can bet your britches I'll be making this a thing in the official campaign. ;)

CraigStern

I've added support for custom string variables to Telepath Tactics (as opposed to only supporting custom integer variables, which is what the game had before). This will let you more easily track non-numerical data, such as factional alliances and past dialog choices.

New actions:

SetString -- two parameters: variable name and string.
SetStringByString -- two parameters: variable name and second variable name. (The string contained in the second variable is copied to the first.)
IfStringGoTo -- three parameters: variable name, string and branch. (If the named variable contains the specified string, go to the specified dialog branch.)

The manual has been updated.

CraigStern

Scripts are now in-game and working! ;)

A script is a bundle of script actions thrown together under a single name (for those of you who program, this is the Telepath Tactics equivalent of a function.)

Scripts can be be created anywhere that dialog can (i.e. PersistentDialog.xml and individual battles) using the <Script> tag. They're formatted like dialog, but instead of the speaker and dialog info, it just contains the name of the script and some nested actions.

Here are a couple of example scripts that I've placed into PersistentDialog.xml:

<Script>Nightfall
<Action>ChangeCondition/Global Lighting,Night</Action>
<Action>ChangeCondition/Fog of War,true</Action></Script>

<Script>Daybreak
<Action>ChangeCondition/Global Lighting,Daylight</Action>
<Action>ChangeCondition/Fog of War,false</Action></Script>


So we have a Nightfall script that turns the battlefield dark and turns on fog of war; and a Daybreak script that turns the battlefield bright and turns off fog of war.

To run a script, just use the new action Run. Run takes only one parameter: the name of script to run. That's it! ;)

CraigStern

I've just updated the game installer online; update to gain access to the new scripting / weapon degradation features. :)

CraigStern

New action: IfItemGoTo. This action checks to see if a certain character (or any character on the player's team) has a certain item; if he/she/one of them does, then the conversation moves to the specified branch.

This action has four parameters: Character Name, Item Name, Equipped, and Branch Number. Character name is the name of the character to check for the item; if the name provided is Anyone, then the game checks all the player's characters on the battlefield instead of just one character. Item Name is the name of the item the game will check for. Equipped is either true or false; if true, it will specifically check to see if the named item is equipped, and will only count the item as "found" if it is in fact equipped. Branch number tells the game what branch to go to if the item is found.

So! If I want to see if anyone in the player's army has the Golden Orb equipped and move to branch 6 if they do, I'd use this:

IfItemGoTo/Anyone,Golden Orb,true,6

If I just want to see if Durango Hasslegourd has Bandages sitting around and go to branch 3 if he does, I'd use this:

IfItemGoTo/Durango Hasslegourd,Bandages,false,3

CraigStern

New actions: IfStringRun, IfValRun, IfValsRun, IfStatRun, IfGoneRun, and IfItemRun. These are like their "GoTo" counterparts, except that instead of directing the dialog to a new branch, these run a script instead.

The two big differences:

(1) These have the exact same parameters as their GoTo counterparts, except that they require a script name instead of a dialog branch.

(2) Unlike the GoTo actions, these do not behave in an if / else if / else manner. So if you load up a branch with a whole bunch of IfXRun actions, you can conceivable trigger all of them at once (as opposed to only triggering the first one that returns true).

CraigStern

The manual has been updated with all of the new info. ;)

CraigStern

You can now have the game auto-display the contents of custom string variables--just use this format:

-STR:VariableName-

So let's say that the game has a custom string variable recorded with the player's chosen elemental affinity under the variable name Affinity; we can have it displayed in dialog like so:

"You've chosen -STR:Affinity-; are you sure?"

Suppose the player chose Shadow for her Affinity; the dialog will end up looking like this:

"You've chosen Shadow; are you sure?"

CraigStern

In multiplayer, I've made a couple of changes to random item drops to further discourage turtling in your spawn area:


  • the chance of a drop occurring has been increased from 30% per turn to 35% per turn;
  • random item drops are now limited to spaces a certain minimum distance away from player spawn areas. The minimum distance increases proportionally with the size of the map; right now, the minimum distance is calculated as a number of spaces equal to 40% of the average of the map's length and width (4 spaces on a 10 x 10 map, 6 spaces on a 15 x 15 map, and so on).

CraigStern

You can now have the game auto-display the name of the character that triggered dialog, in dialog. This comes in 3 varieties:

-NAME-     first name
-LNAME-    last name
-FNAME-    full name

Suppose you have dialog triggered by OnMoveComplete or OnReachingSpace. You can use the name of the character that moved / reached the space automatically using those keys above.

For example: suppose that you have a conversation triggered by OnReachingSpace, and Emma Strider is the first character to reach the space and trigger the conversation. This dialog

-NAME-, look out--it's moving!

would instead be displayed as Emma, look out--it's moving!

CraigStern

The OnStat dialog trigger is now in-game and working! This is the 10th (and most likely, final) type of dialog trigger I'll be putting in the game.

The OnStat trigger takes four parameters: Character Name, Stat Name, Mode of Comparison, and Amount. These parameters function exactly like the first 4 parameters of IfStatGoTo.

So let's say we use:

OnStat   Emma Strider,Level,=,2

This will trigger the conversation the moment the game detects that Emma is level 2.