Objective placement

How ATG Scenario decides where an objective goes, and how to author zones for your own map.

Zones are authored, positions are derived

The engine can tell you a position is flat, dry, clear of geometry and near some buildings. It cannot tell you the spot is worth fighting over — good sightlines, a compound with a reason to exist, somewhere players will recognise. So the mod does not try to invent locations.

Instead you author zones: named stretches of your map where objectives belong. The mod picks a zone, then picks a specific position inside it that survives every hard constraint. Geography comes from someone who knows the terrain; usability is decided mechanically.

The exact position varies each time, so the same zone does not replay identically. A 250m-radius zone holds a lot of different fights.

Two ways to author zones

Survey them in-game. A Game Master places a marker, drags it where the fight should be, sizes its ring, and writes the file from chat. Needs no Workbench and no mod of your own — this is the route for a server owner. Covered next.

Ship a zone config in your map mod. Authored in Workbench, versioned with the map, and carried along by a map update. This is the route for whoever owns the map. Covered further down.

If both exist the surveyed file wins outright, and the mod says so at startup. It is a whole-file replacement, not a merge — you get one set of zones or the other, never half of each.

Surveying zones in-game

You need two things: a Game Master role, and ATG Commands loaded ahead of ATG Scenario in the server’s mod list. Every /atg command comes from ATG Commands, so without it /atg zone save does not exist — a zone still places and its ring still draws, but there is no way to write the file. The mod warns about this in the server log at startup.

  1. Open the Game Master content browser and place Objective zone (under Systems). A translucent ring appears, draped over the terrain.
  2. Drag it to where a fight should happen — a village, a compound, an industrial site. Right-click it and choose Set name to give it the place’s name.
  3. Select it and open Edit Attributes. Under Objective zone you get the attributes in the table below. Change the radius and the ring resizes immediately.
  4. Repeat for as many zones as you want.
  5. Mark your base: place one more zone at it and tick Exclusion. Objectives will not be placed inside it, and the distance-from-home limits measure from it.
  6. /atg zone save.

Zones your map already ships are editable the same way. The objective zone is one prefab for both routes: zones placed in World Editor appear in Game Master with their settings, can be dragged and changed, and are written out by /atg zone save alongside any you placed in game.

The attributes

AttributeControlMeaning
RadiusSlider, 50–1000m in 25m stepsHow far from the marker an objective may be placed.
ExclusionCheckboxMarks somewhere nothing may be placed, rather than somewhere objectives belong.
WeightSlider, 0–5 in steps of 0.5How often this zone is chosen against the others. Two means twice as often; zero retires it without deleting the marker.
Allow objectivesCheckbox, on by defaultWhether objectives may be generated here at all. Untick for a place that should be lived-in but never a target.
Allow civiliansCheckbox, on by defaultWhether civilians live here. Untick for a camp, an airfield, a supply dump.
Min tierPicker, tiers 1–8Lowest faction tier at which objectives may be placed here.
Max tierPicker, tiers 1–8Highest faction tier at which new objectives may still be placed here.
CiviliansSlider, -1–64How many civilians live here. -1 works it out from the radius.
Proper case nameCheckbox, off by defaultShow the zone’s name in title case wherever players read it, whatever the string table says.

The zone’s name is not in the panel, because it cannot carry text. Right-click the zone and choose Set name instead: type the name, confirm, and it shows on the zone in Game Master straight away. Protected areas and base capture zones have the same action.

Everything but Radius and Exclusion greys out while Exclusion is ticked, because nothing is ever placed in one — an editable field that silently did nothing would be worse than none. Untick Exclusion and they come back.

Doing it from chat instead

The same values are reachable as chat commands, which act on whichever zone you are standing nearest:

/atg zone                    list every marker with coordinates and radii
/atg zone radius <metres>    resize the nearest
/atg zone exclusion          make the nearest an exclusion
/atg zone area               make it a zone again
/atg zone objectives on|off  whether objectives may be generated in the nearest
/atg zone civilians on|off   whether civilians live in the nearest
/atg zone save               write the file

The attributes panel is usually the better tool — it edits what is selected rather than what you are standing beside, and it shows you the current values. The commands are still the quickest way to see every marker at once.

Placing an objective by hand

A Game Master can ask for a particular objective now rather than waiting for the director to draw one:

/atg objective                 list the objective types, and which are valid at the current tier
/atg objective place <name>    place one of that type now

The objective goes through the same placement search as any other, so it lands in a zone and obeys every rule a drawn one does. The start of a name is enough where only one type matches it. If no ground can be found for it right now, the command says so and the server log names the rule that refused it.

Fortified demolition builds its target inside a walled site, and a Game Master can work with the sites directly:

/atg site                            list the site plans, and which objectives draw from them
/atg site place [<plan or name>]     build one in front of you
/atg site objective [<plan or name>] ask the director for an objective built inside one now
/atg site clear                      take down the sites put down with place

Naming an objective rather than a plan draws one of its plans at random. A site built with place has its target in the middle, and a couple of seconds after it goes up it is checked for sightlines from outside to that target — the check a site plan has to pass before it is worth adding. clear takes those sites down and leaves any site that belongs to a live objective alone.

Both commands need a Game Master role, and both need ATG Commands loaded ahead of this mod, like the zone commands above.

radius accepts 50–1000 from chat, exactly matching the slider, so the two routes cannot disagree about what is allowed. The zones file itself accepts up to 5000 if you hand-edit it, but a zone that large is better split into several.

Who can do what

Placing a zone, dragging it and changing its attributes needs a Game Master role — the attributes panel has no privilege of its own, so anyone who can select the entity can edit it. The chat verbs match that.

/atg zone save requires a full administrator. It is the one thing here that writes a file on the server, so it sits a rung above the rest — a session administrator is refused by name. Run /atg whoami to see what you hold.

The file lands at <profile>/ATG/atg-scenario-zones.json and is in force the moment it is written — the command re-reads it and tells you what it now holds, so no restart is needed. A file you edit by hand afterwards is picked up by /atg reload.

If that file already exists it is replaced, and the previous one is kept beside it as atg-scenario-zones.bak.json — the command tells you so. If the backup cannot be written the save is refused and the old file is left alone.

After saving

While anything is unsaved, Game Master says so. Move, add, delete, rename or change a zone, protected area or base capture zone and a warning is pinned at the top of the editor within a few seconds. It stays until /atg zone save is run, and comes back if anything changes again.

Zones placed in game are named Zone 1, Zone 2 and so on until you name them with Set name. A zone placed in World Editor keeps the name it was given there.

A zone standing on a saved zone’s centre picks that zone up — its name, radius, weight, switches and anything you hand-edited in, such as task types. So zones your map ships, or kept in a saved session, come up showing what the file holds, and saving again keeps your edits. A zone placed anywhere else starts from its own settings.

The first exclusion you mark is named MOB, which is what m_sBaseExclusionName already defaults to. Mark your base first and the distance-from-home limits work with no further setting.

The file is also where you add anything the panel does not cover, such as task-type restrictions, described below.

The zone entities themselves take no part in placement — the director reads the file. A zone left in the world does nothing until the next save, and its ring is only visible to a Game Master.

Shipping a zone config in your map mod

Zones are map data, so they can equally live in whichever mod owns your map. That keeps the mod portable and means a map update carries its own geography with it.

In Workbench, create a new config in your map’s mod with ATG_Scenario_ZoneConfig as its root class — somewhere like Configs/Scenario/ObjectiveZones.conf. Your mod needs ATG Scenario as a dependency for that class to be available.

Then point the mod at it by setting m_sZoneConfig to your new config. Because that setting is a single value, it can also be set per-server through the JSON layer, so several servers can run the same map mod with different zone sets.

Until either m_sZoneConfig or a surveyed file exists, nothing can be placed and the mod says so at startup.

Editing the config by eye in World Editor

Rather than typing coordinates, lay the zones out in the world and let two plugins under World Editor’s ATG plugin menu move them in and out of the config:

  • Load zone config into active layer places one Objective zone in the active layer for every zone in the config, with its settings and its ring. It takes the config selected in the Resource Browser, or offers a list of the zone configs it can find. Exclusion zones are not laid out.
  • Save active layer to zone config writes the zones standing in the active layer back into the config, replacing its zone list, each centred where it stands. The config’s exclusion zones are kept as they are.

The zone in the World Editor carries the same settings a Game Master sees, so the attribute table above applies to it too.

Finding coordinates in World Editor

Zone centres are world coordinates, which you read out of World Editor:

  1. Open your world in Workbench’s World Editor.
  2. Navigate the camera to the place you want.
  3. Select any object near the centre of it. A building, a bush, anything static will do; you only need a position, not a specific entity.
  4. Read its coords from the entity properties panel. Three numbers: X, height, Z.
  5. Copy them into m_vCenter.

The middle value is height and is ignored — positions are resolved onto the terrain surface at placement time, so it does not matter if the object you picked was on a rooftop or below ground.

Pick a radius that keeps a fight recognisably in one place. 200–400m works well; larger zones give more variety but risk drifting somewhere that does not suit the objective.

The zones file

Both routes produce the same two lists. Written out as JSON:

{
  "m_aZones": [
    {
      "m_sName": "Naudeh outskirts",
      "m_vCenter": "3120.45 0 5188.12",
      "m_fRadiusM": 250,
      "m_fWeight": 1
    }
  ],
  "m_aExclusionZones": [
    {
      "m_sName": "MOB",
      "m_vCenter": "1024.00 0 2048.00",
      "m_fRadiusM": 400
    }
  ]
}

