Better Area Map Marker
Developer framework for drawing large, world-aligned circular map areas (zones/objectives) via API. No standalone gameplay features.
Overview
Better Area Map Marker is a dependency mod for authors: it draws large, world-aligned circular zones on the tactical map (outline + soft fill). Players get no gameplay rules from this addon alone you use it from your own Enfusion script so objectives, capture radii, AO rings, etc. show up clearly at any zoom.
What you need in Workbench
- Add REA Better Area Map Marker as a dependency of your addon (same way you depend on the base game script project). Workshop GUID matches the published project (
69072C00BDCBC1AEin the shipped.gproj). - Ship/run with both your mod and Better Area Map Marker enabled on the client that opens the map (the visuals are map UI).
Do not call internal types such as the registry or drawer directly; the supported entry point is BAMM_MapAreaHelper only. That keeps you compatible if internals change.
How it works (architecture)
- Registry: Each circle stores a world XZ center, radius in meters, and color. Handles are positive integers;
AddAreaCirclereturns-1if the radius is ≤ 0 (invalid). - Rendering: While the map is open, the mod attaches a canvas overlay on the map frame and redraws from the registry on the map’s update tick. Circles are tessellated from world space to screen space so they stay aligned when you pan and zoom (this bypasses vanilla map-item culling that would drop huge radii).
- Lifecycle: Closing the map tears down the overlay widget; registered circles remain until you remove them or clear all—reopening the map recreates the overlay and keeps showing whatever is still registered.
The registry is a process-global static store (main game thread). Treat handles like opaque IDs: after ClearAreaCircles(), every old handle is stale use IsAreaCircleRegistered before updates if you are unsure.
API reference (BAMM_MapAreaHelper)
All methods are static. Use from your components, systems, or RPC handlers (see Multiplayer below).
| Method | Purpose |
|---|---|
int AddAreaCircle(vector worldPosition, float radiusMeters, Color color) |
Register a new circle. Returns a handle, or -1 if radius is invalid. |
bool RemoveAreaCircle(int handle) |
Remove one circle. Returns whether a registered entry was removed. |
bool IsAreaCircleRegistered(int handle) |
true if the handle still exists (e.g. after Clear everything is false). |
bool UpdateAreaCirclePosition(int handle, vector position) |
Move the center (world XZ; Y follows your vector). |
bool UpdateAreaCircleRadius(int handle, float radiusMeters) |
Change radius (must be > 0 or update fails). |
bool UpdateAreaCircleColor(int handle, Color color) |
Change color; fill shading is derived from the color you pass (separate fill alpha is computed internally for readability). |
void ClearAreaCircles() |
Remove all circles and reset internal IDs drop every handle you were holding. |
Recommended usage pattern
-
Create when your objective spawns or your mode enters a state that should be visible:
int handle = BAMM_MapAreaHelper.AddAreaCircle(centerWorld, radiusM, myColor);
Ifhandle < 0, abort or fix radius. -
Update when the zone moves or resizes (moving HQ, shrinking zone, pulse effect):
UpdateAreaCirclePosition(handle, newCenter)UpdateAreaCircleRadius(handle, newRadius)UpdateAreaCircleColor(handle, newColor)
-
Remove when the zone ends:
BAMM_MapAreaHelper.RemoveAreaCircle(handle);
OrClearAreaCircles()when your gamemode shuts down / restarts round. -
Defensive coding: If your logic can outlive the zone system, check
IsAreaCircleRegistered(handle)before updates, or clear on mode teardown so you never keep dead handles.
Colors and visibility
- Pass a normal Enfusion
Colorfor the ring; the mod builds a fill variant from it so the interior reads on dark map tiles without you managing two colors. - Very small on-screen circles may render as outline-only (internal diameter threshold) so slivers do not turn into muddy fills.
Multiplayer and where to call from
The tactical map is client UI. The registry lives in the local script world for that game instance. If your authoritative state is on the server, you still need a client-side path that knows the current center/radius (replicated fields, RPC, ScriptInvoker, world entity position you read on the owning/local client—whatever matches your architecture). Calling AddAreaCircle only on the dedicated server will not draw on players’ maps.