Modmodding Q&A Thread

How do I change the year that the game officially ends?

And what is the DoC equivalent of CIVIV_Game_Text_Objects_BTS.xml?
I think either the ending turn or year is set in the scenario files.

What does that XML file do? If it's just a text file, it doesn't matter where you but the text keys in that folder.
 
Okay, thanks.

I have other questions if you do not mind answering them.

Is there a way to make it so that making an improvement gives you that tile culturally?

If I want to make a unique power that gives me bonus commerce based on how many cities have a certain state religion, how do I go about doing that?

Is there a way to lock a certain set of civics on a civilization?

Also, how can I allow just one civilization to survive without it having a city, and the only condition to destroying it is to remove all its units from the game?
 
Okay, thanks.

I have other questions if you do not mind answering them.

Is there a way to make it so that making an improvement gives you that tile culturally?
Sure, but I couldn't say how right now.

If I want to make a unique power that gives me bonus commerce based on how many cities have a certain state religion, how do I go about doing that?
CvPlayer::calculateTotalCommerce(), iterate through all cities and count which of those have your state religion, then add it to the result.

Is there a way to lock a certain set of civics on a civilization?
Not sure what you mean by that, but CvPlayer::canDoCivics() is probably the right place.

Also, how can I allow just one civilization to survive without it having a city, and the only condition to destroying it is to remove all its units from the game?
Not sure, but there's a game option for that. I suggest tracing it back in the code and then use the same place it is implemented. Maybe you can even reuse that code.
 
Nope, DLL.
 
For some reason I am unable to see the FlagDecal of any civ. When I look at it through the DDS viewer, I just get a white screen. How can I see the FlagDecal so that I can change it?
 
How od I edit colours? I found where the primary colour is defined, but there should be a place where the exact colour's proportions are defined. Moreover, where do I define secondary colours?
 
For some reason I am unable to see the FlagDecal of any civ. When I look at it through the DDS viewer, I just get a white screen. How can I see the FlagDecal so that I can change it?
The flag decal is an alpha map, not a color map. Maybe you're editing the DDS with a tool that doesn't show alpha maps? I suggest using DXTBmp.

How od I edit colours? I found where the primary colour is defined, but there should be a place where the exact colour's proportions are defined. Moreover, where do I define secondary colours?
Every civilization has a "player color" that is defined in CIV4CivilizationInfos.xml. A player color consists of three colors: primary, secondary, text. Both can be edited in the XML files in the Interface folder.
 
Thank you, and where do I define the colours themselves. For example where is dark_lemon colour defined? How much red, green and blue?
 
As I said, the XML files that govern that are in the interface folder. ColorVals.xml or something.
 
I'm getting these errors (in my Canada DoC mod):

Spoiler :

Traceback (most recent call last):
File "BugEventManager", line 400, in _handleDefaultEvent
File "CvRFCEventHandler", line 184, in onCityAcquired
File "Stability", line 72, in onCityAcquired
AttributeError: 'NoneType' object has no attribute 'changeConqueredCities'
Traceback (most recent call last):
File "BugEventManager", line 400, in _handleDefaultEvent
File "CvRFCEventHandler", line 823, in onChangeWar
File "Stability", line 109, in onChangeWar
File "StoredData", line 253, in removeWarStatus
KeyError: 37
Traceback (most recent call last):
File "BugEventManager", line 400, in _handleDefaultEvent
File "CvRFCEventHandler", line 823, in onChangeWar
File "Stability", line 109, in onChangeWar
File "StoredData", line 253, in removeWarStatus
KeyError: 36


I'm confused because lWarStatus should automatically increment to iNumPlayers right?
 
I feel like I still have a problem maintaining the WarStatus objects in general, so that might not actually be related to your modmod.
 
I'm editing Python files of a copied and renamed version of the most recent SVN revision, but whenever I try to save the python files, it won't let me because:

Code:
I/O Error
[Errno 13]Permission denied: "C:\\Program Files (x86)\\Firaxis Games\\Sid Meier's Civilization 4\\Beyond the Sword\\Mods\\RFC Dawn of Decolonization\\Assets\Python\\Consts.py"
 
Is it possible to download the source files for the CvGameCore.dll of the current version of DoC? I want to add some new buildings to the mod and I'm trying to avoid downloading the SVN version.
 
The SVN repository is where they are, though. Why don't you want to use it?

If it's just the amount of data, you can append "/CvGameCoreDLL" to the URL to only download the source code folder. If you intend to mod 1.11, make sure to update to the right revision to avoid incompatibility problems.
 
I'll just download the SVN then. I was afraid that some of the newer features wouldn't be balanced.
 
Well as I said, you can roll back the SVN to any arbitrary state including 1.11, if you want.

But I would say current SVN is as good as 1.11 in terms of balance.
 
Did you tried with administrator authorization?

Yeah, that's probably where the problem is. I'm going to see what happens if I edit any non Civ 4 Python files.
 
Back
Top Bottom