• Civilization 7 has been announced. For more info please check the forum here .

Civ4 Universal Map Finder

dilandau

Chieftain
Joined
Aug 19, 2008
Messages
19
I have tired of clicking Regenerate Map button and the annoyed confirmation popup.
So I wrote this program.

Program information
Program Name: Civ4 Universal Map Finder
Program Version: 0.3
Target Civilization 4: all
Target Mods: almost all

Program description
Civ4 Uinversal Map Finder is a universal and flexible tool for Sid Meier's Civilization 4 Map Generation.

Civ4UMF is compatible with all versions of Civ4, and is also compatible with all mods that didn't change CvGameCoreDLL's function regenerateMap() dramatically.
PyCiv4MapNK.py controls the core procedure of auto map regeneration. Civ4UMF uses Civization 4's builtin Python interpreter to execute PyCiv4MapNK.py
Base on this fact, all Python API provided by exe and dll, namely all stuff in module CvPythonExtensions can be used in PyCiv4MapNK.py.

Civ4 UMF does not pollute CvGameCoreDLL, python scripts or XML files.
Hence, you don't need to worry about save file protection for Locked Modified Assests, when using Civ4 UMF to generate map.

Advanced information
This program provides a platform for modding Civ4 in an unusual way.
It can be used to hijack ANY export function in CvGameCoreDLL.dll. You can replace any export function in CvGameCoreDLL.dll by yours. Moreover, you can still use the original function.
For example, if you use Civ4UMF, CvGame::regenerateMap() will be redirected to controll() in Civ4MapNK.dll. Meanwhile controll() still uses regenerateMap() to generate a map.
Actually, map searching is just a specialization of this program's true power.

Download
win-binary
http://civ4xml.googlecode.com/files/civ4umf-0.3.zip
source code
http://civ4xml.googlecode.com/files/civ4umf-src-0.3.zip
download list
http://code.google.com/p/civ4xml/downloads/list
 
I use CreateRemoteThread to inject a dll to Civ4's process.
Actually, this program acts like a virus, it will hijack CvGame::regenerateMap.
This is why it can work with all version of Civ4 and almost all mods.
Hence, it 's very common that the antivirus software might regard it as a virus.
Don't worry.

If you don't trust unknown binary, download the source code and build it by yourself.
 
Ooh. This seems useful. I'll probably need to know the API to be able to use it well from the looks of these python files. Still, being able to require bonuses is good. I've been looking at the examples and some map scripts for info, good enough so far, got a finder for a good OOC.
Huh.
Seems to freeze now, even when I leave the map regen max at 1.
 
Top Bottom