FfH2 Bug Thread

Lord Parkin,

1. Did you research the tech trade? I think you need that to trade techs. Also, this can happen if you got your techs through trade if you play no tech brokering.

2. Probably belongs in the 'cosmetic issues' thread.

3. Unsure about this, maybe it changed priorities once it 'saw' the terrain? You may be right but I would like to see some more cases, it does look like a mini-bug.

4. The AI certainly can be better. Note that patch M looks to be quite a lot better.

5. The scrub probably has a harder surface.

6. I don't think this is a bug. I don't know if 'seeing' someone long distance from a tower is sufficient to generate contact, you may have to be able to 'talk' to a unti ontheother side.

7. This does sound like a bug with team play to me.

8. Doesn't sound like a bug, I think 100 to 300 is proper?

9. AI is not good relative to humans. Try patch M, it is probably better.

10. Make sure you have researched Philosophy to use incense.

11. AI probably doesn't understand team mechanics, it probably just playes each player and assumes the other civ gives access and is freindly?

12. Order has a very high chance of generating an acolyte when order is established in a city, I think it is 75%. Later you get cursaders. This feature is intentional.

13. Clearly a team related exploit! Probably a bug also.

14. The AI is MUCH better in patch M on this apparently, this was a particular problem with L.

15. I'm not sure about this - it may be attacking you because it thinks you are weaker. In L the barbarains were pretty sophisticated, they built up before attacking. I have to admit I don't know exactly what is happening here. I think in M they are working more 'normally'.

16. I don't think this issue is too big a deal, it maybe should be posted to the cosmetics forum.

17. Not sure - maybe he didn't see anything to attack? I admit is seems a little weird.

18. Don't know!

19. Yeah, I've noticed this too. Cosmetic though.

20. Hmm, hadn't seen this before. Is it possible there are more overcouncil members that aren't listed, maybe since the screen may have limited space? Note that you can get an extra vote, say by having Chalid. But if you are saying nothing ever passes, it may be a bug. For something like this, a save would be helpful if you see it again or if you have it.

21. They actually are animals from a 'unit type' standpoint (see the Civilopedia) which is why they are getting the extra strength. Not sure if it is intended.

22. I've seen this too, Hyborem can get boxed in. Not sure if it is a bug or not. I do know that Hyborem's power rating is artifically increased to force him to attack. Here, does he have any room to settle?


Thanks for all of your work!

Best wishes,

Breunor
 
#9: AI sometimes seems to refuse to send a Settler out to settle despite excellent land and numerous guards. See the example below: Varn has had this settler for DOZENS of turns, but has not sent it out despite having several AWESOME spots to send it to (e.g. 2 Gold + Fish + Clam + flood plains, or Copper + Fish + Clam + flood plains). Something must be wrong with the AI risk evaluation or something.
I suspect that's an issue that only affects permanent alliances. I've seen it numerous times (patch m) in team games but never in a game without teams.

#10: Pagan Temple does not give +1 happiness from Incense.
Yes it does. You don't have incense in that picture (remember it requires philosophy).

#18: What does “We Long for the Open Country” mean? All I can guess is that it’s somehow related to civics, because I just changed this turn, but it’s not very specific at all.
Caste system. A lot of the happiness/unhappiness labels are not descriptive (e.g. "aaaaarrgh!", "oh yeah!").

And if it’s related to civics, then why isn’t my Pillar of Chains cancelling out that anger, as the description promises?
I've always assumed the civic anger line on pillar of chains refers to the effect of other civilizations having republic.
 
6. I don't think this is a bug. I don't know if 'seeing' someone long distance from a tower is sufficient to generate contact, you may have to be able to 'talk' to a unti ontheother side.

Long distance initiating diplomacy is all round weird. If you use a hawk to scout and it sees another players borders, that's enough to initiate contact. Hawks can't even talk! But if the hawk merely sees a unit wandering about in the wilderness, that's not enough. In general, the fact that it's inconsistent like that is enough to consider it a bug, IMO. And given that the general principle of it is that you merely have to see the other civ (or they have to see you), I think it would be more sensible to make any and all contact count, rather than creating the hassle of "well does this count, does this not count", etc.

12. Order has a very high chance of generating an acolyte when order is established in a city, I think it is 75%. Later you get cursaders. This feature is intentional.

Wow, I had no idea of this. That's rather cool. Is it actually documented anywhere though?

21. They actually are animals from a 'unit type' standpoint (see the Civilopedia) which is why they are getting the extra strength. Not sure if it is intended.

Hill giants are actually beasts, rather than animals. Is it intended that effects that apply to animals apply to beasts as well? If so then that's fair enough, but it's not really documented anywhere (at least not anywhere that I've seen) hence the confusion. And if that's not supposed to be the case, then I have a bug report of my own. Actually, I can't remember if I reported this one already. :crazyeye:

If you attack a lizardman with a hill giant, the combat odds show the lizardman getting an extra +50% strength, but it does not actually show the source of the +50% bonus like it normally would for any other bonus. I suspect it's coming from the lizarman's +50% vs animals, and if that's intentional then fair enough. But the tooltip really does need to make that clear, and the whole animal<->beast thing needs to be documented more clearly (or, y'know, at all).
 
Okay, here&#8217;s a big compilation post of a few things I&#8217;ve noticed over the last month or so of playing. I&#8217;m on the J patch <snip>
#7: This can also happen in single player, although it is possible the problem could be more severe in multiplayer. I suspect that it is just random clustering, because (at least in my games) there are plenty of other times when it doesn't happen.

#8: This is normal and working as intended. You can confirm this for yourself the next time you are in this situation by giving one of the cities a one-turn lead by assigning a specialist for one turn. You will see that the cost increase for the next great person is the same as when more than one city reaches the threshold simultaneously.

#15: This behavior of the AI was changed in Patch K. Previously the barbarians were inclined to travel long distances to attack a weakly defended city (you could even draw them to you by moving your units out of your capital). Now they tend to go after the closest target, as one would expect. Patching to version K (or later) will solve this problem (and several others).

#18: As a_civilian mentioned, Caste System is the cause of the "We Long for the Open Country". The Pillar of Chains does not cancel this penalty, because the Pillar of Chains only negates the civic anger penalty for not adopting Republic when other civs have done so. The text is misleading, as it implies all civic-related anger penalties will be negated, which is not the case.

#19: I've never seen that happen in tiles that were within my visual range. It does happen with tiles hidden by fog of war, but moving a unit into sight of those tiles will update the border information.

#20: Are you sure you are using a base version of FfH2, and without one or more modmods? Overcouncil (and Undercouncil) resolutions are notoriously trival to pass; usually only a single affirmative vote is required, and even when there are a large number of member nations only a small portion of those need to be positive votes in order for the resolution to pass.

#21: I think the game is confused about whether Hill Giants are animals or beasts. Subdue Animal won't capture them, but Subdue Beasts will, so they should be Beasts (and the 'pedia agrees). However, the +50% vs Animals bonus of certain Recon units applies to them, and Nature's Revolt makes them stronger (unlike other Beast units). I think this might be a situation where Python and XML are not in agreement.
 
#21: I think the game is confused about whether Hill Giants are animals or beasts. Subdue Animal won't capture them, but Subdue Beasts will, so they should be Beasts (and the 'pedia agrees). However, the +50% vs Animals bonus of certain Recon units applies to them, and Nature's Revolt makes them stronger (unlike other Beast units). I think this might be a situation where Python and XML are not in agreement.

The +50% vs Animals bonus of certain Recon units is not "vs Animal UnitCombat", but "vs certain UnitType which can spawn as a barbarian animal unit at the fogged tile from any player" actually.
It is defined with "<bAnimal>" at CIV4UnitInfos.xml.
It is not related with any unitcombat (Melee, Archer or any).

Then, Hill Giant can spawn as a barbarian unit in wilderness tile and can be enhanced Nature's Revolt.
Because Hill Giant has <bAnimal> as true and Nature's Revolt python code references that property to judge he is animal or not.
 
The +50% vs Animals bonus of certain Recon units is not "vs Animal UnitCombat", but "vs certain UnitType which can spawn as a barbarian animal unit at the fogged tile from any player" actually.
It is defined with "<bAnimal>" at CIV4UnitInfos.xml.
It is not related with any unitcombat (Melee, Archer or any).

Then, Hill Giant can spawn as a barbarian unit in wilderness tile and can be enhanced Nature's Revolt.
Because Hill Giant has <bAnimal> as true and Nature's Revolt python code references that property to judge he is animal or not.

Aha, thanks for the explanation. Still, the <bAnimal> vs UNITCOMBAT_ANIMAL distinction is very confusing.
 
1. Did you research the tech trade? I think you need that to trade techs. Also, this can happen if you got your techs through trade if you play no tech brokering.
Don't have No Tech Brokering or No Tech Trading. Have researched Trade.

2. Probably belongs in the 'cosmetic issues' thread.
Okay, will post it there if I see it again.

3. Unsure about this, maybe it changed priorities once it 'saw' the terrain? You may be right but I would like to see some more cases, it does look like a mini-bug.
If it changed priorities, why would it sit there with movement points remaining? Doesn't seem to make sense. I'm sure I've seen it in other games, but I'll post it here again when and if I do see it again. (I don't always play on teams with the AI, so that's the only time when I see it.)

6. I don't think this is a bug. I don't know if 'seeing' someone long distance from a tower is sufficient to generate contact, you may have to be able to 'talk' to a unti ontheother side.
I think (not sure) that the Sentry promotion allows you to make contact when the other guy can't see you though. I'm not arguing with your reasoning, I'm just saying that it should be consistent throughout the game so as to remain intuitive. :)

8. Doesn't sound like a bug, I think 100 to 300 is proper?
In standard BTS it goes from 100 to 200 to 300, and so on. Jumps of 200 don't start until you get to the 1000 threshold. But I haven't kept a close eye on it in other games, so I guess maybe the thresholds have been changed in FFH2. Just seemed odd to me, most other concepts are intuitive when you carry them over from BTS.

9. AI is not good relative to humans. Try patch M, it is probably better.
Will do so.

10. Make sure you have researched Philosophy to use incense.
I was sure I had researched Philosophy and still didn't have access to Incense at that point in the game. I checked the save (from much further on in the game), and noted that I did indeed have access to Incense at that point. Maybe it's just my memory at fault.

11. AI probably doesn't understand team mechanics, it probably just playes each player and assumes the other civ gives access and is freindly?
No, the default mechanism is the city which is "closest" to the tile gets it. Evidently 3 tiles in one direction and 1 in another is measured as "closer" than 2 tiles in one direction and 2 tiles in another. My point, though, is that in team play where Kuriotates are present, Kuriotates should really always be given priority over tiles within 3 radius of their cities, since they are very limited in their city numbers so need them as good as possible. There's no reason why a teammate would willingly sabotage the Kuriotates, especially when they get so few cities. So this probably needs to be fixed, if possible.

13. Clearly a team related exploit! Probably a bug also.
Yeah. Easiest fix would be to prevent Acolytes from spawning when cities are gifted, and limit it to ONLY happening when Order is spread in a new city (or with the odd event).

15. I'm not sure about this - it may be attacking you because it thinks you are weaker. In L the barbarains were pretty sophisticated, they built up before attacking. I have to admit I don't know exactly what is happening here. I think in M they are working more 'normally'.
Definitely wasn't weaker, but probably had undefended cities somewhere. That might explain it. Still, the barbs shouldn't try to go for an undefended city halfway across the map. The net effect was actually good for me, because all the barbs headed over and gave free XP to my Centaurs (and later to Eurabatres :D ). But it was a bit of an exploit, and could have been quite bad if it had happened too early in the game.

17. Not sure - maybe he didn't see anything to attack? I admit is seems a little weird.
But intuitively I would expect a unit with Enraged to go out looking for things to attack. Not to sit at home and wait for things to come to him. Just seems a bit silly.

20. Hmm, hadn't seen this before. Is it possible there are more overcouncil members that aren't listed, maybe since the screen may have limited space? Note that you can get an extra vote, say by having Chalid. But if you are saying nothing ever passes, it may be a bug. For something like this, a save would be helpful if you see it again or if you have it.
The screen definitely doesn't have limited space. It's exactly like the BTS AP/UN screen, which can extend and even include a scroll bar if necessary. Here's another example screen to show that it's not limited space causing the problem.

Civ4ScreenShot0074-1.jpg


Once again in the above example, the individual votes don't add up to the total votes, which makes the threshold for "success" much higher than it should be.

22. I've seen this too, Hyborem can get boxed in. Not sure if it is a bug or not. I do know that Hyborem's power rating is artifically increased to force him to attack. Here, does he have any room to settle?
Not a great deal, but there's definitely room. He could easily found a couple of cities on the far eastern coast, if he'd only move. But he hasn't moved a tile since he spawned. :confused:

See the attached savegame for proof - there's a lot of places he could spawn.

Thanks for all of your work!
No worries. :)

Caste system. A lot of the happiness/unhappiness labels are not descriptive (e.g. "aaaaarrgh!", "oh yeah!").
Hmm, I guess... the former is generally a placeholder for any random unhappy face from a negative event though, and the latter a placeholder for any random happy face from a positive event. Meh, I just wish it was a bit clearer what related to what.

I've always assumed the civic anger line on pillar of chains refers to the effect of other civilizations having republic.
The description doesn't exactly make this clear though, so it should probably be rewritten in less confusing terms.

#20: Are you sure you are using a base version of FfH2, and without one or more modmods? Overcouncil (and Undercouncil) resolutions are notoriously trival to pass; usually only a single affirmative vote is required, and even when there are a large number of member nations only a small portion of those need to be positive votes in order for the resolution to pass.
Yes, using base version of FFH2, patch J. Have never used any modmods, so can be 100% sure that it's not that. Maybe the issue is related to the fact that this particular game has AI's on teams of two? Although I don't see why that would cause any problems. Aside from the world unit(s0, each civ in the Overcouncil civic should get one vote. And if they have the world unit(s), their extra vote(s) should be visible. Certainly in the extreme case I posted, something very odd is going on: 3 out of 3 "yes" votes, and yet the game claims that there were 9 total votes and the unianimous vote didn't reach the required quorum of 4. Something very fishy is going on there.
 

Attachments

Not a great deal, but there's definitely room. He could easily found a couple of cities on the far eastern coast, if he'd only move. But he hasn't moved a tile since he spawned.

Yeah. I find such Hyborem fails pretty typical.
 
With regards to #1 above:

It seems we actually can't trade anything to anyone in this game. Perhaps it's related to being on a team while everyone else has individual civs? Perhaps it has to do with adding Basium to the team, effectively making the game one team of 3 vs everyone else by themselves? I don't know. Either way, it's odd that some civs will offer techs to us if we get them happy enough (Beeri Brawl), but we cannot offer any back to them. You'd think they'd want tech help even more, considering how advanced my girlfriend and I are relative to them. Yet we can't even gift anything to them to help them out! Very odd.

Savegame attached if anyone is interested.
 

Attachments

Yeah. I find such Hyborem fails pretty typical.
Surely it shouldn't be that hard to code it so that he spawns a decent distance away from existing civilization. For instance, making it so the game looks for somewhere for him to spawn that's at least 5 tiles away from a city; if no such places exist, look for 4 tiles away; if no such places exist, look for 3 tiles away from a city; if no such places exist, just place him randomly on the map and put him at war with whomever owns the territory he spawns in.

Or, thinking along a different line, just make it so he automatically combines his entrance into the game with his World Spell. Such that he enters the game into a random Ashen Veil city. Kind of like Basium's entrance, but unpredictable as to where it happens. That would at least ensure that he doesn't completely fail as a civ when the world is mostly filled by the time he arrives.
 
Hello!

