ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Clear Sky Forum » Bugs & Tech support
sleeping bag disappears from inventory when selected

1 2 | Next 10 events »| All Messages
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  02:20:15  16 January 2015
profilee-mailreply Message URLTo the Top
peter tron
(Novice)
 
On forum: 04/29/2014
Messages: 8
sleeping bag disappears from inventory when selected

evening!

i'm using the Readme - SRP v1.0.3a mod.

as above, when i try to 'use it' in the inventory, it disappears.

i read somewhere on gsc that someone mentioned it might have something to do with gamedata/scripts/atmsleep.

i haven't got a clue.

i assume i should be able to use it, but can't.

can this be resolved?

baz
  08:21:51  16 January 2015
profilee-mailreply Message URLTo the Top
Steelyglint
Senior Resident
 

 
On forum: 06/06/2009
Messages: 5171
I've had it happen. All I can suggest is that you make a save before sleeping and, if it vanishes, reload and try again. It doesn't vanish every time, so it will probably work okay after a reload.

.
  12:05:49  16 January 2015
profilee-mailreply Message URLTo the Top
romulous
Senior Resident
 

 
On forum: 12/28/2007
Messages: 1868
Probably best to post this one in the SRP thread in the modding forum where Decane (SRP maintainer) can see it. He will undoubtedly remember all the reports of the sleeping bag vanishing Can't recall now if he ever got to the bottom of it (I vaguely recall the discussions on the possible causes and fixes though).

There was an old fix involving respawning the bag, not sure if it works with 1.03a or not (it probably does I suspect):


---QUOTATION---

Open gamedata\scripts\ui_main_menu.script in a text editor, remove everything and replace it with this http://pastebin.com/ucL8dtVc
Then load your game, go to the pause menu, and press F1. Should spawn a new sleeping bag in your inventory.

---END QUOTATION---

  23:13:28  16 January 2015
profilee-mailreply Message URLTo the Top
Decane
Senior Resident
 

 
On forum: 04/04/2007
 

Message edited by:
Decane
01/16/2015 23:41:08
Messages: 1690
I occasionally get someone reporting this problem. Are you experiencing any other strange symptoms in your game? If you want, you can try to diagnose the problem by doing this:

(1) Add this code to the very top of scripts\atmmain.script (backup the file first):
function dbgmsg(msg)
	local act = db.actor
	if act then
		act:give_game_news("Debug message:", msg, "ui_npc_small_ucheniy_1", 0, 10000, 1)
	end
end

(2) In the same file, add this line of code directly under the line that says 'ui_sleep_init = true;' in function on_item_drop(obj):
		dbgmsg("1")

(3) Still in the same file, replace the entire function update() with:
function update()
	atmsleep.update()
	if ui_sleep_init then
		dbgmsg("2")
		if sleepingbag_id and alife():object(sleepingbag_id)==nil then
			dbgmsg("3a")
			ui_sleep_init = false;
			sleepingbag_id = nil;
			local act = db.actor;
			alife():create("sleepingbag", act:position(),
			act:level_vertex_id(), act:game_vertex_id(), act:id());
			level.start_stop_menu(atmsleep.UISleep(), true);
			dbgmsg("3b")
		else
			ui_sleep_init = false;
			sleepingbag_id = nil;
			dbgmsg("4")
		end
	end
--	atmdebug.show_debuginfo();
end

After you've made these changes, save the file and load up an afflicted savegame. Does your PDA get spammed with debug messages when you use the sleeping bag? If so, what messages are displayed? If no messages appear at all, there is a file access issue somewhere.

EDIT: I think I know what's causing your problem: the else-branch of atmmain.update() should not exist. Why? Because if the update() function runs in a frame in which the used sleeping bag still exists, the else-statement will prevent a new one from ever being created. But please do as I instructed above for now and report back with your results. Then I'll give you some further instructions for resolving your issue.
  13:38:34  21 January 2015
profilee-mailreply Message URLTo the Top
peter tron
(Novice)
 
On forum: 04/29/2014
Messages: 8
thanks for replying decane.

just to check, this is what my atmmain.script file looked like after following those three steps:

function dbgmsg(msg)
local act = db.actor
if act then
act:give_game_news("Debug message:", msg, "ui_npc_small_ucheniy_1", 0, 10000, 1)
end
end
----------------------------------------------------
-- file : atmmain
-- copyright (c) 2009 Atempad (atem.pad@mail.ru)
-----------------------------------------------------

local ui_sleep_init = false;
local sleepingbag_id = nil;

----------------------------------------------------------------------------------
-- Func: Print in log file.
----------------------------------------------------------------------------------
function prnt(msg)
end

----------------------------------------------------------------------------------
-- Func: Callback on the load game.
----------------------------------------------------------------------------------
function on_game_load()
-- atmanoms.dynanoms():level_spawn();
-- atmmonster.sim_monsters():level_spawn();
-- atmdebug.fill_backpack();
-- atmdebug.get_level_graphs()
end

----------------------------------------------------------------------------------
-- Func: Callback on the game end.
----------------------------------------------------------------------------------
function on_actor_destroy()
end

----------------------------------------------------------------------------------
-- Func: Callback on the take of item.
----------------------------------------------------------------------------------
function on_item_take(obj)
end

----------------------------------------------------------------------------------
-- Func: Callback on the loss of item.
----------------------------------------------------------------------------------
function on_item_drop(obj)
if obj:section() == "sleepingbag" then
sleepingbag_id = obj:id();
ui_sleep_init = true;
dbgmsg("1"
end
-- atmdebug.abundance(obj);
end

----------------------------------------------------------------------------------
-- Func: Update of actor.
----------------------------------------------------------------------------------
function update()
atmsleep.update()
if ui_sleep_init then
dbgmsg("2"
if sleepingbag_id and alife() bject(sleepingbag_id)==nil then
dbgmsg("3a"
ui_sleep_init = false;
sleepingbag_id = nil;
local act = db.actor;
alife():create("sleepingbag", act osition(),
act:level_vertex_id(), act:game_vertex_id(), act:id());
level.start_stop_menu(atmsleep.UISleep(), true);
dbgmsg("3b"
else
ui_sleep_init = false;
sleepingbag_id = nil;
dbgmsg("4"
end
end
-- atmdebug.show_debuginfo();
end

----------------------------------------------------------------------------------
-- Func: Save a value in a storage.
----------------------------------------------------------------------------------
function save_val(varname, val)
xr_logic.pstor_store(db.actor, varname, val);
end

----------------------------------------------------------------------------------
-- Func: Load a value from a storage.
----------------------------------------------------------------------------------
function load_val(varname, defval)
xr_logic.pstor_retrieve(db.actor, varname, defval);
end

if all is correct, i loaded an afflicted save, but when checking the pda, i did not see any spam msgs.
  13:59:50  21 January 2015
profilee-mailreply Message URLTo the Top
Decane
Senior Resident
 

 
On forum: 04/04/2007
 

Message edited by:
Decane
01/22/2015 12:20:15
Messages: 1690
You can wrap pre-tags around code to make the forum software display it correctly.

The raw code you posted looks okay to me. With that code in place, immediately after you double-click the sleeping bag to use it, you should get some debug messages on your PDA. These should appear at the top of your PDA's message history list and also on your HUD, as PDA messages usually do. You say that no such messages appear. Can you e-mail me an afflicted savegame? I want to test it on my own PC to rule out the possibility that the problem is with the savegame itself.

Update: Okay, I tested the save file you sent me and I have no problems using the sleeping bag. So the savegame is fine, which means that the problem is with your computer, assuming that you don't have any conflicting mods installed alongside the SRP. Make sure that you have full privileges to the CS directory and all its subdirectories, and that you are running the game as an administrator. Also make sure that your C:\Users\[your_name]\AppData\Local\VirtualStore folder is empty of anything S.T.A.L.K.E.R.-related (you may need to replace 'C:' with something else depending on how your storage drive has been partitioned). Finally, make sure that none of the mod files are being blocked because they came from another computer.
  20:08:00  22 January 2015
profilee-mailreply Message URLTo the Top
peter tron
(Novice)
 
On forum: 04/29/2014
 

Message edited by:
peter tron
01/22/2015 20:08:35
Messages: 8
i'm just using the SRP v1.0.3a

i checked that i'm running it as admin, and i was.

you mentioned 'subfolders'. did you just mean the group of subfolders within the main cs directory, or all folders within those folders too?
i checked the cs directory and the main subfolders within that, and it show that i have full control.

the virtualstore folder is empty.

i downloaded the srp from this pc, so nothing should be blocked.
  21:34:13  22 January 2015
profilee-mailreply Message URLTo the Top
Decane
Senior Resident
 

 
On forum: 04/04/2007
Messages: 1690
What version of the game are you running? Steam? GOG? And what is your OS? If you're on Windows 8, try running the game in compatibility mode. Also, just to be sure, right-click on atmmain.script and in Properties --> General, make sure that Windows isn't blocking the file (assuming that you're running Windows) -- if the file is being blocked, then under this tab, there will be a button permitting you to unblock it. Another thing you can try is to temporarily disable UAC if you've got it enabled. For some reason, on your computer the game seems not to be executing the code it's supposed to be executing, which to me suggests a file read issue of some sort, though it could also be a corrupt game installation.
  23:53:22  22 January 2015
profilee-mailreply Message URLTo the Top
peter tron
(Novice)
 
On forum: 04/29/2014
Messages: 8
i'm using steam (i should have mentioned)

vista32

there is no button to unblock on the atmmain.script, so i assume it is ok.

i have had uac disabled for some time.

i would have uninstalled the mod and tried again, but i neglected to back up my gamedata folder before i installed the mod.
this will mean quite a lot of hassle working out what files should be deleted and what files should be left
  01:19:33  23 January 2015
profilee-mailreply Message URLTo the Top
Decane
Senior Resident
 

 
On forum: 04/04/2007
Messages: 1690

---QUOTATION---
i'm just using the SRP v1.0.3a
---END QUOTATION---



---QUOTATION---
i neglected to back up my gamedata folder before i installed the mod.
---END QUOTATION---


If there was anything worth backing up in there, then this is a conflicting pair of statements.
 
Each word should be at least 3 characters long.
Search:    
Search conditions:    - spaces as AND    - spaces as OR   
 
Forum Index » S.T.A.L.K.E.R.: Clear Sky Forum » Bugs & Tech support
 

All short dates are in Month-Day-Year format.


 

Copyright © 1995-2019 GSC Game World. All rights reserved.
This site is best viewed in Internet Explorer 4.xx and up and Javascript enabled. Webmaster.
Opera Software products are not supported.
If any problem concerning the site functioning under Opera Software appears apply
to Opera Software technical support service.