Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Train Your Party

Page: 1 of 1
 Gorgod
06-16-2011, 3:00 PM
#1
Hey guys. I've been working on this mod since November, more or less, taking 3-4 month breaks between new scripts and dialogue. Now, since it's the summer, I'm hoping to finally finish this sucker.

So this is somewhat basic, really, considering it's my first real mod. It allows you to train Mission, Carth, Canderous, and perhaps Zaalbar in the light or dark side of the force. Here are the features:


Each party member will have their own unique Jedi or Sith training. More about their past will unfold as you work with them.


Once the party member has begun their training, they will virtually know nothing about the force. As you teach them more and travel with them (make them level up) they will learn the ways of the force prodigally.


They will construct their lightsaber near the beginning of their training (level 2 of their Jedi class). They will tell you which color they desire and they will build it with ease. You won't see them build it, they'll just receive a lightsaber with their name (e.g. Mission's Lightsaber), the blade color of your choice, and upgrades depending on their personality. (The PC may use it as well, and it is absolutely positively NOT UPGRADABLE, and it will never be). However, those who are Sith will automatically get a red saber.


The dialogue will be triggered at significant events specific to that party member, such as the Leviathan for Carth and Mission's brother's discovery for Mission.


So yeah. This thread will also be used for questions by me as well, considering I am a wee beginner.

Screenshots:

http://i54.tinypic.com/2z3t92c.jpg)
http://i54.tinypic.com/6hq42w.jpg)
http://i52.tinypic.com/2mi3hac.jpg)
 Istorian
06-16-2011, 3:37 PM
#2
Nice! :) Can't wait to see how the dialogue enhances the experience!
 Gorgod
06-16-2011, 3:40 PM
#3
By the way, do any of you guys know what's wrong with this script? It doesn't seem to be working- it shows an error message saying: "Type mismatch in parameter 1 in call to "GetClassByPosition".


int StartingConditional() {

int iResult;

GetJournalEntry("k_missbroth") >= 30;
object oMission = GetObjectByTag("Mission", 0);
iResult = (GetClassByPosition(oMission,2) == TRUE);

return iResult = TRUE;

}
 harark1
06-16-2011, 3:42 PM
#4
Sounds good. About how much do you still have left?

No clue about the script sorry.
 Gorgod
06-16-2011, 3:46 PM
#5
Sounds good. About how much do you still have left?

No clue about the script sorry.

Well originally I was done with persuading Mission into becoming a Jedi, but then when I altered the script a bit to change it, it wouldn't work. Yeah, I could equip Mission with a lightsaber and everything, but then after, like I said, I altered the conditional script (above) it wouldn't show, obviously. I'll try to test it without the conditional script- then I'll show some screenies.
 Fastmaniac
06-16-2011, 3:55 PM
#6
By the way, do any of you guys know what's wrong with this script? It doesn't seem to be working- it shows an error message saying: "Type mismatch in parameter 1 in call to "GetClassByPosition".


int StartingConditional() {

int iResult;

GetJournalEntry("k_missbroth") >= 30;
object oMission = GetObjectByTag("Mission", 0);
iResult = (GetClassByPosition(oMission,2) == TRUE);

return iResult = TRUE;

}



You used the Class function the wrong way, it has to be GetClassByPosition(2,oMission).

BTW: Nice idea! Looking forward to the release;)

Fastmaniac
 Gorgod
06-16-2011, 4:04 PM
#7
You used the Class function the wrong way, it has to be GetClassByPosition(2,oMission).

BTW: Nice idea! Looking forward to the release;)

Fastmaniac

Ah! Thanks a bunch.

Screenies. Sorry, they're not very high quality.

http://i54.tinypic.com/2z3t92c.jpg)
http://i54.tinypic.com/6hq42w.jpg)
http://i52.tinypic.com/2mi3hac.jpg)
 salam263
06-16-2011, 4:14 PM
#8
this is maybe one of the greatest ideas in kotor 1 that i have ever heard of, but hasn't it already been made??
http://www.youtube.com/watch?v=yLtDzmtoWi4)
http://www.youtube.com/watch?v=6B4TLGkGcRk&feature=related)

but that's only for xbox i think..
 Gorgod
