Modder's Guide to A New Dawn

You mean this?
Code:
	<Define>
		<DefineName>NUM_OR_TECH_PREREQS</DefineName>
		<iDefineIntVal>4</iDefineIntVal>
	</Define>
	<Define>
		<DefineName>NUM_AND_TECH_PREREQS</DefineName>
		<iDefineIntVal>4</iDefineIntVal>
	</Define>

GlobalDefines.xml

That's correct! :)
 
45°38'N-13°47'E;12430258 said:
This isn't causing any troubles if you run the final dll and not in debug mode. It's caused by the fact that there's a limit to the number of prereq techs that a tech can have. In some previous revision I've modified Future Tech prereq; now FT requires 6 or 7 techs which is beyond the limit imposed via xml, but this can be changed in some xml file, I don't remember where. Anyway it isn't causing any trouble in gameplay, prereq techs which are beyond the limit number are simply ignored (say you need 7 techs to reach FT and the limit is 6, the seventh tech is simply ignored as a prereq).
Triggering that assert means that shortly afterwards it writes outside the bounds of an array, corrupting some (possibly unrelated) memory.
Always make sure that you have set those XML values to a high enough value.
 
Triggering that assert means that shortly afterwards it writes outside the bounds of an array, corrupting some (possibly unrelated) memory.
Always make sure that you have set those XML values to a high enough value.

Thank you AIAndy, I didn't know that. Will be corrected in the next revision :)
 
I have 2 questions:

1)

In the city screen we have 3 columns for buildings: Normal/Wonder/Special.
What determines a building's appearance?

I tried to figure it out but found no tags in the Buildingclass.xml.


2)

Is it possible to make a building buildable only to a specific civ, but it stays functional after conquered by an other civ?
 
2)

Is it possible to make a building buildable only to a specific civ, but it stays functional after conquered by an other civ?
Isn't this the case with Assimilation switched on? There's probably some civ-specific ownership tag or something related.

In a previous map I conquered one of Gandhi's cities and picked up a Fast Worker - but apparently after capturing that unit it turned into a normal worker.
 
In a previous map I conquered one of Gandhi's cities and picked up a Fast Worker - but apparently after capturing that unit it turned into a normal worker.

That's what happens when Assimilation is off. When it's turned on, it remains a Fast Worker.
 
For those who are interested, here are copies of my current Tech Tree spreadsheet and Tech Prereqs spreadsheet. These are what I use to look at the current state of technologies and what they allow. The files are actually CSV's so they will open in any spreadsheet program.
 
I would like to know one thing. Maybe it's simple to do, but I have no idea.

You can set a limit of eras in the game? So, for example, start in the Ancient Era in the normal way, and make the game end in the Medieval Era.

This is not thinking in a normal game, is considering a historical scenario created with the World Builder. Starting in a particular era is not a problem, but not how to make the game ends in a specific era. I know it would be necessary to modify CIV4GameSpeedInfo, CIV4EraInfos and many other files for it to work properly, but that's no big deal, the main problem is to make the scenario ends in a specific era.

Maybe something like the option No Future Era, or some way to do it through Python or XML, without having to modify the dll, or having to manually remove all the techs, units and buildings of later eras. If not possible, I'll have to manually disable everything.

Thank you very much in advance.
 
I'm not sure. No future era is being enabled via dll coding, but I suppose that you can put a limit on the number of turns editing your scenario file. There's an entry like "Number of turns" or "Turns limit" where you can set how many turns the game should last. Either way, I'm not sure how AI can handle this limit.
 
45°38'N-13°47'E;13136231 said:
I'm not sure. No future era is being enabled via dll coding, but I suppose that you can put a limit on the number of turns editing your scenario file. There's an entry like "Number of turns" or "Turns limit" where you can set how many turns the game should last. Either way, I'm not sure how AI can handle this limit.

I had already thought of that, but I do not like too much. I'll have to do it the hard way, and see how it turns out. Thank you very much for the quick response.:)
 
Can someone please take a look at this link. I'm trying to port the election mod from ROM:AND, but need some assistance and playtesting feedback. I don't think that it changes leader successfully for some reason.

AFAIK election mod was never completed in AND and that's why its option is off and hidden by default. I guess AI didn't know how to handle it.
 
Question. I'm trying to edit some options in CIV4CivilizationInfos.xml, but the file I find in this mod's Assets\XML\Civilizations folder is the same as the one from vanilla Civ4, no new civilizations or leaders from the expansion or from AND are defined there. Where is the file i should edit? I only want to change the USA Navy SEAL's unitclass from marine to modern marine, I already did it in UnitInfos.xml but I have to edit CivilizationInfos.xml too for the change to apply correctly.

4 years old, but I would like to know this too.
 
Edit the CIV4CivilizationInfos.xml in the mods Assets/XML/Civilizations directory. We definitely have a different file there compared to BTS.

Thanks, but I don't see any of the new leaders defined there.

Nvm, found them in the Assets/Modules directory.
 
I am trying to reduce movement for naval units by editing Civ4UnitInfo, and seems it works fine.The one thing which bothers me is after I load save game is asking me to recalculate modifiers.If I click yes it slightly changes also my finance and research, which should have nothing to do with units.
 
I am trying to reduce movement for naval units by editing Civ4UnitInfo, and seems it works fine.The one thing which bothers me is after I load save game is asking me to recalculate modifiers.If I click yes it slightly changes also my finance and research, which should have nothing to do with units.

This is perfectly normal.

What is going on is that the game engine "caches" (basically stores & remembers) lots of values, tile yields, building effects, etc. When you build a new building, for example, it add the new building effects (from the XML values) to the internal cached values. This saves a lot of time, because otherwise the game would have to check and add up the values for each building the city has, each time it wants to know a value.

Occasionally these values do not get updated correctly. This is rare, but there tiny bugs in processing (or even division/rounding-errors) can result in the accumulation of incorrect values over hundreds or thousands of turns. I wish all of these bugs could be caught and fixed, but they are incredibly hard to spot.

What recalculating the modifiers does is clear the internal caches. The game recalculates all of the internal values from scratch. This gives you a "fresh" state, and is why your gold or yields might change a bit.
 
This is perfectly normal.

What is going on is that the game engine "caches" (basically stores & remembers) lots of values, tile yields, building effects, etc. When you build a new building, for example, it add the new building effects (from the XML values) to the internal cached values. This saves a lot of time, because otherwise the game would have to check and add up the values for each building the city has, each time it wants to know a value.

Occasionally these values do not get updated correctly. This is rare, but there tiny bugs in processing (or even division/rounding-errors) can result in the accumulation of incorrect values over hundreds or thousands of turns. I wish all of these bugs could be caught and fixed, but they are incredibly hard to spot.

What recalculating the modifiers does is clear the internal caches. The game recalculates all of the internal values from scratch. This gives you a "fresh" state, and is why your gold or yields might change a bit.

Thank you for detailed explanation.Basically this means either doing recalculation or not, won't affect my current game much, as well as changing CIV4UnitInfos.xml?
 
Thank you for detailed explanation.Basically this means either doing recalculation or not, won't affect my current game much, as well as changing CIV4UnitInfos.xml?

The game prompts for a recalculation anytime the XML files are changed from the values from the previous save. Each save remembers the game's previous XML values, and also saves the internal cache. When you load up a save with modified XML, it detects this, and that is why you got a prompt to recalculate modifiers. The reason is that if you play a game with new XML values, the internal cache will almost certainly be out of date, and need to be refreshed from scratch.

You can also recalculate modifiers on-demand, in-game with control-shift-r.

As a final note, the recalculation is a special feature of this mod and Cavemen2Cosmos. Normally changing the XML for BTS and other mods will break save compatibility.
 
Top Bottom