Telepath Tactics Liberated

Telepath Tactics Liberated

View Stats:
How do you add a character to your starting roster in a battle or spawn an enemy in after another one dies?
For my last battle in my first campaign, I'm trying to use the roster instead of setting where the characters are, only I can't figure out how to add my custom characters to the player's army. What do I do?

As for spawning in an enemy after a previous one is killed, did I get the basic script right in this dialogue?

"Conv. ID: SpawnCryokurios - Trigger: OnCharDeath - Parameters: Army,Previous Character"

"Branch 0: Cryokurios (A dialogue box will open with text related to the plot.)

Actions: SpawnUnit (Enemy Army,Cryokurios,-1,-1,Facing Up,Focus Pills) - I want their location to be random, though this may change in the future

Replies: EndConv Continue."

Also, do I need to add the conversation ID of that dialogue to the Trigger section under the "Edit Character" menu for the cryokurios enemy for it to spawn after the previous condition is met (death of the first enemy you kill on this map)?
Last edited by Wannabe Skater; 3 Dec, 2022 @ 11:10pm
< >
Showing 1-13 of 13 comments
Tacitus 4 Dec, 2022 @ 11:06am 
For adding a character to the player's roster, you want to use the Recruit or RecruitByName action. You'll need to supply the character's name and the number of the roster (0-9). You'll want to make sure it's added to whatever roster you have set for the player's army in: in Map Settings -> Armies, since this will determine what units the player will be able to deploy and use across maps.

For the spawning conversation, I am not sure which parts are placeholders and which are the actual values you plan to use; just to be thorough, I'll assume they're the real values.

For the trigger, OnCharDeath looks appropriate, and you will need at least those two parameters, Army Number and Character Name. I don't know what else is going on in the map, but if there is only one Cryokurios on the map at a time, then using that name and the number of the enemy army (as set in Map Settings -> Armies) should be good.

For the actual SpawnUnit action, make sure you are supplying the right Enemy Army number. If you are considering a random spawn location, then you have a couple options for the coordinates. I'd recommend looking at the RANGE[] and PICK{} Special Characters. For Facing, you can just put the direction (Up instead of Facing Up). I see you want to give the unit some Focus Pills, but I think you will need some additional commas at the end if you want to do that, so that the game knows which parameter you are referring to. So the end of the list of parameters would look something like this:

Up,,,Focus Pills

Finally, if you want this respawn to happen more than once, make sure you check "Repeatable?" in the first box. The conversation shouldn't need to be listed as a trigger on the character themself.



I think that's everything, but update us if it doesn't work as intended!
Last edited by Tacitus; 4 Dec, 2022 @ 11:06am
Sinister Design  [developer] 4 Dec, 2022 @ 5:03pm 
You can create a roster pretty easily in the cut scene editor! Check out the tutorial at 15:16 here: https://youtu.be/AkCwM_varWM?t=916 If you want to add more characters to a given roster midway through the campaign, though, definitely do what Tacitus says and use the Recruit and RecruitByName actions. :)

Looking at the other stuff, those OnCharDeath trigger parameters look off. The first parameter should be an integer (or, if you're trying to reference a custom value you created that is named "Army", you should use -VAL:Army- there).

That second parameter isn't going to work either unless the enemy Cryokineticists are literally all named "Previous Character"; if you're trying to reference a custom string named Previous Character, use -STR:Previous Character- instead. ;)

That said, if you want this to happen when any enemy cryokineticist is killed, you'd probably have an easier time leaving the name parameter blank and using Cryokineticist in the class parameter that follows instead (e.g. OnCharDeath/1,,Cryokineticist). But if there's one specific Cryokineticist whose death you want to have trigger this, then I'd recommend giving them an ID tag (e.g. ID,1) and referencing that in the name parameter of the OnCharDeath trigger (e.g. OnCharDeath/1,ID[1]). That'll tell the game to trigger the dialogue only when that specific character dies.

With SpawnUnit, Tactitus has it right. Make sure you're using an actual number for the army number, avoid leaving the word "Facing" in when typing in a facing direction, and make sure to leave optional parameters in there, even if they're blank. So instead of Enemy Army,Cryokurios,-1,-1,Facing Up,Focus Pills, you'll want something more like 1,Cryokurios,-1,-1,Up,,,Focus Pills
Last edited by Sinister Design; 4 Dec, 2022 @ 5:06pm
Wannabe Skater 4 Dec, 2022 @ 9:41pm 
Originally posted by Tacitus:
For adding a character to the player's roster, you want to use the Recruit or RecruitByName action. You'll need to supply the character's name and the number of the roster (0-9). You'll want to make sure it's added to whatever roster you have set for the player's army in: in Map Settings -> Armies, since this will determine what units the player will be able to deploy and use across maps.

For the spawning conversation, I am not sure which parts are placeholders and which are the actual values you plan to use; just to be thorough, I'll assume they're the real values.

For the trigger, OnCharDeath looks appropriate, and you will need at least those two parameters, Army Number and Character Name. I don't know what else is going on in the map, but if there is only one Cryokurios on the map at a time, then using that name and the number of the enemy army (as set in Map Settings -> Armies) should be good.

For the actual SpawnUnit action, make sure you are supplying the right Enemy Army number. If you are considering a random spawn location, then you have a couple options for the coordinates. I'd recommend looking at the RANGE[] and PICK{} Special Characters. For Facing, you can just put the direction (Up instead of Facing Up). I see you want to give the unit some Focus Pills, but I think you will need some additional commas at the end if you want to do that, so that the game knows which parameter you are referring to. So the end of the list of parameters would look something like this:

Up,,,Focus Pills

Finally, if you want this respawn to happen more than once, make sure you check "Repeatable?" in the first box. The conversation shouldn't need to be listed as a trigger on the character themself.



I think that's everything, but update us if it doesn't work as intended!


Originally posted by Sinister Design:
You can create a roster pretty easily in the cut scene editor! Check out the tutorial at 15:16 here: https://youtu.be/AkCwM_varWM?t=916 If you want to add more characters to a given roster midway through the campaign, though, definitely do what Tacitus says and use the Recruit and RecruitByName actions. :)

Looking at the other stuff, those OnCharDeath trigger parameters look off. The first parameter should be an integer (or, if you're trying to reference a custom value you created that is named "Army", you should use -VAL:Army- there).

That second parameter isn't going to work either unless the enemy Cryokineticists are literally all named "Previous Character"; if you're trying to reference a custom string named Previous Character, use -STR:Previous Character- instead. ;)

That said, if you want this to happen when any enemy cryokineticist is killed, you'd probably have an easier time leaving the name parameter blank and using Cryokineticist in the class parameter that follows instead (e.g. OnCharDeath/1,,Cryokineticist). But if there's one specific Cryokineticist whose death you want to have trigger this, then I'd recommend giving them an ID tag (e.g. ID,1) and referencing that in the name parameter of the OnCharDeath trigger (e.g. OnCharDeath/1,ID[1]). That'll tell the game to trigger the dialogue only when that specific character dies.

With SpawnUnit, Tactitus has it right. Make sure you're using an actual number for the army number, avoid leaving the word "Facing" in when typing in a facing direction, and make sure to leave optional parameters in there, even if they're blank. So instead of Enemy Army,Cryokurios,-1,-1,Facing Up,Focus Pills, you'll want something more like 1,Cryokurios,-1,-1,Up,,,Focus Pills

Thanks to both of you, I got the roster working. For anyone reading this in the future, I created the roster in the introductory cutscene and had to set the roster number to the same as the player army. You may want to use Tacitus' suggestions if adding characters to your roster mid-game!

Unfortunately, my SpawnUnit dialogue is only half-functional so far: although I've stopped the cryokineticist from spawning on Turn 0 with this dialogue, I can't figure out how to make it spawn immediately after the death of the previous Psy enemy the player fights. Either that or I'll have to use an action to delay the text box that pops up until the turn when the cryokineticist spawns.

Tacitus, thank you for the tips on random unit map placement. I decided to have the cryokineticist spawn in a certain spot, but I'll try those out in the future!

Fyi, those army and enemy unit names were placeholders to avoid spoilers (though you know what the last battle will be like if you recall my posts from before!).

(By the way, what do I do to get the card game action working in a cutscene? I'd like to play that, if possible. Made a test campaign just for it!)
Last edited by Wannabe Skater; 4 Dec, 2022 @ 10:04pm
Sinister Design  [developer] 3 Jan, 2023 @ 2:07pm 
Oh, sorry--the card minigame is still in need of some extra work, and is only gonna be in Together in Battle regardless. (Gotta save some stuff for the new game, after all!)
Wannabe Skater 28 Jan, 2023 @ 8:40pm 
Originally posted by Sinister Design:
Oh, sorry--the card minigame is still in need of some extra work, and is only gonna be in Together in Battle regardless. (Gotta save some stuff for the new game, after all!)
Good to know, though I've still got a problem, possibly a bug, which I mentioned in my last post though I admit it was easily missable:

Originally posted by Wannabe Skater:
Unfortunately, my SpawnUnit dialogue is only half-functional so far: although I've stopped the cryokineticist from spawning on Turn 0 with this dialogue, I can't figure out how to make it spawn immediately after the death of the previous Psy enemy the player fights. Either that or I'll have to use an action to delay the text box that pops up until the turn when the cryokineticist spawns.
After I wrote this, I was able to delay the announcement text box popping up until the OnCharDeath requirement for the enemy kineticist, which is the first enemy on my map, was fulfilled. However, instead of spawning the next foe, an enemy cryokineticist, immediately, it didn't do anything. So I'm stumped. Any advice?

Edit: Never mind, I just checked, and my memory was wrong. Although I've got the dialogue set up so the enemy cryokineticist is supposed to spawn when the enemy kineticist dies, all that pops up on the latter's death is the announcement text I mentioned. The cryokineticist spawns on player turn 1, albeit in the spot I chose

I hope you had a restful holiday season and that your year is going well so far.
Last edited by Wannabe Skater; 28 Jan, 2023 @ 9:32pm
Tacitus 29 Jan, 2023 @ 4:26am 
Just to make sure I'm following the situation as it currently stands: once the enemy kineticist dies, you want a dialogue to pop up with a little text + spawn in your cryokineticist. At the moment, the dialogue box pops up as intended, however the cryokineticist is spawning independently of when this dialogue is triggered. Is that right?

I think copy and pasting the text you are using for your SpawnUnit action atm might help narrow down why the character isn't spawning when the dialogue is triggered.

For the cryokineticist that is spawning turn 1, is this a unit you plopped on the map directly? That's the best explanation I can think of. When you are spawning a unit in with the SpawnUnit action, it does not need (and should not have) the unit you want to spawn already on the map. I don't think it would interfere with trying to spawn it from the script, but it sounds like here you just want one cryokineticist.
Last edited by Tacitus; 29 Jan, 2023 @ 4:31am
Wannabe Skater 18 Feb, 2023 @ 1:01pm 
Originally posted by Tacitus:
Just to make sure I'm following the situation as it currently stands: once the enemy kineticist dies, you want a dialogue to pop up with a little text + spawn in your cryokineticist. At the moment, the dialogue box pops up as intended, however the cryokineticist is spawning independently of when this dialogue is triggered. Is that right?

I think copy and pasting the text you are using for your SpawnUnit action atm might help narrow down why the character isn't spawning when the dialogue is triggered.

For the cryokineticist that is spawning turn 1, is this a unit you plopped on the map directly? That's the best explanation I can think of. When you are spawning a unit in with the SpawnUnit action, it does not need (and should not have) the unit you want to spawn already on the map. I don't think it would interfere with trying to spawn it from the script, but it sounds like here you just want one cryokineticist.
THANKS!!! I’ll let you know how it goes, haven’t had time to work on this lately.
Tacitus 18 Feb, 2023 @ 6:16pm 
One more thing I had thought of that I don't think either of us mentioned: try using a colon in the spawn unit script even if your character has only one name. For example, if you made the character Cryokurios where their entire name was in the first name field, try using Cryokurios: in the script. It took me a while to figure that out when I started using that script.

I'm looking forward to seeing this come out!
Wannabe Skater 11 Mar, 2023 @ 7:59pm 
Originally posted by Tacitus:
One more thing I had thought of that I don't think either of us mentioned: try using a colon in the spawn unit script even if your character has only one name. For example, if you made the character Cryokurios where their entire name was in the first name field, try using Cryokurios: in the script. It took me a while to figure that out when I started using that script.

I'm looking forward to seeing this come out!
Hi, finally got to test this out. I tried what you said and it still hasn't worked. Don't know what I'm doing wrong. I noticed in the script, though, that there's something called a Load ID - what's that? And how would I set that up in the dialogues?

I also posted some screenshots on my profile to show my work
Last edited by Wannabe Skater; 11 Mar, 2023 @ 8:00pm
Tacitus 12 Mar, 2023 @ 5:50am 
You know how in the interface you see when you first open up your campaign you have a list of your characters/units on the left? And how you see the names you created with "/"'s added in? These are your characters' Load IDs. For the purposes of the SpawnUnit, you should use the name exactly as is appears in that list of characters, except swapping out the "/" for a ":".

I took a look at the screenshot. The syntax looks correct to me, but I have two ideas. One, double check now if the Load ID is correct. It should be correct if you see: Black Cape Cryokurios/ in your list of characters.

Two, the army number could be wrong. By default, the armies are numbered 0, 1, 2, etc. Assuming you didn't change the numbers when you set up the armies in Army Properties, the player will likely be army 0, and the AI enemies army 1. If you have 2 or more AI then one of them could be army 2, but I suspect the game is trying to spawn the unit for a non-existent army.
Wannabe Skater 17 Apr, 2023 @ 7:39pm 
Originally posted by Tacitus:
You know how in the interface you see when you first open up your campaign you have a list of your characters/units on the left? And how you see the names you created with "/"'s added in? These are your characters' Load IDs. For the purposes of the SpawnUnit, you should use the name exactly as is appears in that list of characters, except swapping out the "/" for a ":".

I took a look at the screenshot. The syntax looks correct to me, but I have two ideas. One, double check now if the Load ID is correct. It should be correct if you see: Black Cape Cryokurios/ in your list of characters.

Two, the army number could be wrong. By default, the armies are numbered 0, 1, 2, etc. Assuming you didn't change the numbers when you set up the armies in Army Properties, the player will likely be army 0, and the AI enemies army 1. If you have 2 or more AI then one of them could be army 2, but I suspect the game is trying to spawn the unit for a non-existent army.
Sorry for the late reply! Ok. I think I know what’s wrong: I don’t actually have characters with the enemy names in the Load ID list. Will have to make some and test it out when I can. I’ll let you know when I get to it and if it worked. Thanks!
Sinister Design  [developer] 21 Mar, 2024 @ 3:48am 
Hey WannabeSkater, I just noticed your comment about having trouble using proc gen enemies. If they're starting out on the battlefield, you can just place them like normal using the map editor: simply select "Procedurally Generate a Unit," enter the parameters, and place them like normal.

If you're using a script action to spawn them, though, then don't use SpawnUnit; SpawnUnit only creates an instance of a premade character. If you want to use proc gen units, the script action you want is either GenerateUnit (for proc gen generics) or GenerateUnique (for proc gen unique named characters).
Wannabe Skater 15 Oct, 2024 @ 5:11pm 
Originally posted by Sinister Design:
Hey WannabeSkater, I just noticed your comment about having trouble using proc gen enemies. If they're starting out on the battlefield, you can just place them like normal using the map editor: simply select "Procedurally Generate a Unit," enter the parameters, and place them like normal.

If you're using a script action to spawn them, though, then don't use SpawnUnit; SpawnUnit only creates an instance of a premade character. If you want to use proc gen units, the script action you want is either GenerateUnit (for proc gen generics) or GenerateUnique (for proc gen unique named characters).
Just saw this, way too late lol. Thank you! Hope it works
< >
Showing 1-13 of 13 comments
Per page: 1530 50