N-DReW25 1,336 Posted July 25, 2019 Hello, in my K1GI Mod I am trying to fix a bug where the Sith Student Shaardan fails to spawn inside the tomb of Ajunta Pall regardless of whether or not you've spoken to Ajunta. The main issue I am having is that I am totally unaware of what actually spawns him, my guess is that when you are leaving you're meant to walk on a trigger which makes him spawn but for some reason he isn't appearing. Would anyone know what file spawns him in? Or if it would be possible to spawn him in via alternate means without breaking everything. Quote Share this post Link to post Share on other sites
ebmar 893 Posted July 25, 2019 (edited) 35 minutes ago, N-DReW25 said: Would anyone know what file spawns him in? By my observation it should be - Trigger = k37_trg_spn_shaa Scripts \ ScriptOnEnter = k_pkor_spn_shaar Spoiler // Globals int intGLOB_1 = 0; int intGLOB_2 = 1; int intGLOB_3 = 2; int intGLOB_4 = 3; int intGLOB_5 = 4; int intGLOB_6 = 5; int intGLOB_7 = 6; int intGLOB_8 = 7; int intGLOB_9 = 8; int intGLOB_10 = 9; int intGLOB_11 = 10; int intGLOB_12 = 11; int intGLOB_13 = 12; int intGLOB_14 = 13; int intGLOB_15 = 14; int intGLOB_16 = 15; int intGLOB_17 = 16; int intGLOB_18 = 17; int intGLOB_19 = 18; int intGLOB_20 = 19; int intGLOB_21 = 1100; int intGLOB_22 = (-6); int intGLOB_23 = (-5); int intGLOB_24 = (-4); int intGLOB_25 = (-2); int intGLOB_26 = (-1); int intGLOB_27 = 0; int intGLOB_28 = 24; // Prototypes void sub5(int intParam1, string stringParam2, location locationParam3); void sub4(object objectParam1, int intParam2, int intParam3); void sub3(int intParam1); int sub2(object objectParam1, int intParam2); int sub1(); void sub5(int intParam1, string stringParam2, location locationParam3) { object object1 = CreateObject(intParam1, stringParam2, locationParam3, 0); } void sub4(object objectParam1, int intParam2, int intParam3) { int nLevel = GetHitDice(GetFirstPC()); if ((intParam3 == 1)) { if (((((intParam2 == intGLOB_12) || (intParam2 == intGLOB_17)) || (intParam2 == intGLOB_18)) || (intParam2 == intGLOB_19))) { GiveXPToCreature(GetFirstPC(), (nLevel * 15)); } else { if ((((intParam2 == intGLOB_13) || (intParam2 == intGLOB_20)) || (intParam2 == intGLOB_16))) { GiveXPToCreature(GetFirstPC(), (nLevel * 20)); } else { if (((intParam2 == intGLOB_14) || (intParam2 == intGLOB_15))) { GiveXPToCreature(GetFirstPC(), (nLevel * 10)); } } } } if ((((intParam2 >= 0) && (intParam2 <= 19)) && GetIsObjectValid(objectParam1))) { if (((intParam3 == 1) || (intParam3 == 0))) { SetLocalBoolean(objectParam1, intParam2, intParam3); } } } void sub3(int intParam1) { sub4(OBJECT_SELF, intGLOB_1, intParam1); } int sub2(object objectParam1, int intParam2) { int nLocalBool; if ((((intParam2 >= 0) && (intParam2 <= 19)) && GetIsObjectValid(objectParam1))) { nLocalBool = GetLocalBoolean(objectParam1, intParam2); if ((nLocalBool > 0)) { return 1; } } return 0; } int sub1() { return sub2(OBJECT_SELF, intGLOB_1); } void main() { object oPC = GetFirstPC(); object oPM1 = GetPartyMemberByIndex(1); object oPM2 = GetPartyMemberByIndex(2); object oPCi = GetItemPossessedBy(oPC, "k37_itm_freedont"); object oPM1i = GetItemPossessedBy(oPM1, "k37_itm_freedont"); object oPM2i = GetItemPossessedBy(oPM2, "k37_itm_freedont"); if ((((sub1() == 0) && ((GetIsObjectValid(oPCi) || GetIsObjectValid(oPM1i)) || GetIsObjectValid(oPM2i))) && (GetEnteringObject() == oPC))) { sub3(1); object oShaardanSpawn = GetObjectByTag("k37_way_shaardan", 0); location lShaardanSpawn = GetLocation(oShaardanSpawn); sub5(1, "kor37_shaardan", lShaardanSpawn); } } Did you have them [setup appropriately] on the relevant module [korr_m37aa]? 35 minutes ago, N-DReW25 said: ...if it would be possible to spawn him in via alternate means without breaking everything. Not sure about that - but if we can spawn him the most feasible way -like the above setup- I don't see any reason why we should take the alternative though. Granted, that is still possible - I think. 🤔 Edited July 25, 2019 by ebmar Attached ScriptOnEnter content Quote Share this post Link to post Share on other sites
DarthParametric 3,784 Posted July 25, 2019 Since it checks for the presence of the swords, I gather you have changed those. Quote Share this post Link to post Share on other sites
Guest Qui-Gon Glenn Posted July 25, 2019 DP asks a smart question. ... If you simply want him to always spawn, you know what to do - remove conditionals. Quote Share this post Link to post Share on other sites
N-DReW25 1,336 Posted July 26, 2019 20 hours ago, DarthParametric said: Since it checks for the presence of the swords, I gather you have changed those. So I checked what I did to the blades and all I did was modify their stats, removing the blade utis from the override fixed the problem. I will see if it is possible to modify the sword stats without breaking Shaardan. Quote Share this post Link to post Share on other sites
DarthParametric 3,784 Posted July 26, 2019 It should only matter if you changed the tags, since that is what the script is checking. Quote Share this post Link to post Share on other sites
N-DReW25 1,336 Posted July 27, 2019 22 hours ago, DarthParametric said: It should only matter if you changed the tags, since that is what the script is checking. That was presumably the issue. The "Notch Steel Sword" uses a tag and resref "k37_itm_freedont" whilst "Ajunta Palls Blade" uses tag "k37_itm_ajunta" and resref "k37_itm_freedont". My guess is that a while back I put the "ajunta" tag as the resref instead of the "freedont" tag. Thank you all for your help. Quote Share this post Link to post Share on other sites