• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Specific Bug Reports

The alliance option is intended to be an offensive and defensive pact, like the alliances in older versions of civ.

Defensive pacts which don't cancel when you declare but aren't offensive are certainly possible. Could make the alliance option into a three state control: 0 = default BTS; 1 = defensive pact which doesn't cancel; 2 = alliance.
 
The debug dll tells me some errors:

Assert Failed

File: CvUnitAI.cpp
Line: 13636 <- could be different from yours
Expression: iParatrooperCount > 0
Message:

PHP:
	PROFILE_FUNC();

	if (getGroup()->getNumUnits() > 1)
	{
		return false;
	}
	int iParatrooperCount = plot()->plotCount(PUF_isUnitAIType, UNITAI_PARADROP, -1, getOwnerINLINE());
	FAssert(iParatrooperCount > 0);

	CvPlot* pPlot = plot();

	if (!canParadrop(pPlot))
	{
		return false;
	}

Assert Failed

File: CvUnit.cpp
Line: 11009 <- could be different from yours
Expression: getMoves() >= 0
Message:

PHP:
	if (getMoves() != iNewValue)
	{
		pPlot = plot();

		m_iMoves = iNewValue;

		FAssert(getMoves() >= 0);

		if (getTeam() == GC.getGameINLINE().getActiveTeam())
		{
			if (pPlot != NULL)
			{
				pPlot->setFlagDirty(true);
			}
		}

----------------------------------------------------------

Assert Failed

File: CvTeam.cpp
Line: 3814 <- could be different from yours
Expression: eIndex >= 0
Message: eIndex is expected to be non-negative (invalid Index)

PHP:
bool CvTeam::isHasMet(TeamTypes eIndex)	const														 
{
	FAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");
	FAssertMsg(eIndex < MAX_TEAMS, "eIndex is expected to be within maximum bounds (invalid Index)");
	//FAssert((eIndex != getID()) || m_abHasMet[eIndex]);
	return m_abHasMet[eIndex];
}

----------------------------------------------------------

Assert Failed

File: CvCity.cpp
Line: 10583 <- could be different from yours
Expression: eIndex >= 0
Message: eIndex expected to be >= 0

PHP:
int CvCity::getUnitCombatFreeExperience(UnitCombatTypes eIndex) const
{
	FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
	FAssertMsg(eIndex < GC.getNumUnitCombatInfos(), "eIndex expected to be < GC.getNumUnitCombatInfos()");
	return m_paiUnitCombatFreeExperience[eIndex];
}


if not bbai, what else could cause these errors?
 
The last one, with getUnitCombatFreeExperience happens when a unit with NO_UNITCOMBAT wins a battle. Check to make sure that every unit in the XML has unit combat set if it can fight or defend.

As for the movement assert, does moving over a tile (like a hill) consume two movement, or the remaining movement? If it consumes a straight two, it could be setting a 1 to a -1.

As for the other ones... No idea.

Speaking of Asserts, Jdog, the 4 that always pop up with AI Auto Play drive me crazy. I specifically commented them out with the note "AI Autoplay Calls this" but every time I use straight BBAI it bugs me. Please oh please, comment them out!
 
1. Somehow you have a unit which is calling CvUnitAI::AI_paradrop but isn't using UNITAI_PARADROP. This must be some other customization you have, a unit which calls CvUnitAI::AI_paratrooperMove but isn't running UNITAI_PARADROP.

2. Very strange, my guess would again be some non-standard unit defined in XML. Maybe figure out what unit it's happening for and where they are. This is game mechanics related, not AI logic related though.

3. There are a huge number of places this could be coming from, you can check the call stack to see. My bet is that it's a Python file, as that should be fatal if called from inside the DLL.

4. I think Afforess nailed this one.

Hope that helps.
 
1. Okay I guess it's code from theladiesogre.

4. I have units without unit combat to forbid getting any promotions. Should they all have a unit combat?



As for the movement assert, does moving over a tile (like a hill) consume two movement, or the remaining movement? If it consumes a straight two, it could be setting a 1 to a -1.

??? dunno. cant remember changing anything there.
 
4. I have units without unit combat to forbid getting any promotions. Should they all have a unit combat?

YES. Every unit that can fight needs a unit combat. Just make a unitcombat_misc and then they can't get any promotions that way. Without a unitcombat, you can get silent corruption in save files, and it can cause very very nasty things to happen.
 
Make sure you add that new unit combat type to Unit Naming.xml if your mod has BUG. Copy an existing combat type's <option> element and modify it for your new type.
 
Was trying to sort out the languages on a mod I'm doing. Have your BBAI ver 0.84 installed (excellent, thank you) and noticed that among the language options on the initial screen there are the usual 5 and a TXT_KEY_... something in the menu. Think its because you have Finnish referenced in a text file. Anyway was possibly going to add another language. Any idea where you tell the XML that it exists?
 
/!\ IMPORTANT: THIS WAS THE LATEST SVN DEVELOPER VERSION (0.90p) /!\


holy s.h.i.t., something is going wrong here [something with 'happy'] - happened while AI autoplay was active:

attachment.php



nearly every city is shrinking to 1. :D



/!\ IMPORTANT: THIS WAS THE LATEST SVN DEVELOPER VERSION /!\
 
Was playing a Prince Game on a strange map,( must have toggled Flat) as The Qui So-the Chinese leader and Wan Kong declared war on Peter. I joined in but didn't attack for a couple of turns and then Peter started sending unescorted Catapults to his border with me. He did it 3 or 4 times. Not sure the AI should be attacking with 2-3 catapults on their own?
 

Attachments

  • Civ4ScreenShot0007.JPG
    Civ4ScreenShot0007.JPG
    239.9 KB · Views: 59
So this hasn't been fixed since 0.90p .. did you actually defy a resolution to get this or was it triggered by somethng else?
 
Given that this bug has not been reported by any Better BUG AI users, I think it is being caused by a mod Cybah is using. Though it may be pointing toward an issue that could be handled better in BtS somehow, as has been stated that looks very much like referencing a non initialized variable.
 
this happened for the AI, not for me (well, I was not defying any resolution). on the screenshot I am looking into a city of one of my vassals.

the error here:

PHP:
    def onCityDoTurn(self, argsList):
        'City Production'
        pCity = argsList[0]
        iPlayer = argsList[1]

# no anger defying UN resolutions start #
        iGovernmentCivicOption = CvUtil.findInfoTypeNum(gc.getCivicOptionInfo,gc.getNumCivicOptionInfos(),'CIVICOPTION_GOVERNMENT')
        iPoliceState = CvUtil.findInfoTypeNum(gc.getCivicInfo,gc.getNumCivicInfos(),'CIVIC_POLICE_STATE')
        pPlayer = gc.getPlayer(iPlayer)
        iGovernmentCivic = pPlayer.getCivics(iGovernmentCivicOption)

        if (iGovernmentCivic == iPoliceState):
            pCity.changeDefyResolutionAngerTimer(pCity.getDefyResolutionAngerTimer())
# no anger defying UN resolutions end #

        CvAdvisorUtils.cityAdvise(pCity, iPlayer)

COULD cause it. but the AI must have used police state to cause this error. thats something I do not know anymore, at the time of looking into the city, the AI does not have police state (anymore?).

Will observe a new game.

Edit: Well, this error (no minus in the changedef line) MUST be the reason imo. Every round doubled anger. Could cause 1.8 mio bad faces right? Will try.
 
Back
Top Bottom