Closed Nomad7 closed 4 years ago
Try setting the tag for a couple in the planetDefs of the world. Does that change anything?
Silly question, is the config advancedRocketry.cfg,txt
on disk with the txt extension?
@Silfryi what do you mean by 'the tag'? Currently everything is marked as IsKnown=False (see the attached planetDefs config), but everything is still visible in the map.
@zmaster587 no, I just renamed a copy as .txt to upload here since I got an error when trying to upload the .cfg. The server has the original .cfg file. Sorry for the confusion!
@Nomad7 Change this line B:planetsMustBeDiscovered=false
to true in your Advanced Rocketry config. That's likely the problem
@Silfryi Sorry, I hadn't intended for my config upload to cause such confusion, looks like the copy I uploaded is from before following the steps I described. The server currently has planetsMustBeDiscovered=true: advancedRocketry.cfg_ServerCurrent.txt But I've changed this setting back and forth several times now, the only apparent difference is whether we can select the various planets as a destination for warp or not. They all still show up in the Warp Controller list, regardless of the config setting. Since setting planetsMustBeDiscovered=true on my single player game makes all the unknown planets disappear from the warp controller list, I'm guessing there's either a bug or some server/config/modpack issue that I've missed.
I'm at a bit of a loss at this point - I'd be happy to get on a Discord or Skype call and do a screen share to show the behavior I'm seeing and troubleshoot the root cause, if that would help. If this is a modpack issue I'd be happy to report it to the Enigmatica folks, I was just hoping to confirm the nature of the issue here first - changing planetsMustBeDiscovered to true and reloading the planets from xml should remove planets where isKnown=false from the warp controller list, right?
New information from additional testing: I went through the planet discovery process and 'discovered' planet Sol-126: 3. I can browse through the (fully populated) planets list in the warp controller and select Sol-126: 3 as a warp destination. However, the server's world/advRocketry/planetDefs.xml entry for this planet still says isKnown should be false:
<planet name="Sol-126: 3" DIMID="130">
<isKnown>false</isKnown>
<fogColor>1.0,1.0,1.0</fogColor>
<skyColor>0.0,0.86132765,1.0</skyColor>
<gravitationalMultiplier>42</gravitationalMultiplier>
<orbitalDistance>194</orbitalDistance>
<orbitalPhi>0</orbitalPhi>
<rotationalPeriod>323939</rotationalPeriod>
<atmosphereDensity>27</atmosphereDensity>
<biomeIds>advancedrocketry:marsh,minecraft:swampland,minecraft:mutated_birch_forest_hills,minecraft:mutated_extreme_hills,minecraft:mutated_jungle_edge</biomeIds>
</planet>
I'm guessing this is because if any other players on the server set up their own warp drive they'd still have to discover Sol-126: 3 for themselves? If so, this suggests that whatever it is that tracks whether a player has discovered a planet must be something outside of the server's advancedRocketry.cfg and planetDefs.xml, right?
If so, then perhaps the issue with all planets being displayed in the warp controller is specific to me - and perhaps this whole issue could be resolved by purging/modifying this player-specific planet list data, wherever it may be. Any suggestions where I should look? I've purged all my local data a couple times already so I'm guessing it's something on the server somewhere...
Edit: I tried trashing my warp controller and warp core (in case they somehow stored some metadata) and deleted the /world/advRocketry/temp.dat, but when I placed a new warp core and controller all the planets are still showing up in the list. Edit 2: Just to be sure, I deleted the entire /world/advRocketry/ folder from the server, then switched to creative mode to rebuild a new warp core and controller - all the planets are still listed. Edit 3: I also tried deleting all of the files for my user from the /world/playerdata/ folder, but all the planets are still in the list.
I made an interesting new discovery today - at the start of this process I'd noticed that in https://github.com/zmaster587/AdvancedRocketry/issues/1475 someone suggested that the client configs needed to be the same as the server, and I was sure I'd done that test, but apparently I neglected to close and relaunch the game after changing my local configs. Turns out that if I set my local advancedRocketry.cfg to have planetsMustBeDiscovered=true and then launch the game after that, when I open the warp controller on the server all the planets are no longer listed.
I got excited for a minute, then I realized none of the planets are listed at all. Not the Sol-126: 3 my station was orbiting, not Earth, nothing but the stars.
So it seems like there's some funky relationship or interactions between the client and server going on here and I'm still not sure what the exact nature of the issue is. There are apparently three possible states for planets in the warp controller:
With planetsMustBeDiscovered=false all planets are in state 1.
With planetsMustBeDiscovered=true on the server only, all planets are in state 2 until they've been discovered, then they're in state 1.
With planetsMustBeDiscovered=true on both the server and client all planets are in state 3 from the perspective of that client.
The 'isKnown' tag in planetDefs.xml adds an additional wrinkle to this; I think with planetsMustBeDiscovered=true on the server, planets where isKnown is True will show up in state 1 for all clients (but it doesn't look like that value can ever be changed by the actions of a player).
This still seems like a bug to me because of the disconnect between client and server settings, but maybe I've misunderstood the expected behavior?
What I'd really like to be able to do is have server-level control over which planets are displayed in the warp controller(s) for each player. Not sure if that's realistic considering players can then do things which would change that list for themselves (and potentially for other players, via Beacons).
Any advice would be welcome.
One additional note regarding Beacons; before changing my local client config to planetsMustBeDiscovered=true I had discovered Sol-126: 3 (as noted above). After changing my local config Sol-126: 3 was no longer listed (despite my space station currently orbiting the planet :p). I built a beacon on the surface and turned it on, but Sol-126: 3 still didn't appear in my warp controller list. It should have, right? Or do beacons only work for other players, or something?
Also, circling back to the question that seems to be at the root of all this - where is the data stored which tracks which planets I've discovered or not?
Thanks to zmaster's extraordinary patience in troubleshooting this with me on discord, it seems like there are basically two issues here: DimensionManager.knownPlanets not syncing, and planetsMustBeDiscovered not syncing between client and server. The first issue seems to be the cause of planets which should be discovered (tagged as isKnown true in planetdefs.xml) disappearing from the warp controller list when the clients set their local config to planetsMustBeDiscovered=true. The second issue seems to be the reason why clients still see all planets listed in the warp controller despite the server being configured for planetsMustBeDiscovered=true.
Once both these issues are resolved, requiring planet discovery on the server should result in clients only seeing planets that are marked as known in the planetdefs.xml and planets that they've discovered in the warp controller list. (Note to self: test Beacon behavior too!)
And for the record, planet discovery is tracked on a per-station basis and can is stored in the server's /world/advRocketry/temp.dat file; /spaceObjects/spaceContents/ has subfolders (one per station) with a 'knownPlanets' entry where the value is the list of DIMIDs which have been discovered.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 90 days
Version of Advanced Rocketry
Have you verified this is an issue in the latest unstable build
Version of LibVulpes
Version of Minecraft
Does this occur without other mods installed
Crash report or log or visualVM (if applicable)
Description of the problem
Steps to reproduce: 1, Run Enigmatica 2 Light server 2, Build warp core and controller on server 3, Observe planet list in warp controller 4, Stop the server, make planetsMustBeDiscovered=true 5, Restart server 6, Observe the planet list in warp controller
Expected result: Only known/discovered planets should be displayed in the warp controller.
Actual results: All planets are displayed.
Here's our server's advancedRocketry.cfg,txt and planetDefs.xml.txt
I can also provide our server information and may be able to retrieve log files, or anything else that may be useful for troubleshooting.
https://github.com/zmaster587/AdvancedRocketry/issues/1533 seems like a similar issue (in the form of a question).
EDIT: Seems like somethink gets funky with teleporters after doing this? Every time I try to follow the steps listed above, if I then teleport (using Tinker's items or RFTools teleporter) my space station appears to think it's in the overworld... I see my overworld waypoints, gravity is increased to overworld levels, the skybox and clouds look like the overworld, etc. I can't jump down to the actual overworld (after falling for a bit I get put back on my station), and if I teleport back to the actual overworld and try to fly to the coordinates of the station there's nothing there. So my station hasn't actually moved, but it seems like the dimension data got lost or confused with the overworld for some reason.
Edit 2: Taking a rocket to the space station seems to prevent this from happening, but I'm still seeing all the planets in the list for the warp controller despite planetsMustBeDiscovered=true (I also set resetPlanetsFromXML=true and restarted the server, no difference).