Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions docs/formats/save.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,11 @@ after the call sign's terminator, which OpenReliant writes as zeros.

`Rack1` to `Rack20` are the racks in `saved_racks`' order. Loading the save puts each back over
its base where its mod is still on, and keeps the base otherwise.
- **Improvement:** which of the game's variables a saved game keeps is in their records
- **Improvement:** the records of the game's variables say which of them a saved game keeps
(`records.game_variables`, [The game's variables](../guide/scripting.md#the-games-variables)).
`VARS` always holds the original's 25, so that the original can still read the save, and a load
puts back those of them whose records say a saved game keeps them: all 25 with the original's
records.
`VARS` has no room for the others a saved game keeps, such as those mods add
records. `VARS` has no room for the others a saved game keeps, such as those mods add
([Game variables](../guide/modding.md#game-variables)), so the `.mods` file keeps their values
under `[Variables]`, each by its name, or by its number where it has none
(`save.ModVariables`):
Expand Down
8 changes: 4 additions & 4 deletions docs/guide/modding.md
Original file line number Diff line number Diff line change
Expand Up @@ -924,8 +924,8 @@ A mission can put the player in a ship type based on a ship the player can't fly
Basilisk. The player flies it with a cockpit only if it gives `Cockpit`. Its base has no wire frame,
wing icon, blind fire or spectral shields, so it has only those it gives, and its `WireFrame` and
`WingIcon` pictures are drawn over the Predator's rectangles, as for a type without a base. Without
a `Cockpit`, the player flies it as the game's own such ships, without a cockpit, a wire frame or a
wing icon, and the log names the keys it leaves unused.
a `Cockpit`, the player flies it like the game's own ships of that kind, without a cockpit, a wire
frame or a wing icon, and the log names the keys it leaves unused.

A mission can launch ships from a mod's ship type, the player's among them. One that keeps its
base's model launches them as its base does, such as from the Reliant's tubes. One with a model of
Expand Down Expand Up @@ -1099,8 +1099,8 @@ Saved=no
- `Saved` says whether a saved game keeps it, `yes` without it. A saved game keeps a mod's variables
in its `.mods` file, by their qualified names, such as `pirates:pirates_beaten`. Loading a saved
game from before the mod was on gives a variable its `Start`.
- These make the variable's record, beside the game's own in `records.game_variables`, which load
scripts can change, the game's variables too
- These keys make the variable's record in `records.game_variables`, beside the records of the
game's own variables. Load scripts can change any of them
([The game's variables](scripting.md#the-games-variables)).
- Scripts read and set the values with `world.variable` and `world.set_variable`, a mod's by its
qualified name, or by its own name in the mod's own scripts ([Objects](scripting.md#objects)). The
Expand Down
12 changes: 6 additions & 6 deletions docs/guide/scripting.md
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,6 @@ end
read and set the game's variables, as the mission's script does: one of the game's by its name,
such as `"krasnaya_alive"`, or its number, and one a mod adds by its qualified name
([Game variables](modding.md#game-variables)).

- `type` is a name such as `"predator"`, or the qualified name of a mod's type, such as
`"teapot:teapot"`.
- `shields` and `armor` give each quadrant: `left`, `right`, `fore` and `aft`. `hull` is the share
Expand Down Expand Up @@ -1556,9 +1555,10 @@ records.room_views[2].label = "Report for Duty"
### The game's variables

`records.game_variables` says what the campaign does with each of the game's variables, the ones a
mission's script reads and sets by number ([The game's variables](../engine/script-vm.md#the-games-variables)).
It holds one for each number, from 0 to 255, and a script also finds one by its name: the game's,
such as `krasnaya_alive`, or the qualified name of one a mod adds
mission's script reads and sets by number
([The game's variables](../engine/script-vm.md#the-games-variables)). It holds one for each
number, from 0 to 255, and a script also finds one by its name: the game's, such as
`krasnaya_alive`, or the qualified name of one a mod adds
([Game variables](modding.md#game-variables)). Each has:

- `name`, its name, or nil for a number without one. It can't be changed.
Expand All @@ -1580,8 +1580,8 @@ records.game_variables.countdown = { attempt = 60 }

- The table always has its 256 variables: a script changes them but can't add or remove them. A mod
adds a variable of its own, with a name, in its manifest.
- A saved game keeps the 25 variables the original keeps where the original keeps them, so that the
original can still read the save, and the others it keeps in its `.mods` file
- A saved game keeps the original's 25 variables where the original keeps them, so that the
original can still read the save, and any others in its `.mods` file
([Saved games](../formats/save.md#in-openreliant)).
- Scripts read and set the values in a mission that runs with `world.variable` and
`world.set_variable` ([Objects](#objects)).
Expand Down
Loading
Loading