ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Dexxx Blowouts - communities?

1 2 | Next 10 events »| All Messages
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  18:32:03  29 December 2013
profilee-mailreply Message URLTo the Top
rkr5
(Novice)
 
On forum: 09/05/2009
Messages: 41
Dexxx Blowouts - communities?

So I merged Dexxx's Blowout mod in with my own mod, along with the hide_restrictor sections into my LE gamedata so I can have a little bit more control over the size and shape of the available hideouts.
To my surprise, it works almost flawlessly - I can place a new hide_restrictor on a new level with LE, and it indeed protects the actor from the emissions.
However, as expected, NPC's don't see the new restrictors.
The problem is, I'm a little confused as to how p_type (communities) gets itself into the restrictor itself via script.

The ogsm_hideouts spawn_restrictor() function: http://pastebin.com/m1HuhUtm

In particular, the following blocks catch my eye:

local hide_name
if string.find(p_type, "_") then hide_name = "ogsm_common_hide"
else hide_name = "ogsm_"..p_type.."_hide" end


and

local cd = parse_custom_data(custom_data)
if not cd then cd={} end
if not cd.parameters then cd.parameters = {} end
cd.parameters.community = p_type
cd.parameters.radius = p_radius
custom_data = gen_custom_data(cd)
 
packet:w_stringZ(custom_data)
packet:w_s32(story_id)
packet:w_s32(cse_alife_object__unk3_u32)



Am I reading this wrong, or can I somehow get a communities list into the restrictors [custom_data] section in LE, and have NPC's recognize it as a valid hiding place?
The hide_name part throws me off here. I've marked all restrictors on the map using ZRP's "Mark by partial name" feature, and all of them use "*level*_hide_restrictor*ID*" as names. No mention of communities on any of them.
  22:39:19  29 December 2013
profilee-mailreply Message URLTo the Top
Vintar
a bit of this and a lot of that
(Resident)

 

 
On forum: 08/08/2008
Messages: 6349
Check what is calling spawn_restrictor() function, the parameter p_type Is sent from there.
  22:48:09  29 December 2013
profilee-mailreply Message URLTo the Top
Kyojinmaru
(Senior)
 
On forum: 01/17/2010
Messages: 63
I was about to ask something about Dexxx blowouts also, I have OGSM installed and I want to add a warning PDA message when a blowout starts. I'm no scripter so I don't know where to start, someone can help me?, or better, is there any mod with this blowout version plus warning messages?
  23:44:26  29 December 2013
profilee-mailreply Message URLTo the Top
rkr5
(Novice)
 
On forum: 09/05/2009
 

Message edited by:
rkr5
12/30/2013 0:04:33
Messages: 41

---QUOTATION---
Check what is calling spawn_restrictor() function, the parameter p_type Is sent from there.
---END QUOTATION---



It's actually within the same script, under the first_run() function. A typical spawn looks like

spawn_restrictor("l01_escape", vector():set(133.0,0.22,339.5), 437657, 232, "stalker_bandit", 3)



I can bypass the community check altogether, which is actually preferable, but I run into the exact same problem as the scheme attempts to get the "radius" ('3', in the above example), and the game crashes as soon as NPC's enter the hideout.
p_radius shows up in the same custom_data block as p_type (cd.parameters.radius = p_radius, in the pastebin example), so I guess this information is somehow getting into the [custom_data] section of each restrictor spawned by script, unless I'm reading it ass-backwards. Very likely.


For now I'm just going to workaround it by spawning a few major hideouts by script for NPC's, and use the more flexible LE spawned restrictors for the actor.
I just really, really hate messing around with co-ordinates



---QUOTATION---
I was about to ask something about Dexxx blowouts also, I have OGSM installed and I want to add a warning PDA message when a blowout starts. I'm no scripter so I don't know where to start, someone can help me?, or better, is there any mod with this blowout version plus warning messages?
---END QUOTATION---



You mean like the CoP warnings? Or like an air raid siren or whatever as the emission starts?
Look in ogsm_funcs.script, under if select_string=="bl2" then, there is already actually a sound there.
You could, for simplicities sake, copy and paste the lines

	local snd_obj = xr_sound.get_safe_sound_object([[anomaly\dezodor]])
		snd_obj:play_at_pos(db.actor, vector():set(0,0,0), 0, sound_object.s2d)


