Skip to content

Instantly share code, notes, and snippets.

@meag
Last active July 5, 2018 15:57
Show Gist options
  • Save meag/09b7b6c736b8f2fde1df991cf1151abb to your computer and use it in GitHub Desktop.
Save meag/09b7b6c736b8f2fde1df991cf1151abb to your computer and use it in GitHub Desktop.
Installing KTX with www communication built-in (frogbots optional)

Compiling

Compiling MVDSV

Need some extra packages installed (on Ubuntu at least):

sudo apt install pkg-config libcurl4-openssl-dev

Then ./configure and make as usual.

Web server communication is disabled until /sv_www_address is set, so you should see no changes initially.

KTX - botsupport

The source files have changed so you need to run ./configure first of all to update your Makefile

Bot support is also optional, to enable you must run: make build-dlbots

Configuration

Web communication

To enable reporting matches to the website, add the following to server.cfg:

set k_demotxt_format json           // .txt files generated next to .mvd files will be in json format
sv_www_address https://badplace.eu/     // URL to send match/race results to
sv_www_authkey "<authkey>"              // contact meag to find out what string to put here

In mvdsv.cfg, you must also change:

sv_demotxt                    2         // create demo .txt (0 = off, 1=on)

(The comment is incorrect, 0 = off, 1 = basic text file, 2 = stats - this is the stats file sent to the web server)

Race mode

Routes for race maps used to be hard coded into KTX, now they're read from .route files. Copy /resources/example-configs/ktx/race/routes/* to equivalent directory

There are also some bugs in standard race mode (where everyone queues at the start) that I haven't fixed yet, I recommend enabling multi-race mode by default. Add set k_race_simultaneous 1 to ktx.cfg

Bot support

Map routing is now loaded from .bot files, rather than hardcoded in the mod. Copy /resources/example-configs/ktx/bots/maps/* to equivalent directory.

To cut down on extra cpu usage when bots aren't being used, I recommend adding set k_fb_enabled 0 to server.cfg. This will default botmode off whenever the map is reset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment