Fair Strides 509 Posted March 31, 2021 Yeah, that one should work. If it doesn't work as you want it to, you can try moving the SetGlobalFadeOut below the SetGlobalFadeIn, and then possibly adjust the first number. Quote Share this post Link to post Share on other sites
Kaidon Jorn 195 Posted March 31, 2021 (edited) Yup. it cut to black suddenly on the fadeout. #holdmuhbeer Hey how does SetFadeUntilScript work? Edited March 31, 2021 by Kaidon Jorn Quote Share this post Link to post Share on other sites
Fair Strides 509 Posted March 31, 2021 That's usually used at the start of a dialog (like a cutscene) and keeps the screen black until the first script fires that isn't a conditional (I think it won't fire for a conditional). Then it fades in, IIRC. Can also be used during module loads so that you can have everything set up and in the right spots, then start a dialog that runs a script or starts a cutscene to fire a script. Quote Share this post Link to post Share on other sites
Kaidon Jorn 195 Posted April 5, 2021 Got a question... k_def_disturb01 in a creature's OnDisturbed field,... I know the script is blank and "not currently used", but what was it for? Is it like a OnInventoryDistubed on a placeable? I want to have a droid drop a saber part, then fire a journal entry script. So is the only way to do this for a creature is have the OnDeath script give you the part and add the journal entry? Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted April 5, 2021 From k_ai_master: case 1008: //KOTOR_DEFAULT_EVENT_ON_DISTURBED { //NOT USED } break; Quote Share this post Link to post Share on other sites
Kaidon Jorn 195 Posted April 5, 2021 Nevermind Quote Share this post Link to post Share on other sites
Kaidon Jorn 195 Posted April 7, 2021 Could someone decompile these two scripts for me? They were for 604DAN and the second has coordinates I want to fix up and use. k_fab_enter.ncs a_xtracrystals.ncs I am most grateful. Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted April 7, 2021 Here you go. k_fab_enter.nss a_xtracrystals.nss 1 Quote Share this post Link to post Share on other sites
Kaidon Jorn 195 Posted April 7, 2021 Yes! Awesome thankyou! Quote Share this post Link to post Share on other sites
Patches 2 Posted May 1, 2021 is there a copy of the K1 k_pdan_makejedi.nss anywhere that's in its original format instead of the 'I decompiled this but now it's just horrible machine code' format? I want to try and add/change a thing or two, but I can't find the source script with kotor tool and I can't make heads or tails of the decompiled .ncs Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted May 1, 2021 Only global scripts have Bioware's original source. The module scripts are binary only. But I have cleaned up the generated source for a lot of the module scripts in the course of working on K1CP over the last couple of years, especially Dantooine. #include "k_inc_dan" void main() { object oPC = GetFirstPC(); if (GetLevelByClass(CLASS_TYPE_JEDICONSULAR, oPC) == 0 && GetLevelByClass(CLASS_TYPE_JEDIGUARDIAN, oPC) == 0 && GetLevelByClass(CLASS_TYPE_JEDISENTINEL, oPC) == 0) { TurnPlayerIntoJedi(); } ClearAllActions(); } Many of the module scripts make heavy use of planet-specific include scripts, which you can find in the global source. As such what at first glance seem like large scripts often turn out to be quite simple, once you've cleaned out all the external functions. 1 1 Quote Share this post Link to post Share on other sites
Patches 2 Posted May 1, 2021 oh my gosh THANK YOU! that is so much more understandable. I think it will be quite a while before I'm anything like good enough at this to wade my way through the binary stuff, but I'll keep that in mind about the include scripts since those might be among the bits I could potentially pick out at least. Quote Share this post Link to post Share on other sites
Kaidon Jorn 195 Posted May 21, 2021 Hey all So I wanted to place an invisible placeable on an enemy with his OnDeath script. So that I may have you loot him normally, but have another script fire after you've looted him and gotten the part to the quest. here's what I could think of... void main() { if ((GetJournalEntry("ache_saber") == 20)) { CreateObject(64, "ache_lens_cont", GetLocation(GetObjectByTag("infernal_sith", 0)), 0); } ExecuteScript("k_def_death01", OBJECT_SELF); } So the placeable is invisible and holds the part. Then dings the quest entry. Would this work or what am I forgetting/not doing right? I appreciate any help. EDIT: Hey nevermind. What I was doing worked. I just forgot to include the script that jumps the quest entry up. So then i moved the other items he drops to the invisible placeable so there's only one "Remains". Then looting that puts the quest up a notch. Woot. i did it! 2 Quote Share this post Link to post Share on other sites
Kaidon Jorn 195 Posted October 25, 2021 Hey all. Looking to get this 'ere script decompiled so Bandon can have his own on the Endar Spire. Messing with just the .utc doesn't work. k_pend_cut23.ncs Thanks in advance. Quote Share this post Link to post Share on other sites
ebmar 893 Posted October 25, 2021 41 minutes ago, Kaidon Jorn said: Looking to get this 'ere script decompiled... Should be looking like this, more/less -- Spoiler // k_pend_cut23 void main() { // Participants object oEnd_Trask = GetObjectByTag("end_trask"); // Objects object oEnd01_SceneObj03 = GetObjectByTag("end01_sceneobj03"); object oDarkJediSaber = GetItemPossessedBy(OBJECT_SELF, "g_w_drkjdisbr002"); // Waypoints object oWP_Room8_02 = GetObjectByTag("wp_room8_02"); int nUser = GetUserDefinedEventNumber(); switch(nUser) { case 5: ActionEquipItem(oDarkJediSaber, INVENTORY_SLOT_RIGHTWEAPON, FALSE); DelayCommand(0.5, SetLightsaberPowered(OBJECT_SELF, TRUE, TRUE, FALSE)); ActionDoCommand(SignalEvent(oEnd01_SceneObj03, EventUserDefined(0))); break; case 10: ActionMoveToObject(oWP_Room8_02); ActionPlayAnimation(ANIMATION_LOOPING_READY, 1.0, 10.0); break; case 25: ClearAllActions(); ActionCastFakeSpellAtObject(FORCE_POWER_CHOKE, oEnd_Trask, PROJECTILE_PATH_TYPE_DEFAULT); DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectChoke(), oEnd_Trask)); break; } } -- haven't script for a long-while so I might be missing things there, hahah. Anyway, with case 25: -- is there any scenario in-game where Bandon choke Trask? Interesting, can't remember though to be honest. Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted October 25, 2021 Looks like you are using the K1CP modified version there @ebmar. The vanilla script has a slightly different case 10 that introduces a slight hiccup in Bandon's walk forwards. You should use the K1CP version as a basis, I'm just clarifying the situation. Edit: However, you must use this in conjunction with K1CP's k_pend_cut02, or you will end up with a soft-lock that prevents the cutscene from proceeding. 1 Quote Share this post Link to post Share on other sites
ebmar 893 Posted October 25, 2021 (edited) Oh, that I was decompiling the one KJ's attach. 5 minutes ago, DarthParametric said: You should use the K1CP version as a basis, I'm just clarifying the situation. Oh, I see -- guess it's all good then. Thanks for the heads-up. 👍 Also, @Kaidon Jorn -- better look/use the one DP's linking there as a basis, it's properly commented rather than I did. Edited October 25, 2021 by ebmar Quote Share this post Link to post Share on other sites
Kaidon Jorn 195 Posted October 25, 2021 Ok, awesome. Thanks to both of you for the heads up. I am using K1CP. This mod should be compatible with that I would think. So then I need to include k_pend_cut02 when I compile the k_pend_cut23, correct? Then of course. modify g_bandon001.utc to put the saber in his pack inventory, no? Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted October 26, 2021 8 hours ago, Kaidon Jorn said: So then I need to include k_pend_cut02 when I compile the k_pend_cut23, correct? No, it's not an include. I meant that if you were distributing a mod, you'd have to include K1CP's k_pend_cut02.ncs as well because of the changes I listed above. If you are just making something for your own use and already have K1CP installed then you don't need to do anything. Although I would advise in future not using content from MODs as a basis. Extract the RIMs instead. Start with the vanilla content, then check if something like K1CP modifies it afterwards. 8 hours ago, Kaidon Jorn said: Then of course. modify g_bandon001.utc to put the saber in his pack inventory, no? Not necessarily. Modifying the UTC is certainly one route, but you can also just give him items/equip them via script. Remember that modification of assets that are already stored in the save file (i.e. GIT, spawned NPCs, triggers, etc.) will require restarting the module over again. Scripting is therefore very useful for testing at least, even if you want to end up editing a UTC, etc. Quote Share this post Link to post Share on other sites
Kaidon Jorn 195 Posted October 26, 2021 14 hours ago, DarthParametric said: No, it's not an include. I meant that if you were distributing a mod, you'd have to include K1CP's k_pend_cut02.ncs as well because of the changes I listed above. If you are just making something for your own use and already have K1CP installed then you don't need to do anything. Although I would advise in future not using content from MODs as a basis. Extract the RIMs instead. Start with the vanilla content, then check if something like K1CP modifies it afterwards. Not necessarily. Modifying the UTC is certainly one route, but you can also just give him items/equip them via script. Remember that modification of assets that are already stored in the save file (i.e. GIT, spawned NPCs, triggers, etc.) will require restarting the module over again. Scripting is therefore very useful for testing at least, even if you want to end up editing a UTC, etc. Ah. Alright I see. I am simply going to inject files into the modules this time anyway since their isn't that many, the rest goes in override. Thanks Quote Share this post Link to post Share on other sites
Kaidon Jorn 195 Posted November 12, 2021 Hey all Would someone be kind enough to decompile this for me? I'm getting doubles of Bastila's saber and must remedy... k_ptar_hassaber.ncs I am most grateful. Quote Share this post Link to post Share on other sites
TamerBill 135 Posted November 12, 2021 int StartingConditional() { int int1 = (!GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "G_W_DBLSBR004"))); return int1; } Returns true if the player doesn't have any G_W_DBLSBR004 (yellow doublesaber), false if they do. Quote Share this post Link to post Share on other sites
Kaidon Jorn 195 Posted November 12, 2021 Yes thank you. I needed to change the saber tags so it looks for the right one. Otherwise it will always return false and you'll end up with doubles. Quote Share this post Link to post Share on other sites
Kaidon Jorn 195 Posted November 20, 2021 Ok, third playthrough of K1 and I'm realizing that the hurt Wookie in lower Shadowlands still isn't giving the "rough cut wookie amulet". Wondering if it's some old problem that's been fixed or should I get this decompiled and mess with it myself? k_pkas_hurtgive.ncs This is the script and I don't see one in K1CP folder. Can I get a decompile please? Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted November 21, 2021 You really should just grab DeNCS. void main() { object oPC = GetPCSpeaker(); object oCrystal = GetItemPossessedBy(OBJECT_SELF, "kas25_wookcrysta"); ActionGiveItem(oCrystal, oPC); } The problem is the UTC doesn't actually have the item in its inventory. They used ActionGiveItem because that makes the NPC walk to the PC and do an animation, but it needs to either be switched to a CreateItemOnObject directly spawning it into the PC's inventory, or it needs to first be spawned into the Wookiee's inventory and then given to the PC, or the Wookiee's UTC needs to be edited to add it. 6 hours ago, Kaidon Jorn said: I don't see one in K1CP folder If you find a problem that either Community Patch doesn't address, you can just raise an issue for it on the repo. I've added this one (and I also see an issue with the heal scripts). Quote Share this post Link to post Share on other sites