LiquidZoo Posted March 25, 2006 Share Posted March 25, 2006 More 2 questions than 1 here. While testing out some changes I made for a mod that I am making, I came across 2 things that I'm not so sure how to fix. The first has to do with svösh's revelation robes, the second with a saber that I have created for DS Bastila. When I meet with Bastila on the temple roof, she is wearing the revelation robes, ds version; as well as carrying the lightsaber I made for her to use. This is good, as it's what I wanted. However, if I turn to the dark side, she then equips a normal 2 handed saber and a dark master robe. This is not what I wanted. How do I make it so that she keeps the items I had for her? Link to comment Share on other sites More sharing options...
Achilles Posted March 26, 2006 Share Posted March 26, 2006 IIRC, there are several .utc files for Bastila in that module. I never researched it in depth, but at a glance, it appears that they created Bastila at various levels so that her level would be commensurate with your PC's. I imagine that you would have to edit each of those .utc files to equip your custom items to prevent that problem from happening again. Either that or finding the script that adds her back to your party and adding some code to make her equip your items. I hope that helps. Link to comment Share on other sites More sharing options...
Elven6 Posted March 26, 2006 Share Posted March 26, 2006 What game is your mod for, it sounds intresting Link to comment Share on other sites More sharing options...
LiquidZoo Posted March 26, 2006 Author Share Posted March 26, 2006 This is for K1 Thanks Achilles, I hadn't noticed that before. I'll make sure to note that for the future. I'm extracting them now to make sure that the player will get my items when Bastila rejoins. Link to comment Share on other sites More sharing options...
The_Maker Posted March 26, 2006 Share Posted March 26, 2006 Be warned, I did the same thing (cept I gave her a custom robe) and edited each little utc file and they are used more than once. It kinda blew up my Ebon Hawk scene after the temple if DS, and it messed up the Leviathan interrogation in another play through. Use caution. Link to comment Share on other sites More sharing options...
Achilles Posted March 26, 2006 Share Posted March 26, 2006 In that case, scripts are probably in order. EDIT: I'm still pretty new at this whole scripting thing, but I think this might work for you. This script is fired by Reply 73 in unk44_evilbast.dlg. //:: k_punk_bastjoin2.nss // Globals int intGLOB_1 = 1; int intGLOB_2 = 2; int intGLOB_3 = 3; int intGLOB_4 = 4; int intGLOB_5 = 5; int intGLOB_6 = 6; int intGLOB_7 = 3; int intGLOB_8 = 4; int intGLOB_9 = 5; int intGLOB_10 = 6; int intGLOB_11 = 7; int intGLOB_12 = 1; int intGLOB_13 = 2; int intGLOB_14 = 3; int intGLOB_15 = 4; int intGLOB_16 = 5; int intGLOB_17 = 6; int intGLOB_18 = 7; int intGLOB_19 = 8; int intGLOB_20 = 9; int intGLOB_21 = 10; int intGLOB_22 = 11; int intGLOB_23 = 12; int intGLOB_24 = 13; int intGLOB_25 = 14; int intGLOB_26 = 15; int intGLOB_27 = 16; int intGLOB_28 = 17; int intGLOB_29 = 18; int intGLOB_30 = 19; int intGLOB_31 = 20; int intGLOB_32 = 21; int intGLOB_33 = 22; int intGLOB_34 = 23; int intGLOB_35 = 24; int intGLOB_36 = 25; int intGLOB_37 = 26; int intGLOB_38 = 27; int intGLOB_39 = 28; int intGLOB_40 = 29; int intGLOB_41 = 30; int intGLOB_42 = 59; int intGLOB_43 = 0; int intGLOB_44 = 1; int intGLOB_45 = 2; int intGLOB_46 = 29; int intGLOB_47 = 30; int intGLOB_48 = 34; int intGLOB_49 = 35; int intGLOB_50 = 36; int intGLOB_51 = 37; int intGLOB_52 = 38; int intGLOB_53 = 39; int intGLOB_54 = 41; int intGLOB_55 = 42; int intGLOB_56 = 46; int intGLOB_57 = 47; int intGLOB_58 = 15; int intGLOB_59 = 10; int intGLOB_60 = 5; int intGLOB_61 = 2; int intGLOB_62; int intGLOB_63; int intGLOB_64; object objectGLOB_1; int intGLOB_65; int intGLOB_66; int intGLOB_67; int intGLOB_68; int intGLOB_69; int intGLOB_70; int intGLOB_71 = 1; int intGLOB_72 = 2; int intGLOB_73 = 3; int intGLOB_74 = 20; int intGLOB_75 = 21; int intGLOB_76 = 22; int intGLOB_77 = 23; int intGLOB_78 = 24; int intGLOB_79 = 25; int intGLOB_80 = 26; int intGLOB_81 = 27; int intGLOB_82 = 28; int intGLOB_83 = 31; int intGLOB_84 = 32; int intGLOB_85 = 33; int intGLOB_86 = 40; int intGLOB_87 = 43; int intGLOB_88 = 44; int intGLOB_89 = 45; int intGLOB_90 = 48; int intGLOB_91 = 49; int intGLOB_92 = 50; int intGLOB_93 = 51; int intGLOB_94 = 52; int intGLOB_95 = 53; int intGLOB_96 = 54; int intGLOB_97 = 55; int intGLOB_98 = 56; int intGLOB_99 = 57; int intGLOB_100 = 58; int intGLOB_101 = 60; int intGLOB_102 = 61; int intGLOB_103 = 62; int intGLOB_104 = 63; int intGLOB_105 = 64; int intGLOB_106 = 65; int intGLOB_107 = 66; int intGLOB_108 = 67; int intGLOB_109 = 68; int intGLOB_110 = 69; int intGLOB_111 = 70; int intGLOB_112 = 71; int intGLOB_113 = 72; int intGLOB_114 = 1; int intGLOB_115 = 2; int intGLOB_116 = 3; int intGLOB_117 = 4; void main() { int int1; ActionPauseConversation(); SetGlobalNumber("G_FinalChoice", 1); SetGlobalFadeOut(0.0, 0.0, 0.0, 0.0, 0.0); RemovePartyMember(4); RemoveAvailableNPC(4); RemovePartyMember(5); RemoveAvailableNPC(5); int1 = ((GetLevelByPosition(1, OBJECT_SELF) + GetLevelByPosition(2, OBJECT_SELF)) + GetLevelByPosition(3, OBJECT_SELF)); //------------------------------------------------------------------ // This part of the script determines which Bastila to add // to your party based on the level of your PC. //------------------------------------------------------------------ if ((int1 <= 15)) { AddAvailableNPCByTemplate(0, "p_bastilla001"); } else { if ((int1 == 16)) { AddAvailableNPCByTemplate(0, "p_bastilla002"); } else { if ((int1 == 17)) { AddAvailableNPCByTemplate(0, "p_bastilla003"); } else { if ((int1 == 18)) { AddAvailableNPCByTemplate(0, "p_bastilla004"); } else { if ((int1 == 19)) { AddAvailableNPCByTemplate(0, "p_bastilla005"); } else { if ((int1 == 20)) { AddAvailableNPCByTemplate(0, "p_bastilla006"); } } } } } } //------------------------------------------------------------------ // Variables for old and new items //------------------------------------------------------------------ object oOldrobe = GetItemInSlot(INVENTORY_SLOT_BODY, OBJECT_SELF); object oOldsaber = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, OBJECT_SELF); //------------------------------------------------------------------ // This is the only part that you need to change. // Example tags would be "g_a_kghtrobe01" or "g_w_lghtsbr01". // Don't forget the " " or it won't work! //------------------------------------------------------------------ object oNewrobe = CreateItemOnObject("[color=red]tag for your new robe here[/color]",OBJECT_SELF); object oNewsaber = CreateItemOnObject("[color=red]tag for your new lightsaber here[/color]",OBJECT_SELF); //------------------------------------------------------------------ // The following will destroy the old objects and create the new // ones in the appropriate inventory slots. //------------------------------------------------------------------ if (GetIsObjectValid (oOldrobe)){ DestroyObject(oOldrobe); } AssignCommand(OBJECT_SELF, ActionEquipItem(oNewrobe,INVENTORY_SLOT_BODY)); if (GetIsObjectValid (oOldsaber )){ DestroyObject(oOldsaber ); } AssignCommand(OBJECT_SELF, ActionEquipItem(oNewsaber,INVENTORY_SLOT_RIGHTHAND)); SpawnAvailableNPC(0, GetLocation(GetObjectByTag("bastend", 0))); ActionJumpToLocation(GetLocation(GetObjectByTag("main", 0))); ActionWait(1.0); SetGlobalFadeIn(1.0, 1.0, 0.0, 0.0, 0.0); ActionResumeConversation(); } I hope that helps. Link to comment Share on other sites More sharing options...
LiquidZoo Posted March 26, 2006 Author Share Posted March 26, 2006 An excellent point... Scripts it is. Just need to figure out where to fire the script. Shouldn't be hard, though. Does anyone have the source for k_punk_bastadd? It's not one of the source scripts, and that's the one I need to modify to get the items I want. Link to comment Share on other sites More sharing options...
Achilles Posted March 26, 2006 Share Posted March 26, 2006 ^^^^ I made an edit to the post above. The script you want is k_punk_bastjoin2, not _bastadd. Link to comment Share on other sites More sharing options...
LiquidZoo Posted March 26, 2006 Author Share Posted March 26, 2006 AssignCommand(OBJECT_SELF, ActionEquipItem(oNewrobe,INVENTORY_SLOT_BODY)); It would seem to me that command would equip the robe to my PC rather than on Bastila. I don't have a lot of scripting experience, so I could be very wrong. Link to comment Share on other sites More sharing options...
stoffe Posted March 26, 2006 Share Posted March 26, 2006 AssignCommand(OBJECT_SELF (snip) It would seem to me that command would equip the robe to my PC rather than on Bastila. I don't have a lot of scripting experience, so I could be very wrong. OBJECT_SELF is the object running the script. In the case of scripts attached to dialogs, it's the object that the player initiated conversation with (the "owner" of the dialog who speaks Entries with no specific Speaker tag set). So, in any case AssignCommand() to OBJECT_SELF is rather pointless, since that function is used to make another object than the "script runner" execute a scripting function. Link to comment Share on other sites More sharing options...
LiquidZoo Posted March 26, 2006 Author Share Posted March 26, 2006 Cool, thanks for the explanation. Now to get this mod all the way functional. Link to comment Share on other sites More sharing options...
LiquidZoo Posted April 6, 2006 Author Share Posted April 6, 2006 In that case, scripts are probably in order. EDIT: I'm still pretty new at this whole scripting thing, but I think this might work for you. This script is fired by Reply 73 in unk44_evilbast.dlg. //:: k_punk_bastjoin2.nss // Globals int intGLOB_1 = 1; int intGLOB_2 = 2; int intGLOB_3 = 3; int intGLOB_4 = 4; int intGLOB_5 = 5; int intGLOB_6 = 6; int intGLOB_7 = 3; int intGLOB_8 = 4; int intGLOB_9 = 5; int intGLOB_10 = 6; int intGLOB_11 = 7; int intGLOB_12 = 1; int intGLOB_13 = 2; int intGLOB_14 = 3; int intGLOB_15 = 4; int intGLOB_16 = 5; int intGLOB_17 = 6; int intGLOB_18 = 7; int intGLOB_19 = 8; int intGLOB_20 = 9; int intGLOB_21 = 10; int intGLOB_22 = 11; int intGLOB_23 = 12; int intGLOB_24 = 13; int intGLOB_25 = 14; int intGLOB_26 = 15; int intGLOB_27 = 16; int intGLOB_28 = 17; int intGLOB_29 = 18; int intGLOB_30 = 19; int intGLOB_31 = 20; int intGLOB_32 = 21; int intGLOB_33 = 22; int intGLOB_34 = 23; int intGLOB_35 = 24; int intGLOB_36 = 25; int intGLOB_37 = 26; int intGLOB_38 = 27; int intGLOB_39 = 28; int intGLOB_40 = 29; int intGLOB_41 = 30; int intGLOB_42 = 59; int intGLOB_43 = 0; int intGLOB_44 = 1; int intGLOB_45 = 2; int intGLOB_46 = 29; int intGLOB_47 = 30; int intGLOB_48 = 34; int intGLOB_49 = 35; int intGLOB_50 = 36; int intGLOB_51 = 37; int intGLOB_52 = 38; int intGLOB_53 = 39; int intGLOB_54 = 41; int intGLOB_55 = 42; int intGLOB_56 = 46; int intGLOB_57 = 47; int intGLOB_58 = 15; int intGLOB_59 = 10; int intGLOB_60 = 5; int intGLOB_61 = 2; int intGLOB_62; int intGLOB_63; int intGLOB_64; object objectGLOB_1; int intGLOB_65; int intGLOB_66; int intGLOB_67; int intGLOB_68; int intGLOB_69; int intGLOB_70; int intGLOB_71 = 1; int intGLOB_72 = 2; int intGLOB_73 = 3; int intGLOB_74 = 20; int intGLOB_75 = 21; int intGLOB_76 = 22; int intGLOB_77 = 23; int intGLOB_78 = 24; int intGLOB_79 = 25; int intGLOB_80 = 26; int intGLOB_81 = 27; int intGLOB_82 = 28; int intGLOB_83 = 31; int intGLOB_84 = 32; int intGLOB_85 = 33; int intGLOB_86 = 40; int intGLOB_87 = 43; int intGLOB_88 = 44; int intGLOB_89 = 45; int intGLOB_90 = 48; int intGLOB_91 = 49; int intGLOB_92 = 50; int intGLOB_93 = 51; int intGLOB_94 = 52; int intGLOB_95 = 53; int intGLOB_96 = 54; int intGLOB_97 = 55; int intGLOB_98 = 56; int intGLOB_99 = 57; int intGLOB_100 = 58; int intGLOB_101 = 60; int intGLOB_102 = 61; int intGLOB_103 = 62; int intGLOB_104 = 63; int intGLOB_105 = 64; int intGLOB_106 = 65; int intGLOB_107 = 66; int intGLOB_108 = 67; int intGLOB_109 = 68; int intGLOB_110 = 69; int intGLOB_111 = 70; int intGLOB_112 = 71; int intGLOB_113 = 72; int intGLOB_114 = 1; int intGLOB_115 = 2; int intGLOB_116 = 3; int intGLOB_117 = 4; void main() { int int1; ActionPauseConversation(); SetGlobalNumber("G_FinalChoice", 1); SetGlobalFadeOut(0.0, 0.0, 0.0, 0.0, 0.0); RemovePartyMember(4); RemoveAvailableNPC(4); RemovePartyMember(5); RemoveAvailableNPC(5); int1 = ((GetLevelByPosition(1, OBJECT_SELF) + GetLevelByPosition(2, OBJECT_SELF)) + GetLevelByPosition(3, OBJECT_SELF)); //------------------------------------------------------------------ // This part of the script determines which Bastila to add // to your party based on the level of your PC. //------------------------------------------------------------------ if ((int1 <= 15)) { AddAvailableNPCByTemplate(0, "p_bastilla001"); } else { if ((int1 == 16)) { AddAvailableNPCByTemplate(0, "p_bastilla002"); } else { if ((int1 == 17)) { AddAvailableNPCByTemplate(0, "p_bastilla003"); } else { if ((int1 == 18)) { AddAvailableNPCByTemplate(0, "p_bastilla004"); } else { if ((int1 == 19)) { AddAvailableNPCByTemplate(0, "p_bastilla005"); } else { if ((int1 == 20)) { AddAvailableNPCByTemplate(0, "p_bastilla006"); } } } } } } //------------------------------------------------------------------ // Variables for old and new items //------------------------------------------------------------------ object oOldrobe = GetItemInSlot(INVENTORY_SLOT_BODY, OBJECT_SELF); object oOldsaber = GetItemInSlot(INVENTORY_SLOT_RIGHT[color=red]WEAPON[/color], OBJECT_SELF); //------------------------------------------------------------------ // This is the only part that you need to change. // Example tags would be "g_a_kghtrobe01" or "g_w_lghtsbr01". // Don't forget the " " or it won't work! //------------------------------------------------------------------ object oNewrobe = CreateItemOnObject("[color=blue]tag for your new robe here[/color]",OBJECT_SELF); object oNewsaber = CreateItemOnObject("[color=blue]tag for your new lightsaber here[/color]",OBJECT_SELF); //------------------------------------------------------------------ // The following will destroy the old objects and create the new // ones in the appropriate inventory slots. //------------------------------------------------------------------ if (GetIsObjectValid (oOldrobe)){ DestroyObject(oOldrobe); } AssignCommand(OBJECT_SELF, ActionEquipItem(oNewrobe,INVENTORY_SLOT_BODY)); if (GetIsObjectValid (oOldsaber )){ DestroyObject(oOldsaber ); } AssignCommand(OBJECT_SELF, ActionEquipItem(oNewsaber,INVENTORY_SLOT_RIGHT[color=red]WEAPON[/color])); SpawnAvailableNPC(0, GetLocation(GetObjectByTag("bastend", 0))); ActionJumpToLocation(GetLocation(GetObjectByTag("main", 0))); ActionWait(1.0); SetGlobalFadeIn(1.0, 1.0, 0.0, 0.0, 0.0); ActionResumeConversation(); } I hope that helps. Just wanted to point out, in case anyone else wants to use this scripts functionality as well, that it should be INVENTORY_SLOT_RIGHTWEAPON, not RIGHTHAND. Had a few errors the first time, dug through nwscript.nss and figured them 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.