PDF: Civ4 BtS reference sheet

Hi Anion,
I'll answer your pm publicly since I do have a code question and maybe someone does understand c++ better than I (I only learned it by reading the Civ4 code :)).
First the easy thing (since I know this from the AIAttitude stuff ;)):
iWarmongerRespect can be 0,1 or 2 (can of course be modded to whatever but that is the original game). When two AI leaders meet this is a bonus on their relations - the smaller of both values for the two leaders is the modifer, i.e. if one has 2 and the other 0 it is o, if one has 2 and the other 1 it is +1 and if both have 2 it is +2. If you look through the xml you'll see that the aggressive AIs tend to have 2 and the non-aggressive once tend to have 0, this value ensures that the warmongers do not start to go after each other if they start near each other and have easier prey nearby.
iMaxWarXXXPowerRatio
describes the Power Ratio between the AI and its intended target in order to declare war. If the AI is not powerful enough it will not declare, IIRC "Nearby" means if both share borders and "Distant" means if they do not share borders - Note: this is true for Vanilla and Warlords but not necessarily so in BtS - see below.
iTargetNumCities
does only two things: it determines how many "largest cities" get the happiness bonus from Representation (and how much the AI values Representation) for each map size and how far apart the map generator tries to position start positions.

I have checked the Power Ratio stuff: Blake apparently deleted most of it and just commented it prevents conquest or Domination victories, the only remaining snipplet where it is relevant is:
Code:
for (iPass = 0; iPass < 3; iPass++)
                {
                    for (iI = 0; iI < MAX_CIV_TEAMS; iI++)
                    {
                        if (GET_TEAM((TeamTypes)iI).isAlive())
                        {
                            if (iI != getID())
                            {
                                if (isHasMet((TeamTypes)iI))
                                {
                                    if (canDeclareWar((TeamTypes)iI))
                                    {
                                        if (iNoWarRoll >= AI_noWarAttitudeProb(AI_getAttitude((TeamTypes)iI)))
                                        {
                                            int iDefensivePower = (GET_TEAM((TeamTypes)iI).getDefensivePower() * 2) / 3;
                                           
                                            if (iDefensivePower < ((iOurPower * ((iPass > 1) ? AI_maxWarDistantPowerRatio() : AI_maxWarNearbyPowerRatio())) / 100))
I do believe I understand this code, but could someone tell me if they see any instance in which this will not return AI_maxWarNearbyPowerRatio()?, i.e. where iPass actually is >1?
In any case maxWarNearbyPowerRatio and maxWarDistantPowerRatio determine how strong the AI has to feel in order to declare war on its target (the aggressive ones tend to need less than the non-aggressive ones).
 
Hi Anion,
I'll answer your pm publicly since I do have a code question and maybe someone does understand c++ better than I (I only learned it by reading the Civ4 code :)).
First the easy thing (since I know this from the AIAttitude stuff ;)):
iWarmongerRespect can be 0,1 or 2 (can of course be modded to whatever but that is the original game). When two AI leaders meet this is a bonus on their relations - the smaller of both values for the two leaders is the modifer, i.e. if one has 2 and the other 0 it is o, if one has 2 and the other 1 it is +1 and if both have 2 it is +2. If you look through the xml you'll see that the aggressive AIs tend to have 2 and the non-aggressive once tend to have 0, this value ensures that the warmongers do not start to go after each other if they start near each other and have easier prey nearby.
iMaxWarXXXPowerRatio
describes the Power Ratio between the AI and its intended target in order to declare war. If the AI is not powerful enough it will not declare, IIRC "Nearby" means if both share borders and "Distant" means if they do not share borders - Note: this is true for Vanilla and Warlords but not necessarily so in BtS - see below.
iTargetNumCities
does only two things: it determines how many "largest cities" get the happiness bonus from Representation (and how much the AI values Representation) for each map size and how far apart the map generator tries to position start positions.

I have checked the Power Ratio stuff: Blake apparently deleted most of it and just commented it prevents conquest or Domination victories, the only remaining snipplet where it is relevant is:
Code:
for (iPass = 0; iPass < 3; iPass++)
                {
                    for (iI = 0; iI < MAX_CIV_TEAMS; iI++)
                    {
                        if (GET_TEAM((TeamTypes)iI).isAlive())
                        {
                            if (iI != getID())
                            {
                                if (isHasMet((TeamTypes)iI))
                                {
                                    if (canDeclareWar((TeamTypes)iI))
                                    {
                                        if (iNoWarRoll >= AI_noWarAttitudeProb(AI_getAttitude((TeamTypes)iI)))
                                        {
                                            int iDefensivePower = (GET_TEAM((TeamTypes)iI).getDefensivePower() * 2) / 3;
                                           
                                            if (iDefensivePower < ((iOurPower * ((iPass > 1) ? AI_maxWarDistantPowerRatio() : AI_maxWarNearbyPowerRatio())) / 100))
I do believe I understand this code, but could someone tell me if they see any instance in which this will not return AI_maxWarNearbyPowerRatio()?, i.e. where iPass actually is >1?
In any case maxWarNearbyPowerRatio and maxWarDistantPowerRatio determine how strong the AI has to feel in order to declare war on its target (the aggressive ones tend to need less than the non-aggressive ones).

The outermost for-loop sweeps from 0..3 using iPass. So the first 2 loops give maxWarNearbyPowerRatio and the last 2 give maxWarDistantPowerRatio.
 
The outermost for-loop sweeps from 0..3 using iPass. So the first 2 loops give maxWarNearbyPowerRatio and the last 2 give maxWarDistantPowerRatio.
:thanx: yeah after some :coffee: and some more :coffee: I understood this as well and came back to edit my post, but you were faster :D
Basically what it does is loop through all those arguments and checks for a fight to pick up at NearbyPowerRatio then it goes back and rechecks then it checks twice for DistantPowerRatio and if it still does not find a fight to start it gives up - until next turn :evil: DistantPowerRatio therefore is now only a surrogate if NearbyPowerRatio is too high to find an opponent it will relax and start a fight with a stronger opponent (DistantPowerRatio is usually easier to achieve than Nearby).
 
Thanks.
I am currently improving my Reference Guide and your explanations will be very helpful.
Also waiting for 3.13 patch release to check all Firaxis changes and to make a full update on pages.
So, the next update will come soon, after the patch release. :)

Be ready for a small surprise and ... be patient. :)
 
:thanx: yeah after some :coffee: and some more :coffee: I understood this as well and came back to edit my post, but you were faster :D
Basically what it does is loop through all those arguments and checks for a fight to pick up at NearbyPowerRatio then it goes back and rechecks then it checks twice for DistantPowerRatio and if it still does not find a fight to start it gives up - until next turn :evil: DistantPowerRatio therefore is now only a surrogate if NearbyPowerRatio is too high to find an opponent it will relax and start a fight with a stronger opponent (DistantPowerRatio is usually easier to achieve than Nearby).

To be honest, this coding style is good old C-Style. In C++ (or better "object-oriented") this should all be hidden in classes and methods
 
HOT!
All versions are combatible with patch 3.13, now!

See: post #1.

Happy downloading!


Also, I need to thank for your postcards. I received 10 for now.
BIG thanks goes to (in random order):
Zagnut - very beautiful coast, must be very nice to live there :)
George Spadaro - what a beach, I would like to swim there... ;)
Berserker76 - maybe some day I will go there, it's not so far from me :)
Bushface - sailing is that what I really like, and - as you see now - the patch was released... :)
Dave - I always wonder - living in your place, what is it like? I would like to feel it at least for a week... ;)
Markstar - This catherdal tower must be very impressive. Maybe next year I will go to your country! :)
dino_schoen - I would like to go for a train trip to your country. I saw a travel programm about the mountains and the railways there. That kind of trip must be very special. ;)
Tero - I heard that there is lot to see in your country. View on your postcard is very nice. :)
Ludwig II - If you really live near a place on the postcard, I really envy you. Mountains and water together, just a perfect place for me! :)
Pei-Shing Wang - I read about this tower. A view from there must be unforgettable. :)

Thank you once more!
Greetings to all of you!


And I am still waiting for more postcards! ;)
 
I noticed an undocumented change, all the buildings that used to generate EPs don't anymore. So Jail is +50% EPs, Security Bureau just gives the 50% defense, and Intelligence Agency just gives +50% EPs. It was a fairly significant (and IMO good) change, I'm not sure why it wasn't in the release notes :crazyeye:.

Darrell
 
I noticed an undocumented change, all the buildings that used to generate EPs don't anymore. So Jail is +50% EPs, Security Bureau just gives the 50% defense, and Intelligence Agency just gives +50% EPs. It was a fairly significant (and IMO good) change, I'm not sure why it wasn't in the release notes :crazyeye:.

Darrell

:lol: it is not in the patch notes - because it is a bug :lol:
Actually they still give you the espionage points, the display just does not show it anymore when you look at buildings yet to be build...
 
I noticed an undocumented change, all the buildings that used to generate EPs don't anymore. So Jail is +50% EPs, Security Bureau just gives the 50% defense, and Intelligence Agency just gives +50% EPs. It was a fairly significant (and IMO good) change, I'm not sure why it wasn't in the release notes :crazyeye:.

Darrell

Are you sure you aren't just noticing the EP/culture display bug that Bhruic fixed in his Unofficial BTS 3.13 patch? Try applying his patch and see if your overall EP/turn output changes. I bet it won't-- but you will then have a correct display.
 
Hello dj_anion,

Would it be possible for you to spécify what pages change when you update your document ?
It would preserve our printers !
Thanx by advance

Humungus
 
Humungus:

I did that few times before.
Unfortunatelly, this time it isn't so simple. Document has 76 pages now.

News and changes:
1. Leaders - is now bigger and rebuilded (12 pages instead of 6, more infos about leaders' behaviour) - pp. 6-17 (was 6-11).
2. City Buildings - pp. 25(19), 26(20) - patch 3.13 changes.
3. World Wonders - p. 34(28) - patch 3.13 change (Cristo Redentor).
4. Religions and Corporations - p. 37(31) - patch 3.13 change (see: footnote).
5. Units - p. 38-40(32-34), 42(36), 44(38) - patch 3.13 changes; also Cossack cost corrected.
6. Unit Upgrade Paths pp. 46-49(40-43) - upgrade costs added, naval units upgrade path rebuilded (patch 3.13 change).
7. Promotions - p. 51(45) - patch 3.13 change (see: Blitz).
8. Technologies - p. 59(53) - patch 3.13 change (see: Military Science).
9. City Management - pp. 71-72(65-66) - patch 3.13 changes (see: Wealth > all Corporation HQs...; Trade Routes > Customs House...).
10. Difficulty Levels, World Sizes, Game Speeds - pages 74-75 added, right before keyboard/mouse shortcuts.
11. Shortcuts - p. 76(68) - 2 shortcuts added.

(XX) - page numbers in the 3rd edition of the guide

So - as you see - there are few changes. ;)
 
This is a masterpiece, nice job! Question about the unit upgrade costs. If I am reading this correctly, upgrading 1 warrior to a maceman should cost 165 + 105 = 270 gold. In marathon it would be x2 so therefore 540 gold? That seems very high.

In my marathon game, I tested this and found it only cost me something like 340 gold to upgrade 1 warrior to a maceman. Am I reading this chart wrong?
 
Back
Top Bottom