Repository navigation
Custom Missions
Missions don't need Unity. A mission mod is a folder of JSON files (plus optional portraits and voice files), so the same files work on PC and Quest. Missions can be offered at stations like stock side missions, or chained into a story with a campaign.
A finished example ships with the AssetCreator in the Samples/sample-campaign folder (next to Assets), see Samples.
my-missions/
mod.json the mod's id, name and type
characters.json your cast (optional), see Custom Characters
portraits/*.png portraits named in characters.json (optional)
voice/<character>/ line audio (optional, lines without audio are text only)
missions/*.json one mission per file
campaign.json optional, turns the missions into a storyline
mod.json:
{
"id": "my-missions",
"name": "My Missions",
"type": "missions",
"version": "1.0.0",
"author": "you"
}The id is lowercase letters, numbers and dashes. Don't change it once you've published, saves remember it.
Each file in missions/ is one mission. This one sends the player to a nearby sector, has them scan an area, then fight off raiders:
{
"id": "lantern-run",
"title": "Lantern Run",
"desc": "A guild courier went quiet in a nearby sector. Find him before the raiders do.",
"giver": "dispatcher",
"offer": { "atStations": true },
"location": { "type": "nearby" },
"outcomes": { "killed": "restart", "successLines": ["He's home safe. Thank you."] },
"rewards": { "credits": 20000 },
"brief": [
{ "do": "say", "who": "dispatcher", "text": "One of my couriers stopped answering. His last ping came from a sector close to you." }
],
"spawn": [
{ "do": "fleet", "id": "guild", "faction": "neutral", "relation": "friendly" },
{ "do": "ship", "id": "lantern", "fleet": "guild", "template": "Cargo Frigate", "name": "Lantern",
"at": "far", "offset": 6000, "invincible": true, "brainOff": true }
],
"steps": [
{ "id": "search",
"actions": [
{ "do": "say", "who": "crew:coms", "text": "Faint beacon. It's marked on the map." },
{ "do": "scanArea", "id": "beacon", "at": "ship:lantern", "radius": 6000, "time": 15, "label": "the beacon area" }
],
"next": [ { "on": "scanned", "ref": "beacon", "goto": "fight" } ] },
{ "id": "fight", "checkpoint": true,
"actions": [
{ "do": "hunters", "id": "raiders", "faction": "pirate", "strength": 0.5, "at": "farRight", "targets": ["player", "lantern"] },
{ "do": "objective", "key": "raiders", "text": "Destroy the raiders" }
],
"next": [ { "on": "fleetDestroyed", "ref": "raiders", "goto": "success" } ] }
]
}- The player accepts it. brief plays once.
- The player jumps to the mission sector. spawn runs every time the sector loads, before the player arrives.
-
steps play in order, starting at the first step (or the last step marked
"checkpoint": trueif the player died or left after reaching it). A restart rebuilds onlyspawnand then jumps to the checkpoint, so a checkpoint step can't rely on ships, fleets,blockWarporinvinciblechanges from earlier steps. - Each step runs its actions one after another. Its next triggers are checked every second. The first one that fires goes to its
gotostep, or ends the mission with"success"or"failed".
| Field | What it does |
|---|---|
id |
lowercase letters, numbers, dashes. Unique inside your mod |
title, desc
|
shown in the mission list |
giver |
the character who gives the mission and speaks the leave, success and fail popups |
offer |
atStations (offered at stations, false = only a campaign or another mission starts it), stationFactions (list, empty = any station), weight, repeatable, requiresFlags, excludeFlags
|
location |
where it happens, see below |
outcomes |
killed: restart or fail. abortable. fledLines, successLines, failLines: the giver's popups |
rewards |
credits, setFlags, equipment: list of { "title": "LCT2B", "level": 1, "count": 1 }
|
brief, spawn, steps
|
see above |
type |
Meaning |
|---|---|
nearby |
a sector near the player |
nearFaction |
a sector near faction's space. spread widens the search |
sector |
a named sector from your campaign's map ("sector": "<id>") |
nearSector |
a fresh sector one jump away from a named sector on your campaign's map ("sector": "<id>"), instead of that sector itself. Good for an ambush on the way to a story location |
Travel goals. These have no mission sector. The goal shows in the objective list, and once it's met the steps play wherever the player is. steps can be left out, then meeting the goal completes the mission. faction and range pick the stations or sectors, label adds a header line.
type |
Fields | Goal |
|---|---|---|
stations |
count (1 to 6), visitLines, visitWho | Dock at that many stations. visitLines play after each visit but the last, spoken by the giver or visitWho (ex crew:coms) |
deliver |
item, qty, given, pickup | Take qty of an item to a station. given (default true) puts it in the hold on accept, and losing it fails the mission. pickup: true means collect it at another station first |
gather |
item, qty | Have qty of an item in the fleet (cargo already carried counts) |
sectors |
count (1 to 6) | Visit that many nearby sectors |
kill |
target (a faction), qty | Destroy qty ships of that faction, anywhere |
bounty |
prices ({ "Jump Fuel": 150 }, credits each) |
Dock at a station with any of those items. They're sold there and the reward becomes their value |
Travel missions can't use spawn. Their steps can only use dialog, objectives, setFlag, wait, goto and complete, and their triggers only done, timer and flag.
who, captain and giver take:
- an id from your
characters.json -
giver, the mission's giver -
crew:helm,crew:tactical,crew:coms, the player's bridge crew -
ship:<id>, the captain of a ship the mission spawned
Tips from the stock missions:
- Don't give the same speaker two popups in a row. Split them with another speaker, or merge the lines.
- Point players to markers on the map, not to directions like "north" or "west".
- The bridge crew shouldn't interrupt a transmission. Let the caller finish first.
Where things are placed: center, entry (where the player arrives), far, farLeft, farRight, left, right, nearLeft, nearRight, player (the player's flagship, which always warps in first), nearPlayer (10 to 16 km from the player), ship:<id>, toward:<anchor> (a nearPlayer point on the side of another anchor). Add offset (meters) for a random spread around it.
Every action has "do". Any action can also have ifFlags / ifNotFlags to run only when those flags are (or aren't) set.
Dialog
| Action | Fields |
|---|---|
say |
who, text, pauseMs, audio. Waits for the line to finish |
line |
who, text. Doesn't wait |
choice |
who, text, options (list), goto (a step per option), timeout (seconds), default (option index on timeout) |
objective |
key, text, done (true ticks it off) |
removeObjective |
key |
Spawning
spawn runs while the sector loads, so it only takes fleet, ship, hunters, guards, flagshipCaptain, nebulas, jamming, warpInPoint, relation, invincible, targetable, shields, holdFire and farewell. Anything else, such as capturers, support or defendArea, goes at the start of your first step instead. A mission that breaks this fails the check and is skipped.
If an action's faction isn't on the current save's map (for example, a save made before a campaign added that faction), its ships spawn as Marauders instead.
| Action | Fields |
|---|---|
fleet |
id, name, faction, relation (friendly, neutral, hostile), escort (flagship or a ship id to form up on) |
ship |
id, fleet, template (class name like Cargo Frigate or id like bgvr-cor, mod ships work too), name, captain (or gender, for a generated captain), at, offset, invincible, targetable, alwaysVisible, brainOff (AI off), salvage, warpIn (default false), noLaunch (never launches its fighters), standoff (an anchor: the ship arrives at 95% of its weapon range from it) + standoffDistance (fixed meters instead), immobile (true: max speed 0, the ship never moves), dockTo (id of a ship spawned earlier, usually a station: the new ship spawns in a berth on it) + dockOffset ([x, y, z] in meters, in the dockTo ship's local space) + dockYaw (degrees, relative to the dockTo ship's facing), noCapture (true: the ship never counts in capture areas, so a friendly ship that isn't the player's won't contest the player's capture) |
hunters |
id, name, faction, strength (share of the player fleet, 0.5 = half), at, offset, targets (player, ship ids, fleet ids), relation, warpIn, canRetreat, standoff + standoffDistance, matchTargets. With "matchTargets": true the fleet is worth the targets' combined value times strength (default 1) instead of scaling to the player's fleet, so targets ["convoy", "player"] matches a convoy plus the player. noLaunch (true: the fleet's hangars stay shut and it launches no fighters). excludeShips (ship templates the generated fleet never uses: class names, bgvr- ids or mod ship ids, e.g. ["Cargo Frigate"]; ignored if leaving them out would leave nothing to spawn). plusShips (with matchTargets: a list of ship templates whose hull and default gear value is added once on top, e.g. twice the player plus one Cargo Frigate) |
guards |
id, name, faction, strength, at, target (ship to guard), radius, relation, warpIn, plusAllies. With "plusAllies": true the fleet is sized against the player's fleet plus every friendly AI fleet already in the sector, so spawn it after the allies arrive. E.g. { "do": "guards", "id": "screen", "strength": 1.0, "plusAllies": true, "warpIn": true }
|
capturers |
id, name, faction, strength, at, target (a container group). They go for your containers, then hunt the player |
support |
id, name, faction, strength (how much the player's side should outweigh the enemy, 1 = even), at, targets, text and who (line played only if ships actually came) |
flagshipCaptain |
fleet, captain (or gender, voice, subtitle) |
nebulas |
anchors (list), perAnchor, spread |
jamming / clearJamming
|
value (0 to 1, share of sensor range lost) |
warpInPoint |
at: where the player arrives (default entry). Optional standoff (an anchor such as ship:<id> for a ship spawned earlier in spawn): the player drops in just outside that ship's longest weapon range (110%), on the side of at, or standoffDistance meters from it if set. E.g. { "do": "warpInPoint", "at": "entry", "standoff": "ship:fortress" }
|
To park a ship at a station, dock it there. A docked capital ship should usually also be immobile and brainOff:
{ "do": "ship", "id": "flagship", "fleet": "yard", "template": "Cargo Frigate", "dockTo": "shipyard", "dockOffset": [0, 300, 720], "dockYaw": 0, "immobile": true, "brainOff": true }hunters and fleet actions that share the same name merge into one fleet. That's handy for an escort that joins a ship you placed yourself, with excludeShips keeping it from bringing a second ship of the same class.
Objectives
| Action | Fields | Trigger it fires |
|---|---|---|
scanArea |
id, at, offset, radius, time, label | scanned |
scanShip |
id, ship, radius, time, label, verb (the word on the marker and objective, default Scan, e.g. Restore), fixedRate (true: exactly 1 second of progress per second, however many ships are inside), allowLose (false: enemies in the area can't complete it) |
scanned, capturing
|
disableShip |
id, ship, systems (weapons, engines, shields; default weapons + engines), label. Shows live system percentages. Once down the ship can't be targeted or destroyed |
disabled |
disableShips |
id, targets (ship or fleet ids) or ship / fleet, systems, label. Fires when all are down | disabled |
destroy |
id, targets or ship / fleet, label, noEscape. A ship that jumps out counts as gone, unless noEscape is set |
destroyed, escaped
|
defend |
id, targets or ship / fleet, label, all. Coms calls out their health. Fires when one dies, or every one with all: true
|
defendLost |
escort |
id, fleet, at, offset, radius. The fleet flies to the anchor in convoy and jumps out there. Pair it with defend
|
warpedOut |
containers |
id, count, at, offset, time, label, allowLose |
recovered, lost
|
hold |
id, time, text, at, radius (0 = anywhere) | holdDone |
surge / stopSurge
|
id, every, warning, radius, damage (share of hull) |
Control
| Action | Fields |
|---|---|
ping / unping
|
target (ship id): marks it on the map |
blockWarp / unblockWarp
|
stops the player jumping out |
relation |
fleet, target (another fleet, empty = the player), relation. If the target fleet doesn't exist, nothing changes and a warning goes to the log |
hunt |
fleet, targets, time (delay) |
onlyTarget |
fleet, targets (no targets lifts the lock), time |
power |
ship or fleet, mode (balanced, weapons, shields, engines), hold, time |
holdFire |
ship or fleet, hold (false lets it fire again), time |
defendArea |
fleet, at, offset, radius (default 4000 m), target (optional ship id to stay near). The fleet patrols the area and fights anything that comes in, like stock guards. A later hunt replaces it |
brain |
ship, awake (default true: AI on, and hangars open unless the ship has noLaunch; false: AI off), time (seconds later, even after the mission has ended) |
warpAway |
fleet |
invincible |
ship, invincible, time |
targetable |
ship, targetable (default true; false: the ship can't be targeted or selected). E.g. a station spawned with "targetable": false can join the fight later with { "do": "targetable", "ship": "station", "targetable": true }
|
shields |
ship, up (default true). false empties the ship's shields and stops them recharging; true lets them recharge normally again |
farewell |
ship, who (default ship:<id>), text, value (hull share that triggers the line, default 0.2), flag (set if the ship dies). The ship says its line once, when its hull drops that low or it dies, without pausing the step. For a line on death, an event with shipDestroyed is the better choice. A later mission can leave the ship out with ifNotFlags on that flag. E.g. { "do": "farewell", "ship": "lantern", "text": "Hull's breaking up. It was an honour, Captain.", "flag": "lantern_lost" }
|
giveShip |
ship: joins the player's fleet for good |
setFlag |
flag |
credits |
value (negative takes credits) |
giveItem |
name (default Jump Fuel), count |
takeItems |
value (share taken, 0 to 1, default 0.5), optional name. Every player fleet loses that share of each item in its cargo, rounded down. With name, only that item is taken |
wait |
time (seconds) |
goto |
goto: ["step-id"]
|
complete |
outcome: success or failed
|
{ "on": "...", "ref": "...", "value": 0, "goto": "step-id" }. goto can also be success or failed.
on |
Fires when |
|---|---|
done |
the step's actions have all finished |
scanned |
scan ref is complete |
scanCount |
value scans are done, in any order (no ref) |
capturing |
the player's side has started making progress on scan ref
|
recovered |
every container in group ref is recovered or lost |
lost |
the enemy took a container from group ref. List it before recovered
|
disabled |
disableShip / disableShips ref is done |
destroyed |
destroy ref is done |
escaped |
a ship from destroy ref (with noEscape) jumped out |
defendLost |
defend ref lost its ship (or all of them) |
warpedOut |
every ship of escort ref has jumped out |
fleetDestroyed / shipDestroyed
|
fleet or ship ref is gone |
noEnemies |
every hostile fleet the mission spawned has died or jumped out (no ref). E.g. warpAway the enemy fleets, then { "on": "noEnemies", "goto": "debrief" }
|
shipDisabled |
ship ref has engines and weapons at zero |
shipHull |
ship ref's hull is at or below value (a share, default 0.5), or the ship is gone. E.g. { "on": "shipHull", "ref": "flagship", "value": 0.75, "goto": "reserves" }
|
shipShield |
any one of ship ref's six shield arcs is at or below value (a share, default 0.5), or the ship is gone. E.g. { "on": "shipShield", "ref": "flagship", "value": 0.5, "goto": "reinforcements" }
|
holdDone |
hold ref is finished |
timer |
value seconds since the step started |
near |
any player ship is within value meters of anchor ref
|
flag |
flag ref is set |
left |
the player jumps out during this step. goto must be success or failed. It resolves once the player's fleet is inside the warp tunnel, not when the jump starts |
An event is a trigger plus a list of actions. It can fire during any step without changing the step, and it fires at most once per mission run. Use events for things that can happen at any time, like a line and a flag when an ally dies. Put an events list next to steps:
"events": [
{ "on": "shipDestroyed", "ref": "lantern", "actions": [
{ "do": "say", "who": "courier", "text": "Lantern's breaking up. Get clear, Captain!" },
{ "do": "setFlag", "flag": "lantern_lost" }
]}
]- Any trigger works except
done,timerandleft, which only make sense for a step. Every trigger exceptscanCountandnoEnemiesneeds aref. - An event has no
goto, and it can't containgotoorchoiceactions. - For a line from a ship that may already be dead, use a character id from characters.json for
who, notship:<id>. - Campaigns can add events to every mission too, see Custom Campaigns.
Flags are yes/no switches saved with the game. Your mod's flags are kept separate from other mods, so name them however you like. story:<flag> reads a stock story flag (read only).
-
Killed:
restartkeeps the mission and it starts again (from the last checkpoint) next visit.failfails it. -
Fled: the giver says one of the
fledLinesand the mission waits for the player to come back.
Copy the folder to the game's mods folder:
C:\Users\[yourname]\AppData\LocalLow\SpaceOwl Games\BattleGroupVR2\mods\my-missions
Start the game and open Options > Mods. Every file is checked when the game loads. A mission with a mistake is skipped, and the problem is listed on your mod there, with the file name. Station missions show up at stations in Open World.
-
A mission doesn't show up: open Options > Mods and read the errors listed on your mod. The usual causes are a typo in an action or field name, a
nextthat points to a missing step, or an action inspawnthat isn't allowed there (see Spawning). - A campaign doesn't show up: if any mission in a campaign fails the check, the whole campaign won't load. Fix the mission and the campaign comes back.
- A save says "Mod has errors": the mod is installed but something in it is broken. The save list shows the first error, and the save's details list the mod as "(has errors)". Fix that error and the save loads again.
- A save says "Needs mod": the mod isn't installed. The save's details list it as "(missing)". Install the mod again. Campaign missions start from a new Open World game, see Custom Campaigns.
Zip the mod folder and upload it to mod.io with both Windows and Oculus ticked. It's the same file on both. See Publishing To mod.io.