-
Content Count
569 -
Joined
-
Last visited
-
Days Won
17
Posts posted by djh269
-
-
Could be a conflict with the placeable.2da file, is there any mods that have additional rows for the placeable.2da?
-
On 4/22/2022 at 2:11 AM, Marius Fett said:Why, thank you! Those are all mods I still use for every playthrough, too! 😊
I’d like to sink my teeth into some ‘proper modding’ in the near future, so I’m thinking of starting work again on a Mandalorian recruitment for K1 which I worked on before I left. I made pretty decent progress back in the day and I recently found all my old notes again, so I may well start that afresh in the near future.
You're very welcome 😀
If you're thinking of making a recruitment mod I'd suggest to look into this mod:
It's the most complete recruitment mod that edits most (if not all) the vanilla DLG to encompass the new Voice Over lines to ensure complete immersion. If you take a look at which DLG lines were amended you won't come across any crossovers with the edited vanilla party dialogue interjections 😀
-
12 hours ago, Marius Fett said:Great to be back! Do you mind if I ask which ones? Some of my earlier work is horrifically bad looking back! 🤣
For K1:
https://deadlystream.com/files/file/231-carths-republic-uniform-and-flight-suit/
https://deadlystream.com/files/file/236-sith-armour-pack/
https://deadlystream.com/files/file/235-master-vandar-revisited/
For K2:
https://deadlystream.com/files/file/239-atris-to-jocasta-nu/
The above mods are permanent fixtures. I always liked the added littles bits in Carths inventory when you get him especially!
-
It's great to see you back, your reskins and models have been a permanent fixture in my override folder for years 😀
-
I tested it by adding attribute properties with a vanilla upgrade.2da file to a standard g_w_lghtsbr01.uti and the results were the same, so it seems it's unavoidable which is annoying.
The only workaround I'm doing is to only have 1 lightsaber crystal apply an attribute bonus and replaced other stats to the attribute bonuses as that seems the only way. -
Hey guys,
I was making a fix to one of my mods and I've encountered an annoyance. If you install a crystal with an attribute property e.g. Intelligence +1 and a separate crystal that applies an intelligence attribute it doesn't stack, and the property is displayed separately. And the only bonus is from one of the crystals. I've tested it without a upgrade.2da file by placing properties into vanilla lightsaber uti's so it's not a row limit error just and ingame one:So frustrating!
-
1
-
-
On 2/15/2022 at 6:31 AM, ebmar said:Actually I'd suggest you to just edit the OnEnter itself rather than calling/execute it from your script. That way can remove the hassle from having to edit the relevant field on the ARE/IFO. Granted, one can just make a unique name for a script that used for executing the original and placing it to the Override, but I believe that'd do more problems than it solve.
Understandable that there are some edge cases which the original can't be decompiled, but if necessary just go with the editing.
Not really aside of other members' source, vanilla scripts and once in a while I visit NWN Lexicon for relevant answers that can't be found anywhere. And not to forget asking other members for insights is a great educational resources as well.
Though I find the best way to learn is by decompiling any of the binary, and make your way reconstructing them as readable as can be with intelligible constants -- for example [to where they fit into]; int 1 to TRUE, float 0.0 to DIRECTION_EAST, int 5 to ANIMATION_LOOPING_TALK_NORMAL, etc.].
Oh, and comments [started by // then followed with one] can go a long way too -- as our masters @Qui-Gon Glenn once taught me as well --
That's some great advice mate, I'll try and inject the script into the vanilla OnEnter.
I've seen the NWN Lexicon before and reading some stuff on there at the moment, it's a great resource.
Funnily enough I saw the DIRECTION_EAST line in the nwscript.nss file haha. Yeah I leave comments in some scripts
-
3 hours ago, ebmar said:No worries, the pleasure's mine. Anyway, in case you missed the added comments you should change the filename of the executed script/k_pdan_13_areaold to something less/equal to 16 characters.
The script will still compile and the ExecuteScript function will fires -- it's just there's nothing to execute 'cause the game can't read it.
I did notice that part within the text above, funnily enough there's another time when I called an OnEnter script and it didn't fire at all! I'll add the 16 character limitation to my list of notes haha.
3 hours ago, ebmar said:Appreciate you think of me like that -- but I know there's more about the [KotOR] scripting world that I didn't understand yet, hahah. But as what I have now wouldn't be possible if not with helping hands from other members in the communities.
As for scripting syntax [usage of logical AND && / logical OR || / logical NOT !] I'd suggest you to check on this one -- Introduction to Scripting Syntax - Tutorials: Scripting - The International House of Mojo Forums (mixnmojo.com)
There's so many helpful members here, it's great to see they've helped you become as proficient as you are in scripting. There's so many resources to look out for, even Lucasforums has mostly been archived and there's tons there! Do you have any other educational resources you use? I'm trying to get through these:
-
15 hours ago, ebmar said:Try this, this one compiles for me --
Your problem was--as the compiler said so -- Error: Variable "check" defined multiple times in the same scope
Although to be honest I was surprised looking at your script initially - thinking that'd work and the problem was on something else. Would be cool if the compiler can support that idea, I guess. And yeah, it had something to do with the and function within a script.
Wow thanks for your help buddy! That's some great scripting knowledge you have mate!
-
Hey guys,
I'm looking to see if anyone could help me create two conditionals within a script that will spawn an NPC if two quest requirements are met. Here is the script below:Spoilervoid main()
{
int check = GetGlobalBoolean("FOUND_BOD1");
int check = GetGlobalBoolean("light_crys2");
if (check == TRUE){
CreateObject(OBJECT_TYPE_CREATURE, "dan13_jed99", Location(Vector(160.04, 84.16, 12.62), 0.0));}
ExecuteScript("k_pdan_13_areaold", OBJECT_SELF);
}
Unfortunately the above won't compile, I've researched this and I know it must have something to do with the && function within a script.
-
Hey guys,
I've been trying to edit a UTP file to have an alternate name, when I edit the file with Kotor Tool and place the file within the Override and test the Placeables name within the game it shows the correct name. I then use the configuration tool for the TSLPatcher to compare and modify the file with the vanilla file and then run the TSLPatcher exe file, when the UTP file has been edited the name of the UTP file becomes blank. So strange, this is the changes.ini info:
[invisible001.utp]
LocName(strref)=-1
LocName(lang0)=Mandalorian Warrior RemainsIn all fairness I could go down the route of bonding the new name with the dialog.tlk via the below lines within changes.ini:
LocName(strref)=43093
But I was wondering if there's a work around. To not have to go through the route of either just replacing the UTP file without having to compare and add modifiers to the file via TSLPatcher just literally replacing the file, or to have to attach the new name through the dialog.tlk file. I'm wondering if there's some magic to edit the changes.ini file
Thanks all!
-
I love your work so far!!
-
1
-
-
46 minutes ago, LoneWanderer said:Version 1.0 of the mod made poison weapons and upgrades available to the player’s party, next update will give poison weapons to some existent enemies. For example, it’ll make sense for thugs on Nar-Shaddaa to use poisoned daggers.
I like that idea, there's quite a few thugs/mercenaries/Sith that should be using poison weapons!
47 minutes ago, LoneWanderer said:@djh269 Currently, I have no plans for K1 version, as that game already has poison weapons, and enemies, capable to poison the player, are more common. I’ll think about it after version 1.1.
That's fair play mate, I look forward to your 1.1 release!
-
This is such a necessary mod!
Poison is underutilized in both K1 and K2, almost makes the Immunity: Poison property useless after early game. This mod definitely changes that!
Are you thinking of doing a mod similar to this for Kotor 1?
-
You've all done excellent work on this mod, can't wait for the new release mate!
-
Everything working properly now!
Thanks for all the assistance
-
-
On 10/18/2021 at 6:11 PM, DarthParametric said:If you want to gate via a specific skill rank, then you need to check for that instead:
// 315: Get the number of ranks that oTarget has in nSkill. // - nSkill: SKILL_* // - oTarget // * Returns -1 if oTarget doesn't have nSkill. // * Returns 0 if nSkill is untrained. int GetSkillRank(int nSkill, object oTarget=OBJECT_SELF);
I've seen people advise others on scripting functions before, like above. But I don't know how to go from the above to have the script lines ready like below 😀
3 hours ago, DarthParametric said:Try changing the check to:
if (GetSkillRank(SKILL_COMPUTER_USE, GetFirstPC())) > 0 { CreateItemOnObject(COMP_PART,oLocker, 2); }
-
I was being an idiot, I basically wasn't compiling the k_pend_area01.nss file with the k_inc_end.nss file into the Override folder, and it's actually working. But weirdly this function still isn't working:
} if(GetHasSkill(SKILL_COMPUTER_USE,GetFirstPC())) { CreateItemOnObject(COMP_PART,oLocker, 2); }
My PC doesn't have Computer Use, but I still get the computer parts in the footlocker. Weird!
-
Hey all,
I've modified the k_inc_end.nss file and used the below k_pend_area01.ncs file and the script won't work, please see the bottom code for the modified version of k_inc_end.nssOn 10/18/2021 at 6:11 PM, DarthParametric said:#include "k_inc_end" void main() { if (GetIsPC(GetEnteringObject())) { if (HasNeverTriggered()) { SetGlobalFadeOut(); PlayMovie("01A"); SetReturnStrref(FALSE, 32228, 0); //String 32228 is "Return To Hideout". Should instead be 38550, "Transit Disabled". SetGlobalNumber("K_CURRENT_PLANET", 5); SpawnStartingEquipment(); SetGlobalFadeOut(); SetGlobalFadeIn(3.0, 1.5); DelayCommand(0.1, AssignCommand(GetTrask(), ActionStartConversation(GetFirstPC(), "m01aa_c01", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE))); SetMinOneHP(GetFirstPC(), TRUE); } } }
#include "k_inc_utility" #include "k_inc_generic" string sTraskTag = "end_trask"; string sTraskWP = "endwp_tarsk01"; string sCarthTag = "Carth"; string SOLDIER_WEAPON = "g_w_blstrrfl001"; string SOLDIER_ITEM01 = "g_i_adrnaline003"; string SOLDIER_ITEM02 = "g_i_medeqpmnt01"; string SOLDIER_ITEM03 = "g_i_medeqpmnt02"; string SOLDIER_ITEM04 = "g_w_iongren01"; string SOLDIER_ITEM05 = "g_w_fraggren01"; string SOLDIER_ITEM06 = "g_w_stungren01"; string SOLDIER_ITEM07 = "g_i_adrnaline001"; string SOLDIER_ITEM08 = "g_i_cmbtshot001"; string SOLDIER_ITEM09 = "g_i_belt001"; string SCOUT_WEAPON = "g_w_blstrpstl004"; string SCOUT_ITEM01 = "g_i_belt003"; string SCOUT_ITEM02 = "g_i_implant101"; string SCOUT_ITEM03 = "g_w_adhsvgren001"; string SCOUT_ITEM04 = "g_w_iongren01"; string SCOUT_ITEM05 = "g_w_stungren01"; string SCOUT_ITEM06 = "g_i_adrnaline002"; string SCOUT_ITEM07 = "g_i_progspike01"; string SCOUT_ITEM08 = "g_i_parts01"; string SCOUT_ITEM09 = "g_i_secspike01"; string SCOUT_ITEM10 = "g_i_medeqpmnt01"; string SCOUNDREL_WEAPON = "g_i_medeqpmnt01"; string SCOUNDREL_ITEM01 = "g_i_secspike01"; string SCOUNDREL_ITEM02 = "g_i_progspike01"; string SCOUNDREL_ITEM03 = "g_i_secspike02"; string SCOUNDREL_ITEM04 = "g_w_adhsvgren001"; string SCOUNDREL_ITEM05 = "g_i_gauntlet05"; string SCOUNDREL_ITEM06 = "g_w_stungren01"; string SCOUNDREL_ITEM07 = "g_i_parts01"; string SCOUNDREL_ITEM08 = "g_i_mask20"; int ROOM3_DEAD = 3; int ROOM5_DEAD = 4; int ROOM7_DEAD = 2; int TRASK_DEFAULT = -1; int TRASK_MUST_GET_GEAR = 0; int TRASK_GEAR_DONE = 1; int TRASK_TARGET_DONE = 2; int TRASK_MUST_EQUIP = 3; int TRASK_EQUIP_DONE = 4; int TRASK_MUST_MAP = 5; int TRASK_MAP_DONE = 6; int TRASK_MUST_SWITCH = 7; int TRASK_SWITCH_DONE = 8; int TRASK_SWITCH_REMIND = 9; int TRASK_CARTH_BRIDGE = 10; int TRASK_BRIDGE_DONE = 11; int TRASK_MUST_DOOR = 12; int TRASK_DOOR_DONE = 13; int TRASK_ROOM3_DONE = 14; int TRASK_MUST_MEDPACK = 15; int TRASK_COMBAT_WARNING = 16; int TRASK_COMBAT_WARNING2 = 17; int TRASK_COMPUTER_DONE = 18; int TRASK_MUST_DROID = 19; int TRASK_DROID_DONE = 20; int TRASK_MUST_MAP_02 = 21; int TRASK_NOTHING_02 = 22; //int TRASK_COMBAT_WARNING = 27; int TRASK_LEVEL_INIT = 28; int TRASK_MUST_LEVEL = 29; int TRASK_PARTY_LEVEL = 30; int TRASK_LEVEL_DONE = 31; string LOCKER_TAG = "end_locker01"; string STEALTH_UNIT = "g_i_belt010"; string COMP_PART = "g_i_progspike01"; string DEM_MINE = "g_w_cryobgren001"; string REP_PARTS = "g_i_parts01"; string SEC_SPIKES = "g_i_secspike01"; string MED_PAC = "g_i_medeqpmnt01"; //returns Trask's object id object GetTrask(); // checks if the conditions for passing the healing stage have been met int HealingDone(); // returns Carth's object id object GetCarth(); // checks if this has never been done before. uses sw 10 int HasNeverTriggered(); // Has Trask initiate with the pc at any distance void TalkTrask(); // returns the effect from the corridor explosion effect CorridorExplosion(); //spawns equipment into the first locker dependent on the players class void SpawnStartingEquipment(); // returns if the door has been sliced (uses plot 2) int GetIsSecureDoorSliced(object oDoor = OBJECT_SELF); // sets the slice state of the door (uses plot 2) void SetSecureDoorSliced(int bState, object oDoor = OBJECT_SELF); // returns if the door has been repaired (uses plot 3) int GetIsDamagedDoorRepaired(object oDoor = OBJECT_SELF); // sets the repaired state of the door (uses plot 3) void SetDamagedDoorRepaired(int bState, object oDoor = OBJECT_SELF); // returns the value of the trask dialouge state global int GetTraskState(); //sets the trask dialouge global void SetTraskState(int nValue); // returns true if there is somethin equipped in the weapon or body slots int GetHasEquippedSomething(); // Checks if Trask is already waiting to initiate int GetTraskWillInitiate(); // Sets the flag for Trask waiting to initiate void SetTraskWillInitiate(int nValue); //returns Carth dialgue state int GetCarthState(); //sets Carth dialogue state void SetCarthState(int nValue); // plays an explosion void PlayExplosion(string sWP = "end_explode01", int bWithShake = TRUE, int bWithRumble = TRUE); //returns a cutscene invisible placeable based on the given number object GetCutsceneObject(int nObjectNumber); ////////////////////////////////////////////////////////////////////////// object GetTrask() { return GetObjectByTag(sTraskTag); } int HealingDone() { int bDone; object oPC = GetFirstPC(); int bHasMedPack = GetIsObjectValid(GetItemPossessedBy(oPC,"g_i_medeqpmnt01")); int bFullHitPoints = GetCurrentHitPoints(oPC) == GetMaxHitPoints(oPC); if(bFullHitPoints || bHasMedPack == FALSE) { bDone = TRUE; } return bDone; } object GetCarth() { return GetObjectByTag("Carth"); } int HasNeverTriggered() { int bReturn; if(UT_GetPlotBooleanFlag(OBJECT_SELF,SW_PLOT_BOOLEAN_10) == FALSE) { bReturn = TRUE; UT_SetPlotBooleanFlag(OBJECT_SELF,SW_PLOT_BOOLEAN_10,TRUE); } return bReturn; } void TalkTrask() { object oTrask = GetTrask(); if(GetPartyMemberByIndex(0) == oTrask) { SetPartyLeader(NPC_PLAYER); } // AurPostString("Trask trying to talk" + IntToString(GetTraskState()),5,5,5.0); NoClicksFor(0.5); DelayCommand(0.1,SignalEvent(oTrask,EventUserDefined(50))); } effect CorridorExplosion() { effect eZap = EffectBeam(VFX_BEAM_LIGHTNING_DARK_L,GetObjectByTag("end_zap01"),BODY_NODE_CHEST); return EffectLinkEffects(EffectDamage(5),eZap); } object GetSpeaker() { return GetPartyMemberByIndex(1); } object GetListener() { return GetPartyMemberByIndex(0); } void SpawnStartingEquipment() { object oLocker = GetObjectByTag(LOCKER_TAG); int nClass = GetClassByPosition(1,GetFirstPC()); if(nClass == CLASS_TYPE_SCOUNDREL) { CreateItemOnObject(SCOUNDREL_WEAPON,oLocker, 4); CreateItemOnObject(SCOUNDREL_ITEM01,oLocker, 5); CreateItemOnObject(SCOUNDREL_ITEM02,oLocker, 4); CreateItemOnObject(SCOUNDREL_ITEM03,oLocker, 5); CreateItemOnObject(SCOUNDREL_ITEM04,oLocker); CreateItemOnObject(SCOUNDREL_ITEM05,oLocker); CreateItemOnObject(SCOUNDREL_ITEM06,oLocker, 4); CreateItemOnObject(SCOUNDREL_ITEM07,oLocker, 4); CreateItemOnObject(SCOUNDREL_ITEM08,oLocker); } else if(nClass == CLASS_TYPE_SCOUT) { CreateItemOnObject(SCOUT_WEAPON,oLocker); CreateItemOnObject(SCOUT_ITEM01,oLocker); CreateItemOnObject(SCOUT_ITEM02,oLocker); CreateItemOnObject(SCOUT_ITEM03,oLocker, 4); CreateItemOnObject(SCOUT_ITEM04,oLocker, 2); CreateItemOnObject(SCOUT_ITEM05,oLocker, 2); CreateItemOnObject(SCOUT_ITEM06,oLocker, 2); CreateItemOnObject(SCOUT_ITEM07,oLocker, 5); CreateItemOnObject(SCOUT_ITEM08,oLocker, 5); CreateItemOnObject(SCOUT_ITEM09,oLocker, 2); CreateItemOnObject(SCOUT_ITEM10,oLocker, 4); } else if(nClass == CLASS_TYPE_SOLDIER) { CreateItemOnObject(SOLDIER_WEAPON,oLocker); CreateItemOnObject(SOLDIER_ITEM01,oLocker, 2); CreateItemOnObject(SOLDIER_ITEM02,oLocker, 5); CreateItemOnObject(SOLDIER_ITEM03,oLocker, 5); CreateItemOnObject(SOLDIER_ITEM04,oLocker, 4); CreateItemOnObject(SOLDIER_ITEM05,oLocker, 4); CreateItemOnObject(SOLDIER_ITEM06,oLocker, 4); CreateItemOnObject(SOLDIER_ITEM07,oLocker, 2); CreateItemOnObject(SOLDIER_ITEM08,oLocker, 4); CreateItemOnObject(SOLDIER_ITEM09,oLocker); } if(GetHasSkill(SKILL_STEALTH,GetFirstPC())) { CreateItemOnObject(STEALTH_UNIT,oLocker); } if(GetHasSkill(SKILL_COMPUTER_USE,GetFirstPC())) { CreateItemOnObject(COMP_PART,oLocker, 2); } if(GetHasSkill(SKILL_DEMOLITIONS,GetFirstPC())) { CreateItemOnObject(DEM_MINE,oLocker, 2); } if(GetHasSkill(SKILL_REPAIR,GetFirstPC())) { CreateItemOnObject(REP_PARTS,oLocker, 2); } if(GetHasSkill(SKILL_SECURITY,GetFirstPC())) { CreateItemOnObject(SEC_SPIKES,oLocker, 2); } if(GetHasSkill(SKILL_TREAT_INJURY,GetFirstPC())) { CreateItemOnObject(MED_PAC,oLocker, 2); } } int GetIsSecureDoorSliced(object oDoor = OBJECT_SELF) { return UT_GetPlotBooleanFlag(oDoor,SW_PLOT_BOOLEAN_02); } void SetSecureDoorSliced(int bState, object oDoor = OBJECT_SELF) { UT_SetPlotBooleanFlag(oDoor,SW_PLOT_BOOLEAN_02,bState); } int GetIsDamagedDoorRepaired(object oDoor = OBJECT_SELF) { return UT_GetPlotBooleanFlag(oDoor,SW_PLOT_BOOLEAN_03); } void SetDamagedDoorRepaired(int bState, object oDoor = OBJECT_SELF) { UT_SetPlotBooleanFlag(oDoor,SW_PLOT_BOOLEAN_03,bState); } int GetTraskState() { return GetGlobalNumber("END_TRASK_DLG"); } void SetTraskState(int nValue) { // AurPostString("New State" + IntToString(nValue),5,7,2.0); SetGlobalNumber("END_TRASK_DLG",nValue); // AurPostString("Set: " + IntToString(nValue),5,10,3.0); } int GetHasEquippedSomething() { int bItemEquipped = FALSE; object oPC = GetFirstPC(); if(GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_RIGHTWEAPON,oPC)) || GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_LEFTWEAPON,oPC)) || GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_BODY,oPC)) ) { bItemEquipped = TRUE; } return bItemEquipped; } int GetTraskWillInitiate() { return UT_GetPlotBooleanFlag(GetTrask(),SW_PLOT_BOOLEAN_03); } void SetTraskWillInitiate(int nValue) { UT_SetPlotBooleanFlag(GetTrask(),SW_PLOT_BOOLEAN_03,nValue); } int GetCarthState() { return GetGlobalNumber("END_CARTH_DLG"); } void SetCarthState(int nValue) { SetGlobalNumber("END_CARTH_DLG",nValue); } void PlayExplosion(string sWP = "end_explode01", int bWithShake = TRUE, int bWithRumble = TRUE) { location lExplode = GetLocation(GetNearestObjectByTag(sWP)); effect eExplode = EffectVisualEffect(VFX_FNF_GRENADE_FRAGMENTATION); effect eShake = EffectVisualEffect(VFX_IMP_SCREEN_SHAKE); ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eExplode,lExplode); if(bWithShake) { ApplyEffectToObject(DURATION_TYPE_INSTANT,eShake,GetFirstPC()); } if(bWithRumble) { PlayRumblePattern(14); } } object GetCutsceneObject(int nObjectNumber) { return GetObjectByTag("end01_sceneobj0" + IntToString(nObjectNumber)); }
Do I need to compile either of the scripts in a specific folder with the include script also?
-
I'm pretty sure I remember Stoffe modifying her own nss files when she used her high level Force powers mod and they weren't compiled, thanks for the info!!
-
Thanks for all the excellent advice, I will try and be more concise with my scripting and learn to commonly used functions from the various include files!
Why doesn't the k_inc_end.nss compile? So annoying haha!
-
2 minutes ago, DarthParametric said:It does. That's what the giant list of variables and functions is. Calling stuff externally via includes is just for the source to make it easier to parse. When the script is compiled, all those functions are pulled into the NCS.
Oh okay, thanks for the clarification!
If I used this if statement and I was also a Consular and a Soldier, would it still spawn items? If I was technically both?
else if(nClass == CLASS_TYPE_SOLDIER)
{
CreateItemOnObject(SOLDIER_WEAPON,oLocker);I'm concerned with compatibility with Jedi from the start mod
-
Hahaha, seems a better option than £24.95 on Amazon hahaha.
Okay I finally get to implement this within the script:
} if(GetHasSkill(SKILL_STEALTH,GetFirstPC())) { CreateItemOnObject(STEALTH_UNIT,oLocker); }
Instead of:
} if (GetHasSkill(2, GetFirstPC())) { CreateItemOnObject(stringGLOB_35, object1, 1); }
But why doesn't the vanilla script for k_pend_area01.ncs actually use the include for k_inc_end.ncs?
I can't find it referenced in k_pend_area02.ncs either. Weird.
[WIP] Marius Fett's Bits and Bobs
in Work In Progress
Posted
He looks a lot more intimidating for sure! Should have a Vader vibe imo