Single Player bugs and crashes v38 plus (SVN) - After the 20th of February 2018

Can they even attack the city when it has full defenses up?
What do you mean? The city is 3 turns after being founded in the 1st Screen shot and has No defensive buildings even built yet. I have no clue as to how or why it says 28% defense. Not my part of the mod to figure out. Nor do I really know how to figure it out. Part of my long standing gripe that cities in the early game are too strong to take, not like they once were long ago when you were realy taking a chance by having such a weakly defended new city, in a land far far away...…..

But I did have the thought that this might be in part because of the high value we use for city defense in BUG options And in the BBAI Defines that govern how willing the AI is to sacrifice units to attack a city. I've always stated that I thought they were to high in each case. Though I did lower the BBAI one somewhat. Now I don't know if what I did there has been changed by anyone else on the Team.

In days of Yore in early C2C that city would've been Barb by now or Razed with that type and number of force running around. In fact the city next to it would've been gone by now too. As it is only about 12 turns older than the one in the screenies.

Which brings up another thing. There is an Obsidian tile 1 tile to the west of that city's cultural borders that pops a Barb Obsidian unit almost every turn (2nd screenshot). The rate of build off that resource for the Barb AI is strong. Maybe too strong. I had to get 3 obsidian units and a worker over to it and build a palisade on top of it with a Defending unit to stop the Barb unit popping.
 
Last edited:
What do you mean? The city is 3 turns after being founded in the 1st Screen shot and has No defensive buildings even built yet. I have no clue as to how or why it says 28% defense. Not my part of the mod to figure out. Nor do I really know how to figure it out. Part of my long standing gripe that cities in the early game are too strong to take, not like they once were long ago when you were realy taking a chance by having such a weakly defended new city, in a land far far away...…..

But I did have the thought that this might be in part because of the high value we use for city defense in BUG options And in the BBAI Defines that govern how willing the AI is to sacrifice units to attack a city. I've always stated that I thought they were to high in each case. Though I did lower the BBAI one somewhat. Now I don't know if what I did there has been changed by anyone else on the Team.

In days of Yore in early C2C that city would've been Barb by now or Razed with that type and number of force running around. In fact the city next to it would've been gone by now too. As it is only about 12 turns older than the one in the screenies.
Culture increases defense values, you might have free buildings from national/world wonders too.

When you enter city you should be able to hover over defense value on top bar.
 
@strategyonly you and AIs are behind calendar by full era, you should try a game with Win for Losing and Tech Diffusion enabled.

Also it seems you are better than Prince AI.

It looks like four AIs are in Classical era.
Then they are keeping up with calendar.

I looked at AIs capitals and they are doing good job at keeping up with calendar - with PPIO and chipotle (ctrl+z to see whole map) you can check all buildings, that they unlocked.
Why does he need to have those 2 Options On? That is back wards. If he is not using any Options to aid player or AI in research that is the Basis the calendar And research rates Should be based off of. Those 2 Options are "crutches" for either the player or the AI. The AI does Not need those crutches as much now as they did 3 years ago.
 
Culture increases defense values, you might have free buildings from national/world wonders too.

When you enter city you should be able to hover over defense value on top bar.
Raxxo that game I have 4 cities total. That is the 4th one. And I had just reached Sed Life a handful of turns before it's founding. I do not have many if any of the NW's or WWs. And as you can see that New City was in the process of building the Dead Sea NW. It's 1st building to be queued up. My Capitol did build the Bull Leaping Wonder as I had a cow resource in the 1st 8 tiles around the Main tile for the Capitol.
 
Why does he need to have those 2 Options On? That is back wards. If he is not using any Options to aid player or AI in research that is the Basis the calendar And research rates Should be based off of. Those 2 Options are "crutches" for either the player or the AI. The AI does Not need those crutches as much now as they did 3 years ago.
Yeah, I said that before analyzing AIs in depth, now it looks like he doesn't need those options after all.
That is Prince AI without those two options is balanced against calendar (its based on tech tree) after all, at least in first three eras.

Raxxo that game I have 4 cities total. That is the 4th one. And I had just reached Sed Life a handful of turns before it's founding. I do not have many if any of the NW's or WWs. And as you can see that New City was in the process of building the Dead Sea NW. It's 1st building to be queued up. My Capitol did build the Bull Leaping Wonder as I had a cow resource in the 1st 8 tiles around the Main tile for the Capitol.
Can I see this save?
 
Yeah, I said that before analyzing AIs in depth, now it looks like he doesn't need those options after all.
That is Prince AI without those two options is balanced against calendar (its based on tech tree) after all, at least in first three eras.


Can I see this save?
It's right up there with the 2 screen shots in my post.
 
It's right up there with the 2 screen shots in my post.
25% of defense is coming from Traits (Protective trait gives that boost).
That is all cities on start have 25% of defense.

Culture (even low level), and all Fence/Wall/Outpost/Police type buildings give defense.
Spoiler :

Civ4BeyondSword 2019-01-24 19-57-51-84.jpg
Civ4BeyondSword 2019-01-24 19-58-15-81.jpg
Civ4BeyondSword 2019-01-24 19-59-52-93.jpg
Civ4BeyondSword 2019-01-24 19-59-58-39.jpg
Civ4BeyondSword 2019-01-24 20-00-00-44.jpg



Spoiler :

Civ4BeyondSword 2019-01-24 20-03-31-46.jpg
Civ4BeyondSword 2019-01-24 20-03-36-20.jpg
Civ4BeyondSword 2019-01-24 20-03-37-88.jpg

 
has No defensive buildings even built yet
This answered the question, without getting deeper into why. And while Rax shows that's not the case, none of the def bldgs that are there are giving a minimum amount to enter so you can be attacked, but I suspect between the trait and the Palisade, the odds for them aren't all that great so the figured they'd move on and cause more trouble in other ways. They probably could've taken the city but they would've decimated themselves in the process.

Which brings up another thing. There is an Obsidian tile 1 tile to the west of that city's cultural borders that pops a Barb Obsidian unit almost every turn (2nd screenshot). The rate of build off that resource for the Barb AI is strong. Maybe too strong. I had to get 3 obsidian units and a worker over to it and build a palisade on top of it with a Defending unit to stop the Barb unit popping.
When there are limited places a unit can spawn, it often spawns a lot. This is to help balance against those spawns that have very wide plot type definitions and were thus showing up too often.
 
They probably could've taken the city but they would've decimated themselves in the process.
30 Obsidian barb units in the 1st screen shot, were the city only had 28% defense, would be decimated?????? And even later when the stone axeman was upgraded to Obsidian axe and the city defense was upped to 50, the 30 Obsidian Barbs would've been decimated?? Geez I wish it was that easy to decimate that stack out in the open country side.

They should've attacked when it was only the stone axe and dog. They would maybe have lost 2-4 units out of the 30 in the Stack. Even later they should've attacked and maybe lost 1/3 of the stack when the city defense was up to 50% and there were 5 units in the city. Pretty timid and weak Barb AI.

So what is the point of the Barb AI making a 30 unit stack and not doing anything with it? Why not just scatter the 30 units all over if it's just going to harass single hunters, Mil, or civilian units? It used to be that players feared the Barbs early game when they came with stacks. Now....meh. :P
 
30 Obsidian barb units in the 1st screen shot, were the city only had 28% defense, would be decimated?????? And even later when the stone axeman was upgraded to Obsidian axe and the city defense was upped to 50, the 30 Obsidian Barbs would've been decimated?? Geez I wish it was that easy to decimate that stack out in the open country side.

They should've attacked when it was only the stone axe and dog. They would maybe have lost 2-4 units out of the 30 in the Stack. Even later they should've attacked and maybe lost 1/3 of the stack when the city defense was up to 50% and there were 5 units in the city. Pretty timid and weak Barb AI.

So what is the point of the Barb AI making a 30 unit stack and not doing anything with it? Why not just scatter the 30 units all over if it's just going to harass single hunters, Mil, or civilian units? It used to be that players feared the Barbs early game when they came with stacks. Now....meh. :p
Well, they probably would've easily taken the city but the first unit wouldn't have so they opted out because they're just an Attack AI, not a City Attack AI and their goal is to be as painful to other units in the field rather than to be painful to cities. Barbs kinda inherited this shift in AI consciousness since they always work with Attack AI so they aren't that keen on invading cities. Partially this was done to help preserve the AI player cities as well, while enabling us to make barb stacks more plentiful and dangerous. Some of these AI changes were made during Koshling's era and they aren't that easy to disseminate and adjust back. But I'll take a look to see if I can tweak them to prey on cities when they have a more clear advantage. The problem is, determining that clear advantage takes the kind of processing that lengthens turn times dramatically, which is why you see what happens to turn times when wars break out. So we have to be careful not to ask them to overthink themselves.

Suffice it to say this kind of thing must seem simple looking at it from the outside but it's as complex as it gets on the inside. I did, a while back, make stacks a bit more reluctant to use numbers of units to overcome foes if the initial odds were overwhelmingly bad because it was all too common to see stacks attack and attack and not make a dent in the defenders. It's possible that this pulling back was a little too strong but it's not easily adjusted either. Certainly not as simple as a global value dial, which perhaps it should become at some point.

A proper fix is part of a major overhaul of numerous matters regarding stacks and stack behaviors. There's a LOT of issues like this one.
 
Last edited:
Ok, that helps to understand what's happening then. I just 'fixed' a crash but ran into this problem as a result. One bug leads to another. I think I have a theory as to how I can correct this to suit both situations.

Glad it helped. Right now, when the hang happens, I basically attach the debugger, and step out of the loop in "void CvSelectionGroup::mergeIntoGroup(CvSelectionGroup* pSelectionGroup)" in CvSelectionGroup.cpp. That works for me. Hope you can actually fix the problem though.
 
Suffice it to say this kind of thing must seem simple looking at it from the outside but it's as complex as it gets on the inside. I did, a while back, make stacks a bit more reluctant to use numbers of units to overcome foes if the initial odds were overwhelmingly bad because it was all too common to see stacks attack and attack and not make a dent in the defenders. It's possible that this pulling back was a little too strong but it's not easily adjusted either. Certainly not as simple as a global value dial, which perhaps it should become at some point.
I'm going to adjust in My game the BBAI_AI_Variables_GlobalDefines section that deals with attacking a city when you have limited or no siege. I think Toffee changed what I had there before.

Code:
 <!-- Minimum stack strength ratio at which AI will attack enemy city it is next to, higher means less suicide.  BTS default: 120 -->
  <DefineName>BBAI_ATTACK_CITY_STACK_RATIO</DefineName>
  <iDefineIntVal>100</iDefineIntVal>
 </Define>
 <Define>
  <!-- Minimum attack odds of best attacker for AI to skip bombarding a city and just attack.  BBAI default: 12 -->
  <DefineName>BBAI_SKIP_BOMBARD_BEST_ATTACK_ODDS</DefineName>
  <iDefineIntVal>25</iDefineIntVal>
 </Define>
 <Define>
  <!-- Base ratio of stack strengths for AI considering skipping bombard and just attacking enemy city.
  This ratio is reduced by the AI's best attacker odds and how long it will take to bombard the city.
  Lower means AI will more readily skip bombarding.  BBAI default: 300 -->
  <DefineName>BBAI_SKIP_BOMBARD_BASE_STACK_RATIO</DefineName>
  <iDefineIntVal>300</iDefineIntVal>
 </Define>
 <Define>
  <!-- Minimum stack strength ratio for AI to skip bombarding city and just attack, higher is more conservative.  BBAI default: 150 -->
  <DefineName>BBAI_SKIP_BOMBARD_MIN_STACK_RATIO</DefineName>
  <iDefineIntVal>130</iDefineIntVal>

At one time I had set the 3rd define lower than 300 but someone moved it back up to default BBAI value. And I also had the 2nd define lower as well iirc.

This also is coupled with the BUG option about City defense level which is currently set to 75. At one time had it at 65.
 
I'm going to adjust in My game the BBAI_AI_Variables_GlobalDefines section that deals with attacking a city when you have limited or no siege. I think Toffee changed what I had there before.
I've never modified that file, TB adjusted it in rev. 8353 (Feb. 22. 2015), SO adjusted it in rev. 8910 (Nov. 29. 2015), and then it have only been modified three times by you since.

Just saying that you should look in the log before talking about who changed what.
 
I've never modified that file, TB adjusted it in rev. 8353 (Feb. 22. 2015), SO adjusted it in rev. 8910 (Nov. 29. 2015), and then it have only been modified three times by you since.

Just saying that you should look in the log before talking about who changed what.
I did say " I Think" meaning not totally sure off the top of my head. Especially since you have, in the past, changed Many many things I've done over the years. Sorry if it hurt your feelings. :(
 
I did say " I Think" meaning not totally sure off the top of my head. Especially since you have, in the past, changed Many many things I've done over the years. Sorry if it hurt your feelings.
No feelings hurt.
At one time I had set the 3rd define lower than 300 but someone moved it back up to default BBAI value. And I also had the 2nd define lower as well iirc.
BBAI_SKIP_BOMBARD_BASE_STACK_RATIO
Koshling changed it from 350 to 250 in rev 856
Then it remained at 250 until you changed it to 300 in rev. 9674.​
BBAI_SKIP_BOMBARD_BEST_ATTACK_ODDS
You increased it from 10 to 12 in rev. 9674.
You increased it from 12 to 25 in rev. 9774.
I'm not trying to hurt your feelings here, I'm just a stickler for correctness.
 
Last edited:
Right.

How do you pull these up without loading All versions?
 
Right.

How do you pull these up without loading All versions?
There is no need to load old versions.

Right click in Caveman2Cosmos folder, and hover over TortoiseSVN->Show Log, on top of this window you can filter various stuff.
You can do same thing on folder or individual file.
 
There is no need to load old versions.

Right click in Caveman2Cosmos folder, and hover over TortoiseSVN->Show Log, on top of this window you can filter various stuff.
You can do same thing on folder or individual file.
That is really good, another thing that can often help is "Blame...". Do that on a file (keep the entire range of revisions selected in the next window) and you can see for every line in a file which revision made the last change to it, and who did that. Of course, with more than 10,000 revisions it can take a bit of time, but together with the tools raxo2222 mentioned, you can get a good overview.
 
Found more detail on the problem with Cannibalism and Human Sacrifice World Views. If I turn off Slavery Human Sacrifice works but Cannibalism doesn't. If I turn off both Slavery and Human Sacrifice then Cannibalism works.

The Actions on the Captive unit(s) are not being merged. They are being replaced. The question now is why is this happening for captives but not the other units like the Great Prophet.

I found a number of small errors in the Civics file and Pepper's buildings file where the optional nature of these World Views was not being taken into account. I will post the fixes for them shortly.
 
Back
Top Bottom