TK-664

Adding new properties

Recommended Posts

Excuse my novice logic: since the disguise property isn't referenced in k1 in nwscript.nss and seems to work by having an entry in itemprops.2da and itempropdef.2da, I thought I could do the same with max dex bonus (not defined in kotor 1) since in tsl it's not in nwscript.nss unlike all the other new properties. So I copied the new rows from tsl to k1 for those two 2da files, applied the new property to a test item but (of course) it had no effect. How does it even work in tsl? it doesnt have a subtyperesref and all I can make of it is that it references some cost table to apply values from random to 5.

Share this post


Link to post
Share on other sites

The simple answer is you can't. How item properties work is hardcoded, the most you can do with those 2das is tweak the numbers and change the names.

  • Like 1

Share this post


Link to post
Share on other sites
12 hours ago, TK-664 said:

I thought I could do the same with max dex bonus (not defined in kotor 1) since in tsl it's not in nwscript.nss unlike all the other new properties.

You can do just this, but it is not done via properties but rather you can create a new Baseitem 2da line with a modified max dexterity. So you would copy one of the vanilla armor lines thus "cloning" it and giving your clone a brand new max dexterity number.

 

  • Like 1

Share this post


Link to post
Share on other sites
10 hours ago, TamerBill said:

The simple answer is you can't. How item properties work is hardcoded, the most you can do with those 2das is tweak the numbers and change the names.

Good to know, I was planning on scripting in a bunch of those from TSL to add it as a sort of modder's resource. Not wasting any more time then.

18 minutes ago, N-DReW25 said:

You can do just this, but it is not done via properties but rather you can create a new Baseitem 2da line with a modified max dexterity. So you would copy one of the vanilla armor lines thus "cloning" it and giving your clone a brand new max dexterity number.

 

I thought about this first things first, but I believe the armor will lose restriction on force power usage.

Lastly, do any of you have any idea where the file that governs what StrRef is used for showing damage type in descriptions is located? I thought it was iprp_damagetype for the longest time but now that I've went ahead and messed with it, guess not. Changing the string directly in dialog.tlk works but that's not ideal at all.

Share this post


Link to post
Share on other sites
3 hours ago, TK-664 said:

Lastly, do any of you have any idea where the file that governs what StrRef is used for showing damage type in descriptions is located?

Pretty sure those strings are hardcoded, and editing dialog.tlk is your only option. iprp_damagetype.2da works for changing the description of bonus damage, but not base damage.

 

3 hours ago, TK-664 said:

but that's not ideal at all.

That, unfortunately, is KotOR modding in a nutshell. The game wasn't built to be moddable, it was just built on top of one that was.

Share this post


Link to post
Share on other sites

We do what we can right. I'll just hold off on that until modifying existing strrefs is doable, at least without a custom executable. Anyways glad that's cleared up, I was hoping these weren't hardcoded and that it was just me that didn't search well enough but c'est la vie.

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.