FfH2 0.33 Bug Thread

Don't really have time to go through the threads to see if this was mentioned, but for some reason, the Loki Puppets (when Balseraphs civ is AI), gain turn durations each proceeding turn instead of decreasing the duration.:confused:
 
This might explain it:
Snipped.....
The python prereq also makes it not work on Magic Immune units, so you can't mirror Luonnatar or Dragons either.


Ok I am now convinced that MC and Kael are one in the same person :eek: That response was WAY to fast and to know exactly were to look copy and past.... Yin and Yang, Light and Darkness......:run:

Edit: That would also explain why MC's Mod Mod never gets finished but Kaels do.... :)
 
I havent look at this one yet, but why was it changed?

11. Switched back to the 0.33 Amurite Wizard model.

The long boring answer is:

I switched to an updated Amurite Wizard model. Its very cool, made by seZ and I like it. But there was an effect of holding and throwing a fireball that a few units use. That effect actually came from the old Amurite Wizard model. Thats why Clan Adepts attacking (and others) were causing crashes.

So I put the old amurite wizard model back to stop the crashes. But now that I have time to do it right I pulled out the effect, placed it in its own directory for all the units that use it. Then switched the model up to the new one.
 
Patch "e" is linked in the first post. It wont break saves and fixes the following issues:

1. Fixed an issue attaching Great Commanders.
2. Fixed an issue with forced civ on upgrade and the assimilation function ot playing nice together (ogres everywhere! fixed by Xienwolf).
3. Fixed a potential spinlock in CvUnitAI::AI_unitUpdate (fixed by xanaqui42).
4. Fixed a potential crash in CvUnit::healRate (fixed by xanaqui42).
5. Fixed a potential crash in CvUnit::changeExtraEnemyHeal (fixed by xanaqui42).
6. Fixed a potential crash in CvUnit::changeExtraNeutralHeal (fixed by xanaqui42).
7. Fixed a potential crash in CvUnit::changeExtraFriendlyHeal (fixed by xanaqui42).
8. Fixed a potential crash in the redundantly named CvPlayer::changeImprovementYieldChange (fixed by xanaqui42).
9. Fixed a potential crash in CvPlayer::recieveGoody (fixed by xanaqui42).
10. Wonder created Trents, Krakens and Tigers will no longer be permanent.
11. Switched back to the 0.33 Amurite Wizard model.
12. Fixed an WoC error caused by worker units with extra strength (from items are what not) getting confused.
 
Ooh, a little thing I noticed: Black Shields are supposedly world units, but in my game (started with "c") there are at least two...
Here's my suspicion: one was on an island the Bannor had influence on, but never got around to retrieve it. Later the Ljosalfar founded a city on the island, substituting their influence but not taking control of the shield. Time passed, and I saw a stack of elves including the shield. I checked, and the Bannor one was still there...
 
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.

I think it makes more sense to use the second unit, but instead of having the trigger to get the real Brigit be moving onto the square and swapping, instead just have it be moving onto the square.

This makes it more obvious to newer players what, exactly, might happen when they move onto the square.
 
I think that the below report is from older code... I'm verifying...
Spoiler :
RELIGION_CULT_OF_THE_DRAGON no longer exists. However, it's still in the code. Suggested fixes:

onUnitBuilt

Old code:
Code:
		if (unit.getUnitType() == gc.getInfoTypeForString('UNIT_ABASHI') or unit.getUnitType() == gc.getInfoTypeForString('UNIT_EURABATRES')):
			if CyGame().isReligionFounded(gc.getInfoTypeForString('RELIGION_CULT_OF_THE_DRAGON')) == False:
				city.setHasReligion(gc.getInfoTypeForString('RELIGION_CULT_OF_THE_DRAGON'), true, true, true)
				CyGame().setHolyCity(gc.getInfoTypeForString('RELIGION_CULT_OF_THE_DRAGON'), city, True)

Suggested fix:
Code:
#Wiser Orcs start - Cult of the Dragon is a Corporation, not a religion
		if (unit.getUnitType() == gc.getInfoTypeForString('UNIT_ABASHI') or unit.getUnitType() == gc.getInfoTypeForString('UNIT_EURABATRES')):
			if CyGame().[B]isCorporationFounded(gc.getInfoTypeForString('CORPORATION_CULT_OF_THE_DRAGON'))[/B] == False:
				pCity.[B]setHasCorporation(gc.getInfoTypeForString('CORPORATION_CULT_OF_THE_DRAGON')[/B], True, True, True)
				CyGame().[B]setHeadquarters(gc.getInfoTypeForString('CORPORATION_CULT_OF_THE_DRAGON')[/B], city, True)
#Wiser Orcs end

onCityDoTurn

Old code:
Code:
		if (pCity.isHasReligion(gc.getInfoTypeForString('RELIGION_CULT_OF_THE_DRAGON')) and pPlayer.getCivilizationType() != gc.getInfoTypeForString('CIVILIZATION_KURIOTATES') and pPlayer.getCivilizationType() != gc.getInfoTypeForString('CIVILIZATION_SHEAIM')):
			pCity.changeCulture(pCity.getOwner(), -2, True)

Suggested fix:
Code:
		if (pCity.[B]isHasCorporation(gc.getInfoTypeForString('CORPORATION_CULT_OF_THE_DRAGON'))[/B] and pPlayer.getCivilizationType() != gc.getInfoTypeForString('CIVILIZATION_KURIOTATES') and pPlayer.getCivilizationType() != gc.getInfoTypeForString('CIVILIZATION_SHEAIM')):
			pCity.changeCulture(pCity.getOwner(), -2, True)

Non of these things are in Fall from Heaven. What version are you looking at?
 
GEEEZ! whoa man... I didn't see that new patch quickly enough... but then again these patches I can hardly keep up with... my only issue is... and I don't know if it's a bug or not it's just that when I go to load up a new game after playing one game... that I get a memory allocation failure every time... either this is the mod itself or it's the game itself... I'm not sure...
 
GEEEZ! whoa man... I didn't see that new patch quickly enough... but then again these patches I can hardly keep up with... my only issue is... and I don't know if it's a bug or not it's just that when I go to load up a new game after playing one game... that I get a memory allocation failure every time... either this is the mod itself or it's the game itself... I'm not sure...

it's a civ4 issue when playing on huge maps
 
Non of these things are in Fall from Heaven. What version are you looking at?
A file I accidentally merged in from a very old version of FfH II (0.25?). Apologies; I noted the problem minutes after the original post.

If you like removing spurious asserts, the bolded assert below will trigger for any negative building commerce (Market is an example).

Spoiler :
Code:
void CvCity::updateBuildingCommerce()
{
	int iNewBuildingCommerce;
	int iI, iJ;

	for (iI = 0; iI < NUM_COMMERCE_TYPES; iI++)
	{
		iNewBuildingCommerce = 0;

		for (iJ = 0; iJ < GC.getNumBuildingInfos(); iJ++)
		{
			iNewBuildingCommerce += getBuildingCommerceByBuilding(((CommerceTypes)iI), ((BuildingTypes)iJ));
		}

		if (getBuildingCommerce((CommerceTypes)iI) != iNewBuildingCommerce)
		{
			m_aiBuildingCommerce[iI] = iNewBuildingCommerce;
[B]			FAssert(getBuildingCommerce((CommerceTypes)iI) >= 0);[/B]

			updateCommerce((CommerceTypes)iI);
		}
	}
}

There's a similar issue in the #ifdef _DEBUGbranch of CvCity::doTurn:

Spoiler :
Code:
		for (iI = 0; iI < NUM_COMMERCE_TYPES; iI++)
		{
[B]			FAssert(getBuildingCommerce((CommerceTypes)iI) >= 0);[/B]
			FAssert(getSpecialistCommerce((CommerceTypes)iI) >= 0);
			FAssert(getReligionCommerce((CommerceTypes)iI) >= 0);
			FAssert(getCorporationCommerce((CommerceTypes)iI) >= 0);
			FAssert(GET_PLAYER(getOwnerINLINE()).getFreeCityCommerce((CommerceTypes)iI) >= 0);
		}
 
Relatively certain that the Assert hunting is mildly pointless. Those are just bonus textkey/popup information for when you are running a Debug DLL, which I am not sure anyone has ever done with FfH. They cannot cause crashes or errors in and of themselves (unless they manage to make a call on a null pointer, but few actually make calls, as they are generally written to point out null pointers)

Unless of course you actually do manage to make a Debug DLL :) Then it is quite vital and useful information.
 
I'm not certain what's desired here, so I'll give you what happened. I got an assert in CvCity::updateCommerce
Code:
FAssert(m_aiCommerceRate[eIndex] >= 0);

The reason is that the player has a 90% research rate with a market (-1 research), which ends up with

getCommerceFromPercent(eIndex, getYieldRate(YIELD_COMMERCE) * 100)

Returning 90 and

getBuildingCommerce(eIndex)

Returning -1, so

CvCity::getBaseCommerceRateTimes100

Returns -10

This means that in CvCity::updateCommerce,

m_aiCommerceRate[COMMERCE_RESEARCH] = -10

Which gives the assert.

There are two solutions:

1) Remove the assert and hope or check that negative values in the field aren't a problem.
2) Force iNewCommerce to a minimum of 0 prior to the set. The second is shown below.

Really, it comes down to if you want cities to be able to produce negative commerce.
Spoiler :
Code:
void CvCity::updateCommerce(CommerceTypes eIndex)
{
	int iOldCommerce;
	int iNewCommerce;

	FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
	FAssertMsg(eIndex < NUM_COMMERCE_TYPES, "eIndex expected to be < NUM_COMMERCE_TYPES");

	iOldCommerce = m_aiCommerceRate[eIndex];

	if (isDisorder())
	{
		iNewCommerce = 0;
	}
	else
	{
		iNewCommerce = (getBaseCommerceRateTimes100(eIndex) * getTotalCommerceRateModifier(eIndex)) / 100;
		iNewCommerce += getYieldRate(YIELD_PRODUCTION) * getProductionToCommerceModifier(eIndex);
	}

	if (iOldCommerce != iNewCommerce)
	{
[B]		// Wiser Orcs start - minimum comerce of 0
		if (iNewCommerce < 0)
		{
			iNewCommerce = 0;
		}
		// Wiser Orcs end[/B]
		m_aiCommerceRate[eIndex] = iNewCommerce;
		FAssert(m_aiCommerceRate[eIndex] >= 0);

		GET_PLAYER(getOwnerINLINE()).invalidateCommerceRankCache(eIndex);

		GET_PLAYER(getOwnerINLINE()).changeCommerceRate(eIndex, (iNewCommerce - iOldCommerce));

		if (isCitySelected())
		{
			gDLL->getInterfaceIFace()->setDirty(InfoPane_DIRTY_BIT, true );
			gDLL->getInterfaceIFace()->setDirty(CityScreen_DIRTY_BIT, true);
		}
	}
}
 
Relatively certain that the Assert hunting is mildly pointless. Those are just bonus textkey/popup information for when you are running a Debug DLL, which I am not sure anyone has ever done with FfH. They cannot cause crashes or errors in and of themselves (unless they manage to make a call on a null pointer, but few actually make calls, as they are generally written to point out null pointers)

Unless of course you actually do manage to make a Debug DLL :) Then it is quite vital and useful information.
I'm running a Debug DLL for all my internal testing; I've been assuming that anyone working on the C++ code with Visual Studio is doing the same.

If you aren't doing a debug build, I think all you have to do is:
Code:
Project
  CvGameCoreDLL Properties
    Final Debug
      Linker
        Output file (I changed it to ..\Assets\CvGameCoreDLL.dll)

Then change your default build to Final Debug, and rebuild.

If you'd prefer (or the above doesn't work), I can give you the appropriate files (or you can just take them yourself from my project's code).

Note that in debug, the dlls are far larger; I wouldn't recommend them for release.

You are correct that asserts don't cause crashes in and of themselves, unless they are enabled, and contain an expression that crashes. They are useful, however, for debugging, and spurious asserts make that harder (since you have to ignore the spurious ones, but pay attention to the non-spurious ones).
 
Yeah, I wanted to make a debug DLL once a while back, but I use Codeblocks and Kael's lovely walkthrough to set it up didn't quite do the trick for getting a debug out of the thing (that I could figure out). Been too lazy/hesitant to set up another C++ compiler just in case I break something with my current rig and can't code ;)
 
View attachment 186916

Got a WOC first. Went out and reloaded, then got a CTD. It is a .33e save.

Repeated several times and more CTDs.

NOTE: I did unselect UAC in Vista, but still have the problem I noted in the Troubleshooting thread on voice capture. See below:

-------------

I just bought a new computer that should improve the performance of FFH2 - better processor, 4gb RAM, 512 mb ATI card, etc. However, after loading all the software, mods, patches, add-ons, etc. (I should mention I now have Vista Home Premium vs. my old XP) I have run into two problems:

1. Whenever I start up FFH2 I get the following popup box:

INVALID DEVICE: You have selected an unstable voice capture device. Voice capture disabled.

OK, I don't even know what voice capture is or whether you need it in FFH2. I never saw anything like this before. I wouldn't mind just clicking the box to make it go away, but it hangs for about a minute before eventually leaving.

How do I solve this problem?

2. About 10 turns into my game (I copied my saved game from my old machine), I get a box apologizing for an 'inconvenience' and that Beyond the Sword must shut down. I restart the game, get another 10 or so turns, and same thing.

Is this related to the Vista UAC issue? Should I just turn that off? I guess you pick your poison, because in turning it off, you get a nag constantly about your security not being adequate or whatever.

What's the best way to fix this?

Thanks.
 
Hello everyone. Downloaded all the file. try to play and get error message. stated that failed to initiated control feature. what did i missing ? downloaded 4 files the new.033 media pack, the .033 patch e, Fall further setup 042 and fall further 042 patch. Please help
 
you need to download the main FFH mod first, 2.033 (it's pretty big, a couple 100 mb's, link to main mod). Then apply the patch over that mod file, then install fall further, then install the fall further patch. Media pack can be applied during any of the previous phases, AFTER you've installed the main mod
 
Back
Top Bottom