Configuration
Every option in STG Loading Screen V2 config.lua and settings.lua, plus how to change the music, logos, background video and description text.
The settings live in stg-loadingv2/config.lua and stg-loadingv2/settings.lua. Both files stay editable in the escrow version. Images, songs and the video are plain files in stg-loadingv2/html/. Restart the resource after a change. Players see it on their next connect.
Framework
Config.Framework = "auto"Which framework the character info is read from: auto, esx, qb or qbox. With auto, the script looks for qb-core, then es_extended, then qbx_core, and uses the first one that is running.
- ESX: reads the
userstable, including multicharacter rows (char1:tochar10:). Job and job grade are shown with their labels. - QBCore and QBOX: reads every character of the player from the
playerstable. Job and job grade are shown with their names.
Theme
Config.Theme = "pink"Color theme of the whole screen: blue, purple, green, yellow, red, pink or silver.
Adding a theme
Copy one of the files in stg-loadingv2/html/assets/css/themes/, for example pink.css, and name it after your theme, for example orange.css.
Rename the .theme-pink class inside it to .theme-orange and change the color values.
Add the file to the theme list in the <head> of stg-loadingv2/html/index.html:
<link type="text/css" rel="stylesheet" href="assets/css/themes/orange.css">Set Config.Theme = "orange".
Server name
Config.ServerName = "STG"Your server name, shown in large letters on the loading screen.
Staff list
Config.staffList = {
[1] = {
name = "GENER4L",
rank = "Owner",
discord = 397358061548863498
},
-- ...
}The team shown on the left side of the screen, in this order.
Prop
Type
To copy a Discord user ID, turn on Developer Mode in Discord (Settings, Advanced), then right click the member and click Copy User ID.
Music
Config.musicList = {
[1] = {
url = "assets/songs/impala.mp3",
image = "assets/songs/images/impala.jpg",
name = "Let It Happen",
singer = "Tame Impala"
},
-- ...
}The playlist starts with the first song as soon as the screen opens and moves to the next one when a song ends. After the last song it starts again from the top.
Prop
Type
Adding a song
Put the mp3 file in stg-loadingv2/html/assets/songs/ and its cover image in stg-loadingv2/html/assets/songs/images/.
Add a new entry to Config.musicList with the next number, using assets/songs/yoursong.mp3 as url and assets/songs/images/yoursong.jpg as image.
To remove a song, delete its entry and the files. To play no music at all, leave the list empty: Config.musicList = {}.
Social media
Config.socialMedia = {
["discord"] = {
label = "DISCORD",
text = "stg",
icon = "fab fa-discord",
link = "https://discord.gg/stg"
},
-- x, instagram, youtube
}The link cards on the right side of the screen. Clicking a card opens its link in the player's browser. The key, for example ["discord"], only needs to be unique.
Prop
Type
Discord avatars
Settings = {
botToken = ""
}In settings.lua. A Discord bot token, used to fetch the avatars of the members in Config.staffList. Paste a bot token here, not a webhook. See Create a Discord Bot Token. Leave it empty to use the default picture for everyone.
Images, video and text
These parts of the screen are files, not config values. Replace a file with your own under the same name to change it.
| What | File |
|---|---|
| Background video | html/assets/video.mp4 |
| Logo in the middle | html/assets/images/logo3d.png |
| Animated logo in the background | html/assets/images/logo-3d.gif |
| Staff picture without a Discord avatar | html/assets/images/default.png |
The description text under the server name is written in html/index.html. Find the line with class="project-text" and replace the text between the tags with your own.
The included video is about 117 MB, and every player downloads the loading screen files on their first join. A shorter or more compressed video keeps that download small.
Still having trouble?
Open a ticket on our Discord. Our team answers around 15 hours a day.