How enormousapplepie/lekmod works
Lekmod is a Civilization V gameplay mod, accompanied by a desktop installer/updater. The main user workflow is selecting a release and UI variant in the installer, downloading the mod, and configuring files for a Civilization V installation; in-game, the DLL provides gameplay rules, AI, and map-related capabilities. The README also documents a custom Lekmap mapscript, but its source is not present in the supplied tree. Several DLL subsystems are represented from filenames and documentation; unsampled implementation links are omitted rather than inferred.
Main entry points: installer.py Installer GUI · CvPlayer.cpp Player simulation · CvGame.cpp Game state · CvMap.h Map state
Components 25
Installer
- Installer GUI
LekmodInstaller/installer.py - Release lookup
LekmodInstaller/updater.py - Mod downloader
LekmodInstaller/google_drive_api.py - UI configuration
LekmodInstaller/ui_manager.py - Installer updater
LekmodInstaller/installer_updater.py
Gameplay Engine
- Game state
LEKMOD_DLL/CvGameCoreDLL_Expansion2/CvGame.cpp - Gameplay rules
LEKMOD_DLL/CvGameCoreDLL_Expansion2/CvInfos.cpp - Game database
LEKMOD_DLL/CvGameCoreDLL_Expansion2/CvGameDatabase/include/Database.h - Data loading
LEKMOD_DLL/CvGameCoreDLL_Expansion2/CvGameCoreDLLUtil/include/ICvDLLDatabaseUtility.h - Player simulation
LEKMOD_DLL/CvGameCoreDLL_Expansion2/CvPlayer.cpp - City simulation
LEKMOD_DLL/CvGameCoreDLL_Expansion2/CvCity.cpp - Unit simulation
LEKMOD_DLL/CvGameCoreDLL_Expansion2/CvUnit.cpp - Diplomacy
LEKMOD_DLL/CvGameCoreDLL_Expansion2/CvDiplomacyAI.h
AI and Strategy
- Player AI
LEKMOD_DLL/CvGameCoreDLL_Expansion2/CvPlayerAI.cpp - City-state AI
LEKMOD_DLL/CvGameCoreDLL_Expansion2/CvMinorCivAI.h - Deals
LEKMOD_DLL/CvGameCoreDLL_Expansion2/CvDealClasses.h
World and Maps
- Map state
LEKMOD_DLL/CvGameCoreDLL_Expansion2/CvMap.h - Map generation
LEKMOD_DLL/CvGameCoreDLL_Expansion2/CvMapGenerator.cpp - Lekmap script
Game Integration
- Lua bindings
LEKMOD_DLL/CvGameCoreDLL_Expansion2/Lua/CvLuaPlayer.cpp - DLL interfaces
LEKMOD_DLL/CvGameCoreDLL_Expansion2/CvGameCoreDLLUtil/include/CvDllInterfaces.h - World Builder maps
LEKMOD_DLL/CvGameCoreDLL_Expansion2/CvWorldBuilderMap/include/CvWorldBuilderMap.h
Other components
- Mod user
- Google Drive
- Civilization V
Connections 23
- Mod user → Installer GUI: chooses release
LekmodInstaller/installer.py - Installer GUI → Release lookup: checks versions
LekmodInstaller/installer.py - Installer GUI → Mod downloader: downloads release
LekmodInstaller/installer.py - Mod downloader → Google Drive: fetches archive
LekmodInstaller/google_drive_api.py - Installer GUI → UI configuration: configures UI
LekmodInstaller/installer.py - UI configuration → Civilization V: detects installation
LekmodInstaller/ui_manager.py - Installer GUI → Installer updater: checks updates
LekmodInstaller/installer.py - Installer GUI → Civilization V: installs mod
- Mod user → Civilization V: plays mod
- Civilization V → Game state: runs gameplay
- Game database → Data loading: provides game data
- Game state → Player simulation: updates players
- Player simulation → City simulation: manages cities
- Player simulation → Unit simulation: manages units
- Player simulation → Player AI: uses AI
- Player simulation → City-state AI: uses city-state AI
- Diplomacy → Deals: evaluates deals
- Game state → Map state: uses map state
- Map generation → Map state: generates map
- Mod user → Lekmap script: customizes map
- Lua bindings → Player simulation: exposes player actions
LEKMOD_DLL/CvGameCoreDLL_Expansion2/Lua/CvLuaPlayer.cpp - DLL interfaces → Civilization V: exposes DLL API
- World Builder maps → Map state: represents map data