For Modding Beginners: Cheat Console and Modding Tools

raystuttgart

Civ4Col Modder
Joined
Jan 24, 2011
Messages
9,672
Location
Stuttgart, Germany
Modding Cheats:

To be sure to not have to explain it to every new modder anew, I give you the small mini-guide here:
-------
Find the install directory of the game (not the mod !).

There is a shortcut to a file: _Civ4Config
Click it, it will open: CivilizationIV.ini

Make a safety copy if you are afraid to mess it up.

Before the entry [DEBUG] you should have something like this.

; Move along
CheatCode = chipotle


-------

This will allow you to use all "Modders Cheats", e.g. "SHIFT" + "Mouse Over".
It will also allow you to use the console (by chipotle)

Have fun with it. :)
 
Last edited:
For TAC we modders had written a small "basic modding guide" for beginners in German.
https://civ-wiki.de/wiki/Tipps_zum_Modden_(TAC)

Please simply run it through a translator.
If you have any questions, let me know.

Since TAC a lot of small useful functionality was added, but the stuff of TAC all still works.
 
Within the next days, I will try to collect some other stuff that may be useful for you guys.
(I have implemented and found a lot of small useful stuff, just need to sort it a bit.)
 
In 2011 the TAC team (a team of German speaking modders) had started an innitiative to collect and explain all tools for Civ4Col modding.
The information is extremely outdated 10 years later and much better tools and much more knowledge exists right now.

Summary
Let us collect a new list of tool recommendations for modding.
Please support this innititative.

Suggestions:
To get this started each of us modders could describe just 1 of his favourite tools within next week.
One single post with a few screenshots and a few explanations is good enough for a start.

Thanks in advance. :)
 
Last edited:
For further information please alse read here.
It is a wiki page on good modding tools created by CivFanatic Modders many years ago.

Some of these tools are great and I also still use them myself.
Others however I consider totally outdated today because much better alternatives exist.
(That list is heavily outdated, just like the TAC list from 2011 is partially outdated as well.)

Edit:
It is still a good orientation to get started and ask for further recommendations. :thumbsup:
Still, there is no way around that we create a new and uptodate list of recommended tools.
(Some of these tools e.g. for MapBuilding would not even work with WTP or most other complex mods.)
 
Last edited:
My favourite modding tool so far: Microsoft Visual Studio (MSVC) Express 2012. This might sound a bit bland but for DLL development, this is "all you need". With Nighttingale's recent commit in the development branch, debugger is easier to setup too. And MSVC debugger is sweet. Breakpoints, call stacks, watches, assert interruption, memory access violation checks.. you get everything while running the game.

For steam game version, brief instructions on setting up the debugger:
  1. Use https://github.com/atom0s/Steamless to get arid of steam copy protection. Otherwise, debugger won't run.
  2. You might need to edit Project Files/Setup Debugger.bat to add colonization.exe path to an argument for the perl script.
  3. Run the above batch script.
  4. Edit debugger settings to add the selected mod to command arguments (DEBUG-> RaR options / Debugging-> Command arguments-> mod="YOUR_MOD_FOLDER")
  5. Run the game in debugger mode DEBUG->Start debugging (F5).
For standard game installation (no steam), start from step 3.

Starting the game will take quite a bit extra time in debugging mode so be patient. Rewards are well worth it if you know how to use a debugger (and if not, learning is highly recommended!).
 
Forgive me, but I must share another tool I find extremely handy: WMHelp XMLPad Pro Edition.

Table view for xml with editing. Edit xml values as if in Excel. Just look at the screen capture:
Screenshot 2021-10-10 22.14.23.png
Click "Table view" on the bottom bar to activate.
 
GameFontEditor
When editing GameFont this tool will make it a whole lot easier. Note that it supports copy paste (control+C/V) even if it isn't clear in the GUI.

When editing GameFont, do edit UserSettings.txt in the mod's root dir
Code:
Enables the debug screen for GameFont
0 = off, 1 = on (autodetection of max value)
Value higher than 8483 will set the max directly
Debug Max Gamefont=0
When set to 1 the domestic advisor will have an extra button, which will display GameFont debug into. This will make it a whole lot easier to see if you have the IDs set up correctly.
 
Considering "GameFont Editor" itself:

It is one of the most useful tools in modding Civ4Col, whenever you want to introduce new Icons.
(Which you need to do for e.g. a new Nation, a new Bonus Resource, a new Yield, ...)

@Asaf has really created a great tool there. :thumbsup:
I use it since it was created many years ago and never found another tool better suited for "fast editing GameFonts".
(Although I combine its usage also with DXTBmp and GIMP when working on GameFonts.)

My workflow normally for GameFonts:
  1. Create / Draw / Recolour Icon in GIMP from sratch or alternatively Export from other GameFonts
  2. Optimize it in DXTBmp (e.g. Alpha Channel) --> only needed if created from scratch
  3. Import the Icons with in GameFontEditor
  4. Reposition / Restructure order of Icons with GameFontEditor
  5. Save final versions of GameFonts with GameFontEditor
Summary:
  • If you re-use Icons from GameFonts from another mod, you can 100% work with GameFontEditor.
  • If you create GameFont Icons from scratch, you will most likely work with GIMP + DXTBmp first and then do the rest with GameFontEditor.
Considering "Debug View of GameFont Icons in Domestic Advisor:

