ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Smart terrains or logic questions

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  12:45:18  13 June 2014
profilee-mailreply Message URLTo the Top
MilitaryStalker
Senior Resident
 

 
On forum: 01/10/2010
Messages: 183
Smart terrains or logic questions

Hey,
I am trying to add new smart terrains in cordon factory. I want to make 2 new stalkers that just will be standing in one place and guarding it. But I can't understand how to do it, I mean spawning smart terrain in certain location is I think clear to me, but how to select coordinates for where my stalkers will stand ? And do I have to do that in smart terrain? Is there an easier way doing this ?
  15:54:18  13 June 2014
profilee-mailreply Message URLTo the Top
SacriPan
Senior Resident
 

 
On forum: 09/20/2009
 

Message edited by:
SacriPan
06/13/2014 15:54:54
Messages: 319
Hi,

If you don't want those NPC to be replaced by other NPC when they die or when they leave this smart terrain, then I believe you don't need a smart terrain.
Just use logic.

Logic is defined in "gamedata\config\scripts\name_of_your_custom_file.ltx"
That file can be called in all.spawn in the section of your NPC, or in gamedata\config\creatures\spawn_sections.ltx if NPC are spawned by script.
Coordinates and "states/animation" are defined in the all.spawn (way_....ltx files) and called from the logic file itself.