I encountered a crash in my game which I have traced down with a debugger and good knowledge of x86 assembly ( yes, I'm really motivated to continue that game! ).

The crash occurs in the function :
bool CvPlot::isOwned() const
{
return (getOwnerINLINE() != NO_PLAYER);
}
because the pointer to the CvPlot is NULL.

The call to CvPlot::isOwned() comes from the function :
InvisibleTypes CvUnit::getInvisibleType()
at the line :
...
if (plot()->isOwned())
...

plot() being of course :
CvPlot* CvUnit::plot() const
{
return GC.getMapINLINE().plotSorenINLINE(getX_INLINE(), getY_INLINE());
}

and plotSorenINLINE() being defined as :
__forceinline CvPlot* plotSorenINLINE(int iX, int iY) const
{
if ((iX == INVALID_PLOT_COORD) || (iY == INVALID_PLOT_COORD))
{
return NULL;
}
return &(m_pMapPlots[plotNumINLINE(iX, iY)]);
}
which returns NULL for some reason.

So one of the members m_iX and m_iY is set to INVALID_PLOT_COORD, which makes plotSorenINLINE() returns NULL, and it crashes in CvPlot::isOwned as the pointer is invalid.

I haven't tried tracing how units could have got invalid coordinates to begin with, but one of the core programmers may have some idea...

I can post a save file if necessary, or just let me know if there's anything else I can do to help... I really would love to have that bug fixed. For now, I'll try to recompile the DLL with some extra test to handle invalid coordinates...

Thank you!
 
With regard to the problems about tech trading - check you're not in the undercouncil and the undercouncil has prevented trading with outside memebers.
 

Hello, Maloeran.

I think I have fixed the issue which you reported.
That CtD occurs when a new unit is placed on the top of enemy unit.

CvUnit::setXY() function try to push out enemy unit from new placed tile, but that process is before new unit gets valid position.
Unmodded BtS has no problem, but FfH2 checks existing enemy is invisible or not. ::isInvisible() function calls plot() function, but new unit's plot() is NULL pointer.
NULL pointer reference causes crash.

I have fixed ::isInvisible(). Please check here.
Thanks!
 
Hi deney,

It's good news that you have fixed the bug! Though, I think it's really unfortunate that your patch breaks saved games, all my motivation in tracking down that bug was to be able to continue a current game...

I would have implemented my own fix, but I haven't had much luck recompiling the DLL ( for some reason, it crashes in ntdll.dll when loading, even without any modification to the source ).

Alternatively... It would be nice if every new patch didn't break saved games, some people enjoy huge and very long games, it's annoying to encounter a bug putting an end to it.

In any case, thanks for the great work! I'll be trying to build a DLL that will allow me to continue this game.
 
Hello, Maloeran.

I think I have fixed the issue which you reported.
That CtD occurs when a new unit is placed on the top of enemy unit.

CvUnit::setXY() function try to push out enemy unit from new placed tile, but that process is before new unit gets valid position.
Unmodded BtS has no problem, but FfH2 checks existing enemy is invisible or not. ::isInvisible() function calls plot() function, but new unit's plot() is NULL pointer.
NULL pointer reference causes crash.

I have fixed ::isInvisible(). Please check here.
Thanks!

nice work :goodjob: hopefully makes it into next patch :D
 
Alternatively... It would be nice if every new patch didn't break saved games, some people enjoy huge and very long games, it's annoying to encounter a bug putting an end to it.
The nature of the changes in a patch determines whether saved games break as a result. When a bug fix will break saved games, the choice essentially becomes A) Fix the bug or B) Allow people to continue to play previous saves by not fixing the bug. Option A should always win that contest, because the inconvenience of having to start a new game is less than the inconvenience of being forced to do so by an unfixed bug. Players who are involved in a particularly interesting game when a save-breaking patch is released always have the option to wait until after they finish that game before applying the new patch.
 
The nature of the changes in a patch determines whether saved games break as a result. When a bug fix will break saved games, the choice essentially becomes A) Fix the bug or B) Allow people to continue to play previous saves by not fixing the bug.

Of course, I agree.

On the topic, there is also an option C) Break save games as infrequently as possible, typically only when incrementing the version ( such as 0.41 to 0.42 ). And, when doing so, try to include extra code to smoothly handle save game formats from the previous version.

I don't really recommend C) though, this is an open-source project and I know this kind of tight control would probably get in the way of productivity and dynamism of the code!

In any case, I didn't mean to complain, keep up the great work! I'll be on my own fixing that bug without breaking save games just so that I can resume playing my game :).
 
With regard to the problems about tech trading - check you're not in the undercouncil and the undercouncil has prevented trading with outside memebers.
Ah, excellent, that'd be it. Thanks for solving that mystery. :)

One more problem I've just encountered: Playing as Hyborem, and I've just used my world spell to claim a city on another continent. It has an Obsidian Gate, but I am unable to transport any units there from my home continent. Why is this? I can use the Obsidian Gates to transport units around my home continent perfectly fine. The city on the other continent is going to be pretty vulnerable to attacks since I can't send reinforcements there.
 
You can't even airlift 1 unit per turn? (Ordinarily you can do this even if there's no gate in the target city.)
 
Back
Top Bottom