ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Trouble merging artifact detectors with health overhaul

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  15:09:06  5 February 2013
profilee-mailreply Message URLTo the Top
exostalker
Novice fashion designer since 2008
(Resident)

 

 
On forum: 08/10/2009
 

Message edited by:
exostalker
02/05/2013 16:40:44
Messages: 1267
Trouble merging artifact detectors with health overhaul

Health overhaul works perfectly with other mods merged, it works fine by itself on vanilla, but whenever I merge in this mod, it doesn't work anymore.
Artifact detectors themselves work perfectly, but if they do, medkits don't heal slowly anymore.

EDIT :

Managed to find the thing that is causing it:

function Drop(obj)
if obj:section() ~= "separator" then
--stop_update = false
end
end

commenting it out works, but I'm not sure if it's going to cause any bugs in the future... mod seems to work fine, as well as medkits.

This function is initalized in bind stalker function actor_binder n_item_drop
so I wonder if it's going to change something when dropping detectors/artifacts... I tried dropping everything, didn't experience any bugs...

So far it works...
  21:26:05  5 February 2013
profilee-mailreply Message URLTo the Top
Daemonion
All About Audio
(Resident)

 

 
On forum: 09/27/2011
 

Message edited by:
Daemonion
02/05/2013 21:28:20
Messages: 567

---QUOTATION---
Trouble merging artifact detectors with health overhaul

Health overhaul works perfectly with other mods merged, it works fine by itself on vanilla, but whenever I merge in this mod, it doesn't work anymore.
Artifact detectors themselves work perfectly, but if they do, medkits don't heal slowly anymore.

EDIT :

Managed to find the thing that is causing it:

function Drop(obj)
if obj:section() ~= "separator" then
--stop_update = false
end
end

commenting it out works, but I'm not sure if it's going to cause any bugs in the future... mod seems to work fine, as well as medkits.

This function is initalized in bind stalker function actor_binder n_item_drop
so I wonder if it's going to change something when dropping detectors/artifacts... I tried dropping everything, didn't experience any bugs...

So far it works...
---END QUOTATION---


Yea, I have no idea what this means:
if obj:section() ~= "separator" then

But your bind_stalker looked like this?

function actor_binder:on_item_drop (obj)
	level_tasks.proceed(self.object)
	if obj:section() ~= "separator" then
		stop_update = false
	end
end


Also, what artifact detector mod are you using?
  22:58:26  5 February 2013
profilee-mailreply Message URLTo the Top
exostalker
Novice fashion designer since 2008
(Resident)

 

 
On forum: 08/10/2009
 

Message edited by:
exostalker
02/05/2013 23:02:25
Messages: 1267
yeah before I wrote a lot from scripts of the mods, because I didn't know what was causing it, edited it when I found out what was causing it


the mod is artifact detectors 1.0 by Singapur22 and others from stalker portal

my bind_stalker looked like this

function actor_binder n_item_drop (obj)
_Sin_Linking.Sin_On_item_drop (obj)
if obj:clsid() ~= clsid.wpn_ammo then
level_tasks.proceed(self.object)
end

abc_medkit.chk_medlot_object(obj)

etc. etc. ZRP stuff

end





_Sin_Linking.Sin_On_item_drop (obj) of course links back to
function Drop(obj)
if obj:section() ~= "separator" then
stop_update = false
end
end



HERE IS THE REST OF THE CODE WHICH INVOLVES SEPARATOR :

bind_belt.script:

local separator = nil --//ïåðåìåííàÿ äëÿ ñîõðàíåíèÿ userdata ðàçäåëèòåëÿ
local del_separator = false --//êëþ÷ü óäàëåíèÿ ðàçäåëèòåëÿ
local start_add_belt = false --//êëþ÷ü íà÷àëà çàïîëíåíèÿ òàáëèöû db.belt
local stop_update = false
local start_function = true

--îñíîâíàÿ ôóíêöèÿ èòåðàöèè èíâåíòàðÿ
--(ïðèâÿçàíà ê ôóíêöèè update() â ôàéëå bind_stalker.script)
function IterateInventory()
if stop_update == true then return end

--//óäàëåíèå âñåõ ñëó÷àéíî-ñîõðàí¸ííûõ ðàçäåëèòåëåé (ïðîèçâîäèòñÿ ïðè çàãðóçêå/ïåðåçàãðóçêå ñêðèïòà)
if start_function then
db.actor:inventory_for_each(function(item)
if item:section() == "separator" then
alife():release(item, true)
end
end)
separator = nil
del_separator = false
start_function = false
end

--//óäàëåíèå ðàçäåëèòåëÿ (òðåòèé öèêë)
if del_separator and separator then
this.DeleteSeparator()
stop_update = true
hud_detector.initialise_det()
return
end

--//èòåðàöèÿ èíâåíòàðÿ (âòîðîé öèêë)
if separator then
db.belt = {}
db.actor:inventory_for_each(ScanInventory)
del_separator = true
start_add_belt = false
else
--//ñïàâí ðàçäåëèòåëÿ (ïåðâûé öèêë)
separator = alife():create("separator", db.actor osition(), db.actor:level_vertex_id(), db.actor:game_vertex_id(), db.actor:id())
end
end

--ôóíêöèÿ óäàëåíèÿ ðàçäåëèòåëÿ
function DeleteSeparator()
alife():release(separator, true)
separator = nil
del_separator = false
end

--ôóíêöèÿ ñêàíèðîâàíèÿ èíâåíòàðÿ
function ScanInventory(item)
local section = item:section()

if start_add_belt and not DetermineSlot(item:id()) then
db.belt[section] = (not db.belt[section] and 1) or (db.belt[section] + 1)
end

if item:section() == "separator" then
start_add_belt = true
end
end

--ôóíêöèÿ îïðåäåëåíèÿ ïðèâÿçêè îáúåêòà ê îäíîìó èç ñëîòîâ
function DetermineSlot(item_id)
for i=0, 12 do
local obj = db.actor:item_in_slot( i )
if obj and obj:id() == item_id then
return true
end
end
return false
end

--ôóíêöèÿ çàïóñêà îáíîâëåíèÿ òàáëèöû ïðè çàêðûòèè èíâåíòàðÿ
--(ïðèâÿçàíà ê êîëáýêó info_callback() â ôàéëå bind_stalker.script)
function InventoryInfo(info)
if info == "ui_inventory" or info == "ui_car_body" or info == "ui_trade" then
if separator then
this.DeleteSeparator()
end
elseif info == "ui_inventory_hide" or info == "ui_car_body_hide" or info == "ui_trade_hide" then
stop_update = false
end
end

--ôóíêöèÿ çàïóñêà îáíîâëåíèÿ òàáëèöû ïðè ïîòåðå ïðåäìåòà
--(ïðèâÿçàíà ê êîëáýêó on_item_drop() â ôàéëå bind_stalker.script)
function Drop(obj)
if obj:section() ~= "separator" then
stop_update = false
end
end


THE ACTUAL SEPARATOR item is in items.ltx near medkits and stuff:

[separator]:identity_immunities
GroupControlSection = spawn_group
discovery_dependency =
$spawn = ""
$prefetch = 32
class = II_BANDG
cform = skeleton
visual = equipments\item_bandage.ogf

description =
inv_name =
inv_name_short =
inv_weight = 0

inv_grid_width = 0
inv_grid_height = 0
inv_grid_x = 0
inv_grid_y = 0

eat_health = 0
eat_satiety = 0
eat_power = 0.0
eat_radiation = 0.0
wounds_heal_perc = 0
eat_portions_num = 1

cost = 0


animation_slot = 4


So that script manipulates separator item for some function or something. Would like to know if commenting that line in my previous post could cause any problems later on...
 
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.: Shadow of Chernobyl Forum » Mod discussion
 

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


 

Copyright © 1995-2021 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.