Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resetkey and resetworldkeys does not persist #42

Open
geeklynad opened this issue Nov 8, 2023 · 2 comments
Open

resetkey and resetworldkeys does not persist #42

geeklynad opened this issue Nov 8, 2023 · 2 comments

Comments

@geeklynad
Copy link

geeklynad commented Nov 8, 2023

I tried a variety of different ways, but ultimately every time I tried to reset the world keys using either resetkeys or resetworldkeys, the settings would eventually revert to initial state prior to running the command. Initially seemed to work as verified with listkeys, but changes would revert over the course of gameplay by an unknown event (possibly during an autosave or maybe a god-power activation possibly, not sure). Logging out of session and logging back into server would revert the changes consistently.

Tried:

  • During session with multiple users, used both commands on different occasions. Verified with listkeys that keys were removed. reverted after unknown time.
  • On dedicated server as a solo. Changes reverted upon logging out and logging back in.
  • Downloaded world file to local solo game. Ran commands while mod was enabled. Uploaded world, logged in, changes reverted.
  • Tried again on local solo world file. Disabled server devcommands as well as bepinex. Changes seemed to work, however listkeys returned "is not valid in this context" (not sure, but this command may only work on dedicated servers). Uploaded modified worldfile to server. Logged in with mods disabled. Keys were correctly removed (listkeys returned null). Logged out and re-enabled bepinex and server devcommands. Logged back in and the changes reverted. listkeys returned all previously active keys.
  • Lastly tried updating bepinex and server devcommands for client and server. Version information in edit below. All attempts with updated versions yielded the same results.

What eventually worked for removing the keys was to use removekey [key] on each key individually. This worked with the mod active. Changes persisted.

I'm honestly not 100% sure this is due to server devcommands. It was such a strange sequence of events that I was having trouble isolating the cause. But I wanted to at least leave a mention of it here as well as how I got it working in case anyone else runs across the same issue.

edit: Wanted to add that both the server and the client were running 1.62.0 for all listed attempts. Server and client were then both updated to 1.64.0 and attempted again with same results.

Initial attempts

Server:

  • Bepinex 5.4.2202
  • Server Devcommands 1.62.0

Client:

  • Bepinex 5.4.2105
  • Server Devcommands 1.62.0

After updating

Server:

  • Bepinex 5.4.2202
  • Server Devcommands 1.64.0

Client:

  • Bepinex 5.4.2202
  • Server Devcommands 1.64.0
@JereKuusela
Copy link
Owner

JereKuusela commented Nov 9, 2023

That's interesting. Version 1.62 removed custom implementations of listkeys and resetkeys because vanilla added admin support for them.

But I never tested if the vanilla implementation really worked.

@geeklynad
Copy link
Author

Yea, that was my impression as well. The reason I'm reporting here is because of a difference in the console output depending on whether the mod is enabled or not.

With mods disabled on single player:
listkeys returns 'listkeys' is not valid in the current context
resetworldkeys returns Server keys cleared
resetkeys returns 'resetkeys' is not valid in the current context

With mods disabled on single with mods disabled or enabled on dedicated server:
listkeys, resetworldkeys, and resetkeys only ever return null.

With mods enabled on single player:
listkeys returns Current Keys, Server Option Keys, and Player Keys
resetkeys returns Global and player keys cleared
resetworldkeys returns Server keys cleared
Modifications seem to persist between sessions

On dedicated server with mods enabled:
Same returns as in single player, however the changes do not consistently persist. resetworldkeys does not seem to have any effect. resetkeys has an immediate effect, but changes are eventually reverted.

So I'm definitely scratching my head over what the cause might be. I haven't been able to corroborate this with anyone else's servers (just from browsing around and checking through threads). It happens on all 3 of mine. I use the lloesche docker container for them. That's the only other non-vanilla thing I can think of being a cause. I haven't tested on an out-of-the-box dedicated server. But as far as I can tell, the containers are correctly disabling mods (stop container, remove, modify env variables to disable bepinex, rename mounted config volume bepinex folder, and reinitialize container from scratch).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants