FfH2 0.33 Bug Thread

Well, the math is wrong anyway. Those calculations are a diminishing 20% of 20%. The actual odds would be a diminishing 20% of 80%, thus the chain would be 20%, 16%, 12.8%, 10.24%, 8.192%, 6.5536%, 5.24288%. Thus total odds of getting any religion at all in a city with all religions present would be 79.02848%.

EDIT: Also noticed while re-writting the function that I was incorrect when I evaluated it before. It is not the FIRST religion listed in the XML which is most likely, it is the LAST listed religion. And the above numbers are not accurate either, slightly.

The reason is that the function does not break when a religion is given to the unit. Thus the unit can actually gain EVERY religion in the city, but each one overwrites the previous one. Thus the 20% isn't applied to a diminishing 80%, it is applied repeatedly to the full 100%. If you win on the final "roll" then you adopt the final listed religion. So for that one it is really a flat 20% chance. For the religion just before that one it is a 20% chance, but then you have to subtract the intersecting set which also wins on the next roll (so 20% of the 20% won't make it, so your result will be 16%... Hrm... Sounds like the above numbers might be valid then, just not for the stated reasoning. Not enough time to run through the rest of the numbers right not, and it no longer applies to me anyway :p)

If any other Modders (or Kael) would like my new function here it is:
Spoiler Code Revision :
To break it down in English first: If you are Agnostic, none of your units will gain a religion. Otherwise, each unit has the Global Define "RELIGION_ADOPTION_CHANCE" (currently 20%, I am wondering if it ought to be increased however to 40%) to gain your state religion. If this check fails, then they have the same chance to gain any religion present in the city (which quite likely includes your state religion). If they succeed on the check for a religion from those present in the city, one is selected at random from the lists).
Code:
/*************************************************************************************************/
/**	Xienwolf Tweak							09/06/08								Xienwolf	**/
/**																								**/
/**						Grants a level playing field for adoption of religions					**/
/*************************************************************************************************/
/**								---- Start Original Code ----									**
                for (int iI = 0; iI < GC.getNumReligionInfos(); iI++)
                {
                    if (isHasReligion((ReligionTypes)iI))
                    {
                        if (pUnit->getReligion() == NO_RELIGION)
                        {
                            if (GC.getGameINLINE().getSorenRandNum(100, "Religion Adoption") <= GC.getDefineINT("RELIGION_ADOPTION_CHANCE"))
                            {
                                pUnit->setReligion(iI);
                            }
                        }
                    }
                }
/**								----  End Original Code  ----									**/
                if (pUnit->getReligion() == NO_RELIGION && !GET_PLAYER(getOwnerINLINE()).isAgnostic())
                {
                    if ((GET_PLAYER(getOwnerINLINE()).getStateReligion() != NO_RELIGION) && (GC.getGameINLINE().getSorenRandNum(100, "Religion Adoption") <= GC.getDefineINT("RELIGION_ADOPTION_CHANCE")))
                        pUnit->setReligion(GET_PLAYER(getOwnerINLINE()).getStateReligion());
                    if (pUnit->getReligion() == NO_RELIGION)
                    {
                        if (GC.getGameINLINE().getSorenRandNum(100, "Religion Adoption") <= GC.getDefineINT("RELIGION_ADOPTION_CHANCE"))
                        {
                            int iRel = GC.getGameINLINE().getSorenRandNum(getReligionCount(), "Religion Adoption");
                            iCount = 0;
                            for (int iI = 0; iI < GC.getNumReligionInfos(); iI++)
                            {
                                if (isHasReligion((ReligionTypes)iI))
                                {
                                    if (iCount == iRel)
                                        pUnit->setReligion(iI);
                                    iCount++;
                                }
                            }
                        }
                    }
                }
/*************************************************************************************************/
/**	Xienwolf Tweak							END													**/
/*************************************************************************************************/
 
With patch g i had two Ctds with naval combats, but it seems it's not reproductible.
 
Ok, I am not sure if this has been reported or not (to lazy to check) but I have a horrible problem... spearmen.

I was playing two games last night, and against multiple civs. So I decided to do something different and try conquering them. So I built an army, fought their cities. Everything was going great until I kill the last combat unit. Then suddenly a spearman with 1 life spawns. I didn't know what it was, so I kept pounding at it with my superior melee forces. It died every single time, but it didn't dissapear from the enemy stack. So eventually I exhausted all my attacks for that turn except for an archer. Only my archer was able to kill this seemingly immortal spearman who only had 1 life/power.

This happened multiple times for multiple cities. I don't know really why or how, because it seemed to happen randomly for different cities.

Also, there was another time I wiped out all the units in a city and the spearman appeared. I attacked til I had was exhausted, then went to next turn. The next turn, I was able to kill the spearman for good with my melee units.

Hope this helps you with some bugs. And atleast the spearman never killed tanks.
 
That's the Horrible Tank-Crushing Spearmen of Death. It's Kael's response to all the whiners who are complaining about the Four Horseman not being deadly enough. It was sechulded for 0.34, but it's power is so high that it's broken free and now is wandering through time and current (old?) versions of FFH and no one can stop him.

The end is night! Run to the hills!
 
Is there any new prerequisites to casting wall of stone? I built an adept, promoted him appropriately but i was not able to cast it in any of my cities.

Also, for some reason i had a confessor and was trying to build an order temple in one of my small cities but i could not do that either.
 
Is there any new prerequisites to casting wall of stone? I built an adept, promoted him appropriately but i was not able to cast it in any of my cities.

