Jump to content

Home

Train Your Party


Gorgod

Recommended Posts

If I get it right, you want the conditional to return TRUE only if Mission is level 2 AND the journal entry of the quest "training_mission" is at 0 AND you're currently at Ebon Hawk, right? Well, that's rather easy..You just combine these three arguments with an Logical AND (&& that is). So the script should be something like:

 


int StartingConditional()

{

  object oNPC = GetObjectByTag("Mission");
  int iLevel = GetLevelByClass(5, oNPC);
  int iEntry = GetJournalEntry("training_mission");
  string sModule = GetModuleName();

  if(iLevel == 2 && iEntry == 0 && sModule == "ebo_m12aa")
   {
       return TRUE;
   }
   return FALSE;
}

 

Generally, if you want many conditions to be TRUE for the conditional to return TRUE, you just combine them with the "&&" character...This should work. I honestly can't remember if we use the GetModuleName() or the GetModuleFileName() routine..I think it's the first one, though..:thmbup1:

Link to comment
Share on other sites

No, those were normal PC mods by Redhawke. Someone must've just ported them to xbox.

 

He made Make [character] a jedi mods for Carth, Canderious, and Mission. However, it sounds like this mod may have more dialog and plot in its execution, so it'll be interesting to see how it turns out.

 

I've never used those modifications, but I think I expand more on the Master - Apprentice traditional relationship. Also, I might be adding more Jedi training activities, such as sparring and tests.

 

If I get it right, you want the conditional to return TRUE only if Mission is level 2 AND the journal entry of the quest "training_mission" is at 0 AND you're currently at Ebon Hawk, right? Well, that's rather easy..You just combine these three arguments with an Logical AND (&& that is). So the script should be something like:

 


int StartingConditional()

{

  object oNPC = GetObjectByTag("Mission");
  int iLevel = GetLevelByClass(5, oNPC);
  int iEntry = GetJournalEntry("training_mission");
  string sModule = GetModuleName();

  if(iLevel == 2 && iEntry == 0 && sModule == "ebo_m12aa")
   {
       return TRUE;
   }
   return FALSE;
}

 

Generally, if you want many conditions to be TRUE for the conditional to return TRUE, you just combine them with the "&&" character...This should work. I honestly can't remember if we use the GetModuleName() or the GetModuleFileName() routine..I think it's the first one, though..:thmbup1:

 

You've been so helpful. I'm serious. I couldn't have done this without you. Thank you so much.

Link to comment
Share on other sites

Heh, it's nothing! Really scripting is pretty easy, once you understand its basic philosophy! ;) I'm just glad I could help! Anything else, just drop a post! Also, I like the idea of enriching the dialogue and the activities with the party members! :thmbup1:

Link to comment
Share on other sites

Heh, it's nothing! Really scripting is pretty easy, once you understand its basic philosophy! ;) I'm just glad I could help! Anything else, just drop a post! Also, I like the idea of enriching the dialogue and the activities with the party members! :thmbup1:

 

Thanks! Both the persuasion part and the lightsaber building part are now done for light side Mission. And now, of course, I have more questions... :p

 

How could I do this: http://www.lucasforums.com/showthread.php?s=&threadid=126615 but with the PC vs. a party member on the Ebon Hawk? (e.g. Mission).

Link to comment
Share on other sites

Well, your method should be like 95% the same as tk's. Only some small tweaks, and I think it should work! ;)

 

The second script that tk102 has graciously provided should look like this one:

 


void main()

{

object oNPC=GetObjectByTag("npc_tag");

//Turn on the immortality
SetMinOneHP(oNPC,TRUE);

// make NPC (Party Member) go hostile
ChangeToStandardFaction(oNPC, 1);

// give them kick to make them start attacking you
ExecuteScript("k_ai_master",oNPC,1005);
}

 

You should also make a new OnSpawn script for Mission to replace "k_hen_spawn01", and change the OnSpawn box in Mission's utc file under the Scripts tab to the name of this new script (whatever you choose to name it! ;) ). This script should look something like this:

 

//:: k_hen_spawn01
/*
   v1.0
   Henchmen On Spawn In
*/
//:: Created By: Preston Watamaniuk
//:: Copyright (c) 2002 Bioware Corp.

#include "k_inc_generic"
#include "k_inc_debug"

void main()
{
  //added march 10,03 by Aidan
  SetIsDestroyable(TRUE,TRUE,TRUE);

  GN_SetListeningPatterns();

  GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_DAMAGED);          //OPTIONAL BEHAVIOR - Fire User Defined Event 1006

// DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) *****************************************************************************************
}

 

Now, as you can see, I've removed the

 

GN_SetDayNightPresence( AMBIENT_PRESENCE_ALWAYS_PRESENT);  
GN_WalkWayPoints();

 

