ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Clear Sky Forum » Mod discussion
NPC Looting Script fix

« Previous 10 events | 1 ... 3 4 5 6 7 8 9 10 11 | Next 10 events »| All Messages
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  05:24:28  11 September 2009
profilee-mailreply Message URLTo the Top
x_Spartan_x
Whos got the Kokoretsi?
(Resident)

 

 
On forum: 07/07/2009
Messages: 1971

---QUOTATION---
Hmmm, something very weird happening here...

I still get horrible stuttering with that new script, but the original one works fine.

I even tried on static lighting mode with all the details turned down, still stutters, and when you walk anywhere the grass details take about 3 seconds to fill-in fully.

It almost reminds me of the issues I had trying to get Deus Ex to run on a dual-core CPU.

Has anybody else noticed this stuttering effect with the new script?
---END QUOTATION---



im on it now, just woke up, got the coffee ready, and il be back
  07:18:15  11 September 2009
profilee-mailreply Message URLTo the Top
x_Spartan_x
Whos got the Kokoretsi?
(Resident)

 

 
On forum: 07/07/2009
Messages: 1971
ok, it works a treat WD

i even pumped up my vid setting to full blast to see, it even works better than the laggy one, apart from lag, it now does what it should.
ive tested it on its own, and with my mod(fully updated).
so im extreamly happy, solves hell'ov'a'lot for me.

well done all.

ok, next thing is simple.

would this work.

local disabled_objects = {}
or
st.disabled_objects = {}

wich one do i put in certain obj\items\weopns
and if so.
how would i write the line in between brackets. ive posted somewhere a example previous posts.

also 1 more thing, we disable certain AI from doing what not, but in this line..
local corpse_checked = {}

can we add certain charactors that hold quest items, and if so.
is that how, and how would we write the line.

for me, i think those last questions would finalize the looting script for me.

until further tests.

any help on this???
or questions??

  11:03:56  11 September 2009
profilee-mailreply Message URLTo the Top
RoboMook
Senior Resident
 

 
On forum: 11/12/2008
Messages: 4387
^^ This script still hates me and I don't know why

Tried it on a new game with no mods in static lighting mode, and it runs fine up until a few bodies hit the ground, then it's just unplayable lag & stuttering.

Definately not a perfomance issue as such, my comp is pretty low-end (2.2ghz dual-core amd, 9500gt, 2gig ram) but it runs perfectly smoothly on dx9 enhanced, and the original version of the script works fine, so there's definately a very specific problem I'm having - I just can't work out what it is
  11:44:29  11 September 2009
profilee-mailreply Message URLTo the Top
Decane
Senior Resident
 

 
On forum: 04/04/2007
Messages: 1690

---QUOTATION---
local corpse_checked = {}
any help on this???
---END QUOTATION---


In function checkCorpse(obj), it looks like if there is an object id inside the corpse_checked table, then the function will cause NPCs to ignore that corpse by returning corpse already checked to the script:
		if corpse_checked[obj:id()] ~= nil then
			return corpse_checked[obj:id()]
		end

... Or at least that's how I'm interpreting the function. Thus, it should be possible to make certain corpses ignorable, by adding the quest corpse ids into the table:
local corpse_checked = 	{
				"mar_recover_item_1_corpse",
				"mar_recover_item_3_stalker",
				"mar_recover_item_4_corpse"
			}

However, I'm more interested in the local disabled_objects = {} table, because I think it might be possible to add quest objects in there, and thus to circumvent issues where the quest corpse is allocated randomly (for instance, in the Military Warehouses Fetch Item quest "mil_additional_quest_3").
  11:57:14  11 September 2009
profilee-mailreply Message URLTo the Top
Decane
Senior Resident
 

 
On forum: 04/04/2007
Messages: 1690

---QUOTATION---
Definately not a perfomance issue as such, my comp is pretty low-end (2.2ghz dual-core amd, 9500gt, 2gig ram) but it runs perfectly smoothly on dx9 enhanced
---END QUOTATION---


x_Spartan_x & smoq2, could you both please post your PC specs so that we can do a little comparison? I'm not convinced that this is a hardware performance issue on your end, RoboMook, but it would still be worthwhile to see if there are noticeable difference in our configs which could be attributed for causing performance deviations. My specs: Q6600, HD4870, 4GB RAM.

BTW: Have you tried disabling a core, and then re-enabling it? I don't think this will solve the problem, but it could be worth a shot. Also, have you tried monitoring your RAM usage? I'm not sure how this script would affect it, but if your RAM is being filled up more quickly then you might be experiencing trashing, i.e. lag caused by swapping between virtual memory and physical memory. Then again, static lighting should dramatically reduce the amount of memory used, so I don't think this is it either.
  12:04:15  11 September 2009
profilee-mailreply Message URLTo the Top
x_Spartan_x
Whos got the Kokoretsi?
(Resident)

 

 
On forum: 07/07/2009
Messages: 1971

---QUOTATION---
local corpse_checked = {}
any help on this???
In function checkCorpse(obj), it looks like if there is an object id inside the corpse_checked table, then the function will cause NPCs to ignore that corpse by returning corpse already checked to the script:
		if corpse_checked[obj:id()] ~= nil then
			return corpse_checked[obj:id()]
		end

... Or at least that's how I'm interpreting the function. Thus, it should be possible to make certain corpses ignorable, by adding the quest corpse ids into the table:
local corpse_checked = 	{
				"mar_recover_item_1_corpse",
				"mar_recover_item_3_stalker",
				"mar_recover_item_4_corpse"
			}

However, I'm more interested in the local disabled_objects = {} table, because I think it might be possible to add quest objects in there, and thus to circumvent issues where the quest corpse is allocated randomly (for instance, in the Military Warehouses Fetch Item quest "mil_additional_quest_3").
---END QUOTATION---



so i should not use
st.disabled_objects = {}

but add my changes in
local disabled_objects = {}

as for the corpse diable, il give it a shot.

my specs are
win xp 64
2gig ram
radeon hd4800 series
intel core 2 duo

but i doubt its a vid thing, case i pumped it up, np.
  12:10:02  11 September 2009
profilee-mailreply Message URLTo the Top
smoq2
Forklift operator
(Resident)

 

 
On forum: 09/08/2008
 

Message edited by:
smoq2
09/11/2009 12:16:05
Messages: 2433

---QUOTATION---
ok, it works a treat WD

i even pumped up my vid setting to full blast to see, it even works better than the laggy one, apart from lag, it now does what it should.
ive tested it on its own, and with my mod(fully updated).
so im extreamly happy, solves hell'ov'a'lot for me.

well done all.

ok, next thing is simple.

would this work.

local disabled_objects = {}
or
st.disabled_objects = {}

wich one do i put in certain obj\items\weopns
and if so.
how would i write the line in between brackets. ive posted somewhere a example previous posts.

also 1 more thing, we disable certain AI from doing what not, but in this line..
local corpse_checked = {}

can we add certain charactors that hold quest items, and if so.
is that how, and how would we write the line.

for me, i think those last questions would finalize the looting script for me.

until further tests.

any help on this???
or questions??


---END QUOTATION---



Actually adding objects to disabled_objects won't help as it is a table with dynamic values. I think that "potential" object to pick up is assigned to object variable in all __init functions with lines self.st = st. I believe that the path could be broken here.


or...


maybe adding items to


function isValuable(obj)
	local sec = obj:section()
	if sec == "amk_metka" [or sec == "kolbasa" or sec == "bread"] then
		return false,false
	end
	if valuable_clsid[obj:clsid()] then
		return true, false
	end
	return bgwith(sec,"ammo_") or bgwith(sec,"wpn_") or bgwith(sec,"energy_") or checkCorpse(obj), IsStalker(obj) or IsMonster(obj)