Also, for some reason i had a confessor and was trying to build an order temple in one of my small cities but i could not do that either.

install patch g :)
 
Going to war with the Hippus or the Illians is getting to be a true comedy with all the withdrawing and fleeing that they do. :crazyeye:

The listed rates I believe are 25% withdrawal chance and 10% chance to flee.

Does anyone else feel that these rates are understated?

Add in those delightful horsey units with three promotions to withdraw and they never stand and fight.;) I had one battle where the sucker withdrew three times from three of my units and out of range.

Also, I have to say it appears the AI is programmed to grab these type of promotions rather than the higher Combat ones making their units very slippery to catch and kill.
 
I didn't trace down why successfully, but I'm getting unit type NO_UNITCOMBAT in the following code, which causes a problem in getUnitCombatFreeExperience (since it's off the beginning of the "array"). The fix is also below (the new if statement).

Spoiler :
Code:
							int iCityExp = 0;
							iCityExp += pPlotCity->getFreeExperience();
							iCityExp += pPlotCity->getDomainFreeExperience(pLoopUnit->getDomainType());
							// Wiser Orcs start - fix array out of bounds defect
							if (pLoopUnit->getUnitCombatType() != NO_UNITCOMBAT)
							{
								iCityExp += pPlotCity->getUnitCombatFreeExperience(pLoopUnit->getUnitCombatType());
							}
							// Wiser Orcs end
							if (iCityExp > 0)
 
AI workers can build any mana nodes, but they prefer to improve only raw mana and leave any once improved (and later pillaged or destroyed) mana.
Is this correct semantics?
 
I believe you are running into the Brotherhood of Wardens, which spawns defenders for a City where it is present. The Brotherhood can appear in an opponent's city if you raze one of his other cities.

I don't think it couldn have been this, because it was happening with multiple civs, and even durring the first city battle.
 
Ever since the new and shiny media pack, I'm unable to enjoy these spivy movies. If I don't disable movies in the initial screen, the game won't start at all.
Has anything else change apart from their length?

Running with all the latest patches on XP.
 
On advanced start you can place a city on top of the Broken Sepulcher, meaning no Barbatos and a free Death mana. Seems like a bug since you cannot place a city on top of regular mana or other landmarks like the Tomb of Sucellus.

Edit: A city can be placed on top of the Pyre of the Seraphic as well, but this one isn't as big a deal as there is no one guarding it.
 
Apparently you can't see the fighting odds, when attacking a Barbarian Leader with a Shadow (probably all HN Units?!) unless you are in war with the leader or the leader is already at war with the Barbarians.
 
There are problems with the animal logic, including capture, the Doviello world spell and Summon Tiger. Note that I don't know if there is a defect per se here; I merely noted the asserts and that this was closely related to an AI issue I wanted to address anyway for my modmod (the AI players all use the animals just like barbarians). Obviously, if you think a different AI is better for captured animals, use that instead.

Spoiler :
Code:
void CvUnitAI::AI_init(UnitAITypes eUnitAI)
{
	AI_reset(eUnitAI);

	//--------------------------------
	// Init other game data
	AI_setBirthmark(GC.getGameINLINE().getSorenRandNum(10000, "AI Unit Birthmark"));

	FAssertMsg(AI_getUnitAIType() != NO_UNITAI, "AI_getUnitAIType() is not expected to be equal with NO_UNITAI");
	area()->changeNumAIUnits(getOwnerINLINE(), AI_getUnitAIType(), 1);
	GET_PLAYER(getOwnerINLINE()).AI_changeNumAIUnits(AI_getUnitAIType(), 1);
	// Wiser Orcs start - give players animals valid AI
	if (AI_getUnitAIType() == UNITAI_ANIMAL)
	{
		if (!GET_PLAYER(getOwnerINLINE()).isBarbarian())
		{
			AI_setUnitAIType(UNITAI_ATTACK);
		}
	}
	// Wiser Orcs end
}
 
I've done a limited comb-through of this thread and couldn't find anything related...by my apologies if I'm just coming across as brain-addled.........

I was lucky enough to have both the Pyre of the Seraphic and the Tomb of Sucellos both nearby my starting position, both of which my workers made beelines for with roads. However, while the Life mana node immediately made its presence known on the on-screen counter and in my city manager, the Fire mana node fails to show up (even though a mouse-over on the Pyre itself shows it to be connected).

I've little experience with the XML programming, but I'm diligent enough to comb through the Improvements and Bonus files to compare/contrast the Pyre and the Tomb...the only difference between the two seemed to be a tech pre-req of Knowledge of the Ether in order to make use of bonus Fire mana (is this an oversight?). My civ does indeed have the required tech, but still no fire.

As this is my first day posting on here, i'll give it a few days to wait for a response attach a save file later if it becomes necessary.

Thanks in advance for any help you might have!

EDIT: OK, nvm - I did NOT have the Ether tech yet, and once I finished researching, it popped up! This does bring up a n00b question though - why the pre-req for fire and none for life? Are there others I should know about? Does it warrant a blurb in the pedia references saying "allows XXX mana to be connected"?
 
I believe you may also need the tech Elementalism before Fire mana becomes hooked up. Not sure though.
 
Again, if this is already known, my apologies...

There are various tool tips while in the city manager that jump to the right hand side of the screen when they appear...two I'm viewing right now are the worker and the adept (while playing Elohim). Merely an aesthetic thing of course, but odd nonetheless......... :)
 
Top Bottom