 |
 |
 |
|
 |
 |
 |
|
 |
 |
Space restrictors not working |
|
1 2 |
|
|
11:06:24 2 March 2013 |
|
Bangalore
Robberbaron (Resident)
 On forum: 02/17/2008
 Message edited by: Bangalore 03/02/2013 11:08:46
Messages: 1158
|
You find restrictions for npc's in all.spawn and in the gulag script:
For all.spawn: in LE, choose npc, search for "in space restrictions" option, double click on it, and the maps space restrictor list will appear. Choose all campfire restrictor, tick them, recompile all.spawn, and test how it works.
In gulag script (for you gulag_deadcity.script), search for lines (or add them if missing) with
in_rest = "", out_rest = "", and insert into in_rest all campfire restrictor on the map.
It should prevent all npc on that map to enter into campfires - theoretically. 
Call of Chernobyl - a mod for Call of Pripyat
http://www.moddb.com/mods/call-of-chernobyl
SDK and modeling tutorials
https://www.moddb.com/tutorials/sdk-and-3d-modelinganimation-tutorials
Tutorial - creating AI map and graph:
http://www.moddb.com/members/bangalore/tutorials/creating-ai-map-and-graph
Tutorial - Editing SOC's all.spawn with level editor:
http://stalkermod.wiki-site.com/index.php/Working_on_all.spawn_with_SOC_level_editor
http://www.moddb.com/members/bangalore/tutorials/working-on-allspawn-with-soc-level-editor
|
08:35:48 3 March 2013 |
|
te47
Senior Resident
On forum: 06/03/2010
 Message edited by: te47 03/03/2013 8:37:45
