Gorgod Posted June 16, 2011 Share Posted June 16, 2011 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: Show spoiler (hidden content - requires Javascript to show) Show spoiler (hidden content - requires Javascript to show) Show spoiler (hidden content - requires Javascript to show) Link to comment Share on other sites More sharing options...
Istorian Posted June 16, 2011 Share Posted June 16, 2011 Nice! Can't wait to see how the dialogue enhances the experience! Link to comment Share on other sites More sharing options...
Gorgod Posted June 16, 2011 Author Share Posted June 16, 2011 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; } Link to comment Share on other sites More sharing options...
harark1 Posted June 16, 2011 Share Posted June 16, 2011 Sounds good. About how much do you still have left? No clue about the script sorry. Link to comment Share on other sites More sharing options...
Gorgod Posted June 16, 2011 Author Share Posted June 16, 2011 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. Link to comment Share on other sites More sharing options...
Fastmaniac Posted June 16, 2011 Share Posted June 16, 2011 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 Link to comment Share on other sites More sharing options...
Gorgod Posted June 16, 2011 Author Share Posted June 16, 2011 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. Show spoiler (hidden content - requires Javascript to show) Show spoiler (hidden content - requires Javascript to show) Show spoiler (hidden content - requires Javascript to show) Link to comment Share on other sites More sharing options...
salam263 Posted June 16, 2011 Share Posted June 16, 2011 this is maybe one of the greatest ideas in kotor 1 that i have ever heard of, but hasn't it already been made?? but that's only for xbox i think.. Link to comment Share on other sites More sharing options...
Gorgod Posted June 16, 2011 Author Share Posted June 16, 2011 this is maybe one of the greatest ideas in kotor 1 that i have ever heard of, but hasn't it already been made?? 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? Link to comment Share on other sites More sharing options...
Istorian Posted June 16, 2011 Share Posted June 16, 2011 That should work, if not, I blame my time away from scripting! void main() { object oNPC = GetObjectByTag("Your_Tag_Here"); int iLevel = GetLevelByClass(CLASS_TYPE_*, oNPC); } Link to comment Share on other sites More sharing options...
Gorgod Posted June 16, 2011 Author Share Posted June 16, 2011 That should work, if not, I blame my time away from scripting! void main() { object oNPC = GetObjectByTag("Your_Tag_Here"); int iLevel = GetLevelByClass(CLASS_TYPE_*, oNPC); } Would I replace iLevel with the level that I want? Link to comment Share on other sites More sharing options...
Istorian Posted June 16, 2011 Share Posted June 16, 2011 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! Link to comment Share on other sites More sharing options...
Gorgod Posted June 16, 2011 Author Share Posted June 16, 2011 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. Link to comment Share on other sites More sharing options...
Istorian Posted June 16, 2011 Share Posted June 16, 2011 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; } Link to comment Share on other sites More sharing options...
Gorgod Posted June 16, 2011 Author Share Posted June 16, 2011 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. 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? Link to comment Share on other sites More sharing options...
Istorian Posted June 16, 2011 Share Posted June 16, 2011 Heh, thanks! You mean a reply of the PC, right? Link to comment Share on other sites More sharing options...
Gorgod Posted June 16, 2011 Author Share Posted June 16, 2011 Heh, thanks! You mean a reply of the PC, right? Yeah. Link to comment Share on other sites More sharing options...
Istorian Posted June 16, 2011 Share Posted June 16, 2011 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! Link to comment Share on other sites More sharing options...
Gorgod Posted June 16, 2011 Author Share Posted June 16, 2011 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. Link to comment Share on other sites More sharing options...
Istorian Posted June 16, 2011 Share Posted June 16, 2011 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! Link to comment Share on other sites More sharing options...
Gorgod Posted June 17, 2011 Author Share Posted June 17, 2011 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? Link to comment Share on other sites More sharing options...
Istorian Posted June 17, 2011 Share Posted June 17, 2011 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! 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! Let us know for any other questions! Link to comment Share on other sites More sharing options...
Gorgod Posted June 17, 2011 Author Share Posted June 17, 2011 Hey, I'm just glad I could help! If you ask, there's always a script! 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! 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. Link to comment Share on other sites More sharing options...
Gorgod Posted June 17, 2011 Author Share Posted June 17, 2011 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... int StartingConditional() { object oNPC = GetObjectByTag("Mission"); int iLevel = GetLevelByClass(5, oNPC); if(iLevel == 2) { return TRUE; } return FALSE; } Link to comment Share on other sites More sharing options...
Liverandbacon Posted June 17, 2011 Share Posted June 17, 2011 this is maybe one of the greatest ideas in kotor 1 that i have ever heard of, but hasn't it already been made?? 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.