swiftlys2/docs/api/releases/features/ai/

Core Configuration

Core configuration controls framework-wide behavior such as command parsing, plugin loading, menu input, console filtering, console logging, unlocker toggles, and Steam auth mode.

Config File

Edit the following file:

addons/swiftlys2/configs/core.jsonc

The file is created from core.example.jsonc on first startup. Missing keys, or keys with an incompatible type, are replaced with their default value and written back to this file on load. Change the location with -sw_path if SwiftlyS2 is installed elsewhere - see CLI Options.

Global Settings

KeyTypeDefaultDescription
CommandPrefixesstring[]["!"]Prefixes recognized for normal command execution.
CommandSilentPrefixesstring[]["/"]Prefixes recognized for silent command execution.
AutoHotReloadbooleantrueReloads a plugin automatically when its .dll file changes.
ProfilerLevelnumber0Default profiler level. 0 disables profiling, 1 enables EventPipe profiling.
ConsoleFilterbooleantrueEnables console filtering on startup - see Console Filter.
PatchesToPerformstring[][]Identifiers of the game data patches applied on startup. Identifiers that do not exist for the current game are logged and skipped.
CS2ServerGuidelinesstring"https://blog.counter-strike.net/index.php/server_guidelines/"URL of the CS2 server guidelines. Only registered on CS2, and not read by the core at the moment.
Follow<Game>ServerGuidelinesbooleantrueKeeps SwiftlyS2 inside the server guidelines: while enabled, protected schema fields and loadout item access throw instead of returning data. Key name depends on the current game, e.g. FollowCS2ServerGuidelines.
Languagestring"en"Default language code, used when a player has no language of its own.
UsePlayerLanguagebooleantruePrefers the language reported by the player's game client for translations.
ManualLoadPluginsbooleanfalseSkips plugin loading on startup; plugins are then loaded with sw plugins load from the server console.
PluginLoadOrderstring[][]Plugin IDs loaded on startup, in the listed order, when ManualLoadPlugins is true.
DotnetCrashTracerLevelnumber0.NET crash tracer level. A value greater than 0 enables the tracer.
WindowsFullDumpbooleanfalseWindows-only crash dump toggle. Not read by the core at the moment, so it has no effect.

Unlocker Settings

Unlocker controls which restricted engine features are exposed.

KeyTypeDefaultDescription
ConvarsbooleanfalseRemoves the restricted flag from locked convars on startup.
ConCommandsbooleanfalseRemoves the restricted flag from locked console commands.

Console Logger Settings

ConsoleLogger controls console output logging and log file rotation.

KeyTypeDefaultDescription
EnablebooleantrueEnables console logging to files in logs/console/.
ManagedEnablebooleantrueAlso writes managed (.NET) plugin logs to files in logs/managed/.
WriteIntervalMsnumber2000Interval, in milliseconds, between log file writes. Values below 1 fall back to 2000.
Rotation.EnablebooleantrueEnables log file rotation, applied on startup and after every write.
Rotation.Modestring"file_count"Rotation mode. Available: "file_count", "time_interval". Any other value leaves rotation inactive.
Rotation.AvailableModesstring[]["file_count", "time_interval"]Rotation modes listed for Rotation.Mode.
Rotation.MaximumFilesnumber60Maximum number of rotated log files to keep (file_count mode). Values below 1 disable this rotation.
Rotation.DeleteOlderThanHoursnumber168Deletes rotated log files older than this many hours (time_interval mode). Values below 1 disable this rotation.

Menu controls input mode, navigation behavior, and menu sounds.

KeyTypeDefaultDescription
AvailableInputModesstring[]["button", "wasd"]Menu input modes listed for InputMode.
InputModestring"button"Active menu input mode. "wasd" enables WASD navigation, any other value uses the Menu.Buttons mappings.
NavigationPrefixstring"➤"Prefix shown for the currently selected menu item.
ItemsPerPagenumber5Number of menu items shown per page, used by menus that do not set their own limit. Values are clamped between 1 and 5.
KeyDefault
Exit"tab"
Scroll"shift"
ScrollBack"f"
Use"e"

Values are matched case-insensitively against a fixed set of key names: mouse1, mouse2, space, ctrl, w, a, s, d, e, esc, r, alt, shift, weapon1, weapon2, grenade1, grenade2, tab, f. A name outside this set leaves the action unbound, so the key never triggers it.

Menu.Sound defines the sound played for menu actions.

ActionNameVolume
Exit"Vote.Failed"0.75
Scroll"UI.ContractType"0.75
Use"Vote.Cast.Yes"0.75

SteamAuth Settings

SteamAuth controls Steam authentication mode.

KeyTypeDefaultDescription
AvailableModesstring[]["flexible", "strict"]Steam auth modes listed for Mode.
Modestring"flexible"Active Steam auth mode. With "flexible" the Steam ID of a player who has not completed Steam authentication is still returned, any other value returns 0 until authentication succeeds.

Notes

  • Every key is read while the core starts, so restart the server after editing core.jsonc. Console filtering is the exception: sw confilter enable and sw confilter disable toggle it at runtime without writing the change back to the file - see Console Filter.
  • The SetSchemaHammerUniqueId patch is applied on startup even when PatchesToPerform is empty.
  • A key with an incompatible type is reset to its default, while an individual array entry with an incompatible type is skipped with a logged error and the remaining entries are kept.
  • ConsoleLogger.Rotation.AvailableModes, Menu.AvailableInputModes and SteamAuth.AvailableModes only list the values their Mode counterpart understands; the core does not validate Mode against them.