A lot of the game's most useful composites draw nothing at all: a search job, an area sweep, the spot where an android slams the player into a wall. In the Viewport they would be invisible, and where one stands - and which way it faces - matters to how the game uses it.
Composite markup is OpenCAGE's answer: simple coloured shapes the Viewport draws at every instance of a composite, showing what it is and how it is meant to sit in the level. It is for the editor only. It is never an entity, never part of the composite, and never seen by the game.
OpenCAGE ships markup for the game's job and melee composites, and you can give any composite markup of your own.
These composites have markup in every level that has them, with nothing to set up. Each shape is drawn in the composite's own space, so it moves and turns with every instance.
| Composite | Markup |
|---|---|
Archetypes\Jobs\MeleeContext\MeleeContext_HighCover | A ring on the floor with a raised fist over it, and a line along the floor to a T standing 2.5 m in front: where the face of the wall the android throws the player against goes. |
Archetypes\Jobs\MeleeContext\MeleeContext | As above, with the T 1.25 m in front: the low cover the player is thrown onto. |
Archetypes\Jobs\MeleeContext\MeleeContext_CorpseTrap | A ring, a figure lying on its back and a red warning mark: where an android playing dead grabs the player. It faces away from the android, which lies about 0.9 m behind it. |
Archetypes\Jobs\Base\BaseSearchJob | A ring and a magnifying glass: a spot an NPC searches at. It shows wherever a SearchJob is placed. |
Archetypes\Jobs\Base\BaseAreaSweepJob | A ring and a broom: a spot an NPC sweeps over (in every AreaSweepJob). |
Archetypes\Jobs\Base\BaseIdleJob | A ring and an hourglass: a spot an NPC waits at. |
Archetypes\Jobs\Base\BaseFollow | A ring, one person walking behind another and a red arrow over them pointing the way they walk: one NPC following another. |
Archetypes\Gameplay\Container (and Container_Script) | A closed box held up in front, with a line and arrow from the composite's origin pointing at it: something the player loots. |
Archetypes\Gameplay\Fire_Volume | An orange flame with a yellow core, standing in both side planes so it reads from any side. |
The NPC composites in Archetypes\NPCs\ (Xenomorph_NPC, Facehugger, Egg, Android_NPC, Android_Heavy_NPC, the Worker, Security (Grunt) and Riot NPCs, and the named actors) | The ring, turned so its bar points the way the character faces, and who it spawns written in blue on the floor just behind it, facing up, e.g. XENOMORPH, ANDROID, WORKER / PISTOL, SECURITY / SHOTGUN, MEEKS / SPACESUIT. It reads the right way round from above, and still makes sense with the Character render filter off. |
Archetypes\Script\Mission\SpawnPositionSelect | The ring and PLAYER on the floor behind it: where the player can start. |
CageOnly\front_marker (inside door packages) | The word FRONT in blue on the floor, reading the right way round from the front. |
The ring every job stands on is 0.42 m across, with a bar from its back edge to just past its middle. The composite faces its own +Z (the way a placed entity faces), which for a melee context is towards the T. The icons over the rings stand across the composite, so you see them face on from its front or back.
The two melee contexts' markup is to scale, and is worth lining up exactly: the grapple animation the android plays is laid out from where the context stands, so the surface it throws the player against has to be where the T is.
MeleeContext_HighCover): the T's near face is 2.49 m and its far face 2.5 m in front of the context. Put the T in the face of a high wall, with the context facing it. That is where the game's own levels put theirs: measured in their collision, the wall in front of a retail high cover context is a median 2.5 to 2.57 m away.MeleeContext): the T stands 1.25 m in front.The line along the floor runs from the ring to the T, 4 cm wide. Place AI Markup puts the high cover it places 2.5 m from the wall's face for the same reason.
Markup has its own filter in Render Filters, with the scene's other categories: Markup, on unless you turn it off. Turning it off hides all markup, built in and your own, at once.
Markup is drawn and nothing more. Clicking it selects nothing (a click goes through to whatever is behind it), it isn't listed among the composite's entities, a selected composite isn't greyed out over it, and composite previews leave it out.
Right-click a composite in the Composite Browser and choose Edit Markup. The window shows the composite's built-in markup, if it has any (which can't be changed), and the pieces your level adds to it.
Every change shows in the Viewport straight away, at every instance of the composite, and goes on the undo history (a run of changes to the fields is one step). Your markup is saved with the level.
Nothing. Markup is never written into a composite: the built-in markup is part of OpenCAGE, and your own is kept in a table of OpenCAGE's beside the level's scripts in COMMANDS.PAK, with its other editor data (entity names, flowgraph layouts and so on), which the game doesn't read. Adding markup doesn't mark a composite as changed, so it doesn't make a composite part of a mod, and it costs the game nothing at all.
An AI assistant connected to OpenCAGE lists markup with list_composite_markup (one composite's built-in markup and pieces, or every composite of the level that has markup), adds a piece (or replaces one, with index) with add_composite_markup (shape, position, rotation, size, colour; a Mesh from mesh_file or vertices and indices) and removes pieces with remove_composite_markup. set_viewport_view switches the markup scene filter.