Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Fixes and features

eix’s own changes to game.exe RU 1.06, beside the originals’ features: fixes of defects that the original addon.dll and SpellAddon leave, and features. Each is set in eix.ini.

Fixes

Code: crates/addon/src/fixes/, one module per fix, applied in table order after the patch groups.

  • A fix changes nothing a player sees, except the mod setting below. The changes a player sees are game options, switched in the same section.
  • No fix writes a place a SpellAddon feature patches, or changes what a multiplayer peer computes.
  • addon.log lists each fix under fixes: applied, failed with the reason, or off. With Enabled 0 one line says no fix applied, and only the mod setting is listed.

The switches are in eix.ini’s [EngineFixes] section.

A mod’s config.reg can set [MOD] ShowTutorialDefault: the “Show tutorial” option’s value while the game has none stored, as on a first start. The game stores the option at exit, so the player’s later choice wins. Without the key the game’s default (on) stands. Enabled 0 does not turn it off.

FixBeforeAfter
HeapPaddingheap overruns crash under Wine (lobby, shops, looting)blocks padded (about 14 % more heap)
TimerResolutionframe times snap to 15.6 ms on Windows 10 2004+1 ms timer
CastTargetGonea cast whose target leaves the world crashes the serverthe order ends
KillScriptOutsideKillScript outside a script writes through null (AntiCrash on)reported, game goes on
LowercaseTableslow per-character lower-case conversion in parsing and lookupscached; zone loads about 30 % faster
ViewDepthInituninitialised depth can crash the draw sort on a first zone loaddepth starts at 0
MappedFileMessagea failed-open message over 210 bytes overflows its bufferpath cut at 210
PresentFailurea screen lock or UAC prompt in full screen ends the gameflip waits, frame skipped
FullScreenFallbacka refused full-screen mode crashesnext larger mode, game in its top left corner
ScreenshotRowPaddingscreenshots at some widths read past their bufferbuffer sized right
BriefingTexta guest joining during a briefing crashes the hostdialogue goes on
UnitPanelTextthe unit panel stalls the frame for its textdrawn in memory, copied on change
StreamWaita music change spins the main threadthe wait sleeps
QuestSortquests without a #quest entry crash or hang the journalsorted first
ExitIndexa zone with unloaded exits crashes the briefing screenempty exit, warning
FatalErrorExita fatal error with AntiCrash off crashes on shutdownclean exit, same code
UnknownScreenan unknown game state from the host crashes the clientlogged, ignored
DiplomacySidesa side outside 0..31 reads and writes past the tableshostile, unchanged, warning
MissingPlayerModea party member with cleared modes crashes the party checkskipped
NoAudioDeviceno audio device: movies crashruns silent, warning
EmptyMusicThemean empty theme track list divides by zeroplays nothing, warning
ZoneModeText% in a theme name read as a formatprinted as text
StreamFadeLocka fade races the stream threadtakes its lock
PointLightOverflowthe 257th script light overruns the tablerefused, warning
EmptyItemStripa missing constructor record crashes a camp or shop stripempty list, warning
UnregisteredLighta light removed twice or moved before added corrupts memoryignored, warning
FindHandleLeakeach music track leaks a file search handleclosed
LoadFailureLeaksa failed read and two failed texture loads leakfreed
TruncatedScripta script ending mid-statement crashes or hangs the game“Unexpected end of file”
VertexLighting3DfpFPU.dll lights vertices in slow x87 codeSSE, four at a time, same colours bit for bit, also with Universal Mod’s um-engine.dll

Features

AutoPause and encumbrance are off by default, FLAC music and INI variables on; the game options each have their own default.

Game options

Window, display and start-up changes. Each has its own key in eix.ini’s [EngineFixes]; UnitShadowResolution, KeepRunningOnFocusLoss and ClipCursorToWindow are off by default, the others on. The focus options change the window only, never full screen. Enabled 0 there turns all of them off. addon.log lists each under fixes.

OptionBeforeAfter
KeepWindowOnFocusLossin a window, the game minimises on focus lossstays on screen, paused
KeepRunningOnFocusLossin a window, the game pauses (tick, sound, input) and minimises on focus loss; a multiplayer client falls out of stepkeeps running and playing, not minimised
ClipCursorToWindowin a window, the cursor leaves itconfined to the client area while the window has the focus; let go on focus loss, minimising and closing
UnitShadowResolutionunit shadows are 64 by 64 pixels128 or 256: a sharper edge, more video memory and work per shadowed unit; rendering only
SmoothCamerapanning stutters: a tick’s camera step lands in one framespread over frames, same speed
PlayerListOnJoina client may see an empty player list until players changerefreshed when its player arrives
SkipDiscCheckthe starter’s game.exe asks for the game discstarts without it, as GOG’s exe
UnitPanelSpellsthe unit panel’s values page shows no spells of a unit outside the partyeach spell below the values: its icon and “Effect:” with its value, as the spell windows show it; a page taller than the panel gets the game’s scroll bar (arrows, thumb, and the mouse wheel over the page instead of the camera’s zoom); single player and the host only
SpellsNeedAcceptedSkillsthe camp’s spell constructor counts skills bought on the skills page before the purchase is accepted, so undoing the purchase keeps the spells made with themcounts each hero’s skills as last accepted

KeepRunningOnFocusLoss covers KeepWindowOnFocusLoss in a window: with both on, the game never sees the focus loss, so nothing pauses and nothing minimises. With KeepRunningOnFocusLoss 0 the second still keeps the window on the screen, paused. Minimising the window yourself stays the game’s: it pauses, and resumes when the window is restored.

AutoPause

In single player, the game pauses when a party member’s health drops low, an enemy comes into view, an enemy turns on the party, or an enemy in view dies; each event has its own setting. A network game never pauses. addon.log names what paused the game.

  • Health: a party member’s health drops below Health or HealthPercent; with both set, either limit pauses the game. It pauses once per drop: the member’s health must rise to the limit again before the next drop pauses the game. A member that is already low when it comes into view (a zone loads, a new member joins) does not pause the game.
  • An enemy is a living unit without a player that is hostile to the party’s side. The party’s view is what its members see, as the script PlayerSee gives it.
  • EnemySighted and EnemyAggro pause once per encounter: the next pause comes after no enemy is left in view, or aggressive, and one appears again. Enemies already in view, or aggressive, when a game loads pause it at once.

Encumbrance

The load a hero carries slows running, and makes running cost more stamina; above the hero’s maximum load it slows walking too. Load and maximum load are the encumbrance figures of the hero panel; their ratio is the encumbrance below (1.0 at the maximum). The rates are settings.

  • Running speed is 100% - RunSlope x encumbrance: with the defaults 80% at the maximum load, 60% at twice it.
  • Walking, sneaking and crawling keep the game’s speed up to the maximum load, then lose WalkSlope per extra maximum load: 80% at twice the maximum.
  • Turning while walking or standing slows with the running speed: the game turns a walking or standing unit at its running pace.
  • Running drains the stamina the game’s run system takes, divided by the load’s running speed: at 80%, 1.25 times as much. Wounded legs slow the hero without raising the drain. RunDrain scales the extra: 0 keeps the game’s drain, 50 halves the extra.
  • No load stops a hero from running; wounded legs still slow every movement and stop running, as in the game.
  • The speeds follow the load when the game recomputes a hero’s statistics (regeneration, damage, healing, effects), not at the moment an item is equipped.
  • With SpellAddon’s encumbrancemovespeed also on, both slow movement; addon.log warns. SpellAddon’s heroalwayscanrun changes the same byte as this feature. Its run settings (newrunsystem, runconst) decide the drain that RunDrain scales.

FLAC music

eix plays a music or streamed-sound track from Stream\<name>.flac when there is one, in place of <name>.mp3: the mod’s Stream folder first, then the game’s. The order is the mod’s .flac, the mod’s .mp3, the game’s .flac, the game’s .mp3.

  • The track keeps its .mp3 name in the game: music.reg names and streamsn.reg sections (<name>.mp3) stay.
  • Mono or stereo, any sample rate, up to 32 bits a sample (played as 16 bits). Packs can mix FLAC and MP3 tracks.
  • addon.log names each FLAC file played. A file that does not decode plays silence, with a warning.
  • Briefing speech (speech.res) stays MP3.
  • On by default; eix.ini’s [Music] Flac=0 turns it off.

INI variables

A script’s GSGetVar(0, "ini.<file>.<section>.<key>") reads key in [section] of <file>.ini as a number, so a mod’s map scripts can take settings from an INI file. Mod settings for map scripts shows the use.

  • The file comes from the mod’s folder (Mods\<mod>), else the game folder. <file> is a plain file name: a name with \, / or : reads the game’s variable.
  • Each file is read once, at the first variable that names it: a change applies at the next game start.
  • A missing file, section or key, or a value that is not a number, reads 0; addon.log notes each such name once. The decimal point is . or ,; names ignore case. The key is the rest of the name, dots included.
  • Nothing is stored: saves hold no INI values, and multiplayer clients are sent none. Each machine reads its own file.
  • Without eix the game reads 0 for such a name, as for any variable never set.
  • Always on; other variable names keep the game’s own lookup.