Sign in to follow this  
Arizael

Changing the duration of Force powers

Recommended Posts

​Hello folks, I find myself in dire need of experienced help. I am completely new to kotor modding, trying to achieve quite simple thing - or so i thought. It always annoyed me that various buff spells have incredibly slow duration, so my goal is to prolong their duration at the expense  of increased force cost.

 

​Increasing cost was easy enough via editing the table in spells.2da, but I am stuck trying to increase duration.

 

I believe I tracked where the duration is handled, in the k_inc_force.nss.  I ve extracted copy of the file into the override folder and changed the line 1877 into "float fDuration = Sp_CalcDuration( 45.0 )", thus hoping to prolong the effect Force Valor. Sadly the power is still stuck on 20 seconds and it seems that no other change in the file has any noticable effect on the game.

 

 

I am using various array of mods including High level force powers, which is why i am trying to do it myself, instead of using other possibly conflicting mod. The game is GoG version of the Sith Lords and I have used Kotor Tool and Notepad+ in my attempts. Anyone knows what I am doing wrong ?

Share this post


Link to post
Share on other sites

The problem here is that k_inc_force.nss is a so called "include script" as seen from the "inc" prefix. These scripts are not actually used themselves but when other scripts are compiled they include the functions from those scripts. So in order for your changes to have any effects you need to find the actual script that is responsible for your forcepower (I think that one is mentioned somewhere in spells.2da) and either get the uncompiled (.nss) version directly from KotOR Tool or decompile it with DeNCS, then put your modified k_inc_force.nss into your Override folder and recompile the force power script. Then place that compiled script in the Override and it should be working (assuming that your change to k_inc_force was the change required for what you want to achieve, which I don't know.)

Share this post


Link to post
Share on other sites

Hello, have you had any luck Arizael? I'm trying to do simmilar thing but got stuck just as you did.

Share this post


Link to post
Share on other sites

For anyone who stumbles on this thread(it is pretty high in google search results):

For me it was annoying having to recast everything, so I wanted to do the same thing.

This won't be an exhaustive tutorial, just the high-level steps.

  1. First, obviously you need the NWScript compiler.
  2. The code for the powers is in "k_inc_force.nss". Use kotortool to get it. Syntax is C-like, so you can use any C syntax highlighting you want.
  3. This is just an include file. The actual script called is listed in "spells.2da", impactscript column. This is what you will be compiling.
  4. After making all changes to code you want, put the base script, and all includes it calls in a folder and compile. The result should be a .ncs and .ndb files. You only need the .ncs file.
  5. Put the .ncs file in your Override.

These instructions are valid for for all games. Including Kotor 1/2 and even Neverwinter Nights (apart from any filename differences).

Misc note: Some force powers just apply poisons. Those are configurable in "poison.2da", not the script itself.

Misc note 2: If you want to preserve balance, you can adjust cost in "spells.2da" and damage appropriately.

Edited by martixy
  • Like 2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this