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.

Editing Bastila's weapons on the Star Forge

Page: 1 of 1
 Gavroche
04-22-2007, 12:58 PM
#1
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.
 glovemaster
04-22-2007, 1:42 PM
#2
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
 Gavroche
04-22-2007, 1:45 PM
#3
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 :/
 glovemaster
04-22-2007, 1:52 PM
#4
Maybe its in her UTC file?
 Gavroche
04-22-2007, 1:55 PM
#5
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)
 glovemaster
04-22-2007, 2:03 PM
#6
I just looked and the most probable script is "k_sta_bastatt" however there doesnt seem to be an nss file.
 Gavroche
04-22-2007, 3:16 PM
#7
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...
 Darth_sidek
04-22-2007, 3:27 PM
#8
maybe run another script after the weopon switch which unequips it, then equips the custom sabers?
 Gavroche
04-22-2007, 3:32 PM
#9
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 ?
 deathdisco
04-23-2007, 12:34 AM
#10
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. ;)
 Gavroche
04-23-2007, 12:58 PM
#11
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.
 Shem
04-23-2007, 1:06 PM
#12
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.
 Gavroche
04-23-2007, 1:09 PM
#13
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.
 stoffe
04-23-2007, 2:01 PM
#14
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.
 Gavroche
04-23-2007, 3:11 PM
#15
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_here", ?), left_hand_slot, ?); ?

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