06-16-2011, 4:22 PM
#9
this is maybe one of the greatest ideas in kotor 1 that i have ever heard of, but hasn't it already been made??
http://www.youtube.com/watch?v=yLtDzmtoWi4)
http://www.youtube.com/watch?v=6B4TLGkGcRk&feature=related)

but that's only for xbox i think..

That looks like it's for xbox. Thanks for the compliment, though.

Anyways, does anyone know a script that checks a party member's level? And another function that checks if they've done the conversation before?
 Istorian
06-16-2011, 4:33 PM
#10
That should work, if not, I blame my time away from scripting! :xp:

void main()
{

object oNPC = GetObjectByTag("Your_Tag_Here");

int iLevel = GetLevelByClass(CLASS_TYPE_*, oNPC);

}
 Gorgod
06-16-2011, 4:36 PM
#11
That should work, if not, I blame my time away from scripting! :xp:

void main()
{

object oNPC = GetObjectByTag("Your_Tag_Here");

int iLevel = GetLevelByClass(CLASS_TYPE_*, oNPC);

}


Would I replace iLevel with the level that I want?
 Istorian
06-16-2011, 4:39 PM
#12
You should replace the Tag in GetObjectByTag, the class in GetLevelByClass and the ilevel integer should have the level your NPC is, so you can do whatever you want with it after that! ;)
 Gorgod
06-16-2011, 4:44 PM
#13
You should replace the Tag in GetObjectByTag, the class in GetLevelByClass and the ilevel integer should have the level your NPC is, so you can do whatever you want with it after that! ;)

I'm terrible at scripting, so do you know what I would do if I wanted something like "If Mission is level 2, this dialogue option is available". Like I said, I'm clueless at scripting, really.
 Istorian
06-16-2011, 4:51 PM
#14
Ah, for that you need a conditional script..This ought to do the trick! ;) Just change the Class Type to fit the Class that Mission is (like Jedi Guardian, Jedi Consular, Scoundrel etc):



int StartingConditional()
{

object oNPC = GetObjectByTag("Mission");

int iLevel = GetLevelByClass(CLASS_TYPE_*, oNPC);

if(iLevel == 2)
{
return TRUE;
}
return FALSE;
}
 Gorgod
06-16-2011, 4:53 PM
#15
Ah, for that you need a conditional script..This ought to do the trick! ;) Just change the Class Type to fit the Class that Mission is (like Jedi Guardian, Jedi Consular, Scoundrel etc):



int StartingConditional()
{

object oNPC = GetObjectByTag("Mission");

int iLevel = GetLevelByClass(CLASS_TYPE_*, oNPC);

if(iLevel == 2)
{
return TRUE;
}
return FALSE;
}




I love you. :bow:

Oh yeah, I don't know if this is too much, but do you know how to make a dialogue option disappear after it's been used?
 Istorian
06-16-2011, 5:00 PM
#16
Heh, thanks! :xp: You mean a reply of the PC, right?
 Gorgod
06-16-2011, 5:10 PM
#17
Heh, thanks! :xp: You mean a reply of the PC, right?

Yeah.
 Istorian
06-16-2011, 5:25 PM
#18
Well, you just have to put a conditional to that reply, too, to check if the reply has been used before with a local variable...For that you will need three scripts...One will be the conditional which you will put in the reply node, another one will be a simple script that will change the variable before the reply and the last will change the variable after the reply...So the conditional should be something like this:



int StartingConditional()
{

object oPC = GetFirstPC();
int iLocal = GetLocalBoolean(oPC, 0);


if(iLocal == 1)
{
return TRUE;
}
return FALSE;
}



And the script that you put in the last entry right before the conditional reply should be something like:



void main()
{

object oPC = GetFirstPC();

SetLocalBoolean(oPC, 0, 1);

}



Finally, the script that you put in the first entry right after the conditional reply should be something like:



void main()
{

object oPC = GetFirstPC();

SetLocalBoolean(oPC, 0, 0);

}



Hope this works! ;)
 Gorgod
06-16-2011, 5:52 PM
#19
Well, you just have to put a conditional to that reply, too, to check if the reply has been used before with a local variable...For that you will need three scripts...One will be the conditional which you will put in the reply node, another one will be a simple script that will change the variable before the reply and the last will change the variable after the reply...So the conditional should be something like this:



int StartingConditional()
{

object oPC = GetFirstPC();
int iLocal = GetLocalBoolean(oPC, 0);


if(iLocal = 1)
{
return TRUE;
}
return FALSE;
}



And the script that you put in the last entry right before the conditional reply should be something like:



void main()
{

object oPC = GetFirstPC();

SetLocalBoolean(oPC, 0, 1);

}



Finally, the script that you put in the first entry right after the conditional reply should be something like:



void main()
{

object oPC = GetFirstPC();

SetLocalBoolean(oPC, 0, 0);

}



Hope this works! ;)

Do you know how I could mesh the first script with this one?


int StartingConditional() {

int iResult;

GetJournalEntry("k_missbroth") >= 30;
object oMission = GetObjectByTag("Mission", 0);
iResult = (GetClassByPosition (2,oMission) == TRUE);

return iResult = TRUE;

}


And also, in case you didn't get my last PM, what numbers correspond with each class in coding? You know, instead of CLASS_TYPE_GUARDIAN, it would be a number.
 Istorian
06-16-2011, 7:38 PM
#20
I think that if you look in the classes.2da file which you can find in the 2da branch of Kotor Tool then you can see the classes and the numbers (row label) they correspond to. E.g. I'm pretty confident, without being able to prove it though, that the number that corresponds to the Jedi Guardian class is 3, its row label...Check this out and let me know if it works! ;)
 Gorgod
06-16-2011, 10:48 PM
#21
I think that if you look in the classes.2da file which you can find in the 2da branch of Kotor Tool then you can see the classes and the numbers (row label) they correspond to. E.g. I'm pretty confident, without being able to prove it though, that the number that corresponds to the Jedi Guardian class is 3, its row label...Check this out and let me know if it works! ;)

Thanks- you've helped out quite a bit.

Another question- is there a script that checks if a "quest" has even begun?
 Istorian
06-17-2011, 4:40 AM
#22
Hey, I'm just glad I could help! ;)

Another question- is there a script that checks if a "quest" has even begun?

If you ask, there's always a script! :thmbup1:


This time, global variables. So there's a file in the .2da branch, called globalcat.2da. Open it with the 2da Editor of Kotor Tool, scroll down to the bottom, and in the first box of the empty line (under 'row label') input the next number of the row (for unaltered globalcat.2da files, I think it's 1185).

Next, in the same line, under the 'name' row input your variable name, which has to be unique, and without any spaces. Make it resemble a bit your quest, so you know what it does. ;)

In the 'type' row, just input "Boolean" without the quotation marks, exactly as it is in the lines above. Select File -> Save as 2DA, and save the file in your desktop. From there, you can put it in your override folder.

Now, when you create a Global Boolean variable, its default value is FALSE. So, we capitalize on that to save us the pain of creating another script that will set the default value of the boolean.

Done all that? Now all you need is two scripts. The first one you'll put in the dialogue entry that also starts the quest. If the quest starts just by visiting a module, then open that module's .are file with a GFF editor (K-GFF works fine for me), scroll down until you see a field called "OnEnter", and change that field's value to the name of your script, without the .nss or .ncs extension. After that, just put your script in the override folder. The script that sets the boolean at a specific value should look something like this:



void main()
{

SetGlobalBoolean("YOUR_GLOBAL_BOOLEAN_NAME", TRUE);

}



The other script will just check if the global boolean is TRUE or not, and will act accordingly...Given that you want a certain dialogue option to exist or a trigger to fire only if the boolean is TRUE, you will use this script as a conditional. If you want it for a dialogue option, just write its name in the dialogue option's conditional box! ;) This also goes in the override folder, and should look something like this:



int StartingConditional()
{

int iBool = GetGlobalBoolean("YOUR_GLOBAL_BOOLEAN_NAME");

if(iBool == TRUE)
{
return TRUE;
}

return FALSE;

}



Remember that you can always put the scripts (*.ncs) in the module file that you're making. E.g. 999test.mod instead of the override folder. However, the globalcat.2da file, as all .2da files must be put inside the override folder. ;)

Hope this helps! :thmbup1: Let us know for any other questions!
 Gorgod
06-17-2011, 11:49 AM
#23
Hey, I'm just glad I could help! ;)



If you ask, there's always a script! :thmbup1:


This time, global variables. So there's a file in the .2da branch, called globalcat.2da. Open it with the 2da Editor of Kotor Tool, scroll down to the bottom, and in the first box of the empty line (under 'row label') input the next number of the row (for unaltered globalcat.2da files, I think it's 1185).

Next, in the same line, under the 'name' row input your variable name, which has to be unique, and without any spaces. Make it resemble a bit your quest, so you know what it does. ;)

In the 'type' row, just input "Boolean" without the quotation marks, exactly as it is in the lines above. Select File -> Save as 2DA, and save the file in your desktop. From there, you can put it in your override folder.

Now, when you create a Global Boolean variable, its default value is FALSE. So, we capitalize on that to save us the pain of creating another script that will set the default value of the boolean.

Done all that? Now all you need is two scripts. The first one you'll put in the dialogue entry that also starts the quest. If the quest starts just by visiting a module, then open that module's .are file with a GFF editor (K-GFF works fine for me), scroll down until you see a field called "OnEnter", and change that field's value to the name of your script, without the .nss or .ncs extension. After that, just put your script in the override folder. The script that sets the boolean at a specific value should look something like this:



void main()
{

SetGlobalBoolean("YOUR_GLOBAL_BOOLEAN_NAME", TRUE);

}



The other script will just check if the global boolean is TRUE or not, and will act accordingly...Given that you want a certain dialogue option to exist or a trigger to fire only if the boolean is TRUE, you will use this script as a conditional. If you want it for a dialogue option, just write its name in the dialogue option's conditional box! ;) This also goes in the override folder, and should look something like this:



int StartingConditional()
{

int iBool = GetGlobalBoolean("YOUR_GLOBAL_BOOLEAN_NAME");

if(iBool == TRUE)
{
return TRUE;
}

return FALSE;

}



Remember that you can always put the scripts (*.ncs) in the module file that you're making. E.g. 999test.mod instead of the override folder. However, the globalcat.2da file, as all .2da files must be put inside the override folder. ;)

Hope this helps! :thmbup1: Let us know for any other questions!

So if I wanted to, I could set the global Boolean to true when Mission talks to her brother, check it at the first Jedi training dialogue option, and then set it to false after the dialogue is finished?

Thanks a ton, by the way.
 Gorgod
06-17-2011, 1:08 PM
#24
So if I wanted to, I could set the global Boolean to true when Mission talks to her brother, check it at the first Jedi training dialogue option, and then set it to false after the dialogue is finished?

Thanks a ton, by the way.

I got it, don't worry.

Is there a way to ensure a dialogue option is only available in the Ebon Hawk? I know there's "k_con_at_ebon" but that cancels out my other dialogue condition... what's the function and how can I add it to this script? return (GetJournalEntry("training_mission") ==1)

Also, how can I add the script above to the script below? Ugh... :swear:


int StartingConditional() {

object oNPC = GetObjectByTag("Mission");

int iLevel = GetLevelByClass(5, oNPC);

if(iLevel == 2)
{
return TRUE;
}
return FALSE;
}
 Liverandbacon
06-17-2011, 1:55 PM
#25
this is maybe one of the greatest ideas in kotor 1 that i have ever heard of, but hasn't it already been made??
http://www.youtube.com/watch?v=yLtDzmtoWi4)
http://www.youtube.com/watch?v=6B4TLGkGcRk&feature=related)

but that's only for xbox i think..

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.
 Istorian
06-17-2011, 2:40 PM
#26
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:
 Gorgod
06-17-2011, 3:16 PM
#27
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.
 Istorian
06-17-2011, 3:23 PM
#28
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:
 Gorgod
06-17-2011, 3:59 PM
#29
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).
 Istorian
06-18-2011, 7:05 AM
#30
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! ;)
 Gorgod
06-18-2011, 1:35 PM
#31
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.
 Istorian
06-18-2011, 3:14 PM
#32
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! ;)
 Gorgod
06-18-2011, 8:58 PM
#33
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...
 Gorgod
06-21-2011, 2:12 PM
#34
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.

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**


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.

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.
 Canderis
06-24-2011, 12:26 AM
#35
This is going to be sweet. I had the idea of doing this myself, never got around to it though.
 harark1
06-25-2011, 9:09 AM
#36
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.

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.
Page: 1 of 1