parts of code that tk102 uses. I'm not sure, but I think that they should only mess with your script in case this is a party member. However, if I'm wrong (very likely o_Q ) and it doesn't work with the script I've posted above, add these two to the OnSpawn script, exactly as tk102 says in the talk-fight-talk sequence thread. ;)

 

Finally, the OnUserDefine script needs a minor change, so it should look like this:

 

void main()
{
   int nCurrentHP;
   int nUser = GetUserDefinedEventNumber();
   if(nUser == 1006) // DAMAGED
   {
      nCurrentHP=GetCurrentHitPoints();
      if (nCurrentHP<10) {
          CancelCombat (OBJECT_SELF);
          ClearAllActions();
          ChangeToStandardFaction(OBJECT_SELF, 2);

//record that we have fought
       SetLocalBoolean(OBJECT_SELF,0,TRUE); 

//Turn off the imortality
       SetMinOneHP(OBJECT_SELF,FALSE);
       object oPC=GetFirstPC();
       ActionDoCommand(ActionStartConversation(oPC));
      }

   }

}

 

Also, remember, you should not change anything else in the utc file of the party member except put the names of these two scripts in the Scripts tab. Meaning you should ignore the part where tk says to check the MinOneHP box and the part where he says to change the Faction. The genius of tk102 will take care of the rest if you follow his instructions! ;)

Link to comment
Share on other sites

Well, your method should be like 95% the same as tk's. Only some small tweaks, and I think it should work! ;)

 

The second script that tk102 has graciously provided should look like this one:

 


void main()

{

object oNPC=GetObjectByTag("npc_tag");

//Turn on the immortality
SetMinOneHP(oNPC,TRUE);

// make NPC (Party Member) go hostile
ChangeToStandardFaction(oNPC, 1);

// give them kick to make them start attacking you
ExecuteScript("k_ai_master",oNPC,1005);
}

 

You should also make a new OnSpawn script for Mission to replace "k_hen_spawn01", and change the OnSpawn box in Mission's utc file under the Scripts tab to the name of this new script (whatever you choose to name it! ;) ). This script should look something like this:

 

//:: k_hen_spawn01
/*
   v1.0
   Henchmen On Spawn In
*/
//:: Created By: Preston Watamaniuk
//:: Copyright (c) 2002 Bioware Corp.

#include "k_inc_generic"
#include "k_inc_debug"

void main()
{
  //added march 10,03 by Aidan
  SetIsDestroyable(TRUE,TRUE,TRUE);

  GN_SetListeningPatterns();

  GN_SetSpawnInCondition(SW_FLAG_EVENT_ON_DAMAGED);          //OPTIONAL BEHAVIOR - Fire User Defined Event 1006

// DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) *****************************************************************************************
}

 

Now, as you can see, I've removed the

 

GN_SetDayNightPresence( AMBIENT_PRESENCE_ALWAYS_PRESENT);  
GN_WalkWayPoints();

 

parts of code that tk102 uses. I'm not sure, but I think that they should only mess with your script in case this is a party member. However, if I'm wrong (very likely o_Q ) and it doesn't work with the script I've posted above, add these two to the OnSpawn script, exactly as tk102 says in the talk-fight-talk sequence thread. ;)

 

Finally, the OnUserDefine script needs a minor change, so it should look like this:

 

void main()
{
   int nCurrentHP;
   int nUser = GetUserDefinedEventNumber();
   if(nUser == 1006) // DAMAGED
   {
      nCurrentHP=GetCurrentHitPoints();
      if (nCurrentHP<10) {
          CancelCombat (OBJECT_SELF);
          ClearAllActions();
          ChangeToStandardFaction(OBJECT_SELF, 2);

//record that we have fought
       SetLocalBoolean(OBJECT_SELF,0,TRUE); 

//Turn off the imortality
       SetMinOneHP(OBJECT_SELF,FALSE);
       object oPC=GetFirstPC();
       ActionDoCommand(ActionStartConversation(oPC));
      }

   }

}

 

Also, remember, you should not change anything else in the utc file of the party member except put the names of these two scripts in the Scripts tab. Meaning you should ignore the part where tk says to check the MinOneHP box and the part where he says to change the Faction. The genius of tk102 will take care of the rest if you follow his instructions! ;)

 

Thanks for the help, but for some reason, the dialogue won't start... Mission's HP will just stay at 1... and, not only that, the PC dies, but I'm pretty sure that is supposed to happen. It's supposed to be a sparring session.

Link to comment
Share on other sites

The part about the PC can be fixed if you modify the OnUserDefine script to look like this:

 


void main()

