With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
If you have any trouble with SG, this is the place to ask.

Moderator: Pardner

Starting a Server

Postby PrettyBoy » Mon May 11, 2020 12:57 am

Hi all,

I am having some difficulties setting up a dedicated server. As I understand it, there are two main ways to host an SG server. Through the GUI within the game, as well as from the terminal using the i386_dedicated executable. I have the server working within the GUI, so I know that the network and ports are configured as they must to function. The questions that I have for you are thus:

  1. how does one set up the dedicated server from within the bash terminal? I would like to have the same control over the server as I do within the GUI, such as printing an output from the server. Step by step instructions would be incredibly helpful.
  2. how does one add a map rotation, such that when a game ends, the server automatically switches to a new game on a new map?
  3. how does one make bots that are automatically kicked when individuals join, but automatically join when said individuals leave?
  4. how does one add automatic print commands such as what the BallerBude server outputs periodically?
I am currently using Linux Mint 19.3 to run the server, and as such would use the same bash terminal as Ubuntu would. I have automatic rolling security patches enabled, and the firewall set to block everything aside from the SG port that I have the server configured to use. If you have any advice or know of better ways I can do things, please share your knowledge.

Thank you,

PrettyBoy
User avatar
PrettyBoy
Drifter
 
Posts: 5
Joined: Thu Jan 23, 2020 7:36 am



Re: Starting a Server

Postby TheDoctor » Mon May 11, 2020 3:03 pm

PrettyBoy wrote:1. How does one set up the dedicated server from within the bash terminal?
The commandline for BB is similar to this:
Code: Select all
./smokinguns_dedicated.x86 +set com_hunkmegs 128 +set dedicated 2 +set net_port 27960 +exec yourserver.cfg +fs_game smokinguns +vstr firstmap&

yourserver.cfg is a textfile where certain SG options are defined, among others it should define the command firstmap.

PrettyBoy wrote:2. How does one add a map rotation, such that when a game ends, the server automatically switches to a new game on a new map?

Inside yourserver.cfg you define something like this:
Code: Select all
set firstmap "map dm_dry; set nextmap vstr secondmap"
set secondmap "map dm_fort; set nextmap vstr thirdmap"
set thirdmap "map dm_train; set nextmap vstr firstmap"


PrettyBoy wrote:3. How does one make bots that are automatically kicked when individuals join, but automatically join when said individuals leave?
You put inside yourserver.cfg:
Code: Select all
set bot_minplayers "2"
This command manages the addition/removal of autobots. Bots will leave if there is not enough room on the server. As people join, the bots remove themselves one at a time to make room for human players

PrettyBoy wrote:4. How does one add automatic print commands such as what the BallerBude server outputs periodically?
You need an additional program to do that. Think of it like a mechanized player, who has input (sees the stats or reads the log) and has output (says and does something). Baller Bude uses https://github.com/BigBrotherBot/big-brother-bot which is a complex system, but there are smaller single-script solutions, such as bans_by_ip.pl for specific purposes.

Hope this helps you a bit. Good luck!
Image
User avatar
TheDoctor
Smokin' Amigo!
 
Posts: 818
Joined: Sun Jun 06, 2010 3:31 am




Return to Doc's Office

Show Sidebar
Show Sidebar

User Control Panel

cron