Random Stashes minimod - by nandersen & EggChen

Discussions and Support on S.T.A.L.K.E.R. Mods

Random Stashes minimod - by nandersen & EggChen

Postby nandersen on 18 Oct 2008 12:42

Based on the discussion in the Modding Techniques section and EggChen's suggestions I decided to put this minimod on my STALKER page: http://zhat.dk/stalker/

This minimod is free for all use and abuse as long as you don't blame me if your PC blows up or something... and off course don't blame EggChen either ;)
User avatar
nandersen
Senior Resident
 
Posts: 212
Joined: 17 Sep 2008 17:24

Postby EggChen on 18 Oct 2008 12:56

Nice work nanderson, really no need to mention me, its the implementation that counts!! :thumbright:

I can say it works great, and is easily merged with most mods. I tweaked the stash drops a bit to fit my game, and of course if the mod had new weapons you could add those to drops as well.

It's easy to tailor it to your game/mod.
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Postby Matt_B on 19 Oct 2008 11:57

Good stuff, be interesting if a mod was designed around using this kind of randomness to make the player explore. It'd be perfect if you could set a very large number of potential locations for a stash to physically appear, like have 50 places but only 5 stash objects in the game.
Matt_B
New Member
 
Posts: 37
Joined: 02 Oct 2008 22:28

Postby EggChen on 19 Oct 2008 13:07

There are some unused stash locations in game, but adding more would take some hefty all.spawn editing...

I understand from the work on Priboi you have to spawn the box, backpack, toolbox, etc... then you spawn an invisible "hitbox" around it that is used for the stash, and gives you the "press f to search stash" text.

The box, backpack etc is purely visual.

----

Playing with this mod has made me play the game differently. I use an earlier version where the stash content is based on what level the dead NPC is on. So I often go back to levels like Garbage and Escape, because there is a chance an NPC I killed on a later level would have given some nice stash info.

In vanilla you know what is in a stash, and know its not worth the journey. With this you scavenge a bit more, sometimes its worth the trip, sometimes not.
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Postby MeanderingBeing on 21 Oct 2008 05:28

Hmmmm, this sounds awesome!
I am DLing now.
What do I have to do to add the new weapons in OL 2.2 to the random stashes?
LOOK! It says gullible on the ceiling!!!
User avatar
MeanderingBeing
Senior Resident
 
Posts: 631
Joined: 28 Sep 2008 07:03
Location: The Road.... AGAIN....

Postby nandersen on 21 Oct 2008 09:19

Check the readme ;) :P
User avatar
nandersen
Senior Resident
 
Posts: 212
Joined: 17 Sep 2008 17:24

Re: Random Stashes minimod - by nandersen & EggChen

Postby Grump642 on 27 Dec 2008 18:23

I decided to merge this with what I had. Main difference in treasure_manager was

function CTreasure:populate_stashes()
for k,v in pairs(self.treasure_info) do
if v.done == false and v.active == false then
self:stash_slitams(k)
end
end
end

function CTreasure:stash_slitams(k)
local v = self.treasure_info[k]
local obj = alife():story_object(v.target)
if obj ~= nil then
--'news_manager.send_treasure(v.name)

--' Ïîìåòèòü íà êàðòå
--'local text = "%c[255,238,155,23]"..game.translate_string(v.name).."\\n".."%c[default]"..game.translate_string(v.description)
--'level.map_add_object_spot_ser(obj.id, "treasure", text)

--' Ñãåíåðèòü âåùè
for kk,vv in pairs(v.items) do
if ammo_section[vv.section] == true then
se_respawn.create_ammo(vv.section,
obj.position,
obj.m_level_vertex_id,
obj.m_game_vertex_id,
obj.id,
vv.prob)
else
for i=1,vv.prob do
alife():create(vv.section,
obj.position,
obj.m_level_vertex_id,
obj.m_game_vertex_id,
obj.id)
end
end
end

