FfH2 0.30 Bug Thread

I've removed the crew spells (Still WoC with only crew spells removed), remove -1 attack and -1 defense to the +1 cargo promotion to be sure this is the only difference between the two games . After adding +1 cargo to the queen of line , still no more WoC . Looks like this missing space is the cause of the WoC !?
 
Could you try to delete the Queen of the Line and give them a new one with the same stats as current, see if that clears it up?

In another thread someone stated that deleting a unit while it is loaded in a ship removes the unit, but does NOT clear the cargo space. Thus the ship effectively loses 1 cargo slot. There is a small chance that the AI deleted units (which it loves to do) and thus this ship cannot actually load ANYTHING, but it is desperately trying to.
 
Could you try to delete the Queen of the Line and give them a new one with the same stats as current, see if that clears it up?

In another thread someone stated that deleting a unit while it is loaded in a ship removes the unit, but does NOT clear the cargo space. Thus the ship effectively loses 1 cargo slot. There is a small chance that the AI deleted units (which it loves to do) and thus this ship cannot actually load ANYTHING, but it is desperately trying to.

Yeah, I was thinking the same thing after reading bladios7 post that it's probably something to that effect which is causing the WoC bugs...
 
Ok i've tried to do what you have said with a keyboard shortcut :

Spoiler :
Code:
def debugGame():
        pPlayer = gc.getPlayer(3)
        lUnit = []
        (loopUnit, iter) = pPlayer.firstUnit(false)
        while( loopUnit ):
                if ( not loopUnit.isDead() ): #is the unit alive and valid?
                        lUnit.append(loopUnit) #add unit instance to list
                (loopUnit, iter) = pPlayer.nextUnit(iter, false)

        for sUnit in lUnit :
                if sUnit.getID() == 5333035 :
                        rangerUnit = sUnit
                        break

        pPlot = rangerUnit.plot()
        iX = pPlot.getX()
        iY = pPlot.getY()
        iRangerType = rangerUnit.getUnitType()
        iQueenType = gc.getInfoTypeForString("UNIT_QUEEN_OF_THE_LINE")

        for iIndex in range(pPlot.getNumUnits()) :
                kUnit = pPlot.getUnit(iIndex)
                if kUnit.getUnitType() == iQueenType :
                        queenUnit = kUnit
                        break

        newRanger = pPlayer.initUnit(iRangerType, iX, iY, UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
        newRanger.setReligion(rangerUnit.getReligion())
        newRanger.setLevel(rangerUnit.getLevel())
        newRanger.setExperience(rangerUnit.getExperience(),-1)
        for iProm in range(gc.getNumPromotionInfos()):
                if rangerUnit.isHasPromotion(iProm) : newRanger.setHasPromotion(iProm, True)
        newRanger.setUnitAIType(rangerUnit.getUnitAIType())
        rangerUnit.kill(False, -1)
        
        newQueen = pPlayer.initUnit(iQueenType, iX, iY, UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
        newQueen.setReligion(queenUnit.getReligion())
        newQueen.setLevel(queenUnit.getLevel())
        newQueen.setExperience(queenUnit.getExperience(),-1)
        for iProm in range(gc.getNumPromotionInfos()):
                if queenUnit.isHasPromotion(iProm) : newQueen.setHasPromotion(iProm, True)
        newQueen.setUnitAIType(queenUnit.getUnitAIType())
        queenUnit.kill(False, -1)

... and i get no WoC . In the world builder , the 2 units are exactly the same that previously changed . Perhaps trying to add a function in the SDK that recalculate the cargo space every time it is used should confirm this but this is not on my level .

Tcho !
 
There seems to be an issue in which an entire stack of units can be pushed out of a city when one of the units in the stack that has the Immortal promotion is defeated. As expected, the defeated unit reappears in the capital city, but the rest of the stack is pushed next to the city and the attackers conquer the city.

There's a discussion on this issue in this thread.

If necessary, I can try to get a save game that demonstrates this, but I'm reasonably certain the above conditions should make it happen.
 
I was trying to get an Altar victory for the first time for a change. Started the game with Play Now!, Standard size, Emperor, Archipelago. At turn 338, as I was putting up the last altar :cry:, the game froze when I tried to proceed to the next turn. It actually also froze my comp, I had to restart. Anyway I'll put up the save, hope it helps you to figure out the cause of these WoCs.
 

Attachments

  • Falamar AD-0338.CivBeyondSwordSave
    324.4 KB · Views: 50
I was able to adopt Public Healers (a good civ only civic) as the Calabim underneath Octopus Overlords (evil civ) just now on a warlord difficulty file, continents. Sabathiel is my vassal, and he has a neutral alignment.

Also, Loki needs to be fixed. the AI takes him as bait if he's beside them, allowing you to make the AI put their units anywhere you want, as Loki is so hard to corner, especially for the AI.


edit: changed sabathiel's alignment to what it actually is.
 
I was trying to get an Altar victory for the first time for a change. Started the game with Play Now!, Standard size, Emperor, Archipelago. At turn 338, as I was putting up the last altar :cry:, the game froze when I tried to proceed to the next turn. It actually also froze my comp, I had to restart. Anyway I'll put up the save, hope it helps you to figure out the cause of these WoCs.

The the same spinlock as the above. Delete the Carvels in the Svartalfar cities and you don't have it. Odd that both times its happened its been with an AI Svartalfar civ.
 
Ok i've tried to do what you have said with a keyboard shortcut :

Spoiler :
Code:
def debugGame():
        pPlayer = gc.getPlayer(3)
        lUnit = []
        (loopUnit, iter) = pPlayer.firstUnit(false)
        while( loopUnit ):
                if ( not loopUnit.isDead() ): #is the unit alive and valid?
                        lUnit.append(loopUnit) #add unit instance to list
                (loopUnit, iter) = pPlayer.nextUnit(iter, false)

        for sUnit in lUnit :
                if sUnit.getID() == 5333035 :
                        rangerUnit = sUnit
                        break

        pPlot = rangerUnit.plot()
        iX = pPlot.getX()
        iY = pPlot.getY()
        iRangerType = rangerUnit.getUnitType()
        iQueenType = gc.getInfoTypeForString("UNIT_QUEEN_OF_THE_LINE")

        for iIndex in range(pPlot.getNumUnits()) :
                kUnit = pPlot.getUnit(iIndex)
                if kUnit.getUnitType() == iQueenType :
                        queenUnit = kUnit
                        break

        newRanger = pPlayer.initUnit(iRangerType, iX, iY, UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
        newRanger.setReligion(rangerUnit.getReligion())
        newRanger.setLevel(rangerUnit.getLevel())
        newRanger.setExperience(rangerUnit.getExperience(),-1)
        for iProm in range(gc.getNumPromotionInfos()):
                if rangerUnit.isHasPromotion(iProm) : newRanger.setHasPromotion(iProm, True)
        newRanger.setUnitAIType(rangerUnit.getUnitAIType())
        rangerUnit.kill(False, -1)
        
        newQueen = pPlayer.initUnit(iQueenType, iX, iY, UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
        newQueen.setReligion(queenUnit.getReligion())
        newQueen.setLevel(queenUnit.getLevel())
        newQueen.setExperience(queenUnit.getExperience(),-1)
        for iProm in range(gc.getNumPromotionInfos()):
                if queenUnit.isHasPromotion(iProm) : newQueen.setHasPromotion(iProm, True)
        newQueen.setUnitAIType(queenUnit.getUnitAIType())
        queenUnit.kill(False, -1)

... and i get no WoC . In the world builder , the 2 units are exactly the same that previously changed . Perhaps trying to add a function in the SDK that recalculate the cargo space every time it is used should confirm this but this is not on my level .

Tcho !

Really interesting Sto. There must be something corrupt about those old ships. I wonder if its just coincidence that its always happening with the svartalfar? Hmm..
 
It looks to me like the military unit bonus from the Bannor temple isn't being added. I haven't checked with units other than this champion.
order.jpg
 
Patch K.

Problem:
essential resources are not always on the map.

Explanation:
- I created a map: Pangae, Standard size, temperate, low sea level
- Starting options: Medieval era, Quick game, Random leader, Monarch, Raging barbarians, Aggressive AI, Barbarian world, Wildlands, Last Days
- It happened to me 3 times in a row, with the same settings, and with Svartalfar, Kuriotates, Ljosalfar
The resources GUNPOWDER and REAGENTS were never on the map! They are essential for the game as they unlock essential arcane (Archmage, Summoners) or siege/naval units that are the essence of some civilizations.
The resource MITHRIL was not in the game for the first 2 maps, and came up in the 3rd map...
I never ever saw resources such as Gulagarm, Sheut stone. Probably reserved for later versions... (is it?) or very very rare like some landmarks (?).

Resources such as Incense, Reagent, Mithril, Gunpowder should always be on a map as they are directly part of the game and unlock technologies/units and participate to the balance of the game, even if there is only 1 resource of each type on the map!! (which gives them a very valuable strategic value and increases the fun/challenge in the game!)

File attached:
My 3rd try: starting on a standard Pangae, no Gunpowder, no Reagents (but Mithril), medieval era. Of course some civilizations are very very defavorised and the game unbalanced.

Edited (for not adding 1 more post):
Thanks FenBoy (answer below)!
As I also found that the option Late Days does not work as intended (does not work at all or is way too slow for being noticeable!!), I rarely see any effects from the Infernals, and saw nothing about it in the pedia...
 

Attachments

  • AutoSave_Initial_AD-0096-No REAGENTS and GUNPOWDER.CivBeyondSwordSave
    72.1 KB · Views: 70
Gulgarm, Sheut Stones etc. are found when the Infernals spread Hell terrain over existing resources.

The problem with Reagants, Mithril etc. is an issue that's already known about, though not one that's been fixed yet.

Edit: Looks like it is being addressed, there's the thread here
 
In my current game I am having constant wars with the Illians. Two things:

1. Whenever Auric Ulvin threatens me wanting something, I decline and get the following response from him:

"AI_DIPLO_DEMAND_REJECTED_DEFAULT_TRIBUTE"

I guess it is just a cosmetic error, but it is kind of funny. ;)

2. On one occasion, I demanded (for a change) Gold, and got it. However, a few turns later he demanded Gold. This pissed me off, and I decided to declare war and send some units into his territory.

I was not permitted to do so.

I suppose this is because the game considers we have a peace treaty (?) for 10 turns when he gave me the Gold tribute.

But, if that is the case, how could he demand Gold the turn before???
 
About the WoC , i've done some more tests thinking the problem would not occur with the queen , because of the lanun that can easily destroy units on boats ,the WoC should be more frequent .

test 1:
_ done the queen and ranger replacement : 5 or 6 units are loaded into the queen (knight , the 2 other rangers and some nixxin ) , the queen move to west full loaded and the ranger move to south by land .

test 2:
_ done only the ranger replacement : the same thing happen . The problem can be with the ranger cargo ?

test 3 :
_ take the second game with WoC, change the hunters to unitAI_ICBM(don't move) and no WoC . another time a land unit with cargo is involved .

test 4 :
_ tried some log with python cargo function . no difference between the 2 rangers

Stop replacing units

test 5 :
add (+1 cargo) to the queen . The COUNTER ranger is loaded into the queen with the others

test 6:
I create a bird and load it into the ranger . And i get the WoC ... very strange :

Spoiler :
Code:
bool CvUnitAI::AI_load(UnitAITypes eUnitAI, MissionAITypes eMissionAI, UnitAITypes eTransportedUnitAI, int iMinCargo, int iMinCargoSpace, int iMaxCargoSpace, int iMaxCargoOurUnitAI, int iFlags, int iMaxPath)
{
	PROFILE_FUNC();

	CvUnit* pLoopUnit;
	CvUnit* pBestUnit;
	int iPathTurns;
	int iValue;
	int iBestValue;
	int iLoop;

	// XXX what to do about groups???
	/*if (getGroup()->getNumUnits() > 1)
	{
		return false;
	}*/

	if (getCargo() > 0)
	{
		return false;
	}

getCargo() should return 1 , So AI_load should return false and the two tests you have removed to avoid the WoC should not be taken in count . The WoC should have been broken ????

To be sure , i've loaded a bird into the ranger and add +1cargo to the queen and the ranger is loaded into the queen the turn after with the bird still loaded in ????

I must have missed something , so i stop now . :crazyeye:

Tcho !

Edit : Thinking about cargo and the spell mask . Shouldn't you add a requirement for this spell to check if the unit has a cargo unit or if the unit is in a cargo .
 
About the mask spell , i've added the following requirement :

Code:
def reqMask(caster):
        if caster.hasCargo() : return False
        if caster.isCargo() : return False
        return True

Tested , with a ranger loaded into a ship and a bird loaded into the ranger .

Tcho !
 
I thought about the ranger cargo in cargo problem too. So I took away the rangers ability to carry cargo, but the WoC still happened. So it doesn't seem related to that.

The WoC seems to occur when the loadunit test is failed (either because the ranger has cargo, or the ship is out of space). Specifically when the unit being considered has the COUNTER AI type. But I can't see where the loop is coming from.
 
The WoC seems to occur when the loadunit test is failed (either because the ranger has cargo, or the ship is out of space). Specifically when the unit being considered has the COUNTER AI type. But I can't see where the loop is coming from.

Very strange since if you remove the tests , there is no WoC . But if the tests return false , the result should be the same !?

I've taken a look at the loop that call the function (don't remember the name) and it should break after a number of occurence .

I've tried to load the unit into the queen so the test should be True -> WoC
 
I've tried to load the unit into the queen so the test should be True -> WoC

Rectification :
i keep UNITAI_COUNTER with the loaded ranger

I've removed UNITAI_COUNTER from all other units -> no WoC but the queen of line stay in the city

I've removed UNITAI_COUNTER from an other ranger and keep it for other units -> no WoC but the queen of line stay in the city

Hope this help
 
For reqMask , i've done some errors :

Code:
def reqMask(caster):
        iHiddenNationality = gc.getInfoTypeForString('PROMOTION_HIDDEN_NATIONALITY')
        if caster.isHasPromotion(iHiddenNationality) : return False
        if caster.hasCargo() : return False
        if caster.isCargo() : return False
        group = caster.getGroup()
        if not group.isNone() :
                if group.getNumUnits() > 1 : return False

        return True

I was thinking that you can't load an HN unit into a non HN unit ship ,but this seems to be possible .
 
Top Bottom