Administrator guide
jaPRO server setup
How to run TaystJK's bundled jaPRO game module: its player accounts, admins and clans, how voting and bans work, and the commands that shape gameplay.
Before you start
Everything on this page belongs to TaystJK’s bundled jampgame, the jaPRO-based game module
in the taystjk mod directory, which is what the Docker image and a default native launch
run. If you load another mod’s game module,
that mod brings its own admin and account system and none of this applies.
Commands marked as server commands run in the server console, or from a client through
rcon once you know the rcon password. The others are typed by players, with or without a
leading /.
If you run the Docker image, its bundled server configs already set most of this up. They also set many of these values again at every start and whenever a game mode loads, so make lasting changes in those files; a change made only with a command lasts until the next start or mode change.
Player accounts
Accounts are stored in an SQLite database, data.db, in the mod directory under the
server’s home path
(g_account.c). In Docker that is
homepath/taystjk/data.db on the mounted volume. Back it up; it also holds race records,
duel results and clans.
g_allowRegistration decides what players may do
with accounts:
| Value | Players can |
|---|---|
0 |
Not register (g_account.c). Existing accounts can still log in. |
1 |
Register an account. |
2 |
Also join clans (g_account.c). |
3 |
Also create clans (g_account.c). The bundled configs use this. |
Players create an account with register <name> <password>,
which also logs them in, and later use login,
logout and changepassword.
What an account records for them is covered in
racing. Three rules are worth telling
your players:
- One account per IP address. Registering fails when the player’s address already
belongs to an account (
g_account.c), and logging in to a different account from that address fails too, unless the account is flagged Trusted (g_account.c). - Passwords are stored as plain text in
data.db(g_account.c) and compared without regard to case (g_account.c). Players should not reuse a password from anywhere else, and you should treatdata.dbas sensitive. - Names are simplified. Account names are lowercased and stripped of punctuation, and
names and passwords are cut to 15 characters
(
g_account.c).
Managing accounts
These are server commands:
| Command | Does |
|---|---|
register <name> <password> |
Creates an account for someone. |
changepassword <name> <new password> |
Resets a password. |
accountInfo <name> |
Shows an account’s details. |
clearIP <name> |
Forgets the address an account last used, which frees that address for the one-account rule. |
renameAccount <name> <new name> confirm |
Renames an account, including its race and duel records. |
deleteAccount <name> confirm |
Deletes an account and its race and duel records. |
flagAccount <name> |
Lists an account’s flags. See account flags. |
DBInfo |
Prints how many accounts, race records and duels the database holds. |
renameAccount and deleteAccount do nothing unless the last word is literally confirm
(g_account.c).
Account flags
Each account carries a bitmask of flags. Bits 0 to 22 are the admin rights described below; bits 23 to 29 change how the account is treated:
| Bit | Flag | Effect |
|---|---|---|
| 23 | IP Lock | The account can only log in from the address it last used (g_account.c). |
| 24 | Trusted | Exempt from the one-account-per-address rule when logging in. |
| 25 | No Race | The player’s race times do not count (g_trigger.c). |
| 26 | No Duel | Duels involving the player are not recorded (g_active.c). |
| 27 | All Cosmetics | Every cosmetic is unlocked (g_client.c). |
| 28 | Entities | Allows the nearby and trace inspection commands (g_cmds.c). |
| 29 | Database | Allows flagRecord, which flags, unflags or deletes a race record (g_account.c). |
Toggle one with flagAccount <name> <bit>, for example flagAccount alice 24. The change
reaches the player at once if they are logged in.
Admins
A player’s admin rights are a bitmask with one bit per power, such as kick, ban, teleport or
change map; the g_fullAdminLevel entry lists every bit.
Every admin command checks the bit it needs
(g_cmds.c), and a player can check what they have with
amInfo (g_cmds.c). There are
three ways to hand rights out.
Shared admin passwords
Set g_fullAdminPass and
g_juniorAdminPass. A player who types
amLogin <password> gets the rights in
g_fullAdminLevel or
g_juniorAdminLevel, until they use
amLogout or leave. An empty password disables that login
(g_cmds.c), and passwords are compared without regard
to case (g_cmds.c).
Change what each level grants with the server command toggleAdmin:
toggleAdmin full lists the full level’s rights, and toggleAdmin full 4 switches bit 4
(kick) on or off (g_svcmds.c). Use junior for the
junior level. g_fullAdminMsg and
g_juniorAdminMsg set what everyone sees when someone
logs in; leave one empty to log in quietly.
The bundled configs give the full level every right except Callvote, and the junior level
map changes, amvstr, map listing, amwhois, amlookup and reading admin chat.
Admin rights on an account
Give an account admin bits with flagAccount, and the player
gets them whenever they log in to that account
(g_account.c):
flagAccount alice set full
flagAccount bob set junior
flagAccount carol 4
set full and set junior copy the current full or junior level, set <number> stores
that exact bitmask, and a bare bit number toggles one right. set replaces every flag on the
account, including Trusted and IP Lock, so set those again afterwards
(g_account.c). listAdmins
lists the accounts that have the Read AmSay right, bit 22, which is the one jaPRO treats as
marking an admin account (g_account.c).
Logging out of the account does not remove rights it granted; they last until the player
leaves the server (g_account.c).
Granting rights in game
An admin with the Grantadmin right can run amGrantAdmin
<player> to give another player the junior level’s rights for the rest of their visit, or
amGrantAdmin <player> none to take every admin right away
(g_cmds.c).
No admin command works on another player who holds the same right, so one admin with kick
rights cannot kick another (g_cmds.c).
Clans
jaPRO has two unrelated things called clans.
Account clans are stored in the database and need g_allowRegistration of at least 2 to
join and 3 to create. The player who runs clanCreate <name>
owns the clan (g_account.c) and manages it with
clanAdmin <clan> <kick|private|public|longname|tag>
(g_account.c). A private clan can only be joined by
invitation, sent with clanInvite <clan> <account>. Other
players use clanJoin, clanLeave,
clanList and clanInfo. From the
server console you can manage any clan with clancreate,
clandelete, clanjoin
<clan> <account> and clankick <clan> <account>.
Clan chat needs no account. Players who set the same clanPass
<password> can talk to each other with clanSay
(g_cmds.c), and
say_team_mod clan sends their team chat there instead.
Voting
g_allowVote is a bitmask of the vote types players may
call. List and toggle them with the server command toggleVote,
or the older toggleallowvote, which does the same.
g_tweakVote, set with tweakVote,
adjusts how voting behaves: whether spectators may vote, flood protection, a quiet period
after each map load, and whether abstainers count.
g_voteDelay is how many milliseconds a passed vote
waits before it takes effect (g_cmds.c), and
g_voteTimeout holds back a player whose vote
failed: they wait that many seconds for each failed vote before they can call another
(g_main.c).
Two things are easy to miss:
- Admin-only voting. If either admin level includes the Callvote right, bit 20, then only
players who hold that right can call votes at all
(
g_cmds.c). The bundled levels leave it out. vstrvotes run commands.callvote vstr <name>runs the console commands stored in the server cvar of that name. The vote only checks that the cvar has a value (g_cmds.c), so players can name any server cvar, not only the ones you prepared. The bundled configs prepare a set of vote options.
An admin with the Killvote right cancels a vote in progress with
amKillVote.
Bans
Ban from the server console or through rcon with addip <address>,
and manage the list with removeip and
listip. In game, an admin with the ban right uses
amBan <player>, which adds the player’s address and kicks them
(g_cmds.c).
- Leave numbers off the end to cover a range:
addip 1.2.3bans every1.2.3.xaddress (g_svcmds.c). - The list lives in
g_banIPs, which the server saves, so bans survive a restart (g_xcvar.h). If you set it in a config instead, separate the addresses with spaces and end with a space; the game ignores a last address with nothing after it (g_svcmds.c). g_filterBan1blocks the listed addresses;0admits only them, which makes a private server.
The Docker image keeps these settings in bans.cfg.
Tweak commands
Much of jaPRO’s gameplay is controlled by bitmask cvars, one option per bit. Each has a server command that shows the options and switches them one at a time, so you never have to work out the number yourself:
tweakWeapons
tweakWeapons 21
The first line lists every weapon option with [X] beside the ones that are on. The second
switches option 21, fast weapon switching, and prints its new state.
| Command | Sets | Controls |
|---|---|---|
tweakWeapons |
g_tweakWeapons |
Weapon behaviour, damage and spread |
tweakSaber |
g_tweakSaber |
Saber combat, such as JK2-style swings and damage |
tweakForce |
g_tweakForce |
Force power behaviour |
tweakVote |
g_tweakVote |
Voting rules |
startingWeapons |
g_startingWeapons |
Weapons players spawn with |
startingItems |
g_startingItems |
Items players spawn with |
saberDisable |
g_saberDisable |
Saber styles and types players cannot use |
toggleEmotes |
g_emotesDisable |
Emotes players cannot use |
toggleVote |
g_allowVote |
Vote types players may call |
toggleAdmin |
g_fullAdminLevel, g_juniorAdminLevel |
Admin rights for each password level |
Each cvar’s reference entry lists what every bit does. To keep a combination, print the
cvar’s value, for example by typing g_tweakWeapons, and put that number in your config.
Other server commands help run a match: gametype <number>
switches gametype without reloading the map
(g_svcmds.c),
resetScores clears the scores,
forceteam moves a player, and pause
pauses the match for up to g_pauseTime seconds.
Race records
Race times only count while the server meets jaPRO’s conditions for a fair run
(g_trigger.c). If players report that their times are
not being saved, check these first:
sv_cheatsis0.sv_fpsis20,30or40(g_trigger.c); the bundled configs use40.timescaleis1,g_stepSlideFixandg_smoothClientsare on,g_jediVmercis off, andg_debugMeleeis below2.g_knockbackis1000for the rocket-jump and Tribes styles (g_trigger.c).- The player is logged in and their account does not have the No Race flag.
- If
sv_pluginKeyis set, logged-in players also need a client that proves itself with that key when it logs in (g_trigger.c). Leave it at0unless you use a client plugin that supports it.
Courses can add their own conditions, such as a required force jump level, and tell the player when a run does not count.
Last changed History Edit this page on GitHub