@Nightiggale

I am still amazed at this little modding tool, it is helpful beyond measures. :thumbsup:
Thanks again for developing it. :hug:

I am just trying to explain it a little bit easier for modding beginners.
(I repeat a lot you already said, just restrutcture your answer a bit more beginner friendly.)

----------

The "ingame Gamefont Icon List-View" in the Domestic Advisor is basically kind of a "debugger" ingame.
It helps you to see if you worked correctly with the GameFontEditor. (Your developmet IDE to actually modify GameFonts.)

----------

This is how you activate:

When editing GameFont, do edit UserSettings.txt in the mod's root dir
Code:
Enables the debug screen for GameFont
0 = off, 1 = on (autodetection of max value)
Value higher than 8483 will set the max directly
Debug Max Gamefont=0

This is how you use it afterwards:
When set to 1 the Domestic Advisor will have an extra button, which will display GameFont debug into. This will make it a whole lot easier to see if you have the IDs set up correctly.

----

Edit:
Maybe at some point I should give a "graphical modding" tutorial on "GameFonts". :think:
(I think except me and @Schmiddie nobody really knows how to create those icons anymore.)
 
Last edited:
Maybe at some point I should give a "graphical modding" tutorial on "GameFonts". :think:
(I think except me and @Schmiddie nobody really knows how to create those icons anymore.)
Add me to the list. While I can't draw 2D graphics, I do know how to do the rest regarding GameFont. That doesn't mean teaching others how to do it would be a bad idea.

I should likely write a wiki page (if we haven't got one already) about non-obvious technical limitations and how to get around them.

My favourite modding tool so far: Microsoft Visual Studio (MSVC) Express 2012.
Any version of MSVC can be used. If you have 2010, 2017 or something else, then there is no need to install a different version. You can even use something other than MSVC if you feel like setting it up yourself (you really only need to call a makefile to compile).
If you don't fully understand this, then just use whatever version of MSVC you want. Newer is usually better, but version isn't important.

The internet claims using a newer version of MSVC will result in a faster DLL file. That doesn't apply to our setup and you shouldn't consider that issue at all.
Spoiler technical explanation :
The version of MSVC being used tells which version of the Windows memory manager is used. The exe has been compiled with MSVC 2003, hence matching the memory manager for that version. Mixing versions of memory managers can corrupt the memory, which results in really weird bugs. For this reason the DLL needs to use the same version of memory manager. This is why the 2003 compiler is needed. The Makefile will use this version of MSVC regardless of which version is used to call the Makefile. The version of MSVC you use won't do anything other than calling the Makefile.
 
More infos about the cheat console seems to be found here.

There is some stuff in that console that I had not even used myself so far.
13 years of modding this game and still regularly learning new things ... :)
 
@Kendon
Do you know how to use "Flying Camera" in WTP already?
(It may be helpful, if you want to take nice screenshots for achievements.)

-----------

1. There is a shortcut to a file: _Civ4Config
Click it, it will open: CivilizationIV.ini

2. Change "AllowFlying = 0" to "AllowFlying = 1"

3. Now you can use "Ctrl + Alt + F" to activate "Flying Camera"

4. Now you can use Arrow Keys and Mouse to fly around on the map and change angles.

-----------

For more, please read here.
(It is German, so you need to run it through a translator.)
 
Thanks.
@Kendon

For more, please read here.
(It is German, so you need to run it through a translator.)

Thanks. This is the first time I've seen the TAC Tips for Modding. I didn't know about the CivilizationIV.ini. I had to do some searching to find it but, thanks to DuckDuckGo and some old Forum explanations, I've made some helpful changes to my code.

The flying camera works and I'll see what I can do now that I have the cheat code to make more changes. There's lots to learn but it's exciting when things work.

I also liked seeing how TAC got started. The idea that colonization is neither an unqualified benefit nor an unforgivable evil continues to have contemporary significance.
 
Just bumping this again, because it seems that it was forgotten ... :dunno:
(Some of the younger modders may also never have heard of it.)

Rotating Camera:

SHIFT (or CTRL) + Arrow Keys

Flying Camera:

CTRL + ALT + F

Getting additional Info on Plot (e.g. Coordinates)

SHIFT + Mouse Over

Spy Mode (removes Fog of War and allows to look inside AI cities)

CTRL + Z

Most important TAC / WTP cheat Menus:

CTRL + SHIFT + T --> useful small cheats
CTRL + SHIFT + Z --> e.g. Autoplay
CTRL + SHIFT + E --> Event Cheat Menu

Taking over AIs:

"Ctrl + Alt + Z" --> Looping Forward
"SHIFT + ALT + Z" --> Looping Backward

CTRL + D: Debug Mode

Civ4ScreenShot0002.JPG


SHIFT + ^: Console

Type: help --> get full list of commands
Console.JPG
 
Hi guys!

I would like to make a map for a scenario i have in mind, but after nosing arount the forum, I can't find anything helpfull other than editing an existing map in WorldBuilder, which would be a very painstaking process for a mapsize "huge"-scenario. MapView/MapMaker doesn't seem to work either with WTP-worldbuildersaves, or is not available anymore.

Long story short: do you have any tips on how to make maps from scratch to be used in WTP, other than WorldBuilder?

Best regards,

-HM
 
Back
Top Bottom