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

[Server FEATURE] startmodserver for Natural Selection 2 #3875

Closed
Hitman4 opened this issue May 26, 2022 · 3 comments · Fixed by #4396
Closed

[Server FEATURE] startmodserver for Natural Selection 2 #3875

Hitman4 opened this issue May 26, 2022 · 3 comments · Fixed by #4396

Comments

@Hitman4
Copy link

Hitman4 commented May 26, 2022

User Story

As a LinuxGSM user, I would like to add the newly added Natural Selection 2 DedicatedServer settings

Basic info

  • Distro: [Ubuntu 21.10]
  • Game: [Natural Selection 2]
  • LinuxGSM version: [v21.5.1]

Further Information

for the built-in mod backup web server in Natural Selection 2 which was added with patch 340

I added in the info_messages.sh to the line fn_info_message_spark() 
under the web admin port

fn_port "Mod Backup Web Serverport" modserverport tcp


In info_game.sh to the line fn_info_game_spark()
under the queryport

modserverport=${modserverport:-"0"}


in common.cfg to startparameters line behind the -webport ${webadminport}

-startmodserver -modserverport ${modserverport} and behind the -limit ${maxplayers} i add -speclimit ${spec} to set Spectator slots.

under Predefined Parameters 

maxplayers=""
spec="5"
servername=""
webadminuser=""
webadminpass=""
webadminport="8080"
modserverport="27017"

I think there's more to tweak it, it's an example of how it worked for me.
and i think to add spec or speclimit to info_game.sh make no sense, because for ranked servers its only allowed to have 5 spec slots.

Maybe someone can add that to the next patch?

Further Reading

-speclimit can be found in https://naturalselection.fandom.com/wiki/Dedicated_Server#Basic_Configuration

Added a built-in mod backup web server to the dedicated server that allows connecting clients to download mods from the server if the current version of a mod on steam is newer than the servers or the client failed to download the mod from steam. This fixes the old “Missing required mod” error. The web server can be enabled with the -startmodserver command line option. The default port it binds to is serverport + 2 this can be changed with -modserverport. You can also optionally specify the address or ip the mod server uses with -modserveraddress otherwise its defaults to -ip option.
can be found under Mod System Changes on https://store.steampowered.com/news/app/4920/view/5917165051353982118

and in the Official NS2 Discord in the server-obs channel access only with the server-obs rolle just need to ask in the ns2-chat channel .

@Hitman4
Copy link
Author

Hitman4 commented Aug 25, 2023

and i found out that the webadminport is not displayed in dt it always show me 8080 but i changed it to 8081 because i have a second server as well

fn_info_message_spark() {
	fn_info_message_password_strip
	{
		fn_port "header"
		fn_port "Game" port udp
		fn_port "Query" queryport udp
		fn_port "Web Interface" httpport tcp
	} | column -s $'\t' -t
	echo -e ""
	echo -e "${lightgreen}${gamename} Web Interface${default}"
	fn_messages_separator
	{
		echo -e "${lightblue}Web Interface url:\t${default}http://${httpip}:${httpport}/index.html"
		echo -e "${lightblue}Web Interface username:\t${default}${httpuser}"
		echo -e "${lightblue}Web Interface password:\t${default}${httppassword}"
	} | column -s $'\t' -t
}

fn_info_message_spark() {
	fn_info_message_password_strip
	{
		fn_port "header"
		fn_port "Game" port udp
		fn_port "Query" queryport udp
		fn_port "Web Interface" webadminport tcp
	} | column -s $'\t' -t
	echo -e ""
	echo -e "${lightgreen}${gamename} Web Interface${default}"
	fn_messages_separator
	{
		echo -e "${lightblue}Web Interface url:\t${default}http://${httpip}:${webadminport}/index.html"
		echo -e "${lightblue}Web Interface username:\t${default}${httpuser}"
		echo -e "${lightblue}Web Interface password:\t${default}${httppassword}"
	} | column -s $'\t' -t
}

@dgibbs64 dgibbs64 changed the title [Server FEATURE] for Natural Selection 2 [Server FEATURE] startmodserver for Natural Selection 2 Nov 26, 2023
@dgibbs64
Copy link
Member

I am giving this a go but I cant see to get it working currently

@dgibbs64 dgibbs64 linked a pull request Nov 26, 2023 that will close this issue
13 tasks
@dgibbs64 dgibbs64 added this to the v23.7.0 milestone Nov 26, 2023
@dgibbs64
Copy link
Member

Got it working and raised a PR

@dgibbs64 dgibbs64 closed this as completed Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment