PDA

View Full Version : Question about spawning items (K1)


Hoplite28
08-21-2006, 03:43 PM
I was looking to replace the blaster rifle that you get in your personal footlocker on the Endar Spire (when you're a soldier) with a light repeating blaster. After tedious searching through the forums, I read somewhere that that particular footlocker was titled footlcker001.utp . I've looked through the tutorials, and because I can't find a list of those unique itemplaceholders, I was wondering if footlcker001.utp was a uniqure pre-existing containter or not. Do I have to go and make sure than any items I change aren't duplicated over and over again? Any insight?

And second question, what file do I change so that you get a brown Jedi KNIGHT robe as opposed to a brown Jedi robe after you complete your third Jedi trials?

Sorry for not wording this better; I couldn't find a way to say it to make it clearer. Thanks for putting up with me, and thanks for any help I can get.

Emperor Devon
08-21-2006, 05:26 PM
Using Kotor Tool to find the footlocker's template could've taken you less than a minute. ;)

footlcker001 is not a unique template. You will find that's used more than once throughout the game. There are two ways you could change the inventory of what's inside it. You could go to end_m01aa_s.rim and end_m01aa.rim and extract all the files to a folder. You would then open up the footlocker's template and change what you will, and then compile the module and name it end_m01aa.mod and put it in your modules folder. Since the template for the footlocker you edited is specific to a module, it won't change all the others. But just editing the footlcoker will give you the original inventory in addition to what you added.

The second way would be to try your hand at scripting. You should go to end_m01aa.rim, and extract the file k_pend_time01 from the scripts section. I think that's the one which triggers what goes in the footlocker, since it's placed in the part of the dialogue that exists before you open it. Anyhow, you'd have to decompile the script, (the tool to do that can be found at SWKnights) and change the refferance that gives you a weapon from g_w_blstrrfl001 to g_w_rptnblstr01. Then you should compile it, and drop it into your override folder.

Hoplite28
08-21-2006, 05:43 PM
Thanks Emperor Devon. I'll give it a try.

Any ideas about the Jedi robes though?

Pavlos
08-21-2006, 06:12 PM
You'll want to edit the k_inc_end file - this is by far the easiest route.

You'll see at the top a short list of string constants. Something like this:

string sTraskTag = "end_trask";
string sTraskWP = "endwp_tarsk01";
string sCarthTag = "Carth";

string SOLDIER_WEAPON = "g_w_blstrrfl001"; // Change this to your custom ResRef
string SOLDIER_ITEM01 = "g_i_adrnaline003";
string SOLDIER_ITEM02 = "";

string SCOUT_WEAPON = "g_w_blstrpstl001";
string SCOUT_ITEM01 = "g_i_adrnaline002";
string SCOUT_ITEM02 = "g_i_implant101";

string SCOUNDREL_WEAPON = "g_w_blstrpstl001";
string SCOUNDREL_ITEM01 = "g_i_secspike01";
string SCOUNDREL_ITEM02 = "g_i_progspike01";

To edit what blaster rifle is granted change the part that I have marked. Save the file and plonk it in your override. And compile this script under the name "k_pend_area01.nss"

#include "k_inc_end"

void main() {
if(GetIsPC(GetEnteringObject())) {
if(HasNeverTriggered()) {
SetGlobalFadeOut();
PlayMovie("01A");
SetReturnStrref(FALSE, 32228);
SetGlobalNumber("K_CURRENT_PLANET", 5);
SpawnStartingEquipment();
SetGlobalFadeOut();
SetGlobalFadeIn(3.0, 1.5);
DelayCommand(0.1, AssignCommand(GetTrask(),
ActionStartConversation(GetFirstPC(), "m01aa_c01", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE )));
SetMinOneHP(GetFirstPC(), TRUE);
}
}
}

Place the compiled script in the override. It is now safe to remove the include file :). That should sort out your blaster rifle problems.

As to the Jedi Robe... I haven't played K1 in a while, so I'm not sure where you get this.

Emperor Devon
08-21-2006, 06:18 PM
Any ideas about the Jedi robes though?

Oh, the Jedi robes! I overlooked that while explaining the footlocker. Although you could change the script which gives you the robe, it would be pointless, as that item can only be found once in the game, which is from Master Zhar. Go to BIFs/templates.bif/Blueprint, Item/g_a_kghtrobe01. Change the template resref from g_a_kghtrobe01 to g_a_jedirobe01, and save it as that.

Hoplite28
08-21-2006, 06:35 PM
Sorry, I'm still looking for a program that will decompile the .ncs scripts into .nss scripts for me to edit. Seems like there was something for that in Kotor II, but not Kotor I.

And you completely lost me about the Jedi robes, Emperor Devon. If I did what you told me to do, what would happen ingame?

Emperor Devon
08-21-2006, 06:41 PM
The game would recognize you as having the Jedi robes, but they would have the stats and name of the Jedi Knight robe.

Hoplite28
08-21-2006, 07:16 PM
I changed the weapons with Pavlos's way. But just out of curiousity, is there a way to add a second weapon?