ScienceTechWorks • STW suite
← STW Online Manuals

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

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.

Server setup

  1. Load STW/Bases on the server with the scenario and any content providing the factions/prefabs you plan to use.
  2. Start the server once. STW/Bases creates its default configuration automatically.
  3. Stop the server, back up the generated JSON, then adjust it with a plain-text editor.
  4. Restart and check the server log for [STW] BaseGenerator, SpawnPointGenerator and Persistence messages.

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.

A practical first run: leave the default US, USSR and FIA entries intact, use 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 / filePurpose
$profile:STW/Bases/STWBasesConfig.jsonThe 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.jsonOnly present when the separate STW Bases Crates Integration add-on is installed; controls its crate placement.
Safe editing routine: stop the server; copy the JSON file to a backup; edit valid JSON only; save; then restart. Do not edit the persistence files while the server is running. The mod migrates older configuration versions to its current schema (version 8), but a backup remains the calmest way to experiment.

Global settings in STWBasesConfig.json

SettingMeaning
VersionConfiguration schema version. Leave it to the mod's generated/migrated value.
EnabledMaster switch. When false, the mod publishes an empty integration snapshot and creates nothing.
ForcePlayableFactionsMakes enabled configured factions playable if those factions exist in the scenario.
GenerateArsenalsAllows per-faction arsenal generation.
GenerateMarkersAllows per-faction static base markers.
PersistenceEnabledUses STW/Bases' own JSON layout files. Set false for a fresh layout on every server start.
GenerationRevisionChanges the persistence revision. Increase it when you intentionally want existing saved layouts treated as stale and regenerated.
FactionsArray of faction configurations. Defaults: US, USSR and FIA, with vanilla spawn-point and arsenal prefabs.

Per-faction settings

SettingMeaning
Enabled, factionKeyEnables the entry and identifies an existing scenario faction, for example US, USSR or FIA.
SpawnPoint.Enabled, Count, PrefabWhether to generate spawns, how many (default 3), and the spawn-point prefab. An empty prefab means that faction receives no generated spawn point.
SpawnPoint.StrategyRANDOM 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.
MinimumSeparationMinimum distance between all generated spawn points (default 750 m).
MinimumHostileSeparationMinimum distance from a spawn point belonging to another configured faction (default 1,250 m).
MaximumSlopeDegrees, MaximumPlacementAttemptsTerrain steepness limit (default 12) and attempts per spawn (default 300). More attempts can help difficult maps but adds startup work.
Arsenal.Enabled, PrefabWhether the faction may receive an arsenal and which prefab it uses.
SpawnProbabilityPercentIndependent chance per generated spawn point: 0 never, 100 always, default 100.
MinimumDistance, MaximumDistanceArsenal distance from its base; defaults to 3–6 m. The mod tries up to 40 safe placements.
Marker.Enabled, FactionOnly, TextControls each faction's static marker, whether only that faction can see it (default true), and the label (default Base).
MarkerColorBuilt-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.

FileWhat it stores
STW_SpawnPoints_*.jsonSpawn-point prefab, faction key, position, facing, map name, generation identifier and generation revision.
STW_Arsenals_*.jsonThe 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

  1. Stop the server completely.
  2. Open $profile:STW/Persistence/ and identify the two files whose scenario/map suffix matches the scenario you want to reset.
  3. Copy both files somewhere safe, then remove or rename both matching files.
  4. Start the server. STW/Bases creates a fresh layout and new files for that scenario/map only.
Performance note: base generation happens at startup. Large counts, restrictive separation, steepness limits, and high attempt counts make placement searches longer. Persistence avoids repeating that search on every restart, so it is normally the friendlier choice for a busy Captain Sprocket server.