kts.MISC_CONFIG

Name

kts.MISC_CONFIG – table of miscellaneous config settings

Synopsis

kts.MISC_CONFIG = {
    ... table of various settings ...
}

Description

The table kts.MISC_CONFIG, defined in misc_config.lua, contains configuration variables that affect the game in various ways.

Most mods will probably not need to change any of these settings, but they are documented here for completeness.

The following fields are available:

Notes

The MISC_CONFIG is only loaded once, when the server starts up. Therefore, changes to MISC_CONFIG mid-game, or pre-game (i.e. while players are choosing the next quest), will not affect the game at all.

This page is about the server-side MISC_CONFIG table. There is also another MISC_CONFIG in the Knights client settings (file client_config.lua), which configures various aspects of the game client's UI. This client-side configuration cannot be changed by Knights "mods" and therefore is not documented here. However, it should not be confused with the server-side MISC_CONFIG (i.e. the kts.MISC_CONFIG variable defined in misc_config.lua) which is what is being discussed on this page.

Bugs

The monster_radius setting does not quite work as described above. What actually happens is that when it is time to run monster generation, the game calculates the minimum x and y coordinates of all knights in the dungeon, and subtracts monster_radius from those; it also calculates the maximum x and y coordinates of all knights, and adds monster_radius. This calculation produces two dungeon positions, which become the top-left and bottom-right corners of a rectangle. Monsters can then be generated at any dungeon position inside that rectangle. What this means is that if all knights are fairly close together, then monsters will be generated only in the vicinity of the knights, but if the knights are far apart (say in opposite corners of the dungeon), then monsters will be generated pretty much anywhere in the dungeon. This is, obviously, not a critical issue, since the monsters will move about and players will find them eventually, but perhaps a future version of the game could implement some slightly more sophisticated logic for this feature.

Examples

A mod that wanted to remove the distinction between "fast" and "slow" regeneration potions, and have both potion types regenerate at the same speed, might include code like the following:

kts.MISC_CONFIG.slow_regen_time = 1400
kts.MISC_CONFIG.fast_regen_time = 1400

This sets both slow_regen_time and fast_regen_time to the same value (intermediate between the usual settings for these two variables).