end



I've added an example in [...]

But I'm afraid that only works on objects on the ground. I think that in case of corpses the corpse inventory is just stripped clean with one command.
  12:17:11  11 September 2009
profilee-mailreply Message URLTo the Top
x_Spartan_x
Whos got the Kokoretsi?
(Resident)

 

 
On forum: 07/07/2009
 

Message edited by:
x_Spartan_x
09/11/2009 12:22:15
Messages: 1971
ive tryed tthis at start, when i 1st looked at the script, it dint work...but.

il go re try it, because i think i wrote the line a bit difrent, il be back in 30min, also want to recheck the lag issue for RoboMook

brb


opps forgot, dindt notice the last line you wrote,

il see if it works on items on ground.

so then, if the corpse line work, then i dont really need the specific item check, but the ground looting is usefull.

PS;
would the body searching looting, specific be in this line, note, bolt is not ground item...

function checkCorpse(obj)
if (IsStalker(obj) or IsMonster(obj)) and obj:alive() == false then
if corpse_checked[obj:id()] ~= nil then
return corpse_checked[obj:id()]
end
local cnt = 0
obj:iterate_inventory(function (dummy, item) if item:section() ~= "bolt" then cnt = cnt + 1 end end, nil)
corpse_checked[obj:id()] = cnt > 0
return corpse_checked[obj:id()]
end
return false
end

???

brb
  13:06:41  11 September 2009
profilee-mailreply Message URLTo the Top
smoq2
Forklift operator
(Resident)

 

 
On forum: 09/08/2008
Messages: 2433

---QUOTATION---
ive tryed tthis at start, when i 1st looked at the script, it dint work...but.

il go re try it, because i think i wrote the line a bit difrent, il be back in 30min, also want to recheck the lag issue for RoboMook

brb


opps forgot, dindt notice the last line you wrote,

il see if it works on items on ground.

so then, if the corpse line work, then i dont really need the specific item check, but the ground looting is usefull.

PS;
would the body searching looting, specific be in this line, note, bolt is not ground item...

function checkCorpse(obj)
if (IsStalker(obj) or IsMonster(obj)) and obj:alive() == false then
if corpse_checked[obj:id()] ~= nil then
return corpse_checked[obj:id()]
end
local cnt = 0
obj:iterate_inventory(function (dummy, item) if item:section() ~= "bolt" then cnt = cnt + 1 end end, nil)
corpse_checked[obj:id()] = cnt > 0
return corpse_checked[obj:id()]
end
return false
end

???

brb
---END QUOTATION---



then try adding it there like this item:section() ~= "bolt" and item:section() ~= "bread" and ...
  13:39:32  11 September 2009
profilee-mailreply Message URLTo the Top
RoboMook
Senior Resident
 

 
On forum: 11/12/2008
Messages: 4387

---QUOTATION---
BTW: Have you tried disabling a core, and then re-enabling it? I don't think this will solve the problem, but it could be worth a shot. Also, have you tried monitoring your RAM usage? I'm not sure how this script would affect it, but if your RAM is being filled up more quickly then you might be experiencing trashing, i.e. lag caused by swapping between virtual memory and physical memory. Then again, static lighting should dramatically reduce the amount of memory used, so I don't think this is it either.
---END QUOTATION---



I did try that actually, also tried running on only one core, didn't help. Ram is fine, was still getting the lag with about 700mb free.

I do suspect the CPU is the problem here, there may be some kind of sync issue between cores, I heard somewhere that Stalker uses one core for main gameplay stuff and the other for managing graphics stuff (hence it tends to use one core more than the other), so that's the only thing I can think of to blame at the moment. I did try removing the unecessary AMD dual-core optimizer I had installed, didn't help.

Still, seems weird that such a small part of a script could cause this behaviour, I'm rather perplexed
 
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 » Mod discussion
 

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.