Configuration
Every option in STG Chess config.lua and settings.lua, from framework, target and item to notifications and Discord avatars.
Most settings live in stg-chess/config.lua. The Discord bot token is in stg-chess/settings.lua. Both files stay editable in the escrow version. Restart the resource after a change.
General
STG.Framework = "auto"
STG.Target = 'auto'Prop
Type
With a target resource, every placed table gets three options within 3 metres: Open lobby before the game starts, an option to return to the board for the two players once it has started, and Delete Lobby for the owner.
Without one, a prompt shows within 3 metres of a table: E opens the lobby. During a game, E brings a player back to the board and the owner can press X to delete the lobby.
The getFramework function at the bottom of config.lua loads the framework object. Only change it if your core resource uses another name.
Language
STG.Language = "en"Available: en, de, fr, es, pt, it, nl, pl, sv, no, fi, ar, he, jp, zh. The same file holds the in-game prompts and the menu texts. To change a text, edit the matching file in stg-chess/locales/.
Table and item
STG.chessModel = "qua_chessboard"
STG.item = "chess_table"Prop
Type
Using the item puts a table in front of the camera. Turn it with the left and right arrow keys and press Enter to place it, then the lobby menu opens. Each player can have one table at a time. The table is removed when the owner deletes the lobby or the game ends.
Notifications
STG.Notify = function(message)
lib.notify({
title = "Chess",
description = message,
type = "info"
})
end
STG.HelpNotify = function(message)
lib.showTextUI(message, {
position = "right-center",
icon = 'chess-pawn',
style = {
borderRadius = 1,
whiteSpace = 'pre-line'
}
})
end
STG.HideHelpNotify = function()
lib.hideTextUI()
end- Notify: messages outside the menu, like leaving a lobby, being kicked or a deleted lobby. Replace the body to use your own notification system.
- HelpNotify and HideHelpNotify: the placement hint and the key prompts next to a table. Replace them to use your own text UI.
Discord avatars
Settings = {
botToken = ""
}Set in stg-chess/settings.lua. With a Discord bot token (not a webhook), the lobby and the board show each player's Discord avatar. Players without a Discord identifier, or with no token set, get the default picture. See the guide to create a Discord bot token.
Still having trouble?
Open a ticket on our Discord. Our team answers around 15 hours a day.