AND2 and SVN Bug Reports - A New Dawn 2 ONLY

In "one city challenge" you can't create Moai statues as it says "Requires 3 myths of the ocean". Small issue, but still.
 
In "one city challenge" you can't create Moai statues as it says "Requires 3 myths of the ocean". Small issue, but still.

There will probably be similar issues with other buildings as well. Game is simply not designed for OCC.
 
There will probably be similar issues with other buildings as well. Game is simply not designed for OCC.

Moai shouldn't be doing that, though. There is a tag <ForceNoPrereqScaling> on it and I don't know why that is there. National Wonders have their prerequisite building count drop to 1 in an OCC game.
 
@Vokarya, yes, it was "realistic timescale", thank you!

With Reichstag you're getting "Golden age" when other civ become your vassal.
I thought it is useful, and built it.
After another civ became my vassal I got Golden Age... but only for 2 moves ( with standard length = 16 moves at this speed ).
Does it work as expected or it is bug?
 
It does. Maybe the description should be clearer.

Okay... But it seems 2 moves is not balanced. You need 8 vassales for it to be as useful as Crystal Palace.

Another thing:
playing game with Advanced Diplomacy = On.

I see that Ramkhamhaeng can sell Steamer. He asks for it 234 gold. Buying it. And then I am checking - want he buy it back? He does. And he pays 432 gold for the same Steamer!
So, doing this 7 times in a row and get from him 1400 gold - all that he has.
Looks like bug isn't it?

P.S. Can somebody give the link of code where AI is calculating cost of units he buys/sells?
 
