Add team sharing of players prospection findings using GTNHLib Teams - #85
Merged
Conversation
tiffit
reviewed
May 25, 2026
tiffit
left a comment
Member
There was a problem hiding this comment.
a bunch of very minor nits, code looks good otherwise. Will do some in-game testing once GTNHLib is updated
Also add a sendChat helper
Address comment
3 tasks
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.
Replace Shared Prospecting
(which is currently broken in dailies due to mixins being dodged by newer VP PRs)
Share all prospection findings (ore veins, underground fluids, veins marked depleted from map) across members of a same GTNHLib Teams.
Default to on but can be disabled via
B:enableTeamSharing=falseinconfig/visualprospecting.cfg.explorer_4XhgZ2CBZ8.mp4
How it works
TeamProspectionData
Manage what get stored into gtnhteams
<teamuuid>.jsonfile.Did my best to keep it compact and fast.
Only store coordinate keys then match it to VP server cache files.
Compress everything into a gzipped base64 blob of data (with some tricks to make it more compressible).
Since currently gtnhteams are all loaded on server start I also doesn't expand the data until a team is accessed.
New commands
/vp_team_info [player] [detailed]: inspect a team's prospection record. (only your team if not op)/vp_team_clear <player>: wipe a team's server-side prospection record (op/console).Limitation
Right now you can't push client data. So until player or someone in the team re-prospect an area that data won't exist on server side and can't be shared. Allowing client cache upload could be maybe a future improvement (with item or command).
Known Bug
Right now on team merge one "side" doesn't get the resync instantly for some reason. Confirmed to be a GTNHLib issue.Need help deciding
If someone leave a team, do they get to keep the data or get a blank state ?Status
I tested it on full pack. Both in SP and with server + 2 clients setup.
Had a 50+ points checklist and solved every issue I found
It's "ready"
I do have a list of things I could improve later on.