Skip to main content

Overview

OptionManager is a global singleton that stores all configurable game-mode options as a flat key–value table. Other modules read and write options through two functions: GetOption and SetOption. The module is designed to be safe to require multiple times — a guard at the top prevents re-initialisation:

API

OptionManager:GetOption(optionName, default)

Returns the current value of optionName. If the key has never been set, returns default (or 0 when no default is provided).
Examples:

OptionManager:SetOption(optionName, newValue)

Writes newValue into the option store.
Examples:

Default option values

All defaults are written once during the first require('optionmanager') call (guarded by OptionManager.initialSettings).

Timing

Skill slots

Game modifiers

Picking rules

Mutators

Runtime keys (not pre-seeded)

These keys are written at runtime and have no static default in optionmanager.lua: mapname · antiRat · neutralMultiply · allowIngameHeroBuilder · ingameBuilderPenalty · respawnModifier · respawnModifierConstant · respawnModifierPercentage · buybackCooldownConstant · strongTowers · towerCount · middleTowers · laneMultiply · darkMoon · sharedXP · goldPerTick · neutralItems · banInvis · consumeItems · stacking · turboCourier · extraAbility · globalCastRange · direBotDiff · radiantBotDiff · stupidBots · duplicateBots · botsSameHero · randomOnDeath · lodOptionCrazyWTF