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 Oldest Up Sort by Ascending
  15:30:31  9 March 2013
profilee-mailreply Message URLTo the Top
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.
  21:44:13  5 March 2013
profilee-mailreply Message URLTo the Top
Bangalore
Robberbaron
(Resident)

 

 
On forum: 02/17/2008
 

Message edited by:
Bangalore
03/05/2013 22:26:26
Messages: 1158

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



Under all vanilla campfires with a gulag have ai nodes, because of the kamp waypoints in the center of fire zones.
If i cut out the ai map under the campfires, the kamp waypoint will be invalid (gets a negative vertex in all.spawn), and the camp behaviour will be ruined, you'll see very weird things from npc's around campfires: they will stand and freeze in one straight line, and all of them staring to the horizont.

You can cut out the ai nodes under campfires, and move out the position of the kamp waypoint from campfire above ai map, but in this case one npc will surely sit straight into the campfire.
  09:53:24  5 March 2013
profilee-mailreply Message URLTo the Top
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?
  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".
  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.)
  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.
  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.
  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.
  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 = "",
  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.
 
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.