Repository navigation
fix(waypoint-tools): leave loaded.json to the Gateway that runs the game - #39
Merged
evrydayjunglist merged 1 commit intoNov 13, 2026
Conversation
Waypoint's Give item answered that the mod is not loaded whenever
Waypoint was started while the game already ran, until the Gateway
loaded the mod again.
A Gateway asked for its `commands` or `values` loads the mods too, for
their commands, and Waypoint's Console asks when Waypoint starts. The mod
wrote loaded.json on every load, so that short-lived Gateway wrote its
own process over the one that runs the game and ended: the file named an
ended process, which Waypoint reads as "left by a Gateway that stopped".
loaded.json now belongs to the first Gateway that loads the mod in the
folder, for as long as it runs. Another Gateway there leaves the file
and the requests alone. When the named process has ended (a stop does not
unload the mods) or is another program by now, the next scan takes the
file, a quarter of a second later at most. The file gains `started`, the
named process's start time, so a process number used again is not taken
for the Gateway; a file without it (1.0.2 and before) is matched by the
program's name. Unloading removes the file only when it is this
Gateway's.
1.0.3. Checked on a LocalExile 0.5.1-beta release with the 3.29.3d
client: with the game running, a `commands` run leaves the file naming
the game's Gateway; a file naming an ended process, or another running
program, is taken back within a second; asked first and started after,
the Gateway takes the file; and a Waypoint started while the game ran
gave an Iron Ring ("Added Iron Ring"), where with 1.0.2 it answered that
the mod is not loaded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Waypoint's Give item answered "Give item uses the Waypoint Tools mod, and no running game has it loaded" whenever Waypoint was started while the game already ran, until the game's Gateway loaded the mod again.
Cause. A Gateway asked for its
commandsorvalues <kind>loads the mods too, for their commands, and Waypoint's Console asks when Waypoint starts. The mod wrotedata/waypoint-tools/loaded.jsonon every load, so that short-lived Gateway wrote its own process over the one that runs the game and then ended. Waypoint reads a file naming an ended process as "left by a Gateway that stopped". LocalExile/Waypoint#31 found the same cause and said the root fix belongs in the mod; this is it.Fix.
loaded.jsonnow belongs to the first Gateway that loads the mod in the folder, for as long as it runs:started, the named process's start time, so a process number that is used again is not taken for the Gateway. A file without it (1.0.2 and before) is matched by the program's name.Waypoint reads
protocol,actionsandpidonly, so the new field changes nothing for it, and the protocol number stays 1. Waypoint's own docs for this are in LocalExile/Waypoint#34; it needs no code change.Version 1.0.2 becomes 1.0.3, the README says what the file now means, and
mods.jsonis rebuilt. The change needs nothing new in LocalExile.compatibleClientVersionsis unchanged (0.4.3-beta, 0.5.0-beta, 0.5.1-beta): the new code uses onlySystem.Diagnostics, but it was played on 0.5.1-beta only.Testing
Built against LocalExile main
77d300870and run on a LocalExile 0.5.1-beta release folder with the 3.29.3d client.loaded.jsonnames the game's Gateway, withstartedGameServer.Gateway commandswhile the game's Gateway runscommandsprocess, which had ended)commandsfirst, with no servers running; then the servers started[mods] unloaded waypoint-tools,[mods] loaded waypoint-tools 1.0.2; the file was the Gateway's againNot checked: a source checkout (a Gateway run through
dotnet), LocalExile 0.4.3-beta and 0.5.0-beta, Linux.tools/build-index.ps1 -Checkpasses.