ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Space restrictors not working

1 2 | Next 10 events »| All Messages
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  05:58:30  2 March 2013
profilee-mailreply Message URLTo the Top
te47
Senior Resident
 

 
On forum: 06/03/2010
Messages: 415
Space restrictors not working

I started discussing this in one of my threads from a while ago, but since it had nothing to do with what the thread was originally about (and was never resolved), I thought I'd give it its own thread.

I'm having a problem with the campfire space restrictors in the Dead City map I added to my mod. From what I can tell in the level editor, they're all identical to the working campfire space restrictors in vanilla maps, but none of the Dead City ones are working in-game. The only difference was that they were set to "NOT A restrictor" instead of "IN default restrictor" until recently, but fixing that didn't improve the situation at all (even though that theoretically should have been the whole problem).

Without working space restrictors for campfires, NPCs frequently just walk right into them and die as they try to take their seats. Is there anything else I can try, or anything I might have done wrong that could cause this?
  11:06:24  2 March 2013
profilee-mailreply Message URLTo the Top
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.
  08:35:48  3 March 2013
profilee-mailreply Message URLTo the Top
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...
  10:13:01  3 March 2013
profilee-mailreply Message URLTo the Top
Bangalore
Robberbaron
(Resident)

 

 
On forum: 02/17/2008
 

Message edited by:
Bangalore
03/03/2013 10:35:46
Messages: 1158

---QUOTATION---
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...
---END QUOTATION---



Are you sure it's working properly on all vanilla maps? As i remember, npc's never cared about "in" restrictors around campfires, and walked throgh the fire after they spawned on a _kamp_task waypoint, which was far enough from fire, but on the road to the sit waypoint they walked through fire...
But i played long ago vanilla soc, maybe i remember wrong.
  15:21:03  3 March 2013
profilee-mailreply Message URLTo the Top
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 = "",
  17:16:21  4 March 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 problem is that some of the npcs spawn inside fires because there is ai-map nodes under them.
  19:48:09  4 March 2013
profilee-mailreply Message URLTo the Top
te47
Senior Resident
 

 
On forum: 06/03/2010
Messages: 415

---QUOTATION---
The problem is that some of the npcs spawn inside fires because there is ai-map nodes under them.
---END QUOTATION---



I know that's normally the reason why anyone would see dead NPCs in their campfires, but that's not the problem here. I got that fixed in my mod a long time ago, including in the Dead City, and have never seen that happen since. However, I am seeing plenty of NPCs actually walk through the campfires in the Dead City as they take their seats, as if the oil drums and the fires (and their "in" restrictors) didn't exist. Sometimes they walk through it quickly enough to just start on fire briefly. Other times, they're in it a second too long, and drop dead inside it. But the spawning is fine. It's the walking that's the problem.
  06:34:46  5 March 2013
profilee-mailreply Message URLTo the Top
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
profilee-mailreply Message URLTo the Top
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.)
  08:48:45  5 March 2013
profilee-mailreply Message URLTo the Top
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".
 
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-2020 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.