Coordinates can be gathered by dezowave tool (patrol or waypoint something MOD..., I don't remember the exact name, sorry) or by a console command (IIRC) but I never used it myself.


Take a look at vanilla examples for tutorials.


I'm at the 24H of Le Mans this week-end , but I can make something that will serve as a tutorial/example for you next week, if you didn't succeed until then.
  16:35:30  13 June 2014
profilee-mailreply Message URLTo the Top
MilitaryStalker
Senior Resident
 

 
On forum: 01/10/2010
Messages: 183

---QUOTATION---
Hi,

If you don't want those NPC to be replaced by other NPC when they die or when they leave this smart terrain, then I believe you don't need a smart terrain.
Just use logic.

Logic is defined in "gamedata\config\scripts\name_of_your_custom_file.ltx"
That file can be called in all.spawn in the section of your NPC, or in gamedata\config\creatures\spawn_sections.ltx if NPC are spawned by script.
Coordinates and "states/animation" are defined in the all.spawn (way_....ltx files) and called from the logic file itself.

Coordinates can be gathered by dezowave tool (patrol or waypoint something MOD..., I don't remember the exact name, sorry) or by a console command (IIRC) but I never used it myself.


Take a look at vanilla examples for tutorials.


I'm at the 24H of Le Mans this week-end , but I can make something that will serve as a tutorial/example for you next week, if you didn't succeed until then.
---END QUOTATION---



I dont want to spawn them, I want that those guard points would be taken by a random stalkers. Like in smart terrains. It's confusing as hell. Example or tutorial would be amazing, because so many options that my head starts to spin already and tutorials on mod wiki doesn't explain much about these things..

P.S Have a nice weekend then!
  17:18:09  13 June 2014
profilee-mailreply Message URLTo the Top
SacriPan
Senior Resident
 

 
On forum: 09/20/2009
Messages: 319
Then I guess you'll have to use Smart terrain after all

The tutorial on the wiki is not complete. Maybe you'll find some more informations by reading the thread I opened not long ago:
https://www.gsc-game.com/index.php?t=community&s=forums&s_game_type=xr&thm_page=3&thm_id=22361&sec_id=16
  16:25:34  14 June 2014
profilee-mailreply Message URLTo the Top
MilitaryStalker
Senior Resident
 

 
On forum: 01/10/2010
Messages: 183

---QUOTATION---
Then I guess you'll have to use Smart terrain after all

The tutorial on the wiki is not complete. Maybe you'll find some more informations by reading the thread I opened not long ago:
https://www.gsc-game.com/index.php?t=community&s=forums&s_game_type=xr&thm_page=3&thm_id=22361&sec_id=16
---END QUOTATION---


Thanks, I'll take a look at this.
  00:39:50  20 June 2014
profilee-mailreply Message URLTo the Top
MilitaryStalker
Senior Resident
 

 
On forum: 01/10/2010
 

Message edited by:
MilitaryStalker
06/20/2014 0:41:28
Messages: 183
All right, I am editing esc_fabrika_bandit smart terrain. I never liked how bandits spawning already in factory instead of re-capturing it, so I've changed coordinates of them to spawn outside the factory. Everything seems ok, bandits re-capturing it after some time. But how can I set them go to the factory through certain way? They wandering too much around factory and they care about everything too much, so they going after every dog to kill him.
  10:50:38  20 June 2014
profilee-mailreply Message URLTo the Top
SacriPan
Senior Resident
 

 
On forum: 09/20/2009
Messages: 319

---QUOTATION---
All right, I am editing esc_fabrika_bandit smart terrain. I never liked how bandits spawning already in factory instead of re-capturing it, so I've changed coordinates of them to spawn outside the factory. Everything seems ok, bandits re-capturing it after some time. But how can I set them go to the factory through certain way? They wandering too much around factory and they care about everything too much, so they going after every dog to kill him.
---END QUOTATION---




I don't think you can.
I could be wrong but I think AI uses pre-defined AI paths, meaning it determines the "best" way for the AI to go from A to B. When they are assigned to a ST, they go towards it, but the road that they take can be quite different each time. Actually, in your example, I believe that all the bandits don't take the same "road", right?


IMHO, just choose a better spawnpoint for them, so they will likely avoid the wild life around the factory.
  21:28:27  28 June 2014
profilee-mailreply Message URLTo the Top
MilitaryStalker
Senior Resident
 

 
On forum: 01/10/2010
Messages: 183

---QUOTATION---
All right, I am editing esc_fabrika_bandit smart terrain. I never liked how bandits spawning already in factory instead of re-capturing it, so I've changed coordinates of them to spawn outside the factory. Everything seems ok, bandits re-capturing it after some time. But how can I set them go to the factory through certain way? They wandering too much around factory and they care about everything too much, so they going after every dog to kill him.


I don't think you can.
I could be wrong but I think AI uses pre-defined AI paths, meaning it determines the "best" way for the AI to go from A to B. When they are assigned to a ST, they go towards it, but the road that they take can be quite different each time. Actually, in your example, I believe that all the bandits don't take the same "road", right?


IMHO, just choose a better spawnpoint for them, so they will likely avoid the wild life around the factory.
---END QUOTATION---


Thank you, it's still better than nothing. Another question. I am spawning new smart terrain in escape factory, it looks like that:


[8118]
; cse_abstract properties
section_name = smart_terrain
name         = esc_stalkers_guard
position     = 136.43858337402,-7.7375402450562,-22.290924072266
direction    = 0,0,0
 
; cse_alife_object properties
game_vertex_id  = 131
distance        = 9.09999942779541
level_vertex_id = 440843
object_flags    = 0x==3e
custom_data     = <<END
[smart_terrain]
type     = esc_stalkers_guard
cond     = {-infoportion}
capacity = 2
squad    = 1
groups   = 5
respawn  = esc_respawn_inventory_box_0002
END
 
; cse_shape properties
shapes        = shape0
shape0:type   = sphere
shape0:offset = 0,0,0
shape0:radius = 20.55957102775574
 
; cse_alife_space_restrictor properties
restrictor_type = 3
 
; se_smart_terrain properties



But using Smartterrain_and_Waypoint_Tool my smart terrain doesn't even appears on the map. I know it's not enough just to spawn smart terrain, but doesn't it supposed to appear on the map even if is it not active? Can you give me an example how everything should look?
  13:44:05  30 June 2014
profilee-mailreply Message URLTo the Top
SacriPan
Senior Resident
 

 
On forum: 09/20/2009
Messages: 319
Sorry but I don't know much about STs.

All I know come from the tutorial on the wiki.

What I know is that I got a smart terrains in a working state by following the tutorial

Did you set your ST in the config gulag file and script?
 
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-2022 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.