[1.4.16] Mod stash chance and value?

mkari37
Scavenger
Posts: 11
Joined: 27 Nov 2016, 21:03

[1.4.16] Mod stash chance and value?

Postby mkari37 » 27 Nov 2016, 21:35

Hi! Is it possible to mod both the chance of a stash being non-empty, and the value of the stash? I've played around in coc_treasure_manager.script, with the sections

Code: Select all

for i=1, math.floor(caches_count/2) do
   create_random_stash(true,"stash")
end
and

Code: Select all

local max_weight = math.random(80,130)
but it doesn't seem to have had much effect - still loads of poor or empty stashes.

Also, in coc_treasure_manager.script, at the top it says
To debug the actual results, start a new game. Then while in the loadscreen menu ctrl+left-click on the new 'autosave'. You
will find the <filename>.lua in your savegame folder. Search the file for 'caches'
but there is no mention of the word 'cache' in the resulting .lua file.

Thanks!

User avatar
Alundaio
S.T.A.L.K.E.R.
Posts: 1368
Joined: 26 May 2012, 22:26

Re: [1.4.16] Mod stash chance and value?

Postby Alundaio » 28 Nov 2016, 00:19

What do you mean by empty stashes? Stashes should never be empty, unless you mean empty storage chests?

Code: Select all

for i=1, math.floor(caches_count/2) do
   create_random_stash(true,"stash")
end


This code creates a stash in one half of all the existing inventory boxes (storage chests) in the entire game. If you want all storage chests to be a stash then you just change the code to:

Code: Select all

for i=1, caches_count do


Increase max_weight will increase the amount of items in a stash. Value of an item is determined by it's cost and no real way to modify this without re-writing the stash system.
"I have a dream that one day this community will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident; that all mods are created equal."

mkari37
Scavenger
Posts: 11
Joined: 27 Nov 2016, 21:03

Re: [1.4.16] Mod stash chance and value?

Postby mkari37 » 28 Nov 2016, 04:03

Ah... I think my terminology might be wrong.

What I mean by 'stash' is the containers you find in tree stumps, or pipes, or rotten logs, or safes, or backpacks, or green or blue chests you find in bases. So, what I'm after is that every time I look in a stump or log or safe, or whatever, even if I haven't been given the coordinates, I find something (and something better than a mouldy loaf and a bandage). Currently about 80% of the time they're empty (when I haven't been given the coordinates. If I have the coordinates, there's always some goodies in there).

I made the changes you suggested, and started a new game, but I'm still finding empty containers.

I'm running Warfare as well, but I'm pretty certain that it doesn't touch containers. I'll check though.

mkari37
Scavenger
Posts: 11
Joined: 27 Nov 2016, 21:03

Re: [1.4.16] Mod stash chance and value?

Postby mkari37 » 01 Dec 2016, 14:26

Ah, whoops. I accidentally dropped a ; in there. Working fine now!


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests