Sid Meier's Civilization V

Sid Meier's Civilization V

80 ratings
Faster AI Turn Processing [view mod page for instructions]
2
   
Award
Favorite
Favorited
Unfavorite
Tags: Other
File Size
Posted
Updated
189.753 KB
10 Oct, 2021 @ 6:06pm
16 Oct, 2021 @ 9:01pm
4 Change Notes ( view )

Subscribe to download
Faster AI Turn Processing [view mod page for instructions]

Description
haha ai turn processing go brrrrrr

download:
nexusmods[www.nexusmods.com]
[www.nexusmods.com]

instructions
Install by either unzipping to your Civilization V folder
or copying file from zip to your civilization folder




Conflicts:
will overwrite or be overwritten by any mod that replaces lua51_Win32.dll


More Information


Wait, how does this work?
from my topic over at BoingBoing's BBS[bbs.boingboing.net]:
wait, what the heck?
Civilization V, like Civilization IV before it, uses a Lua interpreter to load information into the game, to build, and execute AI decision trees, and to execute routines. the diplomacy system? controlled by a .Lua file. the menu system? controlled by Lua. this allowed development of the game to occur very quickly in a collaborative setting without having to constantly build and deploy new versions of the game -- a Lua file is a plain-text file, easily shared.
Lua interfaces are not exactly uncommon. It's a very powerful scripting language, one that open source projects like Minetest use to enable users to create and distribute modifications. An entire game-making engine, LOVE2D, is built on it.
Lua is somewhere between Javascript and Python in terms of ubiquity, ease of development, and features. Created and maintained by a team at the catholic university PUC-Rio, Lua has been around for as long as the World Wide Web. It’s probably older than your children, and definitely older than your car. Like other programming languages, it routinely gets extended with newer updates and new features. Not all Lua functions are always integrated into games; some games only expose a narrow set of commands and data structures to a Lua API - reserving the real calculations for the meatier and faster native program binary.

Interpreted languages like Lua can be performant, but not nearly as fast in executing instructions as native programs. Enter the JIT. Just-in-Time compilers/interpreters convert script into machine language, making the exact same script execute dozens if not hundreds of times more quickly. JITs sometimes omit or rewrite how functions work; some JITs keep variables in memory after a function is completed, for example.

What this mod is and how it works
This mod is a customized, Just-In-Time Lua interpreter/compiler.

Specifically, this mod is a pre-compiled binary of moonJIT 2.2.

What it does is compiles .Lua files into machine-compatible low-level programming code. It keeps this code in memory so it can be executed very quickly when the game executes any functions that require reading a Lua file. Since the game can call a Lua file multiple times per turn, this mod essentially reduces the file read-> cache -> interpretation cycle to 0 milliseconds by doing it instantly.

Since text files don't use that much space, the amount of additional RAM consumed is around 50 megabytes. That's two mp3 podcast files. Or less than a single minute of video. Your music-streaming tab of spotify or youtube consumes 200x more RAM than this mod does.




Credits:
moonJIT team, for moonJIT 2.2
moonJIT based on luaJIT 2.1

Source Code:
moonJIT @ https://github.com/moonjit/moonjit
luaJIT @ https://github.com/luajit/luajit
lua created and maintained by lua team
https://lua.org/


forever free icon based on jokerine's icon, and bigcman123's vault girl hud HD

also viewable on Nexus Mods
https://www.nexusmods.com/civilisationv/mods/19
41 Comments
Thomas J Bombadil 30 Apr @ 8:49am 
How do I know if this is working? I did the manual install, moved the file into my game directory. The turns still seem to be processing at the same rate *though I have only just started a new game, haven't seen late game yet.
Lash [fof_bb]  [author] 15 Mar @ 4:26pm 
hi Taranis, sorry for the slow reply

**Do not activate this through the in-game mod manager**. The in-game mod manager is not capable of installing mods to the root game folder. The mod MUST be manually extracted and installed to the game folder directly.
Taranis 9 Mar @ 11:17am 
Doesn't work even when it's the only mod selected :/
Lash [fof_bb]  [author] 4 Jan @ 7:53am 
@Full Spade :
I haven't tested multiplayer functionality with this specific build of moonJIT. Both Community Balance Patch and Vox Populi, which use an older build, have functional multiplayer. For multiplayer play I recommend the Community Balance Patch on github.
Full Spade 3 Jan @ 2:48pm 
Does this work in multiplayer?
lamuchan13 4 Jun, 2023 @ 12:55am 
This doesn't work for me. I use Vox Populi
DanzaDragon 22 Apr, 2023 @ 12:25pm 
Is there any info on what kind of time/performance savings this mod typically yields?

I assume it's better late game when turns typically can take much longer to process?
EkidonaLangley 28 Feb, 2023 @ 10:27pm 
I am having an issue where players in a multiplayer game are being switched to other players locations and unable to access their city. This didn't happen before in an older build but I don't remember which one.
Lash [fof_bb]  [author] 1 Feb, 2023 @ 11:03am 
Hello, Coltwk45:
Vox Populi is built on top of Community Balance Patch, which includes an older revision of MoonJIT.

I haven't tested compatiblity between the current version of MoonJIT and Vox Populi, but the performance difference between the VP/CBP-included version and the current release of MoonJIT, are minimal.
Coltwk45 30 Jan, 2023 @ 11:20pm 
does this work with VP?