xrook Posted May 12, 2015 Posted May 12, 2015 ive been wanting to increase the amount of credits earned from containers (etc.) but no matter how many times i try increasing SWTR_GetQuantity(Random(999)+100); in k_inc_treasure & k_inc_treas_k2, the range of credits i still get inside containers is still around 30 to 300+ ive been using the refugee sector as a test area, and yes i have a save and a backup save before i actually entered the area so the loot wont be fixed this is my 20th try and now im desperate enough to ask in this forum and hope it isnt dead as for the reason why? because seeing an echani vibrosword in the first vendor on telos made me realize the cost gap between low quality and high quality items looting containers/bodies isnt enough to earn me enough credits even until i finished the game the only way to buy high quality items from vendors is to sell high quality items which is absolutely the most retarded decision in game design i gained this fear of not wasting money because of how expensive high quality items are and so ive been hoarding credits in my first playtrough in hopes to see a vendor with something i want... up until i hit the "point of no return" in the game and didnt even get to waste most of my money im currently on my 2nd playtrough and wish to correct this problem Quote
Fair Strides Posted May 12, 2015 Posted May 12, 2015 Well, as far as wanting to increase the credits gained from containers and what-not, you should only have to edit k_inc_treas_k2 and k_inc_treasure and re-compile a few scripts. Additionally, the k_inc_ scripts are not usable by themselves. You will need to re-compile the scripts that use them for them to have any effect in-game. In k_inc_treas_k2, the random loot is given a label composed of the item's template reference followed by "[]", without the quotes and a number substituted in. However, the way the Credits thing works is that the random loot thing uses the "g_i_credits015" and "g_i_credits014" templates, though the first one is more common. The first has a stack size (amount) of 1 and the other 5000. This is level-based, no doubt. Example code: // credits case 911: { nItemQuantity = Random(10*nItemLevel) + Random(50) + 20; sTemplate = "g_i_credits015"; break; } // And then later on down the line: return(sTemplate + SWTR_GetQuantity(nItemQuantity)); So, it all comes back to the SWTR_GetQuantity thing, and the initial amount is equal to 10 x the item level ( minus 1) + random number between 0 and 49 + 20. Here is the SWTR_GetQuantity thing in k_inc_treasure (the only thing you should have to edit in the file): string SWTR_GetQuantity(int iCount){ string str = IntToString(iCount); string pad = "0"; int length = 4; while(GetStringLength(str) { str = pad + str; } return("[" + str + "]");} ,,, So, what you could try doing is either edit the g_i_credits015.uti and making the stack size way higher, or you can try adding a number to the following line in SWTR_GetQuantity: string str = IntToString(iCount); I would add the following right after iCount (and before the ")" mark): + . After that, I'd save k_inc_treasure.nss to the KotOR 2 Override folder. Then, I'd compile k_inc_treas_k2.nss and save it to the Override folder. After that, I'd go through and compile the following scripts without editing them: k_plc_tresciv.nss k_plc_tresdrdlow.nss, k_plc_tresdrdmid.nss, and k_plc_tresdrdhig.nss k_plc_trescorlow.nss, k_plc_trescormid.nss, and k_plc_trescorhig.nss k_plc_tresmillow.nss, k_plc_tresmilmid.nss, and k_plc_tresmilhig.nss k_plc_tresrakat.nss k_plc_tresshalow.nss, k_plc_tresshamid.nss, and k_plc_tresshahig.nss Quote
TheDarkChocolateJedi Posted May 12, 2015 Posted May 12, 2015 Just use the infinite credits glitch with handmaidens robes if you would like me to explain just quote this comment Quote
xrook Posted May 13, 2015 Author Posted May 13, 2015 im starting to get a feeling that i might need to start a new game, is there some mod that gives me a test area? spawn npcs, containers etc.. Quote
TheDarkChocolateJedi Posted May 13, 2015 Posted May 13, 2015 No, here is an alternative, basicly how to perform the infinite money glitch is, after sparring with the handmaiden make sure you have clothes on then tell her to put on some clothes, then go into her inventory and take off her robe continue to tell her to put on clothes and repeat as many times as you want. Then sell all her robes for 2000 each and there, you are filthy rich Quote
Sith Holocron Posted May 13, 2015 Posted May 13, 2015 The OP wants to script it, not cheat it. If I understand correctly. Quote
Hassat Hunter Posted May 13, 2015 Posted May 13, 2015 This is the first time I see people actually wanting to buy something, or having a lack of money. Also TSLRCM fixes that exploit. As for scripts, don't modify the base, nor the original inc if you use TSLRCM!!! http://deadlystream.com/forum/files/file/325-tslrcm-loot-fix-base-scripts/ 1 Quote
xrook Posted May 13, 2015 Author Posted May 13, 2015 this is the fist time i saw this.... and i was finally gonna give up, do i start from scratch? and replace k_inc_treas_k2 in the override with this new one? also are the k_inc_drop & k_inc_treasure not used? EDIT: it worked... it actually worked, using the loot fix actually made my changes work thx 1 Quote
Hassat Hunter Posted May 15, 2015 Posted May 15, 2015 also are the k_inc_drop & k_inc_treasure not used?They are used in KOTOR1, in KOTOR2 they are just leftover files, probably from before they updated them to their own system. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.