Some questions regarding simulation_objects_props.ltx

xQd
Scavenger
Posts: 20
Joined: 11 Jul 2017, 14:56

Some questions regarding simulation_objects_props.ltx

Postby xQd » 12 Jul 2017, 07:02

Hey.

I was trying to make all smart terrains a priority to all factions and I couldn't find the "communities" section of a smart terrain in the all.spawn like in SoC. Therefore, I reckoned that there must be another way to do that in the CoP engine.

I've found this file mentioned in the title, which seems to determine many things about all the smart terrains in the game.

The problem is that I cannot figure out what most of the attributes do and their assigned values. I see that all the factions are there under the "default" section but I don't understand why a faction attribute has a value higher than 1 on some smart terrains. For example, there's this smart terrain from Army Warehouses:

Code: Select all

[mil_smart_terrain_4_5]:default_base
sim_avail    = true
surge       = 1
stalker      = 1
freedom      = 5
dolg      = 2
bandit      = 1
monolith    = 1


What does freedom = 5 and dolg = 2 really mean? How many troops or squads from a faction can occupy that smart terrain or maybe the priority of a faction to capture that point? I cannot figure this out.

I'd also like to know what these attributes do, they seem to be either 0 or 1: base, territory, resource, surge, lair, actor, squad and sim_avail.

User avatar
Alundaio
S.T.A.L.K.E.R.
Posts: 1360
Joined: 26 May 2012, 22:26

Re: Some questions regarding simulation_objects_props.ltx

Postby Alundaio » 12 Jul 2017, 18:36

base - accessible at all times of day by stalker squads
territory - accessible during the day by stalkers and any time by mutants (Basically any smart with this prop is shared between mutants and stalker)
lair - accessible by mutants
resource - accessible by squads that have detector during a certain part of day

Faction props just narrow down which community can access the smart. so a base smart with stalker = 1 and csky = 1 means clear sky and stalker factions can target this smart.

Note that this all only applies to offline simulation; where squads can go and take "jobs", when they come online.

How a target is selected:

All smart terrains the squad can target are put into a list based on a priority calculated using the prop value and distance. Then randomly selected out of the top 1/3 of the list is their target. Increasing the prop value will not increase the likelihood of a target being selected, but it does allow squads a chance to pick the target if it is really far away. Here is the snippet of code from simulation_objects.script:

Code: Select all

   -- priorize target based on target props
   local target_koeff = target.props[squad.player_id]
   if (target_koeff ~= nil) then
      prior = prior + (1*target_koeff)
   end
   
   if (is_squad_monster[squad.player_id]) then
      for k,v in pairs (default_monster_behaviour) do
         target_koeff = target.props[k] or 0
         prior = prior + (v*target_koeff)
      end
   else
      for k,v in pairs (default_squad_behaviour) do
         target_koeff = target.props[k] or 0
         prior = prior + (v*target_koeff)
      end
   end
   
   return prior*evaluate_prior_by_dist(target, squad)




I warn you though, allowing all factions to target base smarts will only just turn the game into a warzone and the player will most likely come across bases full of bodies. That is because say, stalker and bandit squads will sit happily on a smart terrain together offline, but soon as player brings them online they will spawn on top of eachother and fight.
"I have a dream that one day this community will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident; that all mods are created equal."

xQd
Scavenger
Posts: 20
Joined: 11 Jul 2017, 14:56

Re: Some questions regarding simulation_objects_props.ltx

Postby xQd » 13 Jul 2017, 04:40

Thank you very much for your in-depth explanation. Now I actually know what I am doing when changing these values.

Alundaio wrote:I warn you though, allowing all factions to target base smarts will only just turn the game into a warzone and the player will most likely come across bases full of bodies. That is because say, stalker and bandit squads will sit happily on a smart terrain together offline, but soon as player brings them online they will spawn on top of eachother and fight.


Wait a second, there is no offline combat simulation in CoC?(using the lastest version by the way). Well, that explains why Monolith squads reach Cordon and Garbage so fast. I expected them to fight every other faction in offline mode while on their way to the South area of the Zone.

Is there a way to activate offline combat in CoC? If not, I might download Warfare and try to port only the offline combat module, even though I don't know how LUA scripting works in any Stalker game.

User avatar
Alundaio
S.T.A.L.K.E.R.
Posts: 1360
Joined: 26 May 2012, 22:26

Re: Some questions regarding simulation_objects_props.ltx

Postby Alundaio » 13 Jul 2017, 19:11

No there is no offline combat in CoC or CoP for that matter. It was only a thing in Clear Sky, which used a completely different sort of "squad" system, so it is not something that can be re-enabled. It would have to be recreated.
"I have a dream that one day this community will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident; that all mods are created equal."


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 0 guests