View Full Version : Editing Bastila's weapons on the Star Forge

04-22-2007, 12:58 PM
Yep there,

I have no savegame near that point so I'd like to have your opinion. Let's say I want Bastila to wield two sabers when you fight her on the Star Forge.

Not complicated. KotOR Tool>RIMs>[...]>sta_bastila.utc>Inventory... The trap is that her red double-bladed lightsaber is not equipped. It's in her Inventory, but not in her Weapon slot. Looks like a script when you start the fight makes her equip it.

So I wondered, if I want her to wield two sabers (custom sabers, to be specific), what should I do ? Delete the double blade and directly equip her with the sabers ? Or put them in her Inventory and find the script to change it correctly ?

I hope you'll know the answer. Thanks in advance.

04-22-2007, 01:42 PM
I think it would be more real to add them into the inventory and edit the script but to save time and compilation you could just equipt her with them.

Personally i would go with editing the script as its seems more.. proffesional :P

04-22-2007, 01:45 PM
Yes, that's why I wanted to do, or at least make sure the script won't run and equip directly the weapons.
But I don't find it in the Dialog. There is the two scripts to make Bastila Force Stasis Jolee and Juhani, the script to lock the door and (IIRC) the one to make the big lightning effect. But no weapon equip script :/

04-22-2007, 01:52 PM
Maybe its in her UTC file?

04-22-2007, 01:55 PM
Oh yes, I didn't think about that. I'll check it soon... (now we have the first "round" for the elections in France, so I'm a bit worried by the result that will be shown in five minutes)

04-22-2007, 02:03 PM
I just looked and the most probable script is "k_sta_bastatt" however there doesnt seem to be an nss file.

04-22-2007, 03:16 PM
Indeed. It's the one used in the Dialog. I searched it (Hexa gibberish...). I found things interesting at lines 1450, 2799, and 6279... But I can't do anything with that.

I don't mean to remove this script because it seems it's managing several other things that the weapons switch...

04-22-2007, 03:27 PM
maybe run another script after the weopon switch which unequips it, then equips the custom sabers?

04-22-2007, 03:32 PM
The END DIALOGUE already fires a script, where would I put a new one... ?
Should I create another node before the END DIALOGUE, where I would put k_sta_bastatt, and then put the script you suggest in the END DIALOGUE ?

04-23-2007, 12:34 AM
k_sta_bastatt.nss (http://home.comcast.net/~deathdisco/files/k_sta_bastatt.nss)
Using DeNCS to decompile the source code. Prepair to sift through 3,432 lines of code. ;)

04-23-2007, 12:58 PM
Oh yeeeees '^^ Thanks you. With the Search function, I should notice which lines interest me...

However I don't have much experience in scripting. What kind of command should I expect to look for/replace, to equip weapons ? I'm gonna check on the Scripting forums, but I hope you've got an idea.

Edit : looks like I've to look for AssignCommand(GetFirstPC(), ActionEquipItem(oItem, nInventorySlot) in the script. Let's go...

Redit : No such "ActionEquipeItem" in the script. Hm. Two "ActionEquipMostDamaging", but that's all.

04-23-2007, 01:06 PM
Maybe its in her UTC file?Editing her UTC file is not a good idea if you plan on redeeming her instead of killing her. That's because her UTC file name when you confront her is the same name as her UTC on Deck 1 of the Star Forge, where you meet up with her and Carth just before the Star Forge blows up and it will corrupt that scene.

04-23-2007, 01:09 PM
Oh, so I can't even edit her Inventory ? I have to edit this script... As I stated in my edit, I don't find the command which equip her double-bladed lightsaber.

04-23-2007, 02:01 PM
Oh, so I can't even edit her Inventory ? I have to edit this script... As I stated in my edit, I don't find the command which equip her double-bladed lightsaber.

You can edit the inventory in the UTC file if you put the modified UTC file back into the RIM file you extracted it from, instead of putting it into the override filder.

04-23-2007, 03:11 PM
Thanks stoffe. Now this script problem remains...

Should I just add AssignCommand(GetFirstPC(), ActionEquipItem(oItem, nInventorySlot); (modifying the GetFirstPC thing, because I want it on Bastila) at the bottom of the instructions ?

Edit : Hey, just thought about something. When the Handmaiden wears her mother's robes, I guess a script quite similar is fired. I'm going to see how it is written.

Redit : OK, I got the DeNCS and found a_equiphandrobe.ncs, which gives

void main() {
ActionEquipItem(GetObjectByTag("a_robe_x01", 0), 1, 1);

So... what ? Do I just add at the end of k_sta_bastatt something like

ActionEquipItem(GetObjectByTag("custom_item_here", ?) right_hand_slot, ?);
ActionEquipItem(GetObjectByTag('2ndcustom_item_her e", ?), left_hand_slot, ?); ?

I don't get the syntax (what do I have to put in the "?" ?).