Single Player bugs and crashes v39 plus (SVN) - After the 20th of July 2019

v. 11022
Buttons A, S, and D within the city don't work again. It was solved previously.

I got myself gov. civil Chiefdom and converted to Druidism religion. Now a city with state religion Druidism can draft units. 6 per turn. Is it intentional?
Cities without state religion cannot draft units.
To fix the buttons go into the city screen, and than exit the city screen. That is what I have to do when they stop working.
 
Ignore my post, I forgot he had units loaded on him. He can upgrade, thank you for your patience with my ignorance.
:lol:

Also I noticed you are playing on my duel Earth space map.
You are about one era farther than you should be techwise according to calendar - tech leader should be about to reach Medieval era.
Turn time lasts ~33 seconds. 12 000k is pretty long speed (Snail).
You have Noble handicap, which is pretty easy - other civ is in Classical era.

Also build all buildings, or at least production/culture ones as I see, that you are generating culture for traits.

v. 11022
Buttons A, S, and D within the city don't work again. It was solved previously.

I got myself gov. civil Chiefdom and converted to Druidism religion. Now a city with state religion Druidism can draft units. 6 per turn. Is it intentional?
Cities without state religion cannot draft units.
@Toffer90 can check why these don't work correctly.

Also upload save.
 
In the city screen, if I open up the buildings (or units or wonders) but choose research (or any other button) I get that placed in the build queue but I can't exit the screen. Esc, Enter, move to next city buttons, none of them work. I can click on the arrows to go to another city and I can exit the city screen from there.
 
In the city screen, if I open up the buildings (or units or wonders) but choose research (or any other button) I get that placed in the build queue but I can't exit the screen. Esc, Enter, move to next city buttons, none of them work. I can click on the arrows to go to another city and I can exit the city screen from there.
Its same bug with keyboard shortcuts as reported with DC0.

Upload save.
 
In the city screen, if I open up the buildings (or units or wonders) but choose research (or any other button) I get that placed in the build queue but I can't exit the screen. Esc, Enter, move to next city buttons, none of them work. I can click on the arrows to go to another city and I can exit the city screen from there.
I can't replicate the issue, I may need a save and further instructions on how to replicate.
 
I'm getting this error with the assert dll when starting/loading a game.

File: .\.\CvGlobals.cpp
Line: 5414
SVN-Rev: 10998
Expression: stricmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message: info type 'ADAPT_SCALE_CITY_LIMITS' not found, Current XML file is: modules\Natural_Wonders\Reef_Shark_CIV4SpawnInfos.xml

Now the ADAPT_SCALE_CITY_LIMITS didn't use to throw errors before, so I'm wondering about how Anq has handled the xml in-reading of those somewhat special info types.

These types of modifiers are defined in gamespeed and world info XML
like this:

<Percents>
<Percent>
<ID>ADAPT_SCALE_CITY_LIMITS</ID>
<iValue>X</iValue>​
</Percent>​
</Percents>

These are not typical info types like the error message implies, not in the traditional sense at least. They are more akin to an enumeration group defined in xml files. Name, and enumeration index based on the order in which they are read in tied to a single value.

Something for @Anq to investigate perhaps.
 
Last edited:
I'm getting this error with the assert when starting/loading a game.

File: .\.\CvGlobals.cpp
Line: 5414
SVN-Rev: 10998
Expression: stricmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message: info type 'ADAPT_SCALE_CITY_LIMITS' not found,

Now the ADAPT_SCALE_CITY_LIMITS didn't use to throw errors before, so I'm wondering about how Anq has handled the xml in-reading of those somewhat special info types.

These types of modifiers can be defined in gamespeed and world info XML
like this:

<Percents>
<Percent>
<ID>ADAPT_SCALE_CITY_LIMITS</ID>
<iValue>X</iValue>​
</Percent>​
</Percents>

These are not typical info types like the error message implies, not in the traditional sense at least. They are more akin to an enumeration group defined in xml files. Name, and enumeration index based on the order in which they are read in tied to a single value.
Looks like could been removed by accident in some places - only here it exists.
Code:
int CvCivicInfo::getCityLimit(PlayerTypes ePlayer) const
{
    if (ePlayer > NO_PLAYER && GC.getGameINLINE().isOption(GAMEOPTION_NO_CITY_LIMITS))
    {
        return 0;
    }
    //ls612: Option to scale City Limits by Mapsize
    else if (ePlayer > NO_PLAYER && GC.getGameINLINE().isOption(GAMEOPTION_SCALE_CITY_LIMITS))
    {
        int iCityLimit;
        CvPlayer* pPlayer = &GET_PLAYER(ePlayer);
        int iAdaptID = GC.getInfoTypeForString("ADAPT_SCALE_CITY_LIMITS");

        iCityLimit = pPlayer->getGameObject()->adaptValueToGame(iAdaptID , m_iCityLimit);

        return iCityLimit;
    }
    else
    {
        return m_iCityLimit;
    }
}
 
Looks like could been removed by accident in some places - only here it exists.
Nah, that is the only place it needs to exist in addition to in the world infos.
This is where the assert is coming from:

int iAdaptID = GC.getInfoTypeForString("ADAPT_SCALE_CITY_LIMITS");
Spoiler which runs this function :

Code:
int cvInternalGlobals::getInfoTypeForString(const char* szType, bool hideAssert) const
{
    FAssertMsg(szType, "null info type string");
    InfosMap::const_iterator it = m_infosMap.find(szType);
    if (it!=m_infosMap.end())
    {
        return it->second;
    }

    if(!(stricmp(szType, "NONE")==0 || strcmp(szType, "")==0) && !hideAssert && !getDefineINT(szType))
    {
        CvString szError;
        szError.Format("info type '%s' not found, Current XML file is: %s", szType, GC.getCurrentXMLFile().GetCString());
        FAssertMsg(stricmp(szType, "NONE")==0 || strcmp(szType, "")==0, szError.c_str());

        LogMissingType(szType);
    }

    return -1;
}
I do think these
<Percents>
<Percent>
<ID>ADAPT_NAME</ID>
<iValue>X</iValue>​
</Percent>​
</Percents>
are supposed to be registered as info types in their own right even though, when launching the game, the xml parser finds them when parsing inside a world or gamespeed info type.
There's been some changes to how the xml is parsed so I suspect an error has been introduced to this very special case of info types that are not supposed to have their own xml file but live inside other info type entries.

Maybe this is the wrong way to get the index of these modifiers: GC.getInfoTypeForString("ADAPT_NAME");
But I think it's been that way since city limit scaling by worldsize was introduced to C2C.
 
Last edited:
@Toffer90 can check why these don't work correctly.
Also upload save.
I can't upload save now. Bug with shortcut buttons not working is non-systematic and in my case it was solved by re-launching the game.

Is it intentional that I can draft units in my Capital city with Chiefdom and state religion?
 
Nah, that is the only place it needs to exist in addition to in the world infos.
This is where the assert is coming from:

int iAdaptID = GC.getInfoTypeForString("ADAPT_SCALE_CITY_LIMITS");
Spoiler which runs this function :

Code:
int cvInternalGlobals::getInfoTypeForString(const char* szType, bool hideAssert) const
{
    FAssertMsg(szType, "null info type string");
    InfosMap::const_iterator it = m_infosMap.find(szType);
    if (it!=m_infosMap.end())
    {
        return it->second;
    }

    if(!(stricmp(szType, "NONE")==0 || strcmp(szType, "")==0) && !hideAssert && !getDefineINT(szType))
    {
        CvString szError;
        szError.Format("info type '%s' not found, Current XML file is: %s", szType, GC.getCurrentXMLFile().GetCString());
        FAssertMsg(stricmp(szType, "NONE")==0 || strcmp(szType, "")==0, szError.c_str());

        LogMissingType(szType);
    }

    return -1;
}
I do think these
<Percents>
<Percent>
<ID>ADAPT_NAME</ID>
<iValue>X</iValue>​
</Percent>​
</Percents>
are supposed to be registered as info types in their own right even though, when launching the game, the xml parser finds them when parsing inside a world or gamespeed info type.
There's been some changes to how the xml is parsed so I suspect an error has been introduced to this very special case of info types that are not supposed to have their own xml file but live inside other info type entries.

