OGSR / OGSR-Engine

OGSR Project - Evolution of X-Ray Engine for S.T.A.L.K.E.R.: Shadow of Chernobyl
https://discord.gg/Q6QDxbNcfR
Other
468 stars 87 forks source link

Micro stutters caused by stashes. #254

Closed AffectedOne closed 3 years ago

AffectedOne commented 3 years ago

Hello,

I was wondering, would it be possible to make stashes go online only when you search them? I think stashes work like that in Clear Sky, because i never noticed any stutters while playing it. No matter how much stuff i put in stash, it only lag the game when i open it. Maybe something like that can be ported or recreated on this version of engine? Thank you for your efforts, love your work on our beloved Shadow of Chernobyl.

exostalker commented 3 years ago

While fixing this from engine's perspective would be great, there's something like that done by ZRP recently: ZRP-Specific Mini-Mods section here: http://www.metacognix.com/files/stlkrsoc/index.html

It's an alternative all.spawn which edits each stash so that it stays online, slightly longer load times but the stashes don't need to load as you're moving in the level. I would suggest trying it out, heard it's a very smooth experience with it.

EDIT: some more info from old gsc forums from ZRP maker from earlier this year about this:

what I did was take the extracted all.spawn alife_l*.ltx files and search for all instances of "section_name = inventory_box". For each such object, I replaced this line: object_flags = 0xffffff3f with this one: object_flags = 0xffffff3b This just changed the last 'f' into a 'b'. New game required to use the updated all.spawn, but it works well enough to be a significant contribution to the smoothness of the game, as even with SSDs you will experience lag when objects switch online the first time, and treasure boxes switching online seem to always cause a hitch while running.

AffectedOne commented 3 years ago

Oh, thank you for pointing that to me. I'm little bit out of date when it comes to stalker mods, just recently started to catch up on whats new circling around. I'll definitely check it out. But, since ZRP is not so well known in russian speaking part of community, maybe author of this project will consider to implement something like that in engine.

Aciu dar karta, exo. :)

joye-ramone commented 3 years ago

Unfortunately there is no silver bullet how to fix this in engine for everybody. But, there are plenty of options how to fix it via scripts, like custom switch distance for stashes, custom script stashes aka magic backpack https://github.com/dsh2dsh/op2ogse/blob/master/gamedata/scripts/dsh/dsh_rukzak.script etc Engine should provide just possibility and that is what OGSR do right now