Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

S4League Server Emulator Archive

A Tutorial for S4 League

No ads for members. Membership is 100% free. Sign up!
This is an archive of all the S4 League Server Emulators. You need to set one of these up if you want to start modding your own S4. 
Downloads are here: https://archive.org/details/s4lserver-emuarchive
I suggest using the season 1 (patch 26) server emu as it has the most support and is the easiest to use / setup. 

The season 8 and patch 34 server emus are also good enough to play on, but you're on your own there, thus I suggest it for advanced users only.

This tutorial is for the patch 26 server setup, the other emulators follow similar steps
Here is a basic tutorial on Server Setup:
Part 1: DATABASE TUTORIAL

1. Pre-Req files
Make sure to have installed the pre-requisite files FIRST before starting this step.
They are packaged with each server emulator (mysql install & redist installers)

2. Locating your MySQL install & Config
First, navigate to where you installed MySQL, then to the folder inside that MySQL then the folder "bin". If un-changed, the normal path is: "C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin" it is in here you will find the only program with an icon (MySQLInstanceConfig). Begin by running this program.

3. Configuring your MySQL database
Now you'll begin configuring an instance of MySQL, your database's engine which powers it. If you know what you are doing, you're fine, if not follow the steps below:
-1. Choose detailed configuration.

-2. If you are running the server off a computer, choose developer machine. If you are running the server on a real server, choose server machine.

-3. Choose multifunctional database.

-4. Leave the INNODB settings default.

-5. Choose manual setting, whatever that's above 2 for concurrent connections (really doesn't matter this is for remote DB access).

-6. Enable TCP/IP networking must be ticked, port number should be 3306 default, tick add firewall exception for this port IF you want to remotely connect to your database. Enable strict mode.

-7. Standard character set.

-8. Install as windows service, service name should be MySQL, make sure launch automatically is still ticked.

-9. Here you can set database password and enable remote access, only set it up if you know what you are doing. Any password you set here will need to be re-used in the later tutorials where indicated. If you do not wish to use a password, uncheck modify security settings and hit continue. 

-10. Hit execute and your MySQL service + config should be completed.

4. Accessing your MySQL instance and creating your database
Here we will enter MySQL via a GUI, and create your database. For this step install the MySQL workbench tool included. Load up your database tool (workbench) and create a new connection/choose connect to...

-It should be "standard  TCP/IP"

-If the server was installed on the same machine you are connecting to your database on from your UI, you can use "localhost" as the host. If it is elsewhere, use your external IP

-You need not specify the database

-port should be 3306, you may want to forward that port if you choose to allow remote connections, remote connections is only useful if you want to login to your database from another computer

-Save your settings and connect

Onto the creation of the database, once you are connected.

-Create a database, create 2, one named "auth" and one named "game"

-Click on each twice to open them both

-On auth, right click and choose to load dump (or import), a file path box will pop up, navigate to your S4 Server's DATABASE folder (Or the SQL folder in the source code of any of the other emulators). Inside, select "auth_default.sql" and hit next. The dump will load it's self and auto-create your database.

-Do the same for game, step for step. Making sure to instead load "game_default.sql" when choosing your dump. 

Part 2: SERVER EMU SETUP

1. Port Forwarding
You must forward the following ports on whatever IP you will be hosting the server from. 
TCP: 28002, 28003, 28004, 28005
UDP: 22000

there is also a such thing as UDP sockets in the setup, in short this will allow better networking the more you open up. The sockets can be assigned whatever port you want, but it is suggested you go from port 28006 onward. Up to 10-15 sockets is recommended as the minimum. THE SOCKETS MUST BE FORWARDED TOO!!!

You may also bypass the need for sockets with a tunneling program like hamachi or zerotier. The method for setting that up is largely the same as normal setup, just with the IP of those programs as the server IP's.

3. Playing online or via LAN
-LAN: If you are playing via LAN or Tunneling you need not worry about external IP's and if on LAN you can simply leave everything on your internal IP.

-Online: If you are planning to play over the internet you must use an external IP to host the server. This can be gotten online most easily. If you are hosting the server from your own machine you may need to use DMZ to make use of your external IP. Be advised that unlike port forwarding DMZ can be quite a risk as it opens every port on your router's firewall. It's not recommended for public servers, but may be fine in private. Be advised IP's like "16.0.0.8" are not likely to be external IP's, they are likely internal (on your home network).

4. Setting Up Config
Here we'll get into configuring the server's HJSON files, which are it's config. 

Auth config:
{
  listener: [Your Internal IP Here]:28002
  max_connections: 500
  api:
  {
    listener: 127.0.0.1:27000
    serverlist_timeout: 30000
  }
  noob_mode: false
  auto_register: true
  database:
  {
    engine: MySQL
    auth:
    {
      filename: ..\db\auth.db
      host: localhost
      port: 3306
      username: root
      password: null
      database: auth
    }
  }
}

This is the suggested configuration for auth. Depending on how you setup your database depends on the information written at the very bottom (i.e. password, username). 

-Noob mode allows any account to be overriden and logged into no matter what. 

-AutoRegister creates new accounts for any that do not yet exist and attempt to login.

Game Config:
{
  server_name: [S4 Server Name Here]
  server_id: 1
  server_ip: [Your External IP here]
  listener: [Your Internal IP here]:28003
  listener_chat: [Your Internal IP here]:28004
  listener_relay: [Your Internal IP here]:28005
  listener_relay_udp_ports: [28006 , 28007 , 28008 , 28009 , 28010 , 28011 , 28012 , 28013 , 28014 , 28015]
  listener_threads: 1
  worker_threads: 8
  player_limit: 500
  security_level: 0
  auth_webapi:
  {
    endpoint: 127.0.0.1:27000
    serverlist_update_interval: 25000
  }
  save_interval: 60000
  noob_mode: false
  database:
  {
    engine: MySQL
    auth:
    {
      filename: ..\db\auth.db
      host: localhost
      port: 3306
      username: root
      password: null
      database: auth
    }
    game:
    {
      filename: ..\db\game.db
      host: localhost
      port: 3306
      username: root
      password: null
      database: game
    }
  }
  game:
  {
    enable_tutorial: false
    enable_license_requirement: false
    max_level: 101
    start_level: 40
    start_pen: 900000
    start_ap: 900000
    start_coins1: 0
    start_coins2: 0
    durability_loss_per_death: 0
    durability_loss_per_minute: 0
    nick_restrictions:
    {
      min_length: 4
      max_length: 30
      max_repeat: 3
      allow_whitespace: false
      only_ascii: true
    }
    exp_rates_touchdown:
    {
      score_factor: 0.7
      first_place_bonus: 50
      second_place_bonus: 30
      third_place_bonus: 10
      player_count_factor: 0.06
      exp_per_min: 20
    }
    exp_rates_deathmatch:
    {
      score_factor: 0.7
      first_place_bonus: 50
      second_place_bonus: 30
      third_place_bonus: 10
      player_count_factor: 0.06
      exp_per_min: 20
    }
    exp_rates_chaser:
    {
      exp_per_first_point: 5
      exp_per_second_point: 3
      exp_per_third_point: 2
      score_factor: 0.7
      first_place_bonus: 50
      second_place_bonus: 30
      third_place_bonus: 10
      player_count_factor: 0.06
      exp_per_min: 20
    }
    exp_rates_battleroyal:
    {
      score_factor: 0.7
      first_place_bonus: 50
      second_place_bonus: 30
      third_place_bonus: 10
      player_count_factor: 0.06
      exp_per_min: 20
    }
    exp_rates_captain:
    {
      exp_per_first_point: 5
      exp_per_second_point: 3
      exp_per_third_point: 2
      score_factor: 0.7
      first_place_bonus: 50
      second_place_bonus: 30
      third_place_bonus: 10
      player_count_factor: 0.06
      exp_per_min: 20
    }
  } }

This is the suggested configuration for Game. Depending on how you setup your database depends on the information written at the mid-section (i.e. password, username). 1 listener thread is just the minimum, you can feel free to use more provided your system can use more than a single core, which most can.

-The UDP sockets as stated before help improve networking. Feel free to set as many as you want. 25 is a very reliable amount. But a minimum of 10-15 should be enough. Increase as needed.

-The listener threads can be increased at will depending on how many cores your system has, and how strong it's CPU is.

-Similar to the UDP sockets and listener threads the Worker threads will improve networking and ingame preformance. 8 is reccomended.

-If you disabled noob mode (you should) in auth's config, you must do it here too.

-The rest of the options should be fairly self explainatory.

5. Firewall Exception
This one is fairly simple, make sure that you set Auth.exe and Game.exe inside the server folder to run as admin in properties (right click), compatibility. Second and more importantly, make sure to open your OS' (guide will assume windows) firewall and add Auth.exe and Game.exe to your firewall exceptions with PUBLIC AND PRIVATE boxes both ticked before accepting.

Comments

Sign up to access this!

No comments yet

Embed

menu
Share banner
Image URL
HTML embed code
BB embed code
Markdown embed code

Credits

Author
shanzenos
shanzenos Joined 1y ago
Offline
355 points Ranked 48851st
7 medals 1 rare
  • Became a Game Pioneer Medal icon
  • Submitted 1 Tool Medal icon
  • Submitted 5 Maps Medal icon
  • One month a member Medal icon
  • 6 months a member Medal icon
  • 1 year a member Medal icon

Submitter

shanzenos avatar
shanzenos Joined 1y ago
Offline
355 points Ranked 48851st
7 medals 1 rare
  • Became a Game Pioneer Medal icon
  • Submitted 1 Tool Medal icon
  • Submitted 5 Maps Medal icon
  • One month a member Medal icon
  • 6 months a member Medal icon
  • 1 year a member Medal icon
shanzenos
Creator
Sign up to access this!
Sign up to access this!
Sign up to access this!

Game

Sign up to access this!

Category

Details

Difficulty Level
Beginner

Attributes

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • favorite 0
  • remove_red_eye 293
  • access_time 27d
  • access_time 27d

More from Submitter

menu