The Sinister Design Forums

Games => Telepath Tactics => Telepath Tactics Bugs => Topic started by: bugfartboy on September 28, 2015, 02:41:31 PM

Title: [v1.047] Move element; OnStat dialog trigger; -FNAME- in OnCharAttacked trigger
Post by: bugfartboy on September 28, 2015, 02:41:31 PM
When an attack of the "Move" element has a max and min range of 0, it won't allow the player to select the character trying to use it, even if the target location defined in AOEPatterns.xml would cause it to land in a location other than its starting location.

The manual doesn't describe any way of using the OnStat dialog trigger with the string stat types, such as Direction, Class, etc, and I haven't been able to figure out a configuration of parameters that would cause it to work.

The -FNAME- special character isn't being assigned correctly when an OnCharAttacked dialog tree is triggered.  Instead of reflecting the name of the character being attacked, it reads "undefined".  (See the line labeled 561 in the attached log to see what I mean.)

Title: Re: [v1.047] Move element; OnStat dialog trigger; -FNAME- in OnCharAttacked trigger
Post by: CraigStern on September 29, 2015, 10:06:58 AM
Move attacks actually technically land on the location of the red attack tile, not the location of the targeting reticle--this is why they always use the single AOE pattern. (It never would have occurred to me to program it to support other reticle configurations, although I see now why you're trying to.)

For string stats with OnStat, try using the string you want to match against in the operation parameter--see if that works. (In theory, it should.)

The -FNAME- special character isn't being assigned correctly when an OnCharAttacked dialog tree is triggered.  Instead of reflecting the name of the character being attacked, it reads "undefined".  (See the line labeled 561 in the attached log to see what I mean.)

Aha! I think I've figured out the cause of this; this should be fixed in the next update.
Title: Re: [v1.047] Move element; OnStat dialog trigger; -FNAME- in OnCharAttacked trigger
Post by: bugfartboy on September 30, 2015, 02:28:01 PM
For string stats with OnStat, try using the string you want to match against in the operation parameter--see if that works. (In theory, it should.)
I tested it out with the block below, but no dice.
Code: [Select]
  <Dialog branch="0" r="-1">
OnStat/-ANY-,Direction,Up,/-FNAME-/Wait... what am I doing?  I need to face forward!
<Action>SetStat/-FNAME-,Direction,=,0,Right</Action>
<Reply>.../EndConv/</Reply>
  </Dialog>



Completely unrelated, I found another way to break the game.  It seems it doesn't like being given the option of launching 32 dialog branches when a map loads.

The guilty trigger and associated dialog, if you're interested:
Spoiler
Code: [Select]
  <Dialog branch="0" r="-1">
OnStat/-ANY-,Max Energy,=,1//A character has maximum energy! Time to adjust their stats as needed!-N-[This currently just switches to a named branch based on the triggering class.]
<Action>SetStringByStat/class,-FNAME-,Class</Action>
<Action>GoTo/BNAME[-STR:class-Setup]</Action>
<Action>SetStat/-FNAME-,Max Energy,=,0</Action>
<Reply>.../EndConv/</Reply>
  </Dialog>
  <Dialog branch="1" r="-1" bname="PawnSetup">
OnStat/-ANY-,Max Energy,=,1//A Pawn has maximum energy! Which team is it on?-N-
It is on team -VAL:temp1-.
<Action>SetValByStat/temp1,=,-FNAME-,Army</Action>
<Action>SetStat/-FNAME-,Max Energy,=,0</Action>
<Reply>.../EndConv/</Reply>
  </Dialog>
  <Dialog branch="2" r="-1" bname="RookSetup">
OnStat/-ANY-,Max Energy,=,1//A Rook has maximum energy! Which team is it on?-N-
It is on team -VAL:temp1-.
<Action>SetValByStat/temp1,=,-FNAME-,Army</Action>
<Action>SetStat/-FNAME-,Max Energy,=,0</Action>
<Reply>.../EndConv/</Reply>
  </Dialog>
  <Dialog branch="3" r="-1" bname="KnightSetup">
OnStat/-ANY-,Max Energy,=,1//A Knight has maximum energy! Which team is it on?-N-
It is on team -VAL:temp1-.
<Action>SetValByStat/temp1,=,-FNAME-,Army</Action>
<Action>SetStat/-FNAME-,Max Energy,=,0</Action>
<Reply>.../EndConv/</Reply>
  </Dialog>
  <Dialog branch="4" r="-1" bname="BishopSetup">
OnStat/-ANY-,Max Energy,=,1//A Bishop has maximum energy! Which team is it on?-N-
It is on team -VAL:temp1-.
<Action>SetValByStat/temp1,=,-FNAME-,Army</Action>
<Action>SetStat/-FNAME-,Max Energy,=,0</Action>
<Reply>.../EndConv/</Reply>
  </Dialog>
  <Dialog branch="5" r="-1" bname="QueenSetup">
OnStat/-ANY-,Max Energy,=,1//A Queen has maximum energy! Which team is it on?-N-
It is on team -VAL:temp1-.
<Action>SetValByStat/temp1,=,-FNAME-,Army</Action>
<Action>SetStat/-FNAME-,Max Energy,=,0</Action>
<Reply>.../EndConv/</Reply>
  </Dialog>
  <Dialog branch="6" r="-1" bname="KingSetup">
OnStat/-ANY-,Max Energy,=,1//A King has maximum energy! Which team is it on?-N-
It is on team -VAL:temp1-.
<Action>SetValByStat/temp1,=,-FNAME-,Army</Action>
<Action>ChangeCondition/Protect Char,-VAL:temp1-,-FNAME-</Action>
<Action>SetStat/-FNAME-,Max Energy,=,0</Action>
<Reply>.../EndConv/</Reply>
  </Dialog>
The end result: the action box never pops up.


Even more unrelated side statement: I noticed there's an EndTurn dialog reply, but no EndTurn dialog action.