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 ... 4 5 6 7 8 9 10 11 | Next 10 events »| All Messages
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  13:49:45  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 14:04:58
Messages: 1971

---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

then try adding it there like this item:section() ~= "bolt" and item:section() ~= "bread" and ...
---END QUOTATION---


yup it worked with the other you mentioned, they dont pick that up from floor or out of the body, good example the artifact, we dont want the ai grabing a quest items out of dead bodies, i think there is a few..
so, that part is closed and ready for adding in blanks.

ok the thing you mentioned above, in this post reply, i think ive tryed that also, but, yet again, il re try.
if it doesnt work, it doesnt matter, im happy with check corpse fix.
in fact i might remove the other fix, with squads, if it needs better than dual core, but like it is, it is weird the lag, the only glitch i cop, is at start, some ai dont spawn properly, explain that, its got nothing to do with it,lol a reload fixes it, but.

brb, im drunk as a skunk, lmao.

PS

will this work?

if sec == "amk_metka" or sec == "quest_items" then

or would the quest_item line be other?
  14:07:40  11 September 2009
profilee-mailreply Message URLTo the Top
smoq2
Forklift operator
(Resident)

 

 
On forum: 09/08/2008
Messages: 2433

---QUOTATION---


PS

will this work?

if sec == "amk_metka" or sec == "quest_items" then

or would the quest_item line be other?
---END QUOTATION---




sorry, but I don't think so.
  17:55:07  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---


PS

will this work?

if sec == "amk_metka" or sec == "quest_items" then

or would the quest_item line be other?


sorry, but I don't think so.
---END QUOTATION---



np, i thought so, i suppose i got to put in each one indervidaully.

so my last question is.
wich files or ltx can i find these type lines(there for corpses that are quests Ai that died of caurse.
like the other post help
exa

local corpse_checked = {
"mar_recover_item_1_corpse",
"mar_recover_item_3_stalker",
"mar_recover_item_4_corpse"
}

just wondering, make it easier for me.
and that would wrap it up on my part, then il post you guys the file, so you can add or whatever. np. but thats in morning, nite nite.
  05:34:28  12 September 2009
profilee-mailreply Message URLTo the Top
x_Spartan_x
Whos got the Kokoretsi?
(Resident)

 

 
On forum: 07/07/2009
Messages: 1971
these are my note, for new patch(my mod, not looting mod, you guys own that, and il credit you guys in notes, WD)
------------
O;Looting fixes include, important quest AI dont get searched. Various quest and
other now dont get looted(taken) wich are not found on dead AI, good example the
Compas artifact quest item, this will not be touched by looting. (Squads loot only
after reaching way points, AI dont loot on way paths.) plus various small fixes.
------------------


ok, the bit in brackets, will solve a few small probs but might cause probs for small end cpus(i still goto do final test on that also) plus it aint inportant now, that i can disable certain corpses and the AI wont touch quest items out of AI dead bodies, i belive this is enoufgh, and the whole thing will work fine.

now i can finish the rest of my ltx.

TY guys, and il credit your looting script.

  11:43:34  12 September 2009
profilee-mailreply Message URLTo the Top
x_Spartan_x
Whos got the Kokoretsi?
(Resident)

 

 
On forum: 07/07/2009
Messages: 1971
ok heres is my 1st line fixes, this will make AI not pick up from out of the corpse items\obj\things in sourounding.

in the below, they wont touch all the quest items, devises such as pdas and flash cards , and other minor quest items wich are not on corpses.
im going now to fill in the corpses lines,brb

heres the chages

function isValuable(obj)
local sec = obj:section()
if sec == "amk_metka" or sec == "mar_quest_wpn_pm_1" or sec == "mar_quest_wpn_ak74u_1" or sec == "mar_quest_novice_outfit_1" or sec == "esc_quest_akm47" or sec == "esc_quest_luky_detector" or sec == "gar_quest_wpn_wincheaster1300" or sec == "gar_quest_wpn_desert_eagle" or sec == "gar_quest_novice_outfit" or sec == "gar_quest_wpn_pm" or sec == "val_quest_scope_x8" or sec == "val_quest_guitar_serg" or sec == "agr_quest_wpn_spas12" or sec == "agr_quest_duty_abakan" or sec == "yan_quest_ammo_sleep" or sec == "red_quest_tank_minigun" or bgwith(sec,"esc_trader_" or bgwith(sec,"device_" or bgwith(sec,"dev_" or bgwith(sec,"af_" or bgwith(sec,"red_quest_" or bgwith(sec,"red_forest_" or bgwith(sec,"yan_quest_" or bgwith(sec,"agr_mechanic_" or bgwith(sec,"agr_map_" or bgwith(sec,"agr_pda_" or bgwith(sec,"agr_quest_" or bgwith(sec,"val_quest_" or bgwith(sec,"sect_gar_quest_" or bgwith(sec,"gar_quest_" or bgwith(sec,"esc_mechanic_" or bgwith(sec,"esc_quest_" or bgwith(sec,"mil_device_" or bgwith(sec,"mar_quest_" or bgwith(sec,"mil_quest_" 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



feel free to add it, and test it, it works 100 percent, also notice some are indervidual(sec= other is in group(bg "xxx" both work and tested.

and off corse do your own thing..
  11:52:39  12 September 2009
profilee-mailreply Message URLTo the Top
Decane
Senior Resident
 

 
On forum: 04/04/2007
 

Message edited by:
Decane
09/12/2009 11:55:34
Messages: 1690

function isValuable(obj)
	local sec = obj:section()
	if sec == "amk_metka"
	or sec == "mar_quest_wpn_pm_1"
	or sec == "mar_quest_wpn_ak74u_1" 
	or sec == "mar_quest_novice_outfit_1"
	or sec == "esc_quest_akm47"
	or sec == "esc_quest_luky_detector" 
	or sec == "gar_quest_wpn_wincheaster1300"
	or sec == "gar_quest_wpn_desert_eagle" 
	or sec == "gar_quest_novice_outfit"
	or sec == "gar_quest_wpn_pm"
	or sec == "val_quest_scope_x8" 
	or sec == "val_quest_guitar_serg"
	or sec == "agr_quest_wpn_spas12"
	or sec == "agr_quest_duty_abakan" 
	or sec == "yan_quest_ammo_sleep"
	or sec == "red_quest_tank_minigun"
	or bgwith(sec,"esc_trader_") 
	or bgwith(sec,"device_")
	or bgwith(sec,"dev_")
	or bgwith(sec,"af_")
	or bgwith(sec,"red_quest_") 
	or bgwith(sec,"red_forest_")
	or bgwith(sec,"yan_quest_")
	or bgwith(sec,"agr_mechanic_") 
	or bgwith(sec,"agr_map_")
	or bgwith(sec,"agr_pda_")
	or bgwith(sec,"agr_quest_") 
	or bgwith(sec,"val_quest_")
	or bgwith(sec,"sect_gar_quest_")
	or bgwith(sec,"gar_quest_") 
	or bgwith(sec,"esc_mechanic_")
	or bgwith(sec,"esc_quest_")
	or bgwith(sec,"mil_device_") 
	or bgwith(sec,"mar_quest_")
	or bgwith(sec,"mil_quest_") 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

Looks a bit nicer!
  04:29:39  13 September 2009
profilee-mailreply Message URLTo the Top
zoust
(Senior)
 
On forum: 10/19/2008
Messages: 57
i think the scripts are causing troubles in patrol path of npcs : i begin a new game two times and got this every time a few minutes after taking the renegade hq. npcs must be looting somewhere, so they are not on the good path ??

! ERROR: SV: can't find children [14971] of parent [312516608]
! [LUA][ERROR] ERROR: NPC with name sim_default_csky_027394 can't present in PatrolManager[mar_smart_terrain_10_7_to_mar_smart_terrain_10_5_patrol_1_walk]

FATAL ERROR

[error]Expression : fatal error
[error]Function : CScriptEngine::lua_error
[error]File : E:\priquel\sources\engine\xrServerEntities\script_engine.cpp
[error]Line : 180
[error]Description : <no expression>
[error]Arguments : LUA error: ....t.a.l.k.e.r. - clear sky\gamedata\scripts\_g.script:975: bad argument #2 to 'format' (string expected, got nil)
  04:35:27  13 September 2009
profilee-mailreply Message URLTo the Top
RoboMook
Senior Resident
 

 
On forum: 11/12/2008
Messages: 4387
Have you got any mods installed that might affect faction files? I think this can happen if there's too many squads at an ST (there's not enough jobs for them).
  10:37:11  13 September 2009
profilee-mailreply Message URLTo the Top
smoq2
Forklift operator
(Resident)

 

 
On forum: 09/08/2008
 

Message edited by:
smoq2
09/13/2009 10:56:21
Messages: 2433

---QUOTATION---
Have you got any mods installed that might affect faction files? I think this can happen if there's too many squads at an ST (there's not enough jobs for them).
---END QUOTATION---



Now I know what was causing the PatrolManager crash in TFW...

Oh and about my specs, I've got a Samsung r560 lappy, just google it for specs.
  14:45:01  13 September 2009
profilee-mailreply Message URLTo the Top
zoust
(Senior)
 
On forum: 10/19/2008
Messages: 57

---QUOTATION---
Have you got any mods installed that might affect faction files? I think this can happen if there's too many squads at an ST (there's not enough jobs for them).
---END QUOTATION---



damn you're absolutely right , i set the squad max members from 20 to 25, but was far to imagine this can cause that kind of bug. ok i'll revert and see if that works. thank you
 
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.