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

Allow specifying server settings outside of autoexec_ns_server.cfg #430

Open
GeckoEidechse opened this issue Mar 2, 2023 · 11 comments
Open

Comments

@GeckoEidechse
Copy link
Member

Instead of requiring server owners to modify R2Northstar/mods/Northstar.CustomServers/mod/cfg/autoexec_ns_server.cfg, they should just be able to set these values using launch arguments or some other config file outside of the core Northstar mods folder.

The reason for this being that, by changing this approach we can treat all core Northstar mods folders as "owned by Northstar" meaning updaters can e.g. replace all core mods folders on an update without having to worry about destroying any information added by the user.

For example, we had talks before about how we want to change the master server API URL, yet we won't be able to do this until this issue is resolved as VTOL (and I think also Viper) save the contents of autoexec_ns_server.cfg and restore them after an updating, meaning that if we roll out a change to ns_masterserver_hostname a decent chunk of our playerbase will not receive the updated hostname.

@uniboi
Copy link

uniboi commented Mar 2, 2023

Instead of requiring server owners to modify R2Northstar/mods/Northstar.CustomServers/mod/cfg/autoexec_ns_server.cfg, they should just be able to set these values using launch arguments or some other config file outside of the core Northstar mods folder.

They should just make a mod that executes SendToConsole( "exec custom_exec.cfg" ) on startup

@GeckoEidechse
Copy link
Member Author

They should just make a mod that executes SendToConsole( "exec custom_exec.cfg" ) on startup

Hmm, making a mod (i.e. specifying mod.json and everything) might be a bit too much overhead but could work. If custom_exec.cfg only contains some of the convars specified in autoexec_ns_server.cfg, it would only update those right?

@uniboi
Copy link

uniboi commented Mar 2, 2023

actually, exec needs a client (connected) so it won't work for dedicated servers :trollface:

@uniboi
Copy link

uniboi commented Mar 2, 2023

nah I was wrong, SendToConsole needs a client connected (duh)
My method works fine with ServerCommand and yes, no info from the ns autoexec gets overwritten unless you explicitly tell it to

@uniboi
Copy link

uniboi commented Mar 2, 2023

Odd.CustomServerConfig.zip
Made a quick example mod. The only downside is that the cfg gets applied every time the map changes

@GeckoEidechse
Copy link
Member Author

Maybe example mod that changes servername would've been better given that's what we're trying to achieve here :P

That being said, using a mod "feels too complicated" for someone just starting out on setting up a server, so I don't think it would suffice as a "replacement" ^^

@uniboi
Copy link

uniboi commented Mar 9, 2023

A server config template could be uploaded to thunderstore so a server host would just need to download it and edit the config

@pg9182
Copy link
Member

pg9182 commented Mar 9, 2023

I will be doing this as part of APIv1, which is also when we'll be changing the hostname.

@GeckoEidechse
Copy link
Member Author

We will definitely need some non-breaking mechanism to handle clients that don't switch over then though. I know Viper has a mechanism to always finish its own update check before checking for Northstar update and so will always update itself before updating Northstar, so a patch for Viper and Northstar and be provided pretty much at the same time.

However I cannot say the same for VTOL, so there's a decent chance that a player won't have an updated version of VTOL and such will keep the old domain in their cfg and therefore we will have to take care of that scenario for at least some time period...

@pg9182
Copy link
Member

pg9182 commented Mar 9, 2023

Might be best to use a new convar from the start, maybe called ns_atlas_url or smth.

@GeckoEidechse
Copy link
Member Author

Might be best to use a new convar from the start, maybe called ns_atlas_url or smth.

If we set the new convar in the same cfg file, then there's no point in adding a new one though as Viper/VTOL don't do any "smart" merging of changes but simply restore the previous file.

Hence we should make sure to solve this issue first and then give enough time between updates so that Viper/VTOL can roll out patches...

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

No branches or pull requests

3 participants