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.

K1 Jedi Enclave

Page: 1 of 1
 LiquidZoo
01-17-2006, 7:47 PM
#1
Not sure if this has already been done, so forgive me if it has.

Would it be possible to add 1 or more dialog choices to the options where you are choosing your saber color on Dantooine? These options could be for custom saber crystal colors and (possibly) a new custom saber hilt to go with this new color choice? I know next to nothing about modifying the files for this game, having only stumbled on to this community a relatively short time ago and having only attempted 1 reskin "mod".

I'm not sure what the new saber would look like. I'd like something different than the bland basic saber. I'm sure I could think of a color or 2 to add in as an option. Wouldn't need any dialog to describe it, though that would be nice. Again, I could come up with some or leave it in someone's hands who knows more about the lore of the Star Wars universe than I do.
 LiquidZoo
01-18-2006, 3:02 PM
#2
Sorry if this is considered a bump, simply providing some new information that I have found on my own.

I decided to do a bit of digging into the Dantooine modules and I found the dialog that has the questions about when you're choosing your saber crystal. I found it in dan13_dorak.dlg inside the danm13_s.rim module (at least, I think it's a module). I followed the dialog until I got to this 'speech' (for lack of a better term)

[OWNER] - I am beginning to see a pattern here, apprentice. I have a feeling about what you would be best at. But first, the final question. (Link)

But I have no idea where it links to. Trying to learn as I go and see if maybe, just maybe, I can figure out how to make this mod myself. Can anyone point me in the right direction so I can find the continuation of this dialog and maybe get the mod started off?
 Darth333
01-18-2006, 3:16 PM
#3
If you want to do this mod by yourself, I think it's a good place to get started :) I can't give you precise information as of now because I don't have the game with me but you can see where the dialogue branch leads if you use tk102's dlgeditor: http://www.starwarsknights.com/tools.php)

Go to the view menu and select the option that says something like "show indices".

To give your pc a lightsaber, crystal or other item, you will have to use a script like this one:

void main()
{
CreateItemOnObject( "item_template", GetFirstPC());
}

Replace item_template by the name of the item's .uti file.

To attach the script to the dlg file, simply select the dialogue branch where you want to fire the script from and type the name of your .ncs file (without the extension) in the field called "script".

Since this is no longer a simple modding request, I am moving hte topic to the general HL forums.
 LiquidZoo
01-18-2006, 5:22 PM
#4
Thanks, I appreciate the guidance, and your moving the topic. You're right, it's not really a request anymore if I'm going to do it myself.

Will post back with my progress

Edit: Ok, I have a question.

I'm reading through the tutorials on how to create a custom saber and crystal, as I am going to have to do this for the mod if I use a non-standard color. I think I have that worked out on how to create it, and I know how to create the new texture for the crystal (and probably the saber as well, if it's done the same way). Here's what I'm wondering

Other than the scripting that I will need to do to have Master Dorak give me the crystal, are there any changes that I will need to make to other scripts in order to have my PC actually create the new saber during that step of the training? Or will that just happen automatically? Has anyone done something like this?

I'm at work, otherwise I would attempt to dig through the dialog and see if there is a script that fires for the actual saber creation.

*edit* Just thought of something else. I would also need to figure out how to 'give' the PC his Jedi class with this choice (or these choices). Can I do that with the giveitem script, or do I need another script for that as well?
 Darth333
01-18-2006, 9:23 PM
#5
Ah it's been a long time sine I played the game and I totally forgot to mention that you will have to set a few globals and add a Jedi class. Use the existing Jedi classes.


Example:

Custom reply: "I wish to be a Jedi Guardian but I want a yellow crystal

You would attacha script like this:

void main() {

//you can replace CLASS_TYPE_JEDIGUARDIAN by CLASS_TYPE_JEDICONSULAR OR CLASS_TYPE_JEDISENTINEL

int nJediPath = CLASS_TYPE_JEDIGUARDIAN;
SetGlobalBoolean("DAN_DORAK_DONE", 0);
SetGlobalNumber("DAN_PATH_STATE", nJediPath);
CreateItemOnObject("g_w_sbrcrstl15", GetFirstPC(), 1);
}



Master: Very well, here is a yellow crystal, go speak to blablabla. Attach something like this:


//k_pdan_makejedi.ncs decompiled by d333
#include "k_inc_dan"

void main() {
object oPC = GetFirstPC();
if ((((GetLevelByClass(CLASS_TYPE_JEDICONSULAR, oPC) == 0) && (GetLevelByClass(CLASS_TYPE_JEDIGUARDIAN, oPC) == 0)) && (GetLevelByClass(CLASS_TYPE_JEDISENTINEL, oPC) == 0))) {
TurnPlayerIntoJedi();
}
ClearAllActions();
}
 LiquidZoo
01-18-2006, 10:00 PM
#6
Excellent!

Thank you so much Darth333!

