Call of The Zone is a standalone modification for S.T.A.L.K.E.R. – Call of Pripyat that allows you to explore the Chernobyl Exclusion Zone – a desolate and highly contaminated region of Ukraine that has been abandoned and closed off for decades ever since the 1986 Chernobyl disaster. What has been going on in this irradiated wasteland since then? There are no shortage of rumors and conspiracy theories, each more fantastic than the last. Rumors of mutated wildlife, brainwashed cults, secret experiments, and unexplainable paranormal events abound, as do promises of great riches and wildest dreams coming true for those who are daring or desperate enough to try to break through the cordon. You are about to find out for yourself what is true and what is yet undiscovered, and experience for yourself all the Zone has to offer... or to take from you.

Forum Thread
  Posts  
irradiated/contaminated air/zone (Games : S.T.A.L.K.E.R.: Call of Pripyat : Mods : DoctorX Call of The Zone : Forum : STALKER Modding Forum : irradiated/contaminated air/zone) Locked
Thread Options
Jan 8 2021 Anchor

After toying a lot with Metro Last Light Redux thanks to the gog making it free to claim for a few days, i was very interested by the game mechanics on the levels taking place on the surface : air is contaminated so you need gas mask .

And to make it actually fun and keep the player immersed, you need air for your gas mask, it's not a "just wear gask mask and that's all", so you also need to find more air filters to keep going in the surface (or find area in which the air isn't contaminated, usually underground areas.

In a Stalker game, there are only very few areas that work like that, the radiated areas that you can easily ignore for all your game, and once you find a couple of antiradiation artifacts, the radiated areas are losing completely their gameplay impact as you don't need antiradiation medecines or vodka anymore (you barely needed any already).

So i was thinking how things could work to recreate the interesting gameplay and have the zone not being such an easy walk (out of mutant or npc fights), and i found this addon :

Moddb.com

After tweaking the values so i could experiment it on Cordon with the value getting only slightly over the radiation negating value of the novice suit, instead of going all the way into the northern more irradiated maps, i found it absolutely fantastic , the radiation slowly accumulate, so you have to decontaminate regularly, giving an actual value and interest to bringing antirad medecine and vodka.

The only thing that i find annoying is that the script work globally, unlike an emission script it does not ignore surge covers, so even if you go underground in Cordon (like in Sid bunker) , you are still affected (as long of course as your radiation negating from armor/helmet/artifact is lower than the level radiation set in the script) .

Anyone knowledgable in scripting know how you can edit the script so the background radiation does not affect the surge covers ?

Edited by: Sanctuary

DoctorX01
DoctorX01 Developer
Jan 8 2021 Anchor

Surge covers are defined in configs\misc\surge_manager.ltx so if you can find the point in the script where the radiation damage is being applied you could add a check to see if the player or npc is in cover and, if so, then don't apply the damage.

There are functions built in to the surge manager script to do this, unfortunately I haven't found a way to call them directly from there reliably. You could however achieve the same results as follows:

Generate an array containing all of the surge cover locations from the ini file so they can be used in the script. This has to be done once every time the game loads (including level changes), but should not be done more than that since it has to read the entire ini file and would cause performance issues if called over and over:

local surge_covers = {}
local ini = ini_file( "misc\\surge_manager.ltx" )
for i = 0, (ini:line_count( "list" ) - 1) do
	temp1, id, temp2 = ini:r_line( "list", i, "", "" )
	surge_covers[id] = (ini:line_exist( id, "condlist" ) and xr_logic.parse_condlist( db.actor, id, "condlist", ini:r_string_ex( id, "condlist" ) or "true" ) or true)
end

Now, where the radiation damage is being applied in the script, get the location of the player or npc being evaluated and check if they are in one of those cover locations stored in the array you just built. The following example checks if the player is in cover (player id is always 0, just change that to an npc id to use with other npcs):

local obj = alife( ):object( 0 )
local pos = obj.position

local isincover = false
for name, condlist in pairs( surge_covers ) do
	local sr = db.zone_by_name[name]
	if (sr and sr:inside( pos )) then
		isincover = true
		break
	end
end

if ( isincover ) then
	SetHudMsg( "You are in cover sir", 4 )
else
	SetHudMsg( "Yer dead scrub", 4 )
end
Jan 9 2021 Anchor

Thank you very much !

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.