FfH2 0.33 Bug Thread

I played a long 033 patch D multiplayer game yesterday, and experienced a minor problem early on, then a reproducable crash towards the end.

Around turn 240, we started experiencing an OOS. Here's a savegame that exhibits the problem:
http://dogshu.netlsd.com/Jim_AD-0244.CivBeyondSwordSave

Wasn't a big deal though, I was able to restart civ, load a recent autosave, and we didn't experience another OOS again.

However, much later in the game, we started experiencing CTDs. At first we tried loading an autosave, but it kept crashing within a few turns. Here's our most recent autosave:
http://dogshu.netlsd.com/AutoSave_AD-0500.CivBeyondSwordSave

The game should crash within 5 or so turns of that autosave.
 
I just noticed that Cassiel had a score of ogres and centaurs... So upgrading must be completely broken.
 
1.) more Crown of Ankharien(or what)
I built Crown o'A then I moved it to settlement and I was able to build Crown o'A again ...
2.) AI "unpredictability"
Thessa had Defense Pact with Sheelba. Thessa asked me for declaring war on Sheelba. I agreed and I declared war. Then Thessa declared war on me, because of Defensive Pact. So, anyone of us three had war with rest two. Nice, huh?
 
I just noticed that Cassiel had a score of ogres and centaurs... So upgrading must be completely broken.

Yes, there is a problem...
Yesterday my priest converted a goblin... now the little green men aspire to gallop :lol:
 

Attachments

  • ffhbug-upgrade.jpg
    ffhbug-upgrade.jpg
    387.1 KB · Views: 115
This mod needs a quickfix ... quick
 
Aside from the upgrading mess (a quick fix would be very much appreciated!), the hint for the event depicted below informs of a impending monetary loss, but my treasury went up.
 

Attachments

  • coin.jpg
    coin.jpg
    62.3 KB · Views: 175
AI_unitUpdate

In AI_unitUpdate, the return value 1 is supposed to be used to indicate that the move is handled in python, however, this python function doesn't actually handle the move on that layer. It should do the equivalent of:

getGroup()->pushMission(MISSION_SKIP);

To indicate that a particular group should skip its move.

Since it doesn't, bool CvSelectionGroupAI::AI_update() fails its infinite loop check (thus looping 100 times instead of 0 - this may be a time resource drain).

I have the following patch in the C++ code in my next version of Wiser Orcs, but I think it would be better to fix this in python, in case you'd like to actually handle non-skip moves in the future in AI_unitUpdate:

Code:
bool CvUnitAI::AI_update()
{
	PROFILE_FUNC();

	CvUnit* pTransportUnit;

	FAssertMsg(canMove(), "canMove is expected to be true");
	FAssertMsg(isGroupHead(), "isGroupHead is expected to be true"); // XXX is this a good idea???

	// allow python to handle it
	CyUnit* pyUnit = new CyUnit(this);
	CyArgsList argsList;
	argsList.add(gDLL->getPythonIFace()->makePythonObject(pyUnit));	// pass in unit class
	long lResult=0;
	gDLL->getPythonIFace()->callFunction(PYGameModule, "AI_unitUpdate", argsList.makeFunctionArgs(), &lResult);
	delete pyUnit;	// python fxn must not hold on to this pointer
	if (lResult == 1)
	{
[B]		// Wiser Orcs start - prevent infinite loop.
		if (getGroup()->getLengthMissionQueue() < 1)
		{
			getGroup()->pushMission(MISSION_SKIP);  //TODO: check if this prevents spellcasting.
		}
		// Wiser Orcs end
[/B]		return false;
	}

CvUnit::healRate

You added the following code:

Code:
//FfH Mana Effects: Added by Kael 08/21/2007
                iTotalHeal += GET_PLAYER(pPlot->getOwnerINLINE()).getHealChangeEnemy();
//FfH: End Add
This will not work correctly if pPlot->getOwnerINLINE() == NO_PLAYER.

Suggested fix:
Code:
//FfH Mana Effects: Added by Kael 08/21/2007
[B]				// Wiser Orce start - defect fix
				if (pPlot->getOwnerINLINE() != NO_PLAYER)
				{
[/B]					iTotalHeal += GET_PLAYER(pPlot->getOwnerINLINE()).getHealChangeEnemy();
[B]				}
				// Wiser Orcs end[/B]
//FfH: End Add

CvUnit::changeExtraEnemyHeal, CvUnit::changeExtraNeutralHeal, CvUnit::changeExtraFriendlyHeal
I'd suggest removing the asserts. They will trigger on any negative heal promotion.

CvPlayer::changeImprovementYieldChange

I'd suggest removing the last assert. Agriculture (as an example) will trigger it.

All checked in, if you see any more let me know.
 
I just noticed that Cassiel had a score of ogres and centaurs... So upgrading must be completely broken.


Yea my game as Basium/Ethne I was able to upgrade scouts to Centaurs and Champions to Bhuja(? the Beserker vamp unit) and to Balors. Kinda reminded me of Basium's pedia entry when the two mages who want to join him but instead got squished when Basium found out that they could summon balors. IIRC this also allowed me to skip the national limts...

(must admit it was a fun game though: Balors, Vamps, and Wolf Riders OH MY!!!!)
 
I don't know if anyone's said anything about this yet, and frankly I don't feel like digging through the pile of comments to find out so here goes: I think that events aren't properly applying AC changes. It may just be lowering the AC as well. I haven't come across an event that raises the AC yet that I've noticed. That's what I get for playing Elohim.
 
I don't know if anyone's said anything about this yet, and frankly I don't feel like digging through the pile of comments to find out so here goes: I think that events aren't properly applying AC changes. It may just be lowering the AC as well. I haven't come across an event that raises the AC yet that I've noticed. That's what I get for playing Elohim.

Playing on a particularly large map? Could be because the AC additions are in terms of the maximimum AC, and the AC displayed is merely a percentage of that. An event might be +2 AC, but if the max AC is, say, 200 due to map size, that'd only be a +1 change to what you see.
Fall Further apparently has a way to display the "absolulte" AC... Kael should really nick that.
 
Playing on a particularly large map? Could be because the AC additions are in terms of the maximimum AC, and the AC displayed is merely a percentage of that. An event might be +2 AC, but if the max AC is, say, 200 due to map size, that'd only be a +1 change to what you see.

yes, I play on a huge map generally and the change to the AC was 0, I was watching carefully because I had noticed that something seemed wrong.
 
Playing with 0.33d.

Infinite loop at end of turn. savegame attached.

Edit: Has to do with Barbarian Pieces of Barnaxus, lying close to the Broken Sepulcher (bottom left of the map)
 

Attachments

Playing with 0.33d.

Infinite loop at end of turn. savegame attached.

Edit: Has to do with Barbarian Pieces of Barnaxus, lying close to the Broken Sepulcher (bottom left of the map)

Weird, its the worker standing beside the pieces whose running around with Orthus's Axe. Take the axe away and drop it in one of Decius's cities to fix the problem. I'll check in a change to keep the Ai from pickign up equipment with workers.
 
If you'd just blocked non-combat units from picking up equipment to begin with then you could ave avoided whatever blocks you put in place to prevent the numerous Mirror Exploits. (Make sure it is done in a way that you can still block certain unitcombats though, since otherwise modmods like FF that have a unitcombat for workers would still have the bug.)
 
If you'd just blocked non-combat units from picking up equipment to begin with then you could ave avoided whatever blocks you put in place to prevent the numerous Mirror Exploits. (Make sure it is done in a way that you can still block certain unitcombats though, since otherwise modmods like FF that have a unitcombat for workers would still have the bug.)

That doesn't sound like a good plan to me, I like being able to move items with workers or use items to give them some defensive strength however small it may be.
 
Alazkan with HN kill Brigit instated of releasing her.

This is more balance question, but it's intended to let illusions kill units in defence?
 
This is more balance question, but it's intended to let illusions kill units in defence?

I think so. There isn't really an easy way to stop it.

Alazkan with HN kill Brigit instated of releasing her.

Is there really any reason to have 2 Brigit units anymore? Wouldn't it make more sense to just use a <PythonOnMove> to give you the real Brigit, instead of having to capture Brigit_held (who would instead die if taken by an HN unit)?
 
About that mirror... Some units are not allowed to use it... From my last game Basium and Brigit could not but Chalid. I figured it was due to alignment considering the mirrors origin, but when I could let Chalid use it I wasn't sure. (though he can be considered neutral)
 
Is there really any reason to have 2 Brigit units anymore? Wouldn't it make more sense to just use a <PythonOnMove> to give you the real Brigit, instead of having to capture Brigit_held (who would instead die if taken by an HN unit)?

Wouldn't this cause an issue with her Hero promotion? She would be fully leveled by the time you got her and those barbs wont give the right promos....????
 
About that mirror... Some units are not allowed to use it... From my last game Basium and Brigit could not but Chalid. I figured it was due to alignment considering the mirrors origin, but when I could let Chalid use it I wasn't sure. (though he can be considered neutral)
This might explain it:
Code:
        <SpellInfo>
            <Type>SPELL_MIRROR</Type>
            <Description>TXT_KEY_SPELL_MIRROR</Description>
            <Civilopedia>TXT_KEY_SPELL_PLACEHOLDER_PEDIA</Civilopedia>
            <Strategy></Strategy>
            <Help>TXT_KEY_SPELL_MIRROR_HELP</Help>
            <PromotionPrereq1>PROMOTION_BLACK_MIRROR</PromotionPrereq1>
            <PromotionPrereq2></PromotionPrereq2>
            <UnitPrereq></UnitPrereq>
            <UnitClassPrereq></UnitClassPrereq>
            <UnitCombatPrereq></UnitCombatPrereq>
            <UnitInStackPrereq></UnitInStackPrereq>
            <BuildingPrereq></BuildingPrereq>
            <BuildingClassOwnedPrereq></BuildingClassOwnedPrereq>
            <CivilizationPrereq></CivilizationPrereq>
            <CorporationPrereq></CorporationPrereq>
            <FeatureOrPrereq1></FeatureOrPrereq1>
            <FeatureOrPrereq2></FeatureOrPrereq2>
            <ImprovementPrereq></ImprovementPrereq>
            <PromotionInStackPrereq></PromotionInStackPrereq>
            <ReligionPrereq></ReligionPrereq>
            <StateReligionPrereq></StateReligionPrereq>
            <TechPrereq></TechPrereq>
            <bAllowAI>1</bAllowAI>
            <bAdjacentToWaterOnly>0</bAdjacentToWaterOnly>
            [B][COLOR="Red"]<bCasterMustBeAlive>1</bCasterMustBeAlive>[/COLOR][/B]
            <bCasterNoDuration>0</bCasterNoDuration>
            <bCausesWar>0</bCausesWar>
            <bGlobal>0</bGlobal>
            <bInBordersOnly>0</bInBordersOnly>
            <bInCityOnly>0</bInCityOnly>
            <bPrereqSlaveTrade>0</bPrereqSlaveTrade>
            <iAIWeight>50</iAIWeight>
            <iCasterMinLevel>0</iCasterMinLevel>
            <bDisplayWhenDisabled>1</bDisplayWhenDisabled>
            <bHasCasted>1</bHasCasted>
            <bIgnoreHasCasted>0</bIgnoreHasCasted>
            <bResistable>0</bResistable>
            <iRange>0</iRange>
            <iResistModify>0</iResistModify>
            <iDamage>0</iDamage>
            <iDamageLimit>0</iDamageLimit>
            <DamageType></DamageType>
            <AddPromotionType1></AddPromotionType1>
            <AddPromotionType2></AddPromotionType2>
            <AddPromotionType3></AddPromotionType3>
            <RemovePromotionType1></RemovePromotionType1>
            <RemovePromotionType2></RemovePromotionType2>
            <RemovePromotionType3></RemovePromotionType3>
            <bBuffCasterOnly>0</bBuffCasterOnly>
            <ConvertUnitType></ConvertUnitType>
            <CreateBuildingType></CreateBuildingType>
            <CreateFeatureType></CreateFeatureType>
            <CreateImprovementType></CreateImprovementType>
            <SpreadReligion></SpreadReligion>
            <CreateUnitType></CreateUnitType>
            <iCreateUnitNum>0</iCreateUnitNum>
            <bCopyCastersPromotions>0</bCopyCastersPromotions>
            <bPermanentUnitCreate>0</bPermanentUnitCreate>
            <CreateUnitPromotion></CreateUnitPromotion>
            <bImmuneTeam>0</bImmuneTeam>
            <bImmuneNeutral>0</bImmuneNeutral>
            <bImmuneEnemy>0</bImmuneEnemy>
            <bImmuneFlying>0</bImmuneFlying>
            <bImmuneNotAlive>0</bImmuneNotAlive>
            <bDispel>0</bDispel>
            <bPush>0</bPush>
            <bRemoveHasCasted>0</bRemoveHasCasted>
            <bSacrificeCaster>0</bSacrificeCaster>
            <iChangePopulation>0</iChangePopulation>
            <iCost>0</iCost>
            <iDelay>0</iDelay>
            <iImmobileTurns>0</iImmobileTurns>
            <iMiscastChance>0</iMiscastChance>
            <PyMiscast></PyMiscast>
            <PyResult>spellMirror(pCaster)</PyResult>
            <PyRequirement>reqMirror(pCaster)</PyRequirement>
            <Effect>EFFECT_SPELL1</Effect>
            <Sound>AS3D_SPELL_ENCHANTMENT</Sound>
            <HotKey></HotKey>
            <bAltDown>0</bAltDown>
            <bShiftDown>0</bShiftDown>
            <bCtrlDown>0</bCtrlDown>
            <bGraphicalOnly>0</bGraphicalOnly>
            <iHotKeyPriority>0</iHotKeyPriority>
            <Button>Art/Interface/Buttons/Spells/Mirror.dds</Button>
        </SpellInfo>
(Basium and Brigit both have the Angel Promotion, which makes them non living.)


The python prereq also makes it not work on Magic Immune units, so Luonnatar and Dragons can't use it either, although they are alive.







Wouldn't this cause an issue with her Hero promotion? She would be fully leveled by the time you got her and those barbs wont give the right promos....????

No, not at all. She wouldn't exist until the <PythonOnMove> python call created her (much like Barbatos the Lich now spawns when a unit enters the Broken Sepulcher, except under the control of the player whose unit entered the tile instead of barbarian), so there is no way for her to get any free xp or promotions until under your control. This could also mean that some flavorful background text could be displayed when you enter the Ring of Carcer, so a new player would get an explanation of who Brigit is.
 
Back
Top Bottom