--' Ïîìåòèì òàéíèê êàê âûäàííûé
--'self.treasure_info[k].active = true
--'self.treasure_info[k].done = true
else
printf("TREASURE %s, target doesnt exist", k)
end
end
This was at the end of the file that I was using. Believe it was supposed to stop empty stashes bug. Will this script, added to yours, harm yours. No crashes when added, but otherwise?
User avatar
Grump642
Senior Resident
 
Posts: 501
Joined: 20 Dec 2008 05:07
Location: Mississippi, USA

Re: Random Stashes minimod - by nandersen & EggChen

Postby nandersen on 27 Dec 2008 23:01

The treasure_manager.script that I'm using already contains a workaround for empty stashes (taken from fatrap's 1.0005BFX).

If you want to manually merge into your own treasure_manager just take the code that starts with "-- random stash begin" and ends with "--random stash end".
"They shoot and I run and I spill my drink - all over my uniform..."
My files for S.T.A.L.K.E.R.: http://zhat.dk/stalker/
User avatar
nandersen
Senior Resident
 
Posts: 212
Joined: 17 Sep 2008 17:24

Re: Random Stashes minimod - by nandersen & EggChen

Postby ket on 30 Dec 2008 20:15

Is that to fix the empty stashes? I'm lazy and don't feel like merging a whole mod... so a fix for the empty stashes will do :p
Mobo: MSI X570 Tomahawk
CPU: R7 3700X @ 4.4GHz 1.3v
RAM: 2x16GB Klevv BoltX 3600MHz 16-20-20-35
GPU: Powercolor 6800XT Red Devil
Sound: Asus Xonar DX 7.1 PCI-E, Realtek ALC1200
HDD: 250GB & 500GB nVME 3.0 M.2 drives, 2TB Seagate Barracuda, Sata3 64MB Cache, 250GB Hynix SL301
Opticals: DVD-RW, Blu-Ray
PSU: eVGA 1000w G2 Supernova
Case: NZXT Phantom 530

STALKER: Singularity (SIN) homepage
User avatar
ket
Senior Resident
 
Posts: 1262
Joined: 14 Sep 2008 11:57
Location: The solar system

Re: Random Stashes minimod - by nandersen & EggChen

Postby NatVac on 30 Dec 2008 20:48

No, that posted code has nothing to do with fixing empty stashes -- it is used to pre-populate all stashes without marking them as "used". I guess that means you can still get the secret for them.

It might seem like no stash is empty when you get the secret for a nearby stash because it already has something in it. Empty stashes are caused by searching bodies within switch_distance (plus a little offset) of the secret location -- they are not considered "real" enough by the game to preserve their contents on save/load.

And nandersen & EggChen's Random Stash minimod doesn't directly have anything to do with empty stashes, but it is apparently based on files from fatrap's 1.0005 BFX, which already has bardak's loss_workaround fix for the empty stashes.

The loss_workaround stuff is what prevents the empty stashes in the normal game. Search for all instances of that in either of bardak's bfa (bug fix attempt) patches if you want the fix and don't have fatrap's 1.0005 BFX.
NatVac
Resident
 
Posts: 152
Joined: 16 Sep 2008 00:13
Location: Texas

Re: Random Stashes minimod - by nandersen & EggChen

Postby Grump642 on 02 Jan 2009 19:19

Yeah, that "fix" did have that side effect. Old stuff I got awhile back and never did anything about. ;) Extra stuff never hurt. Now I'm shamed into doing something about it.
PS. Fixed-Jeeze, Can't a guy even cheat a little??
User avatar
Grump642
Senior Resident
 
Posts: 501
Joined: 20 Dec 2008 05:07
Location: Mississippi, USA

Re: Random Stashes minimod - by nandersen & EggChen

Postby nandersen on 03 Jan 2009 12:04

Grump642 wrote:Can't a guy even cheat a little??

No, you have to cheat A LOT ;)
"They shoot and I run and I spill my drink - all over my uniform..."
My files for S.T.A.L.K.E.R.: http://zhat.dk/stalker/
User avatar
nandersen
Senior Resident
 
Posts: 212
Joined: 17 Sep 2008 17:24

Re: Random Stashes minimod - by nandersen & EggChen

