Technical documentation

I have some assert failures with the mainscreen mercenary manager button
So I tried to add a new controltype for it, like you did in SoI (cvmaininterface.py, line 300)
I added the corresponding lines into cvgameinterface.cpp, cvenums.h and cvenumsinterface.cpp
But I still get a python exception on game start: "AttributeError: 'NoneType' object has no attribute 'getActionInfoIndex'"
Do you have any ideas what did I miss?

Yep, if you only added CONTROL_MERCENARIES_MANAGER to these 3 files, then you missed the XML part in XML/Units/CIV4ControlInfos.xml
 
I'm curious to know how much of K-mod is in this version. everything you thought was worth it?

I added most of BBAI (which K-Mod includes & was based on) that I thought was worth it but from K-Mod itself I added very little - just a few bugfixes and speed optimizations. There's much much more out there to add.
 
Yep, if you only added CONTROL_MERCENARIES_MANAGER to these 3 files, then you missed the XML part in XML/Units/CIV4ControlInfos.xml

No, it's there
I'm clueless
 
Well, it's a simple thing - if it's in the XML, CvEnums.h and CyEnumsInterface.h, then the ControlTypes.CONTROL_MERCENARIES_MANAGER should work. Are you sure there are no typos? The line in CyEnumsInterface.h would be a good spot to miss a string during copy'n'pasting. If all fails, you can just try putting an integer there instead and see what happens (the one corresponding to XML index).
 
Well, it's a simple thing - if it's in the XML, CvEnums.h and CyEnumsInterface.h, then the ControlTypes.CONTROL_MERCENARIES_MANAGER should work. Are you sure there are no typos? The line in CyEnumsInterface.h would be a good spot to miss a string during copy'n'pasting. If all fails, you can just try putting an integer there instead and see what happens (the one corresponding to XML index).

Ehh, it was a compilation problem. Spent many hours on such small changes when there was no actual mistake in the files :mad:
I read somewhere a tip and tried: compiled a full clean dll (instead of updating my previous compilation), and now it works
Thanks for your help anyway!
 
In that case I'd recommend this if you aren't using it already. Never had to do a clean build since the switch, and compilation takes less than a minute.
 
In that case I'd recommend this if you aren't using it already. Never had to do a clean build since the switch, and compilation takes less than a minute.

Thanks, I was already thinking about switching to that
If you also recommend it, I will definitely do it

Another minor question regarding mainscreen advisor buttons:
I want to switch the corporation/company button to the medieval looking SoI version
Already found that the graphics is in your version of HUD_BTS_icons.tga
But I did not really find where are those buttons and button styles defined. Maybe in the exe?
Anyway, copied your version of the file into the corresponding folder of RFCE. What else do I need to change?
 
Another minor question regarding mainscreen advisor buttons:
I want to switch the corporation/company button to the medieval looking SoI version
Already found that the graphics is in your version of HUD_BTS_icons.tga
But I did not really find where are those buttons and button styles defined. Maybe in the exe?
Anyway, copied your version of the file into the corresponding folder of RFCE. What else do I need to change?

HUD files are defined in theme files. Just copying my HUD_BTS_icons.tga will not work, because RFCE will be still using the original Civ4 theme. You must create your own theme, with all the files inside, even those that are not changed. You can copy mine:

1. Copy the whole Resource folder to RFCE
2. Open Resource/Civ4.thm file and edit the mod path to that of RFCE
3. My theme contains changed colors, to get rid of them just copy the original *.thm files from Beyond the Sword\Resource\Themes\Civ4 to the corresponding folder of RFCE.
 
Hmm, when I add all the files in the Resource folder, and modify the civ4.thm file, all the changes should appear automatically?
For me neither the background changes appear (tested with my changes and with SoI's changes too), nor the new button for the corporations screen
Tried looking through the ini if this is a setting, but didn't find anything

EDIT: nevermind, I found that I missed the CIV4ArtDefines_Misc.xml file

PS: I'm not sure if you know this thread: http://forums.civfanatics.com/showthread.php?t=447067&highlight=theme
It's possible to save space this way, it seems that only have to add those ../../../../Resource/ parts to the paths in the theme files
Then you only have to add the changed files for the mod
Will test this out

PS2: Unrelated to this, but this entry caught my eye in the artdefine xml file
Code:
		<MiscArtInfo>
			<Type>CITY_BILLBOARDS</Type>
			<Path>None</Path>
			<!-- positive scale: city billboards use fonts from GameFont.tga -->
			<!-- negative scale: GFC billboards (uses the interface font) -->
			<fScale>1.0</fScale>
			<NIF>None</NIF>
			<KFM>None</KFM>
		</MiscArtInfo>
It might be a nice addition to our previous discussions about languages in Civ IV
With changing this, it may be easier to introduce special characters, or am I mistaken here?
I will play arond with this one too
 
My bad about CIV4ArtDefines_Misc.xml, forgot about it.

Any luck with those city billboards? I tried it and it works but there's very little space for city & production queue names, so all but short names are truncated...
 
Hi edead and everyone,

I've been playing this mod for a couple of years and it's one of my favorites and certainly the most complete and polished mod I've played. I especially love the new terrains you added (salt flat, semidesert, salt lake, sea) and it would be awesome if I could borrow those for a map project I'm working on for western North America (where many of the same terrain types are found.) I don't have a lot of programming experience so I'm not sure what code or art files I would need to bring in to my scenario and where to put it. Would I also need to first install Blue Marble (IIRC, that's what the terrains in this mod use as a base)? I'm also curious about adding some of the resources, like citrus and olives. Also, is there a better place to post this?

Thank you!

--Mykas
 
the art files themselves are bundled in 2 files called Pak0 and Pak1. you need to open those files with the CivIV PakBuild utility which you can find here.

the other files you need to change to add the terrains are CIV4TerrainInfos.xml and CIV4ArtDefines_Terrain.xml. just copy all the relevant stuff from the SoI versions.
 
Thank you so much srpt! I unpacked Pak0 into a temporary folder. I'm guessing that I'll have to make an actual mod to use the new terrains/resources? Is there a place I can go to get more information on what I need to make a mod? At this point all I have is a map that I currently access through Scenarios and edit in World Builder. Also, I can't unpack the Pak1 file - its size is 0 KB. Do I still need to get it into the appropriate folder? I made a folder in Mods but I'm guessing I will have to copy everything that I need in order for it to work properly. Thanks again for your help!
 
There are many ways. If you already have your new map, I attached a simple script you can use to print the map to the python log. Make sure logging is enabled. Once in game, open the python console (~) and type:
from printmap import *
printmap()


It prints the map data to PythonDbg.log, in csv format, with following settings:
0 = water
1 = land
2 = peak

If you don't want mountains marked, use printmap(False) instead.

Select the output in Notepad++ or similar, remove the blank lines (TextFX Edit -> Remove blank lines in Npp) and copy it to LibreOffice/OpenOffice/MSO, choosing semicolon as a separator. Add some colors and you have a base for all of your spreadsheets.
where is the script supposed to be placed?
 
Top Bottom