turbinejk
Members-
Content Count
15 -
Joined
-
Last visited
Community Reputation
1 NeutralAbout turbinejk
-
Rank
Jedi Apprentice
Recent Profile Visitors
4,503 profile views
-
There's not actually a way to directly create new feats, they're hard coded into the system. There are ways you can work around that for passive feats, but you can't script a dummy feat that runs directly on level up. At least, I don't know a way to do it. Though, that's not saying much.
-
KoTOR Scripting Tool is very useful, you can download it here: http://deadlystream.com/forum/files/file/191-kotor-scripting-tool/ There's also a bunch of resources online if you google NWScript, the language the game uses for scripting. The biggest problem I would see with your idea is how you attach it to leveling up. You could easily run something in the k_hen_heartbeat01 script and have it run once if it meets your conditions. Say you want to give Atton a lightsaber in his right hand when he gets the lightsaber proficiency ability, your script might look something like: Declare a global variable: integer nHasThisRunBefore==0; Then, in the k_hen_heartbeat01 script: void main () { if (GetHasFeat(FEAT_WEAPON_PROFICIENCY_LIGHTSABER, GetObjectByTag("Atton")) && (nHasThisRunBefore==0) && (GetFirstPC()==GetObjectByTag("Atton"))) { ActionGiveItem("g_w_lghtsbr[01-11].uti", GetObjectByTag("Atton")); ActionEquipItem("g_w_lghtsbr[01-11], INVENTORY_SLOT_RIGHTHAND); nHasThisRunBefore==1; } } You could then copy the script into the k_hen_heartbeat01 script, compile it, and put it into the override folder. Then when Atton becomes a Jedi and gets the lightsaber proficiency feat (and is the party leader), he would get a lightsaber of a color you specify [01-11] in his right hand inventory slot.
-
I'm trying to remake some feats from K2 and put them in K1. Right now I'm working through scripting the Close Combat tree of feats. My operative question is: how often does the k_hen_attacked01 script run? Does it run every time a single attacker attacks you (so, multiple times per round if you're being swarmed by enemies), or does it only run once each round? I currently have script drafted for the heartbeat script, but it might be more efficient (read: not need a looping statement) if I the k_hen_attacked01 script runs for each attacker of the party member. This isn't perfect, but my drafted heartbeat script to run the feat for a single character is: ////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Close Combat Lvl 4 // // This really probably belongs directly in this script once I figure out the logic. Actually, // maybe it belongs in OnAttacked? // // What should count as close range? 2 meters? Womp rats aren't much bigger than 2 meters. // ////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////// integer iParty0RH==0; integer iAttack0RH==0; integer iCCBonus0==0; integer iCCDetriment0==0; if (GetHasFeat(****, oParty0)==1) { iCCBonus0==2; iCCDetriment0==4; else if (GetHasFeat(***,oParty0)==1) { iCCBonus0==1; iCCDetriment0==2; } if (GetWeaponRanged(GetItemInSlot(oParty0, INVENTORY_SLOT_RIGHTHAND))==1) {iParty0RH==1} // Party Member 0 // if (GetHasFeat(****, oParty0) && (iParty0RH==1)) { do { if (GetWeaponRanged(GetItemInSlot(oAttack0, INVENTORY_SLOT_RIGHTHAND))==1) {iAttack0RH==1} if (iAttack0RH!=1) { ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectAttackDecrease(iCCDetriment0, ATTACK_BONUS_MISC, oAttack0, 6.0); if (GetAttackTarget(oParty0)==oAttack0) { ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectAttackIncrease(iCCBonus0, ATTACK_BONUS_ONHAND) oParty0, 6.0); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectAttackIncrease(iCCBonus0, ATTACK_BONUS_OFFHAND) oParty0, 6.0); } } } oAttack0==GetNextAttacker(oParty0); while (oAttack0!=(GetLastAttacker(oParty0))); }
-
Logic for a new feat script - Kotor 1
turbinejk replied to turbinejk's topic in General Kotor/TSL Modding
Nevermind, I figured this out. I coded a loop into the script. -
I'm working on a process for coding feats from Kotor 2 that aren't in Kotor 1 over to the original (Superior Lightsaber Specialization, Deflect, Superior Two Weapon Fighting, Close Combat, etc.), and I've been having trouble with a logic issue. Maybe I just don't know the right function to call, but I'm only an amateur scripter and have only recently picked up C/NWScript. I'm planning on incorporating most of the code in the heartbeat script, but am running into an issue with trying to work out the logic to mimic Close Combat as accurately as possible. As a preliminary matter, in order to script a conditional based on distance, I have to come up with a specific distance required to trigger the script. Does anyone know if there is a set distance that counts as melee distance vs. ranged distance that's used in other portions of the game? I was thinking two meters, because womp rats aren't much bigger than two meters. I'm open to suggestions. My bigger issue is with the attack bonus given to attackers when a character is wielding a ranged weapon. I think the game hard codes a +6 bonus automatically, so I need to do a negative attack bonus for each attacker based on which tier of the feat the character has. The only way I know how to do that for sure is to stack a load of if - then statements: if (GetHasFeat("CloseCombat", oPC), GetFirstAttacker(oPC)) && /*attacker distance check*/ { // Apply the negative attack bonus to counteract the hard-coded bonus } if (GetHasFeat("CloseCombat", oPC), GetNextAttacker(oPC)) && /*attacker distance check*/ { // Attack Bonus } // Repeat ad nauseum if (GetHasFeat("CloseCombat", oPC), GetLastAttacker(oPC)) && /*attacker distance check*/ { // Attack Bonus } Is there a more efficient way to do that? I'm thinking of situations like when you're on the Star Forge fighting a horde of enemies all at once, that's a lot of code for the game to read every six seconds. I could place the code in the OnAttacked script, but I'm still not sure that would be much more efficient during battles as the heartbeat script. Thoughts? Help? Thanks!
-
[KOTOR II] Force Cage problem
turbinejk replied to Ravao's topic in Knights of the Old Republic General
Last resort options: 1. You could try to boost your graphics power by getting a video card and plugging it into an external dock. They can link to your laptop via most standard ports. Downside: this is a decent investment. You'd need to buy a graphics card, a dock for it, and have something you can plug it into (a monitor, tv, etc). 2. Depending on your operating system, you could get a flash drive or SD card and plug it in to help boost your processing power with ReadyBoost (on Windows). It may help keep your frame rate up. -
I had a weird glitch where the skin for Atton's clothing was no longer being read once I got my gear back in from the TSF in Citadel Station. All it showed was Atton's head and then his body in all white, no skins or textures. I looked in the override and the files were still there, I re-extracted them from the mod folder and replaced the old ones in the override. It fixed the problem for now.
-
Thanks everyone!
-
Okay, I found the original texture (for some reason his stock texture file does not match the texture for model a in the appearance.2da file, which I find curious). This has given rise to a few more questions: 1. In Rece's armor modding tutorial, he says you have to change the Texture Variation number in the .uti file to match the variable included in the name of the texture file. Does that mean I have to re-name the texture file PMBN##.tga and to get it to register in-game? I understand that there's a link between texture file names and the Texture Variation, but I'm not sure I get how it works. 2. For upgrades, how do I get something without the stats of heavy armor to accept heavy armor upgrades? I reviewed the other variables in the .uti files, and the Upgrade Level variable doesn't seem to have any relationship to what kinds of upgrades it will accept. The 2da array in the attributes tab also didn't have upgrades entered in like it does for lightsaber crystals. I did notice the Body Variation variable was coded 0-4 to match clothing - heavy armor. Is that what determines upgrade compatibility? Thanks for your help!
-
This is my first time making new armor. I am trying to make new armor for Bao-Dur that looks like his stock appearance (so this question is probably going to sound stupid), but I can't find the texture pack for his base clothing appearance. The appearance.2da file lists the model texa/texb columns for Bao-Dur (row 451 on mine) as P_BaoDurBB. I have looked everywhere and can't find the file for the texture. I found some texture packs for B-D under the ERFS > Texture Packs > swpc_tex_tpa/b/c.erf, but none of them are the right file. I'd like to make the armor "invisible" without overwriting the appearance of every armor model for that base defense rating. I haven't found any files in the BIF tree or my override folder. Anyone have any tips about how to go about this? I already have the .uti file prepped, I just need to match a texture to it and make sure I didn't miss something. Thanks.
-
Issues with Kotor Tool and Windows 10?
turbinejk replied to turbinejk's topic in General Kotor/TSL Modding
Thanks everyone, compatibility mode worked! -
I recently returned to a modding project I'd started several months ago, and Kotor Tool isn't working on either my laptop or my desktop. I'm running the most recent update of Windows 10 (version 1607) on both systems. I've tried rebooting, uninstalling, and reinstalling in every possible arrangement I can think of. I always get this error: << System.InvalidOperationException: There is an error in XML document (0, 0), ---> System.Xml.XmlException: The root element is missing. at System.Xml.XmlTextReader.Read() at System.Xml.XmlReader.MoveToContent() at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1 .Read6_Options() --- End of inner exception stack trace --- at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle) at System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream) at kotor_tool.UserSettings.GetSettings() >> Is anyone else having this error? Does anyone have any guidance on how to fix this? Thanks!
-
New to modding and a little stumped
turbinejk replied to turbinejk's topic in General Kotor/TSL Modding
So, I did a complete delete/re-install after unsubscribing from TSLRCM and the Content Pack in the Steam workshop. Then I did manual installs of all my preferred mods (THAT took a while) and backed up my entire game folder to a flashdrive for safekeeping in case i totally screw something up. For a test run I extracted the 101per.git file and modified it to add a placeable, then I extracted all the .rim files for module editing, added the .dlg from the modules folder (somehow it's miraculously there now when I've never seen it there before), and voila! Custom placeable in the kolto tank area carrying the hak pad! Thanks for all the help! Now on to figure out scripting and texture editing for custom armor mods . . . -
turbinejk started following New to modding and a little stumped
-
New to modding and a little stumped
turbinejk replied to turbinejk's topic in General Kotor/TSL Modding
Thanks for the quick responses, everyone! I'll give this stuff a shot. -
Hi everyone, I'm just exploring customizing the game with my own mods, and I have some questions. I've been searching the internet for a few days trying to find the answers to no avail. I'm playing TSL on Steam and have two workshop mods, TSLRCM and the Content Pack - Feats and Powers. So far, all of my manual mod installs seem to be running completely stable. 1. I want to put a custom placeable in a module with specific inventory in it. I've figured out how to modify the .git file for that particular area to add the placeable (and used the whereami armband to find the float position) and I think I know how to put the inventory I want in it, but I'm stumped as to how I get the new .git file to take effect. I tried dropping it into the override and it didn't do anything. How do I get the modified .git file to take effect? 2. I used kotor tool to extract .rim and _s.rim contents to a directory and tried to modify a few files (.utp files to modify their contents), then I used the kotor tool ERF tool to compile it back into a .mod file, but the new mod file is a lot smaller than the stock mod file. After doing some digging, I figured out that the dialogues were missing from a straight ktool TSL .rim/_s.rim extract. How do I fix this? Do I just straight up import the dialog.bifs from the bifs tree into each new mod? What is missing from a mod file when I do a straight .rim and _s.rim extraction to a file, then use the ERF tool to rebuild a mod from all of those files? 3. It's possible that I may just be barking up entirely the wrong tree on how to do custom placeables/modify currently existing placeables. If I am, can anyone steer me in the right direction? 4. The Steam workshop loads all its files to the workshop\content\208580\ folder, but there are still game files located in \common\Knights of the Old Republic II\. Should I direct kotor tool to the original game directory, or the steam workshop TSLRCM directory? I tried directing it to the TSLRCM directory in the workshop folder, and it told me the chitin.key was missing and wouldn't let me access any files. Thanks team, the forums and materials on here have definitely enhanced my Kotor 2 experience!