N-DReW25

No Random Merchant Loot [TSL]

Recommended Posts

In this mod, I'm trying to remove the annoying and easily exploitable random merchant loot generator. Basically I want the merchant loot to be the same EVERY single time you play the game like in K1. For my first test I have decompiled the a_stockstore_01.ncs script (Which I think is Dendis Dobo's) using DeNCS now one of the first problem I encountered is when I decompiled the script I got a_stockstore_01_compile_fails which doesn't look good but when I opened it in Kotor Tool it looked like a script so that might just be me panicking already.

 

So i'm asking how do you turn the random loot thing off in the script.

a_stockstore_01_compile_fails.zipFetching info...

Share this post


Link to post
Share on other sites

The reason a "_compile_fails" file was produced was because DeNCS does a "sanity" check after it decompiles a file by attempting to re-compile it. So your script did decompile (and you can right-click on the gibberish and click "View decompiled code" or something like that) and still work with it; 95% of the time this is true.

Share this post


Link to post
Share on other sites
  On 11/10/2016 at 4:41 AM, Revanator said:

You'd not only need to turn off the random loot, but create a full list of items for each merchant to carry.

You mean create a new utm file with more items for sale than yes i'm up for that but i'm asking how you turn off the random loot script so it doesn't spawn anything or doesn't work at all.

Share this post


Link to post
Share on other sites

As far as the random loot script stuff, it seems that for the three stores in 201TEL at least, they each have scripts that stock the store (like a_stockstore_01.ncs). These are what generate the random items in the store, so you'd essentially need to make empty versions of the scripts:

 

void main()

{

 

}

 

Done.

Share this post


Link to post
Share on other sites
  On 11/10/2016 at 7:34 AM, Fair Strides said:

As far as the random loot script stuff, it seems that for the three stores in 201TEL at least, they each have scripts that stock the store (like a_stockstore_01.ncs). These are what generate the random items in the store, so you'd essentially need to make empty versions of the scripts:

 

void main()

{

 

}

 

Done.

Well that worked, now all I need to do is figure out what I want each merchant to carry.

 

Also could that script work with the random loot system as a whole (And also can things like credits, stims and random medpacs still be random)

Share this post


Link to post
Share on other sites
  On 11/10/2016 at 12:06 PM, N-DReW25 said:

Well that worked, now all I need to do is figure out what I want each merchant to carry.

 

Also could that script work with the random loot system as a whole (And also can things like credits, stims and random medpacs still be random)

It's very different for the rest of the random loot system, since the rest of it is an entirely different system.

 

You'd need to do the following:

 

0. I recommend making a new blank Override folder to keep this organized for now.

1. Extract the following files from KotOR 2's scripts.bif:

 

  Reveal hidden contents

 

 

2. Open k_inc_treas_k2.nss and go to town deleting most of the items. Pretty much leave only what you want to be random, though I'm really leaving out the gory details.

 

3. Save k_inc_treas_k2.nss in the Override folder and try to compile it. You will never get a .nss out of this, but this can help weed out errors in the script.

 

4. Once you get no errors in the script, download this.

 

nwnnsscomp_batch.7zFetching info...

 

5. Extract the nwnnsscomp.exe and the compile.bat file to the Override folder.

 

6. Run the compile.bat file and it will automatically compile all the files, or attempt to.

 

In the end, you should have a lot of .ncs files. The .nss can go in a folder, and then you can use the .ncs files to go through and test the game.

Share this post


Link to post
Share on other sites
  On 11/10/2016 at 9:15 PM, VarsityPuppet said:

I'm curious about the reasoning behind doing away with random loot. What's the reasoning it's so bad?

Because the random loot makes the game feel bad in general. Do you think it's Logical to get an Ion Carbine as T3-M4 that gets transferred back to the Exile even though blasters weren't allowed on Peragus, Is it logical when you kill the Rodian guard at the exchange base on Citadel he drops Mandalorian Battle Armor, is it logical to get Exar Kuns Battle Suit on a Mandalorian corspe on Dxun then to get the exact same set again off a Vaklu Soldier. And then the Merchants are just exploitable so if you really want good gear just save the game before entering the module the merchant is in then when you check his loot and if its bad reload the save and repeat until your satisfied.

Share this post


Link to post
Share on other sites
  On 11/10/2016 at 10:14 PM, N-DReW25 said:

Because the random loot makes the game feel bad in general. Do you think it's Logical to get an Ion Carbine as T3-M4 that gets transferred back to the Exile even though blasters weren't allowed on Peragus, Is it logical when you kill the Rodian guard at the exchange base on Citadel he drops Mandalorian Battle Armor, is it logical to get Exar Kuns Battle Suit on a Mandalorian corspe on Dxun then to get the exact same set again off a Vaklu Soldier. And then the Merchants are just exploitable so if you really want good gear just save the game before entering the module the merchant is in then when you check his loot and if its bad reload the save and repeat until your satisfied.

That is a very good point, and something that's bothered me as well. As a programmer, maybe I am too in love with the beauty of the random loot system, but I think it could be made better to have the best of both worlds: randomness within reason and sensible drops.

Share this post


Link to post
Share on other sites
  On 11/10/2016 at 10:20 PM, VarsityPuppet said:

That is a very good point, and something that's bothered me as well. As a programmer, maybe I am too in love with the beauty of the random loot system, but I think it could be made better to have the best of both worlds: randomness within reason and sensible drops.

Well wouldn't that reduce random loot as a whole. Now things like named items should not be random and should be sold by merchants and NPC's shouldn't have random loot or at least random weapons and armor. Though for the placeables those can still keep the random loot system except on Peragus as I hate it when you get an Ion Rifle as T3 or another blaster or get some stupid item like an implant or an energy shield from a mining droid.

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.