Last edited:
Hi, I downloaded the source code because i want to change the city bar graphics in Cvcity.cpp
(i've done this before on other mods, i already did it successfully)

I changed nothing else, did not do anything to other files but i can't compile, i get always get this error

Build started 3/13/2020 1:12:51 PM.
1>Project "C:\GOG Games\Civilization IV Complete\Civ4\Beyond the Sword\Mods\Rise of Mankind - A New Dawn\CvGameCoreDLL\CvGameCoreDLL.vcxproj" on node 2 (rebuild target(s)).
1>CoreClean:
nmake Release

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.

"C:\Program Files (x86)\Civ4SDK\Microsoft Visual C++ Toolkit 2003\bin\cl.exe" /nologo /MD /O2 /Oy /Oi /G7 /DNDEBUG /DFINAL_RELEASE /Fp"Release\CvGameCoreDLL.pch" /GR /Gy /W3 /EHsc /Gd /Gm- /DWIN32 /D_WINDOWS /D_USRDLL /DCVGAMECOREDLL_EXPORTS /Yu"CvGameCoreDLL.h" /D_MOD_SENTRY /D_MOD_FRACTRADE /D_MOD_GOVWORKERS /D_MOD_GWARM /D_MOD_SHAM_SPOILER /IBoost-1.32.0/include /IPython24/include /I"C:\Program Files (x86)\Civ4SDK\Microsoft Visual C++ Toolkit 2003/include" /I"C:\Program Files (x86)\Civ4SDK\WindowsSDK/Include" /I"C:\Program Files (x86)\Civ4SDK\WindowsSDK/Include/mfc" /FoRelease\CvCityAI.obj /c CvCityAI.cpp
CvCityAI.cpp
1>CvCityAI.cpp(1846): error C2039: 'isTotalVictory' : is not a member of 'CvVictoryInfo'
c:\GOG Games\Civilization IV Complete\Civ4\Beyond the Sword\Mods\Rise of Mankind - A New Dawn\CvGameCoreDLL\CvInfos.h(3819) : see declaration of 'CvVictoryInfo'
1>CvCityAI.cpp(6072): error C2039: 'isTotalVictory' : is not a member of 'CvVictoryInfo'
c:\GOG Games\Civilization IV Complete\Civ4\Beyond the Sword\Mods\Rise of Mankind - A New Dawn\CvGameCoreDLL\CvInfos.h(3819) : see declaration of 'CvVictoryInfo'
1>NMAKE : fatal error U1077: '"C:\Program Files (x86)\Civ4SDK\Microsoft Visual C++ Toolkit 2003\bin\cl.exe"' : return code '0x2'
Stop.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(33,5): error MSB3073: The command "nmake Release" exited with code 2.
1>Done Building Project "C:\GOG Games\Civilization IV Complete\Civ4\Beyond the Sword\Mods\Rise of Mankind - A New Dawn\CvGameCoreDLL\CvGameCoreDLL.vcxproj" (rebuild target(s)) -- FAILED.

Build FAILED.

Time Elapsed 00:00:02.68

I don't really understand what I need to do, I just wanna play this mod where my city bar graphics is the same color as AI lol
 
To be honest trade looks like completely broken with "Advanced Diplomacy"...
You can buy everything you need from AI just starting with one steamer - gold, tanks, artillery, airplanes...
 
I've looked at code and I have some hypothesis why it happens like this with trade.

This is function

int CvPlayerAI::AI_militaryUnitTradeVal(CvUnit* pUnit) const from CvPlayerAI.cpp,
there is code for determining cost for military unit in trade.

Key part is this:

Code:
    else
    {
        UnitTypes eBestUnit = bestBuildableUnitForAIType(pUnit->getDomainType(), eAIType);
        if ( eBestUnit == NO_UNIT )
        {
            iValue = 2 * GC.getUnitInfo(eUnit).getProductionCost();    // We can't build anything like this so double its value
        }
        else
        {
            int    iBestUnitAIValue = AI_unitValue(eBestUnit, (UnitAITypes)GC.getUnitInfo(eUnit).getDefaultUnitAIType(), getCapitalCity()->area());
            int    iThisUnitAIValue = AI_unitValue(eUnit, (UnitAITypes)GC.getUnitInfo(eUnit).getDefaultUnitAIType(), getCapitalCity()->area());

            //    Value as cost of production of the unit we can build scaled by their relative AI value
            iValue = (iThisUnitAIValue * GC.getUnitInfo(eBestUnit).getProductionCost())/std::max(1,iBestUnitAIValue);
        }

        //    Normalise for game speed, and double as approximate hammer->gold conversion
        iValue = (2 * iValue * GC.getGameSpeedInfo(GC.getGameINLINE().getGameSpeedType()).getTrainPercent()) / 100;
    }

So, cost depends on 2 factors: cost of production for unit multiplied on coefficient of how valuable this unit comparing with the best unit player can build. And if you can't produce any unit of this type - coefficient sets by 2.
So, let's imagine I am buying Steamer from AI and AI can produce much more advanced sea units ( in DomainType = 'SEA' ). Than, cost for his unit will be multiplied by some coefficient between 0 and 1.
Now, imagine I am selling Steamer to AI back. I don't know Steam_power yet, so I can't construct such good units, so this coefficient will be more than 1.
That's probably why AI buying Steamers back at cost more than he sold it previously.
 
That can't be right, if it was so, it would buy spearmen at inflated prices, when say gunpowder units are available to them. You just keep a few archers and spears on garrison duty, and sell them at inflated prices when say gunpowder units are available to the AI.

It must be another factor. Maybe the AI doesn't have a port city anymore, or they have lost the ability to build certain naval units due to a lack of resources. If the AI can build a better unit, why would a lessor unit be designated at the 'best unable to build'.

If they know a tech, and have passed it for a higher required tech for a base unit build, wouldn't this just obsolete the previous units, devaluing them in the AI's eye's.

UNLESS it see's it as a potential UPGRADABLE UNIT, in which case, it deems it cheaper to buy and upgrade then build, due to "???" factors.

Gold v's hammers equation.
 
Okay... But it seems 2 moves is not balanced. You need 8 vassales for it to be as useful as Crystal Palace.

Reichstag is supposed to give 2 turns of Golden Age per city of the vassalizing civilization. I had to tone it down from just giving an ordinary Golden Age whenever a civilization vassalized because it was too easy to abuse. I was never able to code it only giving a Golden Age the first time each civilization became a vassal.
 
That can't be right, if it was so, it would buy spearmen at inflated prices, when say gunpowder units are available to them. You just keep a few archers and spears on garrison duty, and sell them at inflated prices when say gunpowder units are available to the AI..

You can't buy spearmens or archers from AI. You can buy siege machines, ships, tanks, vehicles, aircrafts, missiles etc., but not "men-units".


It must be another factor. Maybe the AI doesn't have a port city anymore, or they have lost the ability to build certain naval units due to a lack of resources. If the AI can build a better unit, why would a lessor unit be designated at the 'best unable to build'.

Nope. It works for all AI civs, and they all has ports all the time ( as map is donut ).
I agree with you that this is probably is not so easy as I've written.
I need to learn how to debug and log things there, than I can investigate how it works. This is second annoying bug in ROM ( first is with random espionage slider go nuts together with science bakers amount ).

This bug is quite annoying - I made more experiments, and looks like when you selling Steamer to AI he completely go nuts. For example, when I am trying to buy Heavy Tank from AI it cost sometimes 2300 gold ( that is reasonable price), but sometimes 1100 gold ( that is 2 times less and I don't know why ). But! When I am selling Steamer to AI he proposes me either 660 gold... either 2 Heavy Tanks. And he selling me Steamer for 327 gold. That means, that I can get from all AI all their money using just one Steamer(buy/sell/buy/sell etc.), and then buy with this money all their tanks and aircrafts using fantastic exchange rate 327 gold for 2 Heavy Tanks ( 15 times cheaper than their real cost).
 
Can someone test this save from rev 1082? I'm getting a CTD every time after I end the turn and no solutions which worked earlier work right now. It is my own slightly modified version of AND so you probably will have to recalc. During game I use 15 UPT limit. I'm trying to determine if this is my fault (because of the changes I've made) or not.
 

Attachments

Hello !
I need some help about your mod, and i hope i'm in right place.
I have a windows 8.1 , I7 GTX 860m 8G RAM memory, 1To hard disc.
Launcher rev. 1.23
Mod rev. 1087

Question 1.

I can't, for an unknow reason, play to this module, MegaCiv pack v1.8.5 .
Its simply not working, and if i triger the module in green or red its not working inside the game. And i can't choose any civs than the 30/40 normal ones include to the game.
I install the module like the forum said with the installer and i touch nothing. But nothing appear.

Question 2.

How is it possible to begin a game, directly in modern era ?
I don't know if it is normal, because the game is crashing immidiately, if i do that.

Thank you so much in advance for any help what you guys can provide to me.
Cheers.
 
I can't, for an unknow reason, play to this module, MegaCiv pack v1.8.5 .
Its simply not working, and if i triger the module in green or red its not working inside the game. And i can't choose any civs than the 30/40 normal ones include to the game.
I install the module like the forum said with the installer and i touch nothing. But nothing appear.
Try MegaPack in my signature. That is the most up to date.
Is your Civ4 Steam version or normal? What's your install directory?

How is it possible to begin a game, directly in modern era ?
I don't know if it is normal, because the game is crashing immidiately, if i do that.
I have started games in any era but only for testing reasons. The game shouldn't crash but won't be balanced.
 
Try MegaPack in my signature. That is the most up to date.
Is your Civ4 Steam version or normal? What's your install directory?
My Civ 4 is on steam. And my install directory is :
D:\programmes\Steam\steamapps\common\Sid Meier's Civilization IV Beyond the Sword\Mods\Rise of Mankind - A New Dawn
It is the right place ?
If not can you tell me were i have to extract files please ?

I have started games in any era but only for testing reasons. The game shouldn't crash but won't be balanced.
How can i do to have the same results ? When i start in any civilisation (russia,usa,french,ect...) i can play one turn, and the game crash.
 
Now I know when this happens: this annoying bug when science slider moves from 100% so some other percentage.
The answer is - imperium civic. When some AI, that has more military power than you, converts to imperium, you get some penalty ( 50% of foreign connections ) and this cause your slider to move down ( probably to avoid negative income ).
And, also at the same time your espionage weights to other civs are filling by some random numbers.
I can attach the save when I have 100% on science before end of the turn, but during AI turn Selassie converts to imperium and this moves my slider to 40%.
 
Hello, I've got all mods successfully installed that I can tell, and as long as I run as Admin everything seems to load up properly, except that once I'm in-game there are tiles that appear to be glitched with bright pink, here's what it looks like https://i.imgur.com/UNBXvQs.png
 
Back
Top Bottom