FfH2 0.23 Bug Thread

Something is calling this function with an invalid value (-1). Unfortunately, I'm having trouble tracking down the caller (according to the debugger it's __ehhandler$?canCast@CvUnit@@QAE_NH@Z: - if that helps). In any case, an invalid value should always return false (it doesn't).

I added the following code to the beginning of this function:

Code:
	// Smarter Orcs defect fix begin.
	if ((spell < 0) || (spell >= GC.getNumSpellInfos()))
	{
		return false;
	}
	// Smarter Orcs end
 
There is another Basium/Hyborem problem that is a carryover from version .22 and was noted in the bugs thread.

Both can exceed the limit of three National Units. I was able to build/upgrade as many Heralds as I wanted as long as I had a Level 6 Angel. Also, on the battlefield I ran into more than three Infernal Lords at the same time.

The last time I played as Hyborem I could only build three Infernal Lords. If Hyborem ever has more than three Infernal Lords some of them were probably spawned from Hellfire tiles.
 
The Rage spell only works on enemy units, surely this is wrong?

Also, I feel that the Tsunami spell has too low a success rate (for turning coastal land into ocean), maybe a 1 in 20 in my current game (5% chance). I was thinking that a 20% chance would be far more realistic. Perhaps the Lanun could have an increased success chance for Tsunami?

In my current game, I was unable to build the Mercurian Gate when I discovered the required technology, and no-one else has built it (I`m on about turn 800). At least it keeps the AC down I guess.. Another thing, I can`t seem to build Druids even though I have all technologies and Groves. I`m playing as the Elohim, are they not able to build Druids?
 
You can only build the gate after hyborem has entered the world.
Druids can only build by neutral allignments.
 
The AI doesn't seem to understand that undead units don't count for "We demand military protection". In my current game I'm allied with Sabathiel and half of his cities are only defended by Drown, this is causing major unhappiness for him. He has many other units that could be used as city defenders, but most of them are defending ressources...
I'm using Smarters Orc 0.15
 
Mutation is affecting Skeletons (undead) and Eidolons (demon) when there are living un-mutated units in the same tile.

If all living units in the tile are already mutated, then Mutation can't be cast, but as long as there is one un-mutated living unit in the tile, then Mutation affects also the Skeletons and Eidolons (and I guess other undead or demons that are in the tile).
 
The Rage spell only works on enemy units, surely this is wrong?

I wondered about that, myself, and came to the conclusion that it is supposed to be used before you attack. The Enraged promotion makes a unit stronger on offense, but weaker on defense. Casting it on a strong defender makes it much weaker, giving you a much better chance of killing it. Also, if that unit was the "best defender" in a stack, this might weaken it enough that it is no longer the best defender, letting you directly attack what would otherwise be protected units.
 
The last time I played as Hyborem I could only build three Infernal Lords. If Hyborem ever has more than three Infernal Lords some of them were probably spawned from Hellfire tiles.

So, you're saying if the AI plays Hyborem they can exceed the National Limit on Infernal Lords, but you cannot as the human player? That's odd as I was able to exceed the limit on Heralds and you don't see other AI civs exceeding the National Limit on Tier IV units. :confused:

I'm wondering why more than 3 Infernal Lords would be spawned when the barbs never spawn more than 3 Heavy Crossbowmen, Lizard Beastmasters, etc. at one time.
 
I wondered about that, myself, and came to the conclusion that it is supposed to be used before you attack. The Enraged promotion makes a unit stronger on offense, but weaker on defense. Casting it on a strong defender makes it much weaker, giving you a much better chance of killing it. Also, if that unit was the "best defender" in a stack, this might weaken it enough that it is no longer the best defender, letting you directly attack what would otherwise be protected units.

Just what I needed to know, cheers Tyrant :) Although it would still be good to promote Rage on friendly units.
 
So, you're saying if the AI plays Hyborem they can exceed the National Limit on Infernal Lords, but you cannot as the human player? That's odd as I was able to exceed the limit on Heralds and you don't see other AI civs exceeding the National Limit on Tier IV units. :confused:

I'm wondering why more than 3 Infernal Lords would be spawned when the barbs never spawn more than 3 Heavy Crossbowmen, Lizard Beastmasters, etc. at one time.

I don't know if it's possible to get more than 3 Infernal Lords as a player. As I said, you can only build 3. But if the AI can get more than three from Hellfire tiles, I'd guess that this works for a player as well. My game ended a few turns after I built the third Infernal Lord.

Hyborem is created when someone researches "Infernal Pact"
 
That clears that one up, thanks a lot. When do Hyborem appear?
Once anyone researches infernal pact (the AV specific tech)
 
Two things I've noticed.

1) Bannor Training Yards do not provide a happy face when using Nationhood civic.

WARNING: The text below contains completely inaccurate information filled with poor math and a misunderstanding of the Civ4 combat engine. I don't want to delete it and invalidate a bunch of posts below so I'll leave it. Suffice to say that I think the odds displayed are wrong. You can still look at the picture and skip to the posts below. ;)

2) The combat odds displayed are just plain wrong? See the screenshot. I have my selected Warrior on a Go-to order, and I've moused over the Barbarian Orc Warrior. My Warrior is highly promoted and has several bonuses. Add them all up, and you get 80+40+40+40=200% bonus. My Warrior is hurt (2.7/3), so double strength should be 5.4 not 7.2 as displayed. Even if my Warrior were full health (3), with the given bonuses, the maximum should be 6. How did I get to higher than 7?

Also look at the enemy value. 1.66? The enemy is full health standing on a jungle tile. His strength should be 4.5. Is this a possible reason why some people think the combat in the new version is random and streaky? It seems my attack strength is over-inflated and the enemy's defense strength is under-valued, leading to disproportionate odds.

Unless I'm doing something wrong, the strength values should be 5.4 vs 4.5, not 7.2 vs 1.66 as shown.
 

Attachments

  • Combat Odds.jpg
    Combat Odds.jpg
    47.2 KB · Views: 88
The strength of the orc seems to be correct. All bonuses of an attacking unit are substracted from the defenders strength, only the combat promotions are added to the attackers strength.
So the orcs strength should be 3*1/(1+0,4+0,4+0,4-0,5) = 1,76
On what difficulty are you playing? The bonus you get from difficulty level against the barbarians is calculated into the final strength but not shown as a bonus. If you add in another +10% vs barbarians, the orcs strength would be 3*1/(1+0,8) which matches the 1,66 shown in the screenshot.

But the strength of your warrior should be 2,7*(1+0,8) = 4,86
 
The strength of the orc seems to be correct. All bonuses of an attacking unit are substracted from the defenders strength, only the combat promotions are added to the attackers strength.

I wasn't aware this was how combat worked. I guess I should dig up that article about Civ4 combat mechanics.

So the orcs strength should be (3*1)/(1+0,4+0,4+0,4-0,5) = 1,76

Are you sure this is how defender strength is calculated? Let's pretend my warrior has no promotions (no shock, no orc slaying, no woodsman), then the only modifier is tile defense and the defender strength becomes 3/(1-0.5) = 6? Double strength for standing on a jungle tile? Shouldn't it be 50% bonus as it says?

On what difficulty are you playing? The bonus you get from difficulty level against the barbarians is calculated into the final strength but not shown as a bonus. If you add in another +10% vs barbarians, the orcs strength would be 3*1/(1+0,8) which matches the 1,66 shown in the screenshot.

I'm playing on Noble. I'm not sure what the bonus against barbarians is in FfH. Come to think of it, I'm not sure what the bonus is in the stock game either...
 
You only divide the strength by (1-x) if x is negative. If it's positive, you simply add it, see here: Combat Explained

And I checked the wiki, the bonus against barbarians is 10% on Noble, so the strength of the orc is correct. But I really don't know whats wrong with your warrior.
 
2) The combat odds displayed are just plain wrong? See the screenshot. I have my selected Warrior on a Go-to order, and I've moused over the Barbarian Orc Warrior. My Warrior is highly promoted and has several bonuses. Add them all up, and you get 80+40+40+40=200% bonus. My Warrior is hurt (2.7/3), so double strength should be 5.4 not 7.2 as displayed. Even if my Warrior were full health (3), with the given bonuses, the maximum should be 6. How did I get to higher than 7?

Also look at the enemy value. 1.66? The enemy is full health standing on a jungle tile. His strength should be 4.5. Is this a possible reason why some people think the combat in the new version is random and streaky? It seems my attack strength is over-inflated and the enemy's defense strength is under-valued, leading to disproportionate odds.

Unless I'm doing something wrong, the strength values should be 5.4 vs 4.5, not 7.2 vs 1.66 as shown.

First, you need to take remedial math. A 200% bonus means triple strength, not double strength. A 100% bonus would be double strength.

Second, the combat bug that was introduced in 0.23 is well known and doesn't seem to be a priority. It's MOSTLY a cosmetic issue (arguably) in that the combat log tends to be correct much more often than the displayed odds.
 
Okay, Arathorn's article has cleared up the defender strength.

First, you need to take remedial math. A 200% bonus means triple strength, not double strength. A 100% bonus would be double strength.

Second, the combat bug that was introduced in 0.23 is well known and doesn't seem to be a priority. It's MOSTLY a cosmetic issue (arguably) in that the combat log tends to be correct much more often than the displayed odds.

Oops! Point taken. A 200% bonus would be triple strength. The wonders of playing Civ all night...

However, even triple 2.67 would be 8.01 and not 7.2. Also, according to the article, that is not how attack strength is calculated anyway. While I agree that this may only be a cosmetic issue (assuming that the actual combat still takes place as it should), it is annoying and confusing to the player. I've only played Ffh for a few days, and only on 0.23, so I can't tell if anything is changed from previous versions. It's just that I've seen another thread where some people are trying to make the combat more deterministic and I wanted to point out a possible bug in the odds displayed.
 
1) I have 4 Moroi in a stack and Stack Attack option turned on. When I tried to attack with these four at the same time, with their Burning Blood ability activated, the game goes unresponsive. This doesn't occur if I stack attack with other units or with Moroi when their Burning Blood ability is not activated. The defenders are Bannor Archers and Axemen.

2) Some spells will give all the units in the stack Casted effect if they are cast when more than one unit is selected, even the units which are unable to cast spells, making them all unable to attack on that turn. It's very annoying having to select individual spellcasters from large stacks.
 
Top Bottom