AND2 and SVN Bug Reports - A New Dawn 2 ONLY

Like, I actually won't care too much about the AIs using different mechanics if they didn't burn everything in their way.

Well, I haven't tested it thoroughly but now they need many units to raze big cities, I have seen them razing a 10 size city but taking 4 turns to do it. Had they had less units, they would have been unable to do it. In theory, they check the value of the city. If they deem it valuable, they shouldn't raze it. I think I can fine tune city evaluation if needed.
 
Just a quick idea about espionage:
Maybe smaller civs could be better at spy defense. The larger your civ is the lower your espionage defense will be. Big civs can easily compensate this but they need to work on it. In a small civ on the other hand it's much easier to know what's going on in your cities.

This might be a good idea.
 
I think I've fixed the problem with AI using the old "raze and fortify" feature; now it's correctly using the new system where you need to "pillage" the city. I'll upload the change soon, I'm still checking other things on my to-do list.
I recall I wanted to lower a bit espionage missions costs: Vokarya, do you have any plan for that or can I do it at my discretion? It's a long time I don't play a full game so I'll probably start by lowering costs of probably 20% of current costs. What do you think?

I don't have any plans to mess with espionage; I rarely use it at all. Whatever you want to do would be fine.
 
I don't have any plans to mess with espionage; I rarely use it at all. Whatever you want to do would be fine.

Ok, I'm lowering it a bit and also decreasing mission costs for large empires; max 30% less, trying with 1% less for each city in target empire.
 
Well, I haven't tested it thoroughly but now they need many units to raze big cities, I have seen them razing a 10 size city but taking 4 turns to do it. Had they had less units, they would have been unable to do it. In theory, they check the value of the city. If they deem it valuable, they shouldn't raze it. I think I can fine tune city evaluation if needed.

Currently, they'll raze any city they get - no matter how valuable or not. The only exception is if they were the original owners of it.
 
I think it's a bug for routes that have an OR resource requirement (<PrereqOrBonus>) but not an AND requirement (that is <BonusType> of NONE). Highway (supposed to require Cement OR Oil Products) and Maglev (supposed to require Copper OR Aluminum) have this problem too. Railroad (requires Iron + Coal OR Oil OR Oil Products) does not.

I tried to find out where this might be in the DLL code. I think it's CvPlot.cpp, lines 3414-3470. That covers whether or not routes can be built on particular tiles, but I can't tell why "no bonus" should override "or bonus".

I'm trying to figure out this one since it's really annoying being able to build something when you don't meet requirements. IIRC there was a time when we didn't have this problem, correct? The dll code here is the same as in vanilla BTS and moreover in vanilla BTS there are only 2 routes available, road and railroad, and railroad has 2 OR prerequisites and <BonusType> is NONE, exactly like in our mod for Paved Road. So either it shouldn't work in BTS, or the problem might be somewhere else. I've tried fiddling the true/false statements in CvPlot.cpp but I'm either able to build all routes or none (provided I have the necessary tech). That's really strange to say the least.
 
I'm trying to figure out this one since it's really annoying being able to build something when you don't meet requirements. IIRC there was a time when we didn't have this problem, correct? The dll code here is the same as in vanilla BTS and moreover in vanilla BTS there are only 2 routes available, road and railroad, and railroad has 2 OR prerequisites and <BonusType> is NONE, exactly like in our mod for Paved Road. So either it shouldn't work in BTS, or the problem might be somewhere else. I've tried fiddling the true/false statements in CvPlot.cpp but I'm either able to build all routes or none (provided I have the necessary tech). That's really strange to say the least.

Actually, it's not exactly the same in CvPlot.cpp. Lines 3447-3466 (in the AND Sources file) are not in the vanilla SDK sources and there is a second test of isAdjacentPlotGroupConnectedBonus. I wonder if that's the problem, but I can't say ANYTHING for certain. I can barely read this code. I certainly can't write any of it.
 
Actually, it's not exactly the same in CvPlot.cpp. Lines 3447-3466 (in the AND Sources file) are not in the vanilla SDK sources and there is a second test of isAdjacentPlotGroupConnectedBonus. I wonder if that's the problem, but I can't say ANYTHING for certain. I can barely read this code. I certainly can't write any of it.

Uh, really? Then I need to check again.

Mmmm, I checked again but either I have overwritten my original BTS dll folder or the code is really the same. It was different in basic Civ4 but that change was already there in BTS.
 
Last edited:
Uh, really? Then I need to check again.

Mmmm, I checked again but either I have overwritten my original BTS dll folder or the code is really the same. It was different in basic Civ4 but that change was already there in BTS.

Maybe that's it then. The copy I have is labeled v161. I will grab whatever I can in files on the off chance it proves useful.
 
Uh, really? Then I need to check again.

Mmmm, I checked again but either I have overwritten my original BTS dll folder or the code is really the same. It was different in basic Civ4 but that change was already there in BTS.

It looks like this bug has been there for ages anyway. I've gone back to rev 650-700 (sept. 2013) and it's already there: at the time Railroad required IRON and (COAL or OIL or DIESEL), but if I have IRON I can build whatever I want even if I don't have COAL/OIL/DIESEL. On the contrary, if I don't have IRON, I can't build anything even if I have COAL/OIL/DIESEL. I've made a quick test and it was working ok in basic BTS, if I'm not mistaken.
 
I found a bug, one turn the Iriquis have 0 gold and the next they have a wooping 238k!!!
there weren't any bug messages, which I sometimes get. I uploaded my save it happens the next turn and he flies through technologies cause of it. So I'll have to remove the gold of him for a proper game I tried checking the logs but can't find anything with it, maybe someone can take a look at the save and tell me what happened.

Tech traded to Deganawida (Iroquois): Charters
Tech traded to Deganawida (Iroquois): Theology
Tech traded to Deganawida (Iroquois): Education
Tech traded to Huayna Capac (Inca): Optics
Tech traded to Deganawida (Iroquois): Chivalry
Tech traded to Deganawida (Iroquois): Sanitation


In the log it states, he got the techs traded likely cause he suddenly has like 250k gold to spend...
 

Attachments

Last edited:
Yeah I'll try that... Does that suggest when you get more then 256k you go to zero again?

update: Well that didn't work even gave him 20k I got on me and nothing... He again got like 238-240k...

I rolled back and at the start of the previous turn he gets the massive cashflow this happens:

Traceback (most recent call last):
File "BugEventManager", line 363, in _handleDefaultEvent
File "Revolution", line 565, in onBeginPlayerTurn
File "Revolution", line 652, in checkForRevReinforcement
File "Revolution", line 837, in doRevReinforcement
NameError: global name 'pPlayer' is not defined
 
Last edited:
Its the Hammer over flow bug. You get it when you chop down a forest, on the same turn you complete a building. Not always either.

I've had it, and seem AI's benefit from it as well.

Instead of getting x amount of 1 to 1 gold/hammers unable to be carried fwd, it gives some exponential factor of gold overflow.

I've seen it as well, where you have a virtually un-buildable building, fairly cheap, that suddenly needs millions of hammers, instead of say 300 for Eternity speed games.

Very rare, only struck once for me.
 
How do I even this out again? So my game isn't ruined? Even going back a few turns it happens again...
 
How do I even this out again? So my game isn't ruined? Even going back a few turns it happens again...
Could you just use world builder after it has happened to set their gold down to something reasonable?
 
How do I even this out again? So my game isn't ruined? Even going back a few turns it happens again...
You get it when you chop down a forest, on the same turn you complete a building
Worldbuilder. You can try finding that specific forest/jungle he is about to chop and... chop that worker! :sniper:
So hopefully the chopping and the completing of the building won't happen in the same turn.
But no guarantee.
Let us know if it worked or not...
 
ok I'll give that a whirl... Personally I rarely chop forest in Civ and with this mod even less unless for plantation etc... Jungle camps are awesome too.
 
ok I'll give that a whirl... Personally I rarely chop forest in Civ and with this mod even less unless for plantation etc... Jungle camps are awesome too.
But it's not you chopping but the AI Iroquois.
 
Back
Top Bottom