One final question before I get in to building this mod. Am I going to run into any issues with using a custom saber hilt for my custom saber crystal? Since I know nothing about modeling, and would probably not be able to (very easily, anyway) model my own saber; I was thinking about using Malak's hilt for my custom crystal.
 Darth333
01-18-2006, 10:22 PM
#7
Double check if you have the last version of the scripts as I just re-edited the second one.

Note that in the normal game, the first crystal you get from Dorak is a plot item (fake crystal) and later when you speak to Zhar again, the game replaces that crystal by a real lightsaber. Here is the script that checks which crystal you have chosen and gives you the proper lightsaber:

//k_pdan_saber16.ncs

#include "k_inc_dan"

void main() {
object oSaber = CreateFirstLightsaber();
ShowUpgradeScreen(oSaber);
}


It refers to this part of k_inc_dan.nss

string SABER_BLUE = "g_w_lghtsbr01";
string SABER_GREEN = "g_w_lghtsbr03";
string SABER_GOLD = "g_w_lghtsbr04";

object CreateFirstLightsaber();

object CreateFirstLightsaber()
{

object oPC = GetFirstPC();
object oSaber;
object oCrystal = GetItemPossessedBy(GetFirstPC(),"dan13_plotcrys");
SetPlotFlag(oCrystal,FALSE);
DestroyObject(oCrystal);
/* if(GetIsObjectValid(oSaber))
{
AssignCommand(oPC,ActionEquipItem(oSaber,INVENTORY _SLOT_RIGHTWEAPON));
}*/
int nJediPath = GetGlobalNumber("DAN_PATH_STATE");
if(nJediPath > 0)
{
if(nJediPath == JEDI_PATH_GUARDIAN)
{
oSaber = CreateItemOnObject(SABER_BLUE,oPC);
}
else if (nJediPath == JEDI_PATH_SENTINEL)
{
oSaber = CreateItemOnObject(SABER_GOLD,oPC);
}
else if (nJediPath == JEDI_PATH_CONSULAR)
{
oSaber = CreateItemOnObject(SABER_GREEN,oPC);
}
}
if(GetIsObjectValid(oSaber))
{
// ExecuteScript("k_pdan_player03",oPC);
DelayCommand(0.1,AssignCommand(oPC,ActionEquipItem (oSaber,INVENTORY_SLOT_RIGHTWEAPON)));
}
return oSaber;
}




It has to be tweaked a bit to give you a custom saber. Do you intend to have only one custom saber/crystal? or do you want to give the player several choices?
Depending on what you want to do, you could check only for what the player has in his inventory ( if only one additional choice) or if you intend to give the player several choices of color then I think I would rather set a variable. Let me know what you want to do and I'll give you a script tomorrow.
 LiquidZoo
01-18-2006, 11:18 PM
#8
Yes, I did notice the change to your script (after I typed my response, threw me for a bit).

What I think I am going to do is make the mod have several different color options, but only have one of them installable at a time. For example, have a white Guardian/Sentinel/Consular option, as well as Orange, and whatever other colors I come up with. That way the player would have the option of using whatever custom color you wish when the mod is installed, as well as being able to choose whatever path they wish in terms of a class.

I'm thinking something like this, given that Revan is already very adept at the Force:

"I sense you have a special crystal that I wasn't informed about."

Possible(probable) Dorak Response here, confirming it's existance

"I wish to become a (Class here) using this crystal" (receive crystal, possible response, end dialog)
 LiquidZoo
01-19-2006, 1:51 PM
#9
Well, 1 part done (I guess the easiest part)

I got the saber and its crystal in-game and upgradable. So that's cool. First time for me and it seems to work great. Have a look for yourselves

Screenshot 1 (http://liquidzoo.net/images/new-saber.jpg)

Screenshot 2 (http://liquidzoo.net/images/new-saber2.jpg)

Saber Crystal (http://liquidzoo.net/images/new-saber-crystal.jpg)

This is a big step in the right direction, since I can see for certain that everything works as far as taking Malak's saber and modifying it for my own use. I even made it compatible with everything that RedHawke's mod that uses the upcrystals.2da file (Revan the White packs, I believe) is.

Another question, on the subject of the saber itself. Is the texture on the saber associated with the model itself? Is there a way to reskin just this 1 saber or would I need to go into gmax to do that?
 LiquidZoo
01-20-2006, 3:30 PM
#10
It looks like the script to make the PC a jedi is already listed in the dialog file after you get the crystal from Dorak. It looks to me that the script k_pdan_makejedi fires when you hit the [End Dialog] option.

Am I right in guessing that with the new crystal I have that I will either have to modify that script or write a new one that is similar?
 LiquidZoo
01-28-2006, 4:55 PM
#11
Hmmm, I'm stuck. I don't know how to make my new crystal appear as the dan13_plotcrys. I have the dialogs written, and the saber created (first one, anyway; I imagine that the others can use the same template as only one will be available at a time for now), but I don't know how to have Dorak give me the correct plot crystal and how to incorporate that into the saber creation script.
Page: 1 of 1