{
   int nCurrentHP;
   int nUser = GetUserDefinedEventNumber();
   if(nUser == 1006) // DAMAGED
   {
      nCurrentHP = GetCurrentHitPoints();
      object oPC = GetFirstPC();
      int nPCHP = GetCurrentHitPoints(oPC);
      if (nCurrentHP < 10 || nPCHP < 10) {
          CancelCombat (OBJECT_SELF);
          ClearAllActions();
          ChangeToStandardFaction(OBJECT_SELF, 2);

//record that we have fought
       SetLocalBoolean(OBJECT_SELF,0,TRUE); 

//Turn off the imortality
       SetMinOneHP(OBJECT_SELF,FALSE);
       ActionDoCommand(ActionStartConversation(oPC));
      }

   }

}

 

At least I think that should work. About the fact that the dialogue doesn't restart, I can't tell what's causing the problem, though I have a hint that something is wrong with the OnSpawn script above. I'll take a deeper look at the script, but you can also ask a more experienced scripter than me! ;)

Link to comment
Share on other sites

The part about the PC can be fixed if you modify the OnUserDefine script to look like this:

 


void main()

{
   int nCurrentHP;
   int nUser = GetUserDefinedEventNumber();
   if(nUser == 1006) // DAMAGED
   {
      nCurrentHP = GetCurrentHitPoints();
      object oPC = GetFirstPC();
      int nPCHP = GetCurrentHitPoints(oPC);
      if (nCurrentHP < 10 || nPCHP < 10) {
          CancelCombat (OBJECT_SELF);
          ClearAllActions();
          ChangeToStandardFaction(OBJECT_SELF, 2);

//record that we have fought
       SetLocalBoolean(OBJECT_SELF,0,TRUE); 

//Turn off the imortality
       SetMinOneHP(OBJECT_SELF,FALSE);
       ActionDoCommand(ActionStartConversation(oPC));
      }

   }

}

 

At least I think that should work. About the fact that the dialogue doesn't restart, I can't tell what's causing the problem, though I have a hint that something is wrong with the OnSpawn script above. I'll take a deeper look at the script, but you can also ask a more experienced scripter than me! ;)

 

Thanks.

 

Is anyone else able to help? Anyone? I would really appreciate some help here...

Link to comment
Share on other sites

I think I might add voice acting, because, to me, voiced characters add more depth and intrigue to the story. Mission, Carth, and Canderous will most likely not be voiced, simply because a transition from one voice actor to another is a bit strange. However, since the plot for Canderous and Zaalbar is not finished, the following characters are open for voice acting. The below spoiler HAVE SPOILERS.

 

EDIT: Canderous' training "contact" is now open- a dirty Mandalorian.

 

Also I still need help with the party member fighting script.

 

Show spoiler
(hidden content - requires Javascript to show)
Zayne Carrick- A brown haired human male Jedi affiliated with Mission's training. He will be found on Dantooine near the Ebon Hawk landing zone. Their encounter on Taris will be heavily mentioned in the dialogue. He also knows Carth from the Mandalorian Wars, although he will only say a brief little greeting if he's in your party. If you trained Mission in the Dark Side, Mission will fight Zayne and then shock him with Force Lightning, killing him. If you trained Mission in the light side, he will teach her about the history of the Jedi. Those of you who read the comics are aware of him. **TAKEN BY ZHABOKA**

 

Show spoiler
(hidden content - requires Javascript to show)
Roye Vesser - Dak Vesser's cousin. He is a human (perhaps Twi'Lek) republic officer stationed on Manaan. He will be found in the Republic Embassy along with Roland Wann. He was Carth's bunk mate during the Mandalorian Wars who also lived on Telos. They will discuss the Telos bombing and Saul's betrayal and how Carth killed Saul himself. If you trained Carth as a Jedi, you will tell Carth to not say such prideful things. If you trained him in the dark side, Roye will mention that Carth looks different. On the verge of killing Roye, he whispers "the cameras". He is a original character.

 

Show spoiler
(hidden content - requires Javascript to show)
Dirk Galen - A dirty, ragged, alcoholic Mandalorian with nothing to live for. He will be in the cantina on Tatooine. Upon meeting him, he his depressed and sorrowful- and drunk. He served with Canderous as a Mandalorian. They will reminisce and Canderous will explain his new training as a Jedi if Canderous was trained in the light side, however if Canderous was trained in the dark side, Canderous will choke Dirk, and when he's on the floor, begging for his life, Canderous walks away saying he wasn't worth killing.
Link to comment
Share on other sites

Cool, you have a little typo here I want to point out, not sure if you forgot something or what but just making you aware.

 

Show spoiler
(hidden content - requires Javascript to show)
Dirk Galen - A dirty, ragged, alcoholic Mandalorian with nothing to live for. He will be in the cantina on Tatooine. Upon meeting him, he his depressed and sorrowful- and drunk. He served with Canderous as a Mandalorian. They will reminisce and Canderous will explain his new training as a Jedi, -> however if Canderous was trained in the light side, however if Canderous was trained in the dark side, Canderous will choke Dirk, and when he's on the floor, begging for his life, Canderous walks away saying he wasn't worth killing.

 

The however, however is a little confusing.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...