This loading screen can be a bit tough to get set-up but hopefully this page will help you. The instructions are split up into various sections
so as to make it easy for to find out what you want to do. All the sections can be found in the quick-nav on the left.
The loading screen is coded using a server side language known as PHP. This means that the file has to be running off a web server for it to work.
To configure your loading screen we will primarily just be editing config.php
To make changes to the loading screen open up config.php using your favourite code editor (I personally use Brackets, it's free and will highlight the code nicely so that you can read it better).
We can then start to make changes based on what's written in this documentation.
1. GET A STEAM API KEY
We need to acquire a Steam API Key to be able to pull the connecting clients username and avatar.
To get a Steam API Key visit: http://steamcommunity.com/dev/apikey
Just sign in with your steam account and generate an API Key.
2. ADD STEAM API KEY TO CODE
We now need to add the key to config.php, open it in a code editor and find the line below.
$SteamAPIKey = "INSERT YOUR STEAM API KEY HERE";
Replace the words INSERT YOUR STEAM API KEY HERE, with your newly generated key. You also need to make sure that the key is inside of the quotation marks
otherwise the script won't work. Below is an example of what it should look like with a key.
please note that the key in the example below is invalid
$SteamAPIKey = "0000000000";
3. UPLOAD SplataLoad FOLDER TO YOUR WEB HOST
This loading screen uses PHP to dynamically insert a steam avatar and name. To do this it has been coded in a server side language which only works
properly when it is accessed from a web server.
All you need to do is simply upload the contents of the folder called 'SplataLoad' onto your web host. The easiest way to do this is to use FTP to transfer
the files onto your web hosting account. (please note that web hosting is different from your game server host)
If you don't have a web host then I recommend Hostinger as they are a free web host, and offer all the
php features required for the loading screen to work. Once you have done this, you can then move onto the next step.
000WebHost is also another good free webhost but contains advert banners.
(Please note that if you use a different host they must support PHP or else the loading screen will not work).
4. TEST LOADING SCREEN
We can now test the loading screen to see if it is able to pull the avatar and name of someone from steam.
To test the loading screen simply type into the address bar the domain for where you uploaded SplatLoad onto your web server.
You will be greeted with a page
which has two different links. Select the test link first, if you see CaptainMcMarcus's Steam Avatar and Steam Name show up then the loading screen has been
correctly configured :D
5. CREATE CORRECT SV_LOADINGURL FOR GARRY'S MOD SERVER
If the test went through all ok then we can move onto the next part which is to configure our sv_loadingurl, this is the really important bit,
as you need to do this otherwise it won't work in garry's mod. For this to work you need to add ?steamid=%s to the end of the URL. Below is an example which
shows this.
sv_loadingurl "http://domainnameexample.com/index.php?steamid=%s"
DO NOT SET YOUR LOADING URL VIA THE SERVER STARTUP COMMAND LINE, this will result in a black screen appearing, instead you should set your sv_loadingurl via the server startup config file.
You can have either a large description box in the middle or a set of rules, the choice is entirely yours.
Adding in a description is super easy to do and is all controlled via config.php
1. Disable Rule Box
The first thing we need to do is to edit the config.php file and to tell it that we don't want to use a rule box, this will make the loading screen switch
to the description box.
To do this we need to locate $RuleBox and set it to false.
$RuleBox = false;
2. SET DESCRIPTION
The description can be found in config.php, below shows the code which makes up the default description. Set it to be whatever you want and you're done!
If you want your description to start a new line just use <br /> in the text
$Description = "Spicy jalapeno bacon ipsum dolor amet shankle tail bresaola spare ribs. Swine alcatra meatball boudin, flank turducken pork belly capicola pig. Beef ribs venison tongue shoulder tri-tip pig t-bone jerky spare ribs turducken bacon short ribs cow shankle. Ribeye brisket pork chop ham hock short ribs ball tip bacon picanha shank filet mignon. Meatloaf hamburger kielbasa cupim sausage drumstick leberkas. Short loin porchetta picanha filet mignon jerky. Tenderloin bacon tongue chicken, beef ribs ground round beef boudin pork loin swine.
Kielbasa ribeye filet mignon ham hock meatloaf. Porchetta cupim pastrami boudin tri-tip tail chicken pig flank. Swine cupim rump, tenderloin shank drumstick strip steak. T-bone rump spare ribs swine meatloaf porchetta shank venison capicola sausage hamburger. Venison boudin chuck shankle, brisket corned beef prosciutto tail.";
Changing the rules is fairly easy, you can add in as many or as little rules as you like.
By default there are 10 rules, all of these are stored in an array inside of config.php
1. Enable Rule Box
The first thing we need to do is to edit the config.php file and to tell it that we want to use a rule box.
To do this we need to locate $RuleBox and set it to true.
$RuleBox = true;
2. FIND THE RULES ARRAY
The rules are all in one big list in config.php, below shows the code which makes up the rules list.
$RulesList[] = "Do not bully or harass other players";
$RulesList[] = "Do not be annoying";
$RulesList[] = "Do not kill other people with props";
$RulesList[] = "Do not start randomly killing people";
$RulesList[] = "Do not metagame";
$RulesList[] = "Do not hack or exploit the game mode or the server.";
$RulesList[] = "Do not spam your microphone";
$RulesList[] = "Do not kill players who are Away From Keyboards (AFK)";
$RulesList[] = "Listen to all server staff, they have final say on the server.";
$RulesList[] = "Stay Fresh!";
3. CHANGING AND ADDING RULES
To change the rules simply modify the text inside of the quotation marks. If you want to add in some extra rules simply copy and paste one of the previous rules and then ammend the text
inside the quotation marks to be your new rule.
Below is some example code showing some changed rules with a few extra ones thrown in.
$RulesList[] = "Rule 1";
$RulesList[] = "Rule 2";
$RulesList[] = "Rule 3";
$RulesList[] = "Rule 4";
$RulesList[] = "Rule 5";
$RulesList[] = "Rule 6";
$RulesList[] = "Rule 7";
$RulesList[] = "Rule 8";
$RulesList[] = "Rule 9";
$RulesList[] = "Rule 10";
$RulesList[] = "Rule 11";
$RulesList[] = "Rule 12";
$RulesList[] = "Rule 13";
$RulesList[] = "Rule 14";
$RulesList[] = "Rule 15";
4. REMOVING RULES
To remove a rule just delete an entire line of the array which contains the rule you want to remove.
Below is some example code showing rules 5, 8, 9 & 10 removed. PHP Comments have been added to show where these rules used to be.
$RulesList[] = "Do not bully or harass other players, it's not fun for anyone involved.";
$RulesList[] = "Do not be annoying.";
$RulesList[] = "Do not kill other people with props.";
$RulesList[] = "Do not start randomly killing people.";
//Rule 5 used to be here
$RulesList[] = "Do not hack or exploit the game mode or the server.";
$RulesList[] = "Do not spam your microphone.";
//Rule 8 used to be here
//Rule 9 used to be here
//Rule 10 used to be here
The logo is simply an image named logo.png which sits in the images folder.
To change the logo simply over-write the image in this folder and it will update the image on the loading screen.
The default dimensions for the logo are 980px x 150px, however any sized image will work.
You can add as many or as little backgrounds as you like. To change the backgrounds simply add the images you want into the backgrounds folder.
SplataLoad will then automatically load up any backgrounds contained within that folder.
To reduce the load time of your loading screen, compress your backgrounds to JPEG's
The default colours for SplatLoad can be changed by modifying $HeaderColour, $BackgroundColour & $PercentColour in config.php.
$HeaderColour will change the pink headers.
$BackgroundColour will change the dark grey stripe boxes. The stripes will still be visible.
$PercentColour will change the loading bar.
You can change these with any colour of your choice.
Colours must be entered in hex code format, this looks like #c81a5e
$HeaderColour = "#c81a5e";
$BackgroundColour = "#6a6667";
$PercentColour = "#60d222";
Adding music is relatively straightforward however, steam uses an old version of the chromium engine that can only play .OGG files.
Please note that the music script is PHP Based so you will only hear the music playing if it's all uploaded onto your web host, you won't be
able to hear any music if you open the loading screen locally on your PC.
SplataLoad supports two different methods of audio, however you can only use either .OGG files or embedded youtube videos. You can not use both
of these systems at the same time
Pick what type of audio you want to use with SplataLoad below.
1. Enable Youtube Audio
The first thing we need to do is to edit the config.php file and to tell it that we want to use youtube audio.
To do this we need to locate $YoutubeAudio and set it to true.
$YoutubeAudio = true;
2. Add In A Youtube Video ID
Find a youtube video which you want to use as your background audio and get that videos ID, it's the little bit at the end of the link after v=.
Once you have your ID, open up config.php and scroll down to the $YoutubeTrack example and replace the example data with your ID. Below is an example.
For this example I will be using: https://www.youtube.com/watch?v=NsSvN7ykmy8 as the youtube video I want to use for background audio.
The ID for this video is: NsSvN7ykmy8
$YoutubeTrack[] = "NsSvN7ykmy8";
3. *Optional* Add Additional Tracks
You can randomise between a selection of different youtube tracks, just add in however many you want and the loading screen will randomly select one to play.
Below is an example showing several different Youtube tracks being used.
$YoutubeTrack[] = "NsSvN7ykmy8";
$YoutubeTrack[] = "xFG6770beMc";
$YoutubeTrack[] = "6zGCKhfXPVo";
1. Enable Audio File Player
The first thing we need to do is to edit the config.php file and to tell it that we want to use .ogg audio files.
To do this we need to locate $YoutubeAudio and set it to false.
$YoutubeAudio = false;
2. Convert Audio File to .OGG
The steam browser which loads up our loading screen can only read .OGG files, this means we have to convert our audio file. To do this simply use an online
audio converter such as: http://audio.online-convert.com/convert-to-ogg
Drop the bitrate to 128kbps and don't worry about changing anything else.
By using a lower bitrate, the song will be a smaller filesize and will allow the page to load up faster.
3. CHANGE FILENAME
To prevent any errors with the songs playing we need to strip the filename of any special characters and spaces.
Name the file something simple
so that if you decide to enable the now playing feature, you will be able to easily sort out the artist name and description for each file.
4. ADD TRACKS TO THE SONGS FOLDER
Inside the SplatLoad folder is the core structure for the loading screen, there is also a folder in there called songs.
Add your .OGG files into this folder and SplataLoad will automatically handle the rest.
If one song is in the folder then that'll be the only thing played and if you add in 20 then it will randomly select one of the 20 songs you have added.
Please Note: Adding more songs will dramatically increase your bandwidth usage, especially if you are any web host with a monthly
bandwidth limit.
Please also remember that adding copyrighted audio is illegal. If you add copyrighted music you will be held liable.
5. [OPTIONAL] ADJUST VOLUME
You can adjust the volume by changing $SongVolume in config.php. The number indicates the volume as a percentage, 0.3 = 30%, 0.5 = 50% and 1.0 = 100%.
Below is the code to modify in config.php
$SongVolume = 0.3;
It's advised to not increase the volume over 0.3 otherwise it may cause players to disconnect because of the high volume of your audio.
Adding server staff is similar to adding in the music info from the previous section, but there's a few extra steps.
Not only can you add staff, but you can also assign each staff member their own unique colour
All you will need is the steamid's for all your staff members and the titles you want to give them.
1. FIND STAFF SECTION IN CONFIG.PHP
open up config.php and scroll down until you see the comment in the code box below
By default the staff list is commented out, if nothing is set then it doesn't bother showing
the staff list option on the side, if something is set then it will toggle everything on.
// ***** STAFF BOX ***** \\
// Add in as many staff as you like using the following format
// EXAMPLE: $Staff["STEAM ID"] = "Admin";
// EXAMPLE2: $Staff["STEAM_0:1:20082319"] = "Creator";
// If you want to give your staff member a special colour then add this below them
// EXAMPLE: $StaffColour["STEAM ID"] = "HEX COLOUR";
// EXAMPLE 2: $StaffColour["STEAM_0:1:20082319"] = "#60d222";
2. ADD IN A MEMBER OF STAFF
All we need to do, is copy and paste the example code and then replace it with our own data.
The SteamID will allow us to pull a users avatar and steam name, the comment will allow us to define their role.
Both regular SteamID's and SteamID64 will work with SplataLoad
We can also give each user their own individual colour by adding staffcolour and giving it a steam id, we then set the comment to be a hex colour.
Below is some example code showing CaptainMcMarcus set as server owner with a green background.
$Staff["STEAM_0:1:20082319"] = "Creator";
$StaffColour["STEAM_0:1:20082319"] = "#60d222";
3. ADDING ADDITIONAL STAFF
You can add in as many server staff members as you like, all you need to do is just copy and paste the same code and insert your own data.
The list will be rendered in the order they are written in config.php. You can also set a staff role to say whatever you want.
Below is some code showing several steam members added in as staff.
$Staff["STEAM_0:1:20082319"] = "Creator";
$StaffColour["STEAM_0:1:20082319"] = "#60d222";
$Staff["STEAM_0:1:46657740"] = "Streamer Person";
$Staff["STEAM_0:1:44717599"] = "Dude";
$Staff["STEAM_0:1:39853924"] = "Some Dude";
$Staff["STEAM_0:0:32499135"] = "Random Dude";
$Staff["STEAM_0:1:33664989"] = "Cool Dude";
Keep in mind that if you add in too many members of staff, they might dissapear on smaller sized monitors.
If you don't want to give a staff member their own colour, don't add in a colour for them and it'll default to dark grey.
For this loading screen to work we need to be able to pull the users users steam id as well as current map.
Garry's mod can give this to us by adding ?steamid=%s to the end
of the url. Below is an example showing you what your sv_loadingurl should look like.
Please note that if you set the loading url via the command line it results in just a black screen being shown, it must bet set within your autoexec.cfg file.
sv_loadingurl "http://domainexample.com/index.php?steamid=%s&map=%m"
If you do not know the full domain and the extension that needs to be added, simply navigate to the root directory of where the loading screen is being hosted.
A welcome page will be generated which contains both a test and final sv_loadingurl.
You can adjust the speed in which backgrounds switch between each other as well as how long a single background is visible for.
You can change these settings by editing $BackgroundSpeed and $BackgroundDelay in config.php
$BackgroundSpeed = "1800";
$BackgroundDelay = "3500";
Please note that the times are displayed in milliseconds
Bored of the old fading effect? Then change the transition :D
Head over to http://jquery.malsup.com/cycle/browser.html and find an effect you like.
Onve you've found an effect you like simply locate the code below in config.php and put the effect name inside of the "".
$BackgroundEffect = "fade";
Please note that effect names are case sensitive.