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

Now you have 2 games to compare against each other as you play them. :)

Not really , as Russia killed me !!!:eek:
We were on a small Landmass and he ambushed me and later he came with 15 Units and destroyed me.
That was on the one side a cool moment , as i never saw the AI killing me ,on the other side i was a little sad.
So , i am glad that i can use that save further more.....

Edit: And the AI of Russia was a clever one.He build Neandertal Culture and then swarm
Neandertal Warriors...
 
Last edited:
what happened to my Smugglers Shanty, after recent SVN, all my Pirate stuff disappeared??
Did you happen to change civics? I don't know of any direct changes to this building... Anyone?
 
Did you happen to change civics? I don't know of any direct changes to this building... Anyone?
mope i even went BACK to the Banditry Civic where it is authorized, pic 1, and still not there?? and not in my built buildings also,where it used to be pic 2

an trying to get Dragon Pirate Ships. .
 

Attachments

  • civic.JPG
    civic.JPG
    182.7 KB · Views: 48
  • not there.JPG
    not there.JPG
    290.5 KB · Views: 50
mope i even went BACK to the Banditry Civic where it is authorized, pic 1, and still not there?? and not in my built buildings also,where it used to be pic 2

an trying to get Dragon Pirate Ships. .
You must produce alcohol or drugs to make this building.
 
One potential bug in CvBuildingInfo:: CopyNonDefault regarding PrereqOrVicinityBonuses and PrereqRawVicinityBonuses.
They are stored as arrays of length GC.getNUM_BUILDING_PREREQ_OR_BONUSES,
but the individual values of an array are not a boolean map to bonus-types. Instead the first identifier read from the XML is resolved and stored in the first slot of an array, and so on. The CopyNonDefaults code regarding them is that for a boolean map. The problem arises when a second xml has an extension on the vicinity bonus requirement of the same building. Because the bonus ids are resolved and stored in the first slots of the arrays, this CopyNonDefaults code will overwrite previous values. This is the current code:

Line 7324
Code:
    for ( int i = 0; i < GC.getNUM_UNIT_PREREQ_OR_BONUSES(); i++)
    {
        if ( getPrereqOrVicinityBonuses(i) == NO_BONUS && pClassInfo->getPrereqOrVicinityBonuses(i) != NO_BONUS)
        {
            if ( NULL == m_piPrereqOrVicinityBonuses )
            {
                CvXMLLoadUtility::InitList(&m_piPrereqOrVicinityBonuses,GC.getNUM_UNIT_PREREQ_OR_BONUSES(),(int)NO_BONUS);
            }
            m_piPrereqOrVicinityBonuses[i] = pClassInfo->getPrereqOrVicinityBonuses(i);
        }
    }

This is one possible way to fix it: (updated) (my previous try in TB's quote isn't working)
Code:
    for ( int i = 0; i < GC.getNUM_UNIT_PREREQ_OR_BONUSES(); i++)
    {
        if ( NULL == m_piPrereqOrVicinityBonuses )
        {
            CvXMLLoadUtility::InitList(&m_piPrereqOrVicinityBonuses,GC.getNUM_UNIT_PREREQ_OR_BONUSES(),(int)NO_BONUS);
        }
        if ( getPrereqOrVicinityBonuses(i) == NO_BONUS)
        {
            for ( int j = 0; j < GC.getNUM_UNIT_PREREQ_OR_BONUSES(); j++)
            {
                if ( pClassInfo->getPrereqOrVicinityBonuses(j) == NO_BONUS )
                {
                    break;
                }
                else
                {
                    m_piPrereqOrVicinityBonuses[i+j] = pClassInfo->getPrereqOrVicinityBonuses(j);
                }
            }
            break;
        }
    }

The block right below for PrereqOrRawVicinityBonuses is similar.

There may be other similar ones.
 
Last edited:
One potential bug in CvBuildingInfo:: CopyNonDefault regarding PrereqOrVicinityBonuses and PrereqRawVicinityBonuses.
They are stored as arrays of length GC.getNUM_BUILDING_PREREQ_OR_BONUSES,
but the individual values of an array are not a boolean map to bonus-types. Instead the first identifier read from the XML is resolved and stored in the first slot of an array, and so on. The CopyNonDefaults code regarding them is that for a boolean map. The problem arises when a second xml has an extension on the vicinity bonus requirement of the same building. Because the bonus ids are resolved and stored in the first slots of the arrays, this CopyNonDefaults code will overwrite previous values. This is the current code:

Line 7324
Code:
    for ( int i = 0; i < GC.getNUM_UNIT_PREREQ_OR_BONUSES(); i++)
    {
        if ( getPrereqOrVicinityBonuses(i) == NO_BONUS && pClassInfo->getPrereqOrVicinityBonuses(i) != NO_BONUS)
        {
            if ( NULL == m_piPrereqOrVicinityBonuses )
            {
                CvXMLLoadUtility::InitList(&m_piPrereqOrVicinityBonuses,GC.getNUM_UNIT_PREREQ_OR_BONUSES(),(int)NO_BONUS);
            }
            m_piPrereqOrVicinityBonuses[i] = pClassInfo->getPrereqOrVicinityBonuses(i);
        }
    }

This is one possible way to fix it:
Code:
    for ( int i = 0; i < GC.getNUM_UNIT_PREREQ_OR_BONUSES(); i++)
    {
        if ( getPrereqOrVicinityBonuses(i) == NO_BONUS && i != 0 )
        {
            for (int j = 0; j < GC.getNUM_UNIT_PREREQ_OR_BONUSES(); j++)
            {
                if ( pClassInfo->getPrereqOrVicinityBonuses(j) == NO_BONUS )
                {
                    break;
                }
                else
                {
                    m_piPrereqOrVicinityBonuses[i+j] = pClassInfo->getPrereqOrVicinityBonuses(j);
                }
            }
        }
    }

The block right below for PrereqOrRawVicinityBonuses is similar.

There may be other similar ones.
You are right. We've never really tried to address this but I think it was identified as a potential issue a while back.
 
as soon as i "tried" to range assault the city circled in yellow from my ship, CTD/ / / mini and save in zip
K, I'll take a look.

also in the second pic arent barb's allowed to use SM??
Barbs used to not be able to use SM, but now that the SM AI isn't instructing much in the way of splitting and is almost entirely using merges, it made sense to enable it for them so that they could compound their units and cost the game less memory as a result. It has helped with speed of processing and game longevity. The way you asked it makes it sound like you are thinking they should be able to use it and they aren't using it but they have. Stone throwers would not normally be 1.5 str, but rather 1. Given the size of that stack, they would probably use it more if they had a higher tech era achieved and thus could.
 
as soon as i "tried" to range assault the city circled in yellow from my ship, CTD/ / / mini and save in zip
I'm not sure how to explain this exactly.

Running this with a debug dll (and a normal one as well), I was able to process straight through the action without a crash. You have a modmod or two loaded up that I don't, such as some extra civs. MAYBE that could have something to do with it but...

The minidump shows that somehow the EXE lost the plot - literally. The plot you were hitting with the bombard mission has a definition in the mission setup but the processing goes into the exe to work with the graphics of the animation on the attack and it comes back out into the dll asking for what plot is under attack based on this mission definition and suddenly it doesn't have any plot being attacked when looking for the direction of the plot. How an option or a modmod would be causing that, I don't know, but it would have to be one of the two things, a difference in options or a modmod you have running that I don't. I can't get a good logical theory here as to what it could be aside from that.
 
I'm not sure how to explain this exactly.
How an option or a modmod would be causing that, I don't know, but it would have to be one of the two things, a difference in options or a modmod you have running that I don't. I can't get a good logical theory here as to what it could be aside from that.
only thing i changed was using the Confederate civ, and that isnt even involved in this?? oh well, oh it might be the ranged attached that archers use also in the bug options
 
only thing i changed was using the Confederate civ, and that isnt even involved in this?? oh well, oh it might be the ranged attached that archers use also in the bug options
Yeah I don't see that Confederacy as being an issue.

I don't think you're using archer bombard and even if you were there shouldn't be an overlap between the two.

Might just be a difference in how your processor handled a call in the EXE and something I cannot replicate here as a result. But this all happens in the graphics engine processing somewhere in the EXE, so maybe it has something to do with some graphic options.

Are you using viewports by chance? THAT could have something to do with it potentially.
 
Yeah I don't see that Confederacy as being an issue.

I don't think you're using archer bombard and even if you were there shouldn't be an overlap between the two.

Might just be a difference in how your processor handled a call in the EXE and something I cannot replicate here as a result. But this all happens in the graphics engine processing somewhere in the EXE, so maybe it has something to do with some graphic options.

Are you using viewports by chance? THAT could have something to do with it potentially.
Nope no need for that any longer . . its ok i have moved on already . .
 
I've got a couple of minor bugs this time. In my current game I built an A-Bomb, but it can't be used for a nuclear attack - all it can do is recon, rebase, and a pathetically weak airstrike (which doesn't consume the unit), presumably using its air combat strength of 1 as if it's an ordinary plane (the Propeller Tactical Bomber units in the same city don't seem to gain an ability to attack using it either). I don't have any other types of nuclear weapon yet for comparison (progress is slow as I'm both bogged down in a war and seeing more crashes - I suspect the game is running out of memory more frequently). However, it doesn't list the ability to nuke in its civilopedia entry, whereas other nuclear weapons do. I'm playing with the advanced nukes option, in case that's relevant.

The other is that flamethrower units (the ones you get in the Atomic Age with 37 strength, I'm not sure about others) are eligible for the "radioactive shells" promotion, which doesn't really seem appropriate.
 
@Thunderbrd
Looks like you can't have more than ~21 million * amount of cities of national culture.
That is city can't have more than 21 474 275 culture in it - at this cap city doesn't contribute to National Culture anymore.

My save is from experimental modmod, that lets you build all buildings, so culture output will fall as you recalculate this save.
That is several cheat buildings were added (resources/cultures/animals), and buildings/globals/infos were changed along with one python file from PPIO.

National Culture is stuck at 21 474 275 due to accumulated culture cap in single city that I have in my experiment.
Also cities can't generate more than 214 742 :culture::gold::science::espionage: per turn due to second division by 100 somewhere - was it for rounding errors?.
Culture limits are very easy to breach in my experimental mod :D
Probably my city generates 2x - 10x more culture than in normal game at 100 000 culture per turn.

By the way you forgot to include one text - MISC_HELP_GOLDEN_AGE

Also I can build all golden age extending buildings - my golden ages were longer and longer and then it became perpetual as GPs were birthing faster than Golden Age was used :p
I think its possible to do so in normal gameplay too.
 

Attachments

  • AutoSave_February 2, AD-1045.CivBeyondSwordSave
    1.6 MB · Views: 29
Last edited:
That is city can't have more than 21 474 275 culture in it - at this cap city doesn't contribute to National Culture anymore.
Yep. Shouldn't need more than that. And cities shouldn't be pumping more than 2 hundred thousand of any commerce in a round. If that's possible, we should be looking at the buildings as being too powerful, or something is. Why does your city generate more culture than a normal game?
Where is MISC_HELP_GOLDEN_AGE being called?

Good to know we have that loophole RE golden ages. Perhaps we should pull back on the buildings that can lengthen them by a bit.
 
Yep. Shouldn't need more than that. And cities shouldn't be pumping more than 2 hundred thousand of any commerce in a round. If that's possible, we should be looking at the buildings as being too powerful, or something is. Why does your city generate more culture than a normal game?
I already wrote, that I made test mod, where you can build ALL buildings in city, details are in thread I linked.
So reducing culture modifiers by 50% or 75% is in order then.
I'm in middle of Industrial era and I have +1735% culture from buildings.
No other commerce has >700% from buildings + resources.
So if I reduced all culture modifiers from buildings by 75% then now I would have 433% boost from buildings - value in line with other commerce boosters from buildings and or resources.
Here it seems only regular buildings need snipping.

Where is MISC_HELP_GOLDEN_AGE being called?
Here.
Spoiler :

Civ4BeyondSword 2019-06-06 18-09-11-26.png
Civ4BeyondSword 2019-06-06 18-08-57-36.png
Civ4BeyondSword 2019-06-06 18-09-18-17.png


cvGameTextMgr.cpp
Code:
    //STEP 9 : Golden Age Base Commerce Changes (usually trait driven though it might be interesting to enable this on civics.)
    if (owner.isGoldenAge())
    {
        int iGoldenAgeCommerce = owner.getGoldenAgeCommerce(eCommerceType);
        if (0 != iGoldenAgeCommerce)
        {
            szBuffer.append(gDLL->getText("TXT_KEY_MISC_HELP_GOLDEN_AGE_PLAYER_COMMERCE", iGoldenAgeCommerce, info.getChar()));
            szBuffer.append(NEWLINE);
            bNeedSubtotal = true;
        }
        iBaseCommerceRate += 100 * iGoldenAgeCommerce;
Line 37336

Good to know we have that loophole RE golden ages. Perhaps we should pull back on the buildings that can lengthen them by a bit.
So halving those modifiers should be enough.
 
Last edited:
I already wrote, that I made test mod, where you can build ALL buildings in city, details are in thread I linked.
So reducing culture modifiers by 50% or 75% is in order then.
I'm in middle of Industrial era and I have +1735% culture from buildings.
No other commerce has >700% from buildings + resources.
So if I reduced all culture modifiers from buildings by 75% then now I would have 433% boost from buildings - value in line with other commerce boosters from buildings and or resources.
Here it seems only regular buildings need snipping.


Here.

cvGameTextMgr.cpp
Code:
    //STEP 9 : Golden Age Base Commerce Changes (usually trait driven though it might be interesting to enable this on civics.)
    if (owner.isGoldenAge())
    {
        int iGoldenAgeCommerce = owner.getGoldenAgeCommerce(eCommerceType);
        if (0 != iGoldenAgeCommerce)
        {
            szBuffer.append(gDLL->getText("TXT_KEY_MISC_HELP_GOLDEN_AGE_PLAYER_COMMERCE", iGoldenAgeCommerce, info.getChar()));
            szBuffer.append(NEWLINE);
            bNeedSubtotal = true;
        }
        iBaseCommerceRate += 100 * iGoldenAgeCommerce;
Line 37336


So halving those modifiers should be enough.
OK, cool I'll look into the text key error and the rest sounds fair enough, since we've already diminished mod%s on gold and research in a like vein.
 
OK, cool I'll look into the text key error and the rest sounds fair enough, since we've already diminished mod%s on gold and research in a like vein.
Is it possible to make something like Greater Gold but for culture?
Even with 4 slower speed you will eventually get 21 million culture in city and then city stops providing culture for national culture.
 
Top Bottom