Postby NatVac on 03 Jan 2009 19:28

Heh, I don't even think of it as cheating. The goal is to improve the fun factor of the single-player game, and the game's programmability makes it a lot easier to do this. The Random Stashes minimod can help keep the game interesting for those of us who play it over and over, but it was still not fun for me to know there were lots of secrets I never saw in the vanilla game.

P.S. I think that Captain Kirk's "cheat" in the Kobayashi Maru scenario is a perfectly valid solution. It doesn't show Kirk's reaction to the no-win situation to the Academy's teachers in the way they desired, but it revealed an aspect of Kirk's character that might even be more important.
NatVac
Resident
 
Posts: 152
Joined: 16 Sep 2008 00:13
Location: Texas

Re: Random Stashes minimod - by nandersen & EggChen

Postby EggChen on 29 Jan 2009 22:38

Hey nanderson, a post by Natvac on the ZRP thread :

Instead, you want the old behavior of getting the same secret over and over. Wow, this was fixed in patch 1.0004, not the 1.0004 bfa and not the ZRP.

To bring back that old bug, in the same treasure_manager.script file, in the function CTreasure:save(p), replace "p:w_bool(v.done)" with "p:w_bool(false)" and save. This way, you can get the same secret again but not during the same game session.


I've updated my game for if I ever get to play it again, but thought you may wish to tweak the minimod? Seems to me that as the stashes are random, we could get the same location again and again ;)
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Re: Random Stashes minimod - by nandersen & EggChen

Postby nandersen on 30 Jan 2009 19:36

EggChen wrote:I've updated my game for if I ever get to play it again, but thought you may wish to tweak the minimod? Seems to me that as the stashes are random, we could get the same location again and again ;)

Are you suggesting that I enable that old bug on purpose? ;)
"They shoot and I run and I spill my drink - all over my uniform..."
My files for S.T.A.L.K.E.R.: http://zhat.dk/stalker/
User avatar
nandersen
Senior Resident
 
Posts: 212
Joined: 17 Sep 2008 17:24

Re: Random Stashes minimod - by nandersen & EggChen

Postby DARK TEMPLAR on 30 Jan 2009 20:47

So this does not require a new game as I understand .
And does this conflict with the treasure manager.

Sorry for being ignorent but I kinda have a lack of inf on this one
User avatar
DARK TEMPLAR
Senior Resident
 
Posts: 1151
Joined: 16 Sep 2008 07:26
Location: Drifting in an endless haze

Re: Random Stashes minimod - by nandersen & EggChen

Postby EggChen on 30 Jan 2009 20:51

Possibly.... :-"

Would fit in with the mod. I added some unique items to the random stashes, and its quite possible you'll never find a particular something, but if you go killing again there is always another chance!!

I also (used) to do very long periods in the zone, and after a few weeks, never finding stash info became a bit dull.
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Re: Random Stashes minimod - by nandersen & EggChen

Postby nandersen on 30 Jan 2009 21:03

DARK TEMPLAR wrote:So this does not require a new game as I understand .
And does this conflict with the treasure manager.

It doesn't require a new game :)

It's hard to say if it conflicts, depends what your treasure_manager.script has in it. There are comments around the random stash code to help find it and merge it into other versions of treasure_manager.script.

DARK TEMPLAR wrote:Sorry for being ignorent but I kinda have a lack of inf on this one

No problem at all :)

EggChen wrote:Would fit in with the mod. I added some unique items to the random stashes, and its quite possible you'll never find a particular something, but if you go killing again there is always another chance!!

I understand what you mean... however, I enjoy not knowing what a new game will bring. If you can keep getting stashes over and over it is more probable that you find most (if not all) of the configured treasures after a while in every game.
"They shoot and I run and I spill my drink - all over my uniform..."
My files for S.T.A.L.K.E.R.: http://zhat.dk/stalker/
User avatar
nandersen
Senior Resident
 
Posts: 212
Joined: 17 Sep 2008 17:24


Return to Mods & Discussions

Who is online

Users browsing this forum: No registered users and 18 guests

cron