Keep the keys exactly as written — a mistyped key is not an error, it is a field that silently keeps its default. A file that parses but yields no zones at all is reported when it is read and falls back to the map mod’s config.

To restrict a zone to certain objective types, add m_aTaskTypes to it; the values are the same task types listed under objective templates on Configuration. Leaving it out allows any.

Zone fields

FieldMeaning
m_sNameName for logs, and the place name players are shown when a civilian is killed.
m_vCenterWorld position. The height component is ignored.
m_fRadiusMHow far from the centre an objective may be placed.
m_fWeightRelative likelihood. 0 retires the zone without deleting it.
m_aTaskTypesWhich objective types suit this zone. Empty allows any.
m_bAllowObjectivesWhether objectives may be placed here at all. Default true.
m_bAllowCiviliansWhether people live here. Default true.
m_iCivilianCountHow many live here. -1 derives it from the radius.
m_iMinTierLowest faction tier at which objectives may be placed here. Default 1.
m_iMaxTierHighest tier at which new objectives may be placed here. Default 8.
m_bProperCaseNameShow the name in title case wherever players read it. Default false.

The two tier fields make the campaign spread outward as the faction climbs: give the zones nearest the base a band starting at 1 and the ones further out a higher minimum. Above its maximum a zone takes no new objectives, and any already live in it finish normally, so early zones retire as the front moves on. The band is checked each time an objective is placed, so a tier falling back opens a zone again. It does not affect civilians. If no zone is open at the current tier, nothing is placed and the server log says so at warning level. A zone with neither field loads as 1 to 8. A Game Master sets both from the objective zone’s Min tier and Max tier pickers.

m_bAllowObjectives, m_bAllowCivilians and m_iCivilianCount are independent of each other, so a zone can host objectives with nobody around, people with no objectives, or both — see Civilians. Because a zone name can reach players, give them the names the place actually has rather than internal shorthand.

Restricting task types is worth doing where a place only makes sense for one kind of job — a fuel depot might only ever host Destroy, while a village suits most things.

m_bProperCaseName reaches task titles as well. A zone named with a string-table key such as #AR-MapLocation_Sawmill is translated on each player’s machine and then title-cased there, so a task reads “Destroy vehicle in Saint Philippe” whatever case the string table spells the place in.

Exclusion fields

FieldMeaning
m_sNameName for logs, and what m_sBaseExclusionName matches against.
m_sEntityNameWorld entity to follow. Wins over the coordinate below.
m_vCenterCoordinate, used when no entity is named.
m_fRadiusMNothing may be placed within this distance.

Prefer m_sEntityName wherever the thing being avoided is an entity — a coordinate silently goes stale the moment somebody moves the base in World Editor, and nothing will tell you.

You will want at least one exclusion around your main base, and m_sBaseExclusionName should match its name, since that is what the distance-from-home limits measure against.

What exclusions are and are not for

Exclusions are for permanent features — a main base, a fixed spawn point.

They constrain placed objectives, the ones whose position has to be chosen. They say nothing about anchored objectives, whose location is inherent to what they are: an attack on the main base happens at the main base by definition, so it never asks for a position. Listing somewhere as an exclusion does not make it immune from being attacked — it makes it ineligible as a dartboard for routine objectives.

Avoid listing places that are only sometimes occupied. A static exclusion sterilises that ground permanently, even when nothing is there — and those are often the most interesting parts of a map, which is exactly why something was placed there in the first place.

The constraint pipeline

Vanilla’s terrain search does the first pass: a hexagonal-grid sweep across the zone looking for a clear cylinder, tracing against entities and ocean. Positions come back resolved onto the terrain surface, so “below terrain” cannot happen by construction, and anything intersecting a wall is already rejected.

Candidates then pass through the mod’s own rules, cheapest first so most rejects cost only a distance comparison:

  1. Separation from other live objectives
  2. Outside every exclusion
  3. Within the min–max ring from home
  4. Clear of connected players
  5. Ground variation across the footprint
  6. Open sky overhead

The survivors are pooled and one is chosen at random.

Why the overhead check exists

The clear-cylinder test will happily hand back the inside of a sealed room, because the interior genuinely is empty ground sitting on terrain — exactly what it was asked to find. Tracing upward is what tells a courtyard from a locked room.

What the checks do not cover

Two things the solver cannot judge, worth knowing when you author zones:

Pathability. The checks confirm ground is clear, not that AI can move around it sensibly. A position hemmed in by terrain can be perfectly valid and still make for poor defenders. If a zone consistently produces awkward fights, tighten its radius onto ground you know plays well.

Very tall interiors. A hangar or warehouse with a ceiling above m_fOverheadClearanceM clears the overhead trace. Lowering that setting rejects such interiors, at the cost of also rejecting legitimate spots beside tall buildings — worth adjusting only if you see objectives appearing indoors.