Two ways to host
- From the game. Start a game from the menu of VisionJK and others can join it while you play. This works on Windows and on Linux and is the quick way for a round with friends.
- A dedicated server. A program without a picture that runs day and night. It is in the Linux download and is named visionjkded.x86_64.
Players with VisionJK and players with the original game can both join. Those with the original game play as they always did, just without the voice chat.
Start a dedicated server
- Install VisionJK on the machine as in First steps. The game data has to be there too.
- Open the file server.cfg in the folder japlus with a text editor. It is a ready example. Give your server a name (
sv_hostname) and set the passwords described below. - Start it from the GameData folder:
./visionjkded.x86_64 +set dedicated 2 +exec server.cfg
With dedicated 2 the server shows up in the public server list. With dedicated 1 it stays private: people join by typing your address.
Open the doors
Two ports have to reach your server from outside, both UDP. In a home network that means forwarding them in your router.
| Port | For |
|---|---|
| 29070 | The game. This is the usual port, you can choose another with net_port. |
| 29071 | The voice chat. It is the game port plus one, unless you set another with g_voicePort. |
Passwords and admins
The example config comes with empty passwords. Set your own before anybody else can reach the server.
| Setting | What it protects |
|---|---|
rconpassword | Full control of the server from the console. |
jp_councilPass | The highest admin rank. |
jp_knightPass | The middle admin rank. |
jp_instructorPass | The lowest admin rank. |
An admin logs in during a game by typing amlogin and the password of his rank into the console. What each rank may do is set in the same config. Admins can kick and ban, put a player to sleep, protect or silence him, teleport, rename, change the map and start polls. aminfo lists the commands.
The server page
VisionJK servers come with a page for the owner. You open it in a browser and see the level with everybody on it, live.
- Put two lines into your server.cfg:
seta g_webPassword "a long password"seta g_webPort 8080 - Start the server, or change the map if it already runs.
- Open
http://your-server:8080/in a browser. Any name works, the password is the one you set.
The page has two modes. In Administration you see the players, change their health, team or size, move them with a right click on the map, kick or ban, read the chat and edit the config. In Editor you move, turn, copy and remove the things in a level, and place new ones.
The page is not encrypted. Use it inside your own network, or put it behind HTTPS before you open it to the internet. With seta g_webBind "127.0.0.1" it only answers on the server machine itself. As long as no password is set, the page is off.
Voice chat on your server
Voice chat is on from the start, you do not have to do anything except keep the voice port open. Three settings you may want:
| Setting | What it does |
|---|---|
g_voiceRange | How far a voice carries. 1024 from the start. With 0 everybody hears everybody. |
g_voiceTeamOnly 1 | In team games only the own team hears a player. |
g_voice 0 | No voice chat on this server. |