Messages: 415
|
Thanks for the advice, but... I'm not sure if there's something wrong with my level editor or what, but when I double click on "in space restrictions" for NPCs, none of the campfire restrictors show up in the list. In fact, hardly any Dead City specific entities show up. It's mostly just general spawn element types in there, plus a few specific things from certain maps (other than campfire restrictors). I checked the vanilla maps, and it's the same thing there. Should I check "space_restrictor" in the list? Seems far too vague to actually work...
As for the gulag scripts, none of the vanilla ones include any campfire space restrictors in the "in_rest" lines. In fact, none of them even include multiple space restrictors at all. Just a single space restrictor in quotes. I'm all for improvised non-standard workarounds, but I'm not sure what the correct syntax is for multiple entries (assuming that's what you mean when you say I should insert all campfire restrictors). I guess I was hoping for a fix that would make the Dead City exactly the same as all other vanilla maps, but that's probably not too realistic at this point... 
"Get out of here, stalker." - Duty on the only way into their territory.
|
15:21:03 3 March 2013 |
|
te47
Senior Resident
On forum: 06/03/2010
 Message edited by: te47 03/03/2013 15:48:42
Messages: 415
|
It works properly on all of the vanilla maps that have the "in" restrictors properly set up, which is most of them. But Pripyat, for example, is missing most of the campfire space restrictors, and the few campfires that do have them are set to "NOT A restrictor". But I've never seen an NPC walk through a campfire in a map like the Cordon with all "in" restrictors properly set up, including in the version of the Cordon I compiled myself with the tunnel to the Dark Valley cleared. And I've been playing SoC for a very long time.
What I don't understand is why a map like the Cordon with all campfire space restrictors in place and configured properly would work perfectly, but a map like the Dead City with all campfire space restrictors in place and configured properly wouldn't. Makes me think I'm missing something, or did something wrong that I'm not seeing...
So for the gulag method, should I change these lines from something like this:
in_rest = "cit_jail_restr", out_rest = "",
To something like this?
in_rest = "cit_jail_restr", "camp_fire_0000", "camp_fire_0001", "camp_fire_0002", "camp_fire_0003", "camp_fire_00...", "camp_fire_0019", out_rest = "",
"Get out of here, stalker." - Duty on the only way into their territory.
|
06:34:46 5 March 2013 |
|
NatVac
Senior Resident
On forum: 06/15/2007
Messages: 4286
|
You can change the logic for initial navigation to their destinations, te47. It is in xr_kamp.script. NPCs randomly* select a camp spot around the fire, one of eight cardinal map points around the center of the camp (usually the fire). The random selection is then mapped to the nearest accessible vertex, and they then walk to the point via a random interim point.
The fact that it is random is part of the problem. You can make it so they walk around the camp with a bit of extra scripting. The code to do that is already there, just keep the nodes that go near the fire out of the choices when they select the interim vertex. See the first two (x and z) vertex_in_direction() random arguments in the action_go_position:execute() function.
The ZRP workaround is to make the NPCs invulnerable to fire. There's also the bardak tweak to beef up their collision resistance; two bodies spawning in the same spot can kill one of them.
Another possible approach: Use Red75's Stalkers Are Not Blind minimod and add campfires to the anomaly list, assuming you don't have the issue with the ai-map node placement mentioned by Vintar. (I would have expected the lack of node there would actually fix your problem, but maybe not.)
__________
*This code is broken in vanilla. NPCs will select the same points, and some otherwise-unique points in several camps share the same vertex. I've got an updated xr_kamp.script I'll be releasing shortly as part of a ZRP update to address these issues. |
08:19:04 5 March 2013 |
|
te47
Senior Resident
On forum: 06/03/2010
 Message edited by: te47 03/05/2013 8:33:10
Messages: 415
|
Thanks for the advice. Unfortunately, I lack the scripting skills to pull off your first recommended solution without outside guidance. Sounds good, though. I didn't realize NPCs used a random interim point before arriving at their final seat locations. In the Dead City, it always looked like they just walked/ran to a random seat position in a straight line, often through the fire itself.
I could make NPCs immune to fire damage, but I'd prefer to make them steer clear entirely somehow. Seeing them burst into flames is half the reason I'm trying to fix this. Not exactly immersive...
I'm very interested in this Stalkers Are Not Blind solution. I'm actually already using that in my mod. But how can I add campfires to the list of anomalies that NPCs avoid? Adding it to the "local radius" list in anomaly_holder.script just makes the game crash in the first second of any loading screen.
(To be clear, the AI-map does go right through campfires in the Dead City, just like in every vanilla map. I just meant that NPCs never spawn inside the campfires. They just walk through them. Since they never walk through them in vanilla maps, and since not including nodes under the campfires seems to cause problems, I assumed that wasn't the reason for this issue.)
"Get out of here, stalker." - Duty on the only way into their territory.
|
08:48:45 5 March 2013 |
|
NatVac
Senior Resident
On forum: 06/15/2007
Messages: 4286
|
You probably forgot a comma in the list: a,b,c,d,e f <== should end "e,f"
There's always a comma separating each entry in the table.
But it still would not work. You'd have to check the obj:clsid() to see if it matches the fire's corresponding clsid in the same way it is checked for clsid.zone_bfuzz_s and the other anomaly types.
Use a small radius to start, maybe the size of the barrel, and experiment. Otherwise you will have a problem getting them to sit by the fire "anomaly". |
09:53:24 5 March 2013 |
|
te47
Senior Resident
On forum: 06/03/2010
 Message edited by: te47 03/05/2013 9:56:07
Messages: 415
|
---QUOTATION--- You probably forgot a comma in the list: a,b,c,d,e f <== should end "e,f"
There's always a comma separating each entry in the table.
But it still would not work. You'd have to check the obj:clsid() to see if it matches the fire's corresponding clsid in the same way it is checked for clsid.zone_bfuzz_s and the other anomaly types.
Use a small radius to start, maybe the size of the barrel, and experiment. Otherwise you will have a problem getting them to sit by the fire "anomaly". ---END QUOTATION---
It was a missing comma that caused the crash. Thanks.
I've added campfire entries in all the same places as zone_bfuzz_s in anomaly_evader.script and anomaly_holder.script, but it has no effect. I've tried using "zone_kampfire", "zone_flame_small", and "campfire", but NPCs keep walking through the flames regardless. What exactly do you mean when you say I should check the obj:clsid() to see if it matches the fire's corresponding clsid?
"Get out of here, stalker." - Duty on the only way into their territory.
|
15:30:31 9 March 2013 |
|
NatVac
Senior Resident
On forum: 06/15/2007
Messages: 4286
|
---QUOTATION--- What exactly do you mean when you say I should check the obj:clsid() to see if it matches the fire's corresponding clsid? ---END QUOTATION---
I meant exactly what I said, te47. You are likely just changing the tables, but you need to change the script's logical tests like the one in anomaly_holder.script's enumerate_anoms() function so that it checks for fires.
You probably would be well served to learn some programming concepts and maybe learn the Lua language, then study the SDK wiki stuff in depth. Start with the sticky in this forum about modding STALKER.
---QUOTATION--- My main Lua resources: http://www.lua.org/ and http://lua-users.org/
Visit the Wiki:
"S.T.A.L.K.E.R. MOD portal - Mod Wiki"
http://sdk.stalker-game.com/en/index.php/S.T.A.L.K.E.R.:_Shadow_of_Chernobyl_MOD_portal
http://sdk.stalker-game.com/en/index.php/Category:Articles ---END QUOTATION---
¯¯¯¯¯¯¯¯¯¯
Bangalore, thanks for the enlightenment! So the node needs to be there to anchor the camp center. The devs could have used something different to mark the center of a camp than a place where NPCs can walk, but that would have added to their effort.
>> they will stand and freeze in one straight line
And I'll bet the log showed "Scheduler tried to update some doofus npc" for each one. |
|
1 2 |
|
|
|
» » |
|
All short dates are in Month-Day-Year format. |
 |
|
 |
|
|
|
 |
 |
 |