Repository navigation
Database
VIPCore stores grants in the connection named by DatabaseConnection in config.jsonc, an entry in SwiftlyS2's configs/database.jsonc. MySQL, MariaDB, PostgreSQL and SQLite are supported. Tables are created and updated automatically.
| Table | Holds |
|---|---|
vip_users |
Grants: one row per player, server and group |
vip_servers |
The servers using the database, by GUID, IP and port |
__vipcore_version_info |
Schema version |
addons/swiftlys2/data/VIPCore/server_id.txt holds the server's GUID. Once Steam is connected, the server registers in vip_servers by that GUID, IP and port, and gets an ID. Local grants are tied to that ID.
- Until the ID is known, local grants fail with
Server ID is not initialized.; global ones work. - Keep
server_id.txtand the ID follows the server, wherever it moves. - Without the file, the same IP and port get the old ID back. A new address gets a new ID, and the old local grants stop applying — set
ServerIdto the old ID to recover them.
| Scope | Applies on | Granted with |
|---|---|---|
| Local | The server that granted it |
!vip_adduser, Grant VIP → This server, VIP_Test, VIP_GoldMember |
| Global | Every server on the database |
!vip_addglobal, Grant VIP → All servers
|
ShareServerId: true makes every server's local grants apply here too.
| Goal | Setup |
|---|---|
| VIP on every server | One database for all servers, global grants |
| VIP per server | One database, local grants |
| Separate VIP lists | A database per server |
A change made on one server reaches a player online on another when they next join.
A grant ends at its expiry time. Online players are checked every 30 seconds: an expired player is told Your <group> status has expired., and another group they hold takes over at once. Expired grants are deleted at that check, or when their player next joins.
VIP users never lists an expired grant.