Quick Modding Questions Thread

I had a quick look @ t BTS 3.19 sources and contact delay is not scaled in any manner. Map size \ game speed do not affect the time until the AI will contact the player.

Wow. It had felt like there was no scaling but it's still shocking to learn there is none. If playing the game on blitz you can possibly breeze through several eras without the ai ever
contacting you. To be honest even when playing on normal speed the default contactdelay combined with contactrand settings make the ai hardly ever contact you.
I'm going to need to do some mass tweaking.

I wonder if it's possible to make the contactdelay setting scale with gamespeed? Probably would involve some python or DLL editing that I'm not familiar with.
Might have to start studying how to.
 
It would be trivial to scale the contact delays. For instance you could just add the scaling code in CvPlayerAI::AI_changeContactTimer(..). Unfortunately, this function is not exposed to python so you'd have to mod the DLL.
 
It would be trivial to scale the contact delays. For instance you could just add the scaling code in CvPlayerAI::AI_changeContactTimer(..). Unfortunately, this function is not exposed to python so you'd have to mod the DLL.

Is it maybe exposed with AND? I'm guessing not. Know of any good tutorials written or in video forum? Preferably both.
 
Where is the rule implemented that e.g. Galleys can enter Ocean when it is culturally covered?
 
Duh, I have looked at this snippet twelve times but my eyes glazed over because I was looking for getOwner(). Thanks for the help!
 
I’ve got a specific question about unit graphics. The female Mormon missionary unit in Caveman 2 Cosmos is awesome, but I can’t figure out how to add it to my mod. The unit has a .dds file, not a .nif, and I can’t find the xml for it in the unit art file. How do I add it?
 
I’ve got a specific question about unit graphics. The female Mormon missionary unit in Caveman 2 Cosmos is awesome, but I can’t figure out how to add it to my mod. The unit has a .dds file, not a .nif, and I can’t find the xml for it in the unit art file. How do I add it?
Haven't looked at the unit yet, but I guess it is the model I created some time ago: https://forums.civfanatics.com/resources/more-female-missionaries-part-2.19352/

You should be able to find the nif and dds files there and also the basic xml entries.
 
XML question????

I want to make buildings have "OR" Bonus requirements like some units do, for ex. to build a Tavern you would have to have the Bonus Ale OR Wine OR Liquor. Is this possible???

for example I tried to use this tag edited from the spearman unit in unitinfos

<PrereqBonuses>
<BonusType>BONUS_ALE</BonusType>
<BonusType>BONUS_WINE</BonusType>
<BonusType>BONUS_LIQUOR</BonusType>
</PrereqBonuses>

it doesn't give the OR option for buildings like it does units.
 
There are a wide range of causes for CtDs. IIRC, missing art definitions are one frequent non-DLL-bug cause.

If you can compile a dll and debug, it is usually not too hard to find the bug or at least in which part of the code it happens, depending on the complexity of the code involved. Usually the problem is an invalid memory access, and if you're debugging the game with Visual Studio it will pause the game and show a popup.
 
There are a wide range of causes for CtDs. IIRC, missing art definitions are one frequent non-DLL-bug cause.

If you can compile a dll and debug, it is usually not too hard to find the bug or at least in which part of the code it happens, depending on the complexity of the code involved. Usually the problem is an invalid memory access, and if you're debugging the game with Visual Studio it will pause the game and show a popup.

How do you debug the game with Visual Studio?
 
XML question????

I want to make buildings have "OR" Bonus requirements like some units do, for ex. to build a Tavern you would have to have the Bonus Ale OR Wine OR Liquor. Is this possible???

for example I tried to use this tag edited from the spearman unit in unitinfos

<PrereqBonuses>
<BonusType>BONUS_ALE</BonusType>
<BonusType>BONUS_WINE</BonusType>
<BonusType>BONUS_LIQUOR</BonusType>
</PrereqBonuses>

it doesn't give the OR option for buildings like it does units.
Not possible without changing the dll unfortunately.
 
I'm facing some unidentified bugs in my mod (Chronicles of Mankind). There is an infinite loop at and turn in the early classical era. Unfortunately I don't understand how logs work (if those can help at all?). Is there some tutorial for debugig and especially on how logs work? (This is a modmod of Rise of Mankind - A New Dawn 2.)

If someone experienced could take a look at the saves of jopin and tell me what may cause the the problem, I'd be grateful. THX!
 
Top Bottom