STW/Bases
A server-side base generator for Arma Reforger by Bohemia Interactive. STW/Bases creates faction spawn points, optional nearby arsenals and clear static base markers when a scenario starts—so a Game Master can begin with a usable battlefield instead of placing every base by hand.
Created by STW (ScienceTechWorks, sciencetechworks@gmail.com). The system is server-authoritative, works from the active scenario's existing factions, and does not require a custom Game Master prefab or a separate Game Master save.
STW suite connection
STW/Bases is designed to stand on its own while offering a clean server-side API for companion mods. The dedicated STW Bases Crates Integration add-on is the direct STW-suite companion: with STW Crates also installed, it waits until STW/Bases and STW Crates are ready, then creates or reuses a faction crate near each generated base. By default it prefers placement beside an available arsenal, otherwise beside the base.
That integration has its own profile configuration and does not change STW/Bases' spawn-point, arsenal, marker or persistence settings. Install it only if you want crates at bases; STW/Bases itself needs neither it nor STW Crates to operate.
What STW/Bases adds
- Automatic faction spawn-point placement at server startup.
- Two placement strategies: broad
RANDOMplacement andMILITARY_POIplacement near detected military-style locations. - Optional faction arsenals placed near generated spawn points.
- Optional static
FLAG3map markers, with faction-only visibility and faction colours. - Optional automatic activation of configured factions that already exist in the scenario.
- Scenario-and-map-specific persistence for the generated spawn points and arsenals.
Placement rejects water, terrain that is too steep, occupied ground and locations that violate configured spacing. Bases for opposing configured factions are also kept farther apart. If the map cannot provide a valid location within the configured attempts, that individual spawn point is skipped and a warning is logged.
Players and Game Masters
For players
There is no player menu or special interaction to learn. Join a scenario where the server has STW/Bases enabled, select a playable configured faction, and use its generated spawn points as normal. When base markers are enabled and visible to your faction, they appear as static flag markers; their text uses the nearest named map location followed by the configured label, such as Montignac Base.
The optional arsenal is a normal spawned arsenal prefab beside a base. Its available equipment comes from that prefab and the rest of the server's loaded content, not from an STW/Bases inventory menu.
For Game Masters and scenario authors
STW/Bases starts automatically on the server shortly after the game world is available. No Game Master placement is required. It hooks the base game mode rather than replacing a complete mode, so it is intended to be comfortable in Game Master scenarios and other compatible game modes.
- Make sure each configured
factionKeyis actually present in the scenario. STW/Bases can make an existing faction playable, but it never creates a new faction. - Use markers while testing a new configuration; faction-only markers are a useful way to keep each side's base information private.
- For custom factions, provide valid spawn-point and arsenal prefab paths yourself. The included defaults are for US, USSR and FIA.
- Other server-side mods can read the generated-base snapshot through
STW_BasesAPIafter it reports ready. This is for mod integrations, not a player-facing feature.
Server setup
- Load STW/Bases on the server with the scenario and any content providing the factions/prefabs you plan to use.
- Start the server once. STW/Bases creates its default configuration automatically.
- Stop the server, back up the generated JSON, then adjust it with a plain-text editor.
- Restart and check the server log for
[STW] BaseGenerator,SpawnPointGeneratorandPersistencemessages.
The mod's project dependency is Arma Reforger's base content. No other STW mod is required for STW/Bases itself. The optional STW Bases Crates Integration add-on requires both STW/Bases and STW Crates; when installed, it can create or reuse a faction crate for each generated base.
RANDOM, start with three spawns per faction, and keep persistence and markers enabled. Tune one factor at a time after you have seen the map's results.Configuration files and safe editing
Configuration lives in the server profile, not in the downloaded mod. $profile means the profile directory selected by the server's -profile parameter. Run the server once to create these folders:
| Folder / file | Purpose |
|---|---|
$profile:STW/Bases/STWBasesConfig.json | The only STW/Bases settings file: master switches and faction-by-faction base settings. |
$profile:STW/Persistence/ | Generated spawn-point and arsenal layouts, kept separately from the settings. |
$profile:STW/BasesCratesIntegration/STWBasesCratesIntegrationConfig.json | Only present when the separate STW Bases Crates Integration add-on is installed; controls its crate placement. |
Global settings in STWBasesConfig.json
| Setting | Meaning |
|---|---|
Version | Configuration schema version. Leave it to the mod's generated/migrated value. |
Enabled | Master switch. When false, the mod publishes an empty integration snapshot and creates nothing. |
ForcePlayableFactions | Makes enabled configured factions playable if those factions exist in the scenario. |
GenerateArsenals | Allows per-faction arsenal generation. |
GenerateMarkers | Allows per-faction static base markers. |
PersistenceEnabled | Uses STW/Bases' own JSON layout files. Set false for a fresh layout on every server start. |
GenerationRevision | Changes the persistence revision. Increase it when you intentionally want existing saved layouts treated as stale and regenerated. |
Factions | Array of faction configurations. Defaults: US, USSR and FIA, with vanilla spawn-point and arsenal prefabs. |
Per-faction settings
| Setting | Meaning |
|---|---|
Enabled, factionKey | Enables the entry and identifies an existing scenario faction, for example US, USSR or FIA. |
SpawnPoint.Enabled, Count, Prefab | Whether to generate spawns, how many (default 3), and the spawn-point prefab. An empty prefab means that faction receives no generated spawn point. |
SpawnPoint.Strategy | RANDOM searches across the map. MILITARY_POI searches around detected military, barrack, bunker, arsenal, headquarters, checkpoint, watchtower or hangar-style entities; it falls back to random placement if no candidates are found. |
MinimumSeparation | Minimum distance between all generated spawn points (default 750 m). |
MinimumHostileSeparation | Minimum distance from a spawn point belonging to another configured faction (default 1,250 m). |
MaximumSlopeDegrees, MaximumPlacementAttempts | Terrain steepness limit (default 12) and attempts per spawn (default 300). More attempts can help difficult maps but adds startup work. |
Arsenal.Enabled, Prefab | Whether the faction may receive an arsenal and which prefab it uses. |
SpawnProbabilityPercent | Independent chance per generated spawn point: 0 never, 100 always, default 100. |
MinimumDistance, MaximumDistance | Arsenal distance from its base; defaults to 3–6 m. The mod tries up to 40 safe placements. |
Marker.Enabled, FactionOnly, Text | Controls each faction's static marker, whether only that faction can see it (default true), and the label (default Base). |
MarkerColor | Built-in custom-marker colour. Defaults are US blue, USSR red, FIA green and orange for other/custom factions. |
Invalid numeric values are constrained to safe ranges: percentages stay 0–100, counts and distances cannot be negative, placement attempts are at least one, and an arsenal maximum distance cannot be lower than its minimum.
Persistence: keeping a base layout
With PersistenceEnabled true, STW/Bases saves the generated spawn points and arsenals independently. The files are scoped to the active scenario and loaded map, with names like:
$profile:STW/Persistence/STW_SpawnPoints_SCENARIO_MAP.json$profile:STW/Persistence/STW_Arsenals_SCENARIO_MAP.json
The actual SCENARIO_MAP portion is derived from the mission/scenario name and world file name, sanitized for a safe filename. This prevents one map's generated entities being restored onto another map.
| File | What it stores |
|---|---|
STW_SpawnPoints_*.json | Spawn-point prefab, faction key, position, facing, map name, generation identifier and generation revision. |
STW_Arsenals_*.json | The corresponding arsenal prefab, faction, position, facing and its association with a base, plus generation/map identifiers. |
On a later restart, valid saved spawn points are recreated first, their static markers are recreated, and valid matching arsenals are restored. If the spawn-point file is missing, stale, uses a different map, has a different generation revision, or no longer matches the configured faction counts, STW/Bases generates a new layout. Because arsenals depend on that layout, their file is also regenerated when spawn points are regenerated.
Resetting one scenario/map safely
- Stop the server completely.
- Open
$profile:STW/Persistence/and identify the two files whose scenario/map suffix matches the scenario you want to reset. - Copy both files somewhere safe, then remove or rename both matching files.
- Start the server. STW/Bases creates a fresh layout and new files for that scenario/map only.