parties joining in mission_templates

Currently viewing this thread:

jik

Knight
I have been looking through the native codes but either I am missing something or it's handled by the game engine.  What I need to do is modify the visitors for a scene to include the player's party only, since there is no enemy party to start with.  I am good with spawning the enemies later, but how do I get the player's party to spawn on the site?  Most of the visitor spawn stuff deals with troop IDs, not parties (or party stacks).

Has any one done this?  I'm thinking I need to manually go through the player's stack and add those troops to the scene, but how will I be sure that at the end of the battle, the troops involved will be the ones from the troop stacks?  I guess I could remove them from the stack and also check who's left and put them back at the end of the battle.
 

fisheye

Grandmaster Knight
You use the add_reinforcement operations. There's no good way to control how many guys turn up though, that's in the game engine based on relative strengths, tactics and battle size.
 

jik

Knight
fisheye said:
You use the add_reinforcement operations. There's no good way to control how many guys turn up though, that's in the game engine based on relative strengths, tactics and battle size.

If I were to say, only want trp_fighter types to be in the scene, could I remove the other agents from the scene?

I'm guessing I will still have to manually control the units spawned if I want to do that.  Problem is how to I make it so that the units in the party are spawned, not just generic troops of that type?
 

fisheye

Grandmaster Knight
You can access the participating parties directly through the game menu that calls the battle (I can't remember, mnu_encounter or something like that... all allies and enemies are stored in some global variables - see simple_triggers to find out where the event begins that starts the call to the game menu). Then you can spawn the guys one at a time. If you do that, you'll have to manually alter the party composition due to deaths and injuries at the end of the battle though. Seems like more work than payoff to me.
 

jik

Knight
fisheye said:
You can access the participating parties directly through the game menu that calls the battle (I can't remember, mnu_encounter or something like that... all allies and enemies are stored in some global variables - see simple_triggers to find out where the event begins that starts the call to the game menu). Then you can spawn the guys one at a time. If you do that, you'll have to manually alter the party composition due to deaths and injuries at the end of the battle though. Seems like more work than payoff to me.

Maybe...  How does the game engine keep track of XP and such if I do that?  Seems that when I spawn troops, it just generates a generic troop, not one from the party.  Is that how it works?  I guess then you just drop the dead ones, and throw some XP at them?  If that's the case, the mission end may not be as bad as I thought.

The other way I guess I could do it, is to have a separate party with the other types attached to the player's party?  I don't have to have the ally party join in do I? 

The other issue is that the enemy party have varying numbers.  I'm manually spawning the enemies, but the trigger doesn't seem to be firing right.  with the trigger timer as such: 2,0,5

they still all spawn at the same time...maybe I'll test my own timer variable...


 

fisheye

Grandmaster Knight
Personally, I'd do the spawn using add_reinforcements, and mess with the agent's AI depending on its troop type, to get the kind of behavior you want.
 
Top Bottom