Maybe this is the wrong way to get the index of these modifiers: GC.getInfoTypeForString("ADAPT_NAME");
But I think it's been that way since city limit scaling by worldsize was introduced to C2C.

That assert points to a real error which is caused by changes @Anq made to IDValueMap in svn10994.
 
Is it intentional that I can draft units in my Capital city with Chiefdom and state religion?
When you changed to State Religion Civic did it not say you could draft X number of units? What religion is your State religion? Are you using Divine Prophets? Multiple Religion Spread?

Chiefdom Civic does not have drafting units in it. State Religion may.

EDIT: Check All your Civics that you are currently using to see which one or ones will allow drafting units.

EDIT2: Also raxo2222 recently went thru the CivicInfos .xml and removed some tags with 0 settings. Trying to remove what was considered unused code lines. I think and said that this could be a mistake.
 
Last edited:
EDIT2: Also raxo2222 recently went thru the CivicInfos .xml and removed some tags with 0 settings. Trying to remove what was considered unused code lines. I think and said that this could be a mistake.
I didn't remove any default tags in civic infos.
Only thing I did here recently was merging stuff from modules.

Use "show log" on civic infos to see commits, where changes were done to that file.
Then double click on blue file (civicinfos) in this file list below message.

I removed default valued tags only from building and unit infos.

I made my comment clearer in one commit, where I merged Vokayra's module and fixed few tag removal mistakes in building/unit infos - there were few nested tags with default value inside.
Now it clearly states, that only unit and building infos were cleared from default valued stuff.

Modules that I merged had their civicinfos overrides - mostly (un)happiness from buildings.
 
Last edited:
Is it intentional that I can draft units in my Capital city with Chiefdom and state religion?
On Complex Traits, some traits give draft adjustments. I wasn't sure if that would mean that the 'ability' to draft automatically opens up if you have an amount you can draft, but based on this, I suspect it does mean that. Numerous traits add draft amounts and just as many take draft amounts down (min 0 overall of course but it can counter the expected ability to draft or your earned ability to from other means.) Imperialism, IIRC, even automatically drafts from any invaded city as soon as you capture it.
 
On Complex Traits, some traits give draft adjustments. I wasn't sure if that would mean that the 'ability' to draft automatically opens up if you have an amount you can draft, but based on this, I suspect it does mean that. Numerous traits add draft amounts and just as many take draft amounts down (min 0 overall of course but it can counter the expected ability to draft or your earned ability to from other means.) Imperialism, IIRC, even automatically drafts from any invaded city as soon as you capture it.
That's it, there is no on/off switch for drafting in civics, they do it the same way by adding or removing possible drafting amounts.

That would also explain why I haven't managed to see the reported bug myself as I don't play with traits.
 
Just checked Chiefdom and State Religion and<iMaxConscript>0</iMaxConscript> for both.

On Complex Traits, some traits give draft adjustments.
Didn't know this myself. As I test the Civic changes with the standard trait set.
I didn't remove any default tags in civic infos.
Only thing I did here recently was merging stuff from modules.

Use "show log" on civic infos to see commits, where changes were done to that file.
Then double click on blue file (civicinfos) in this file list below message.

I removed default valued tags only from building and unit infos.

I made my comment clearer in one commit, where I merged Vokayra's module and fixed few tag removal mistakes in building/unit infos - there were few nested tags with default value inside.
Now it clearly states, that only unit and building infos were cleared from default valued stuff.

Modules that I merged had their civicinfos overrides - mostly (un)happiness from buildings.
10-4 good buddy 10-4.
 
Didn't know this myself. As I test the Civic changes with the standard trait set.
Cool... glad I could see that to help with diagnosis is all.

Feature, not bug :)
 
@billw2015 there is minor graphical bug in GIT version, when you hover over floristry tech.
Not sure if it exists in SVN.
Civ4BeyondSword 2019-08-28 10-14-27-30.png

It is after turn number.
I'm using assert DLL.
 

Attachments

Back
Top Bottom