above g_start_timer("bl3",0,0,8) and change the sound (anomaly\dezodor) to whatever you sound you have in your gamedata\sounds directory.

Edit: Actually, it would probably be a bit less immersion breaking to add the new snd_obj lines under the next timer, so add it in the if select_string=="bl3" then block instead. That way the warning will sound after the initial weather change. Still not exactly "Disney Princess elegant", but a bit less dumb than my previous suggestion.
  02:10:39  30 December 2013
profilee-mailreply Message URLTo the Top
Kyojinmaru
(Senior)
 
On forum: 01/17/2010
Messages: 63

---QUOTATION---
You mean like the CoP warnings? Or like an air raid siren or whatever as the emission starts?
Look in ogsm_funcs.script, under if select_string=="bl2" then, there is already actually a sound there.
You could, for simplicities sake, copy and paste the lines

	local snd_obj = xr_sound.get_safe_sound_object([[anomaly\dezodor]])
		snd_obj:play_at_pos(db.actor, vector():set(0,0,0), 0, sound_object.s2d)


above g_start_timer("bl3",0,0,8) and change the sound (anomaly\dezodor) to whatever you sound you have in your gamedata\sounds directory.

Edit: Actually, it would probably be a bit less immersion breaking to add the new snd_obj lines under the next timer, so add it in the if select_string=="bl3" then block instead. That way the warning will sound after the initial weather change. Still not exactly "Disney Princess elegant", but a bit less dumb than my previous suggestion.
---END QUOTATION---


I mean a small news warning, a PDA message, just when a blowout is about to start. Mods like OGSE or AMK do this, problem is I don't know how to identify which part of code executes the function.

For a graphic description just look this video, 0:54, the first message:
http://www.youtube.com/watch?v=9QODeZGlFeg
  02:32:39  30 December 2013
profilee-mailreply Message URLTo the Top
rkr5
(Novice)
 
On forum: 09/05/2009
 

Message edited by:
rkr5
12/30/2013 2:35:01
Messages: 41

---QUOTATION---

I mean a small news warning, a PDA message, just when a blowout is about to start. Mods like OGSE or AMK do this, problem is I don't know how to identify which part of code executes the function.

For a graphic description just look this video, 0:54, the first message:
http://www.youtube.com/watch?v=9QODeZGlFeg
---END QUOTATION---




news_manager.send_tip(db.actor, "my_info")


"my_info" in this case points to a string in the text folder. I might be wrong, but I think any file will do, so pick your poison. Just make sure to use the correct XML syntax, using the other entries as an example.

Try

	if select_string=="bl1" then
		if ogsm_surge then
			if (level.name() ~= "l03u_agr_underground") and (level.name() ~= "l08u_brainlab") and (level.name() ~= "l10u_bunker") 
			and (level.name() ~= "l04u_labx18") and (level.name() ~= "l12u_sarcofag") and (level.name() ~= "l12u_control_monolith") 
			and (level.name() ~= "l12_stancia") and (level.name() ~= "l12_stancia_2") then
				--if sleep_manager and sleep_manager.is_sleep_active() then sleep_manager.stopper() end
				start_timer("bl2",1)
				news_manager.send_tip(db.actor, "my_info")
			else
				g_start_timer("bl1",0,1,0)
			end
		else
			g_start_timer("bl1",0,10,0)
		end
	end

  04:28:22  30 December 2013
profilee-mailreply Message URLTo the Top
Kyojinmaru
(Senior)
 
On forum: 01/17/2010
Messages: 63

---QUOTATION---

I mean a small news warning, a PDA message, just when a blowout is about to start. Mods like OGSE or AMK do this, problem is I don't know how to identify which part of code executes the function.

For a graphic description just look this video, 0:54, the first message:
http://www.youtube.com/watch?v=9QODeZGlFeg


news_manager.send_tip(db.actor, "my_info")


"my_info" in this case points to a string in the text folder. I might be wrong, but I think any file will do, so pick your poison. Just make sure to use the correct XML syntax, using the other entries as an example.

Try

	if select_string=="bl1" then
		if ogsm_surge then
			if (level.name() ~= "l03u_agr_underground") and (level.name() ~= "l08u_brainlab") and (level.name() ~= "l10u_bunker") 
			and (level.name() ~= "l04u_labx18") and (level.name() ~= "l12u_sarcofag") and (level.name() ~= "l12u_control_monolith") 
			and (level.name() ~= "l12_stancia") and (level.name() ~= "l12_stancia_2") then
				--if sleep_manager and sleep_manager.is_sleep_active() then sleep_manager.stopper() end
				start_timer("bl2",1)
				news_manager.send_tip(db.actor, "my_info")
			else
				g_start_timer("bl1",0,1,0)
			end
		else
			g_start_timer("bl1",0,10,0)
		end
	end


---END QUOTATION---


Works flawlessly, now I will try to customize it a bit, many thanks!
  17:59:08  30 December 2013
profilee-mailreply Message URLTo the Top
Vintar
a bit of this and a lot of that
(Resident)

 

 
On forum: 08/08/2008
Messages: 6349
The space restrictor`s custom_data is created in the function here and manipulated via packets :

68.custom_data = "[logic] \nactive = sr_mapspot \n[sr_mapspot] \nhint = "..hide_name.." \nlocation = "..mapspot
69. 
70.local cd = parse_custom_data(custom_data)
71.if not cd then cd={} end
72.if not cd.parameters then cd.parameters = {} end
73.cd.parameters.community = p_type
74.cd.parameters.radius = p_radius
75.custom_data = gen_custom_data(cd)



check the function gen_custom_data() and see if there is anything interesting in there. looking at the example of "stalker_bandit" as p_type, it makes no sense at all unless somewhere "stalker_bandit" is linked to "bandit" community or something like that.
  19:46:00  30 December 2013
profilee-mailreply Message URLTo the Top
rkr5
(Novice)
 
On forum: 09/05/2009
Messages: 41
Way over my head.

The parse_custom_data and gen_custom_data functions: http://pastebin.com/Q1NpwD7M

All I'm getting from this, is that I could use it as I would anything else in [custom_data], with
[custom_data]
thing = other_thing
but how can I find out what ["..key.."] is supposed to be?

I've at least found that hide_name block plays no part in it. It seems just to generate a link to the text folder, to display a hideouts community on mouseover in the PDA map.

---QUOTATION---
looking at the example of "stalker_bandit" as p_type, it makes no sense at all unless somewhere "stalker_bandit" is linked to "bandit" community or something like that.
---END QUOTATION---


That generates a link to ogsm_common_hide, rather than ogsm_*faction*_hide. The thing is, the p_type definitely plays a part in how npc's get their nearest hideouts. Without it, they stand around looking dumb as their skin is torn from their flesh, unless I comment out the community check - in which case they go darting off to my test restrictor. There are no hard links whatsoever to community sections in any of the scripts.


---QUOTATION---
it makes no sense at all
---END QUOTATION---


Re-quoted for emphasis.
  12:51:19  22 January 2014
profilee-mailreply Message URLTo the Top
rkr5
(Novice)
 
On forum: 09/05/2009
Messages: 41
I took another look at the script after getting annoyed and leaving it alone for a couple of weeks, only to see the answer staring me right in the face.
For anyone who might care, the custom data block is

[parameters]
radius
community


So now that I have this block in my hide_restrictors, NPC's go running off to hide during a blowout, except I now have another major issue.
Once the NPC's get there, they run back and forth on the border of the restrictor, as if they can't get into it.
Easy fix, right? Just change the restrictor type to allow an NPC's entry?
Wrong.
NONE doesn't allow NPC's inside during a blowout, but does let them inside during normal gameplay
NOT completely undoes the restrictor logic. NPC's no longer see it.
IN has the same deal as NONE, with the added bonus of not letting NPC's in at all.
OUT is the one I've had the most luck with. A bunch of NPC's go into their hide state on entry, but another bunch all run to the far corner of the restrictor, presumably trying to access the same AI node. Eventually, all NPC's try to get to this node. Also, as yet another added bonus, all NPC's abandon their jobs and head to the restrictor to stand around like idiots whether there is a blowout or not.
I'm not sure why this is happening, none of the NPC's have any restriction settings in their logic or their individual settings in the SDK.

So there we have it. None of the restrictor types work as they should, meaning I'm still missing something vital.
This leads me onto my next question: Is there some way I can crack open a .sav file to take a look at exactly what is created by ogsm_hideouts.script? I'm certain I remember reading that a .sav is essentially an all.spawn without the graph points, but maybe I'm remembering that wrong.
I quicksaved on game start, and opened up that save in Notepad++. I can see remants of a few hide_restrictors, but I can't gather enough information amongst the strings of nonsense.
 
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-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.