sith-shenanigans

Modding alignment nValues in kotor 2

Recommended Posts

Hi! I’m trying to make it so dark side decisions give more dark side points than light side decisions give light side points, for immersion purposes. I’ve found a_givedark and a_dark(sml/med/high), but I can’t figure out where the actual nValues I need to edit are. Does anyone know where to find them?

Share this post


Link to post
Share on other sites

Those are defined in k_inc_utility.

//Alignment Adjustment Constants
int SW_CONSTANT_DARK_HIT_HIGH = -6;
int SW_CONSTANT_DARK_HIT_MEDIUM = -5;
int SW_CONSTANT_DARK_HIT_LOW = -4;
int SW_CONSTANT_LIGHT_HIT_LOW = -2;
int SW_CONSTANT_LIGHT_HIT_MEDIUM = -1;
int SW_CONSTANT_LIGHT_HIT_HIGH = 0;

Since it's an include file you'll need to recompile the scripts that use it, like a_darkhigh.

Share this post


Link to post
Share on other sites
On 2/8/2021 at 8:06 AM, TamerBill said:

Those are defined in k_inc_utility.


//Alignment Adjustment Constants
int SW_CONSTANT_DARK_HIT_HIGH = -6;
int SW_CONSTANT_DARK_HIT_MEDIUM = -5;
int SW_CONSTANT_DARK_HIT_LOW = -4;
int SW_CONSTANT_LIGHT_HIT_LOW = -2;
int SW_CONSTANT_LIGHT_HIT_MEDIUM = -1;
int SW_CONSTANT_LIGHT_HIT_HIGH = 0;

Since it's an include file you'll need to recompile the scripts that use it, like a_darkhigh.

Thank you! I ended up deciding that I could most easily accomplish what I wanted by editing the table that adjusts point gains based on current alignment category and telling it to always use category 2 when below “very light” (aka earning points like the pc is sort of light even while neutral and dark), and I can’t find a corresponding k_inc_utility.ncs. Am I good to just drop the nss into Override? Do I need to grab all the files that use the table and do something to them as well, or put them in Override also, or does changing the table instead of the constants(?) it uses mean it will just work?

(I’m afraid I’m not actually good at programming, I just check around in files and look things up online, and since ncs/nss is *only* used in these games this means I have a lot of very basic questions. 😅)

Edit: Never mind! Someone elsewhere was kind enough to explain what you meant; I think I know what I need to do now. Thank you for your help, though! 

Edited by sith-shenanigans

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.