FfH2 Bug Thread

reloadEntity() (at least I think that's the culprit) causes the unit to cease to be IsSelected(). This causes issues like the promotion panel not being updated, or unit selection cycling no longer working (you have to manually click on another unit). Try it out with the Illian assassin and that spell that gives it the Hidden promotion for instance.

To fix the promotion list not being updated, you should move the stuff that causes an entity reload to the end of the :sethasPromotion function. To fix unit cycling, you should gDLL->getInterfaceIFace()->selectUnit(this,?,?,?) after reloadEntity().

This should work (using the 40x SDK files):

Code:
		if (IsSelected())
		{
			gDLL->getInterfaceIFace()->setDirty(SelectionButtons_DIRTY_BIT, true);
			gDLL->getInterfaceIFace()->setDirty(InfoPane_DIRTY_BIT, true);
		}

		//update graphics
		gDLL->getEntityIFace()->updatePromotionLayers(getUnitEntity());

        if (GC.getPromotionInfo(eIndex).getUnitArtStyleType() != NO_UNIT_ARTSTYLE)
        {
            if (iChange > 0)
            {
                setUnitArtStyleType(GC.getPromotionInfo(eIndex).getUnitArtStyleType());
            }
            else
            {
                if (GC.getPromotionInfo(eIndex).getUnitArtStyleType() == getUnitArtStyleType())
                {
                    setUnitArtStyleType(NO_UNIT_ARTSTYLE);
                }
            }
            reloadEntity();
			gDLL->getInterfaceIFace()->selectUnit(this, false, false, false);
        }
        if (GC.getPromotionInfo(eIndex).getGroupSize() != 0)
        {
            if (bNewValue)
            {
                setGroupSize(GC.getPromotionInfo(eIndex).getGroupSize());
            }
            else
            {
                setGroupSize(0);
            }
            reloadEntity();
			gDLL->getInterfaceIFace()->selectUnit(this, false, false, false);
        }

Sorry for the layout mixup. That's because you use four spaces while I use tabs.
 
I apologize for posting about an old version, but it is extremely likely that the error here will continue to the latest version. I'm playing BtS 3.17, FfH II 0.41a.

In the save game, hitting end of turn causes an infinite loop. I did some playing around in the WB, if you eliminate the trireme in the Svartalfar city 'Nameless Tower' in the north of Svart lands, it eliminates the error.

I suspected the Svarts were the culprits (because they are evil - naw, only kidding) because of their proclivity for hidden units. Or I may have gotten lucky.


Best wishes,

Breunor
 

Attachments

reloadEntity() (at least I think that's the culprit) causes the unit to cease to be IsSelected(). This causes issues like the promotion panel not being updated, or unit selection cycling no longer working (you have to manually click on another unit). Try it out with the Illian assassin and that spell that gives it the Hidden promotion for instance.

To fix the promotion list not being updated, you should move the stuff that causes an entity reload to the end of the :sethasPromotion function. To fix unit cycling, you should gDLL->getInterfaceIFace()->selectUnit(this,?,?,?) after reloadEntity().

This should work (using the 40x SDK files):

Code:
		if (IsSelected())
		{
			gDLL->getInterfaceIFace()->setDirty(SelectionButtons_DIRTY_BIT, true);
			gDLL->getInterfaceIFace()->setDirty(InfoPane_DIRTY_BIT, true);
		}

		//update graphics
		gDLL->getEntityIFace()->updatePromotionLayers(getUnitEntity());

        if (GC.getPromotionInfo(eIndex).getUnitArtStyleType() != NO_UNIT_ARTSTYLE)
        {
            if (iChange > 0)
            {
                setUnitArtStyleType(GC.getPromotionInfo(eIndex).getUnitArtStyleType());
            }
            else
            {
                if (GC.getPromotionInfo(eIndex).getUnitArtStyleType() == getUnitArtStyleType())
                {
                    setUnitArtStyleType(NO_UNIT_ARTSTYLE);
                }
            }
            reloadEntity();
			gDLL->getInterfaceIFace()->selectUnit(this, false, false, false);
        }
        if (GC.getPromotionInfo(eIndex).getGroupSize() != 0)
        {
            if (bNewValue)
            {
                setGroupSize(GC.getPromotionInfo(eIndex).getGroupSize());
            }
            else
            {
                setGroupSize(0);
            }
            reloadEntity();
			gDLL->getInterfaceIFace()->selectUnit(this, false, false, false);
        }

Sorry for the layout mixup. That's because you use four spaces while I use tabs.
This would be great to fix. It's a real pain to lose unit selection in those case :mad:
 
I don't remember seeing this, but Fear doesn't work.

I attacked a Specter with my Lucian, he killed it, but afterward I got the "Lucian is too afraid to attack" message.
 
I apologize for posting about an old version, but it is extremely likely that the error here will continue to the latest version. I'm playing BtS 3.17, FfH II 0.41a.

In the save game, hitting end of turn causes an infinite loop. I did some playing around in the WB, if you eliminate the trireme in the Svartalfar city 'Nameless Tower' in the north of Svart lands, it eliminates the error.

I suspected the Svarts were the culprits (because they are evil - naw, only kidding) because of their proclivity for hidden units. Or I may have gotten lucky.


Best wishes,

Breunor

Unfortunately, it isn't that lucky. Not surprisingly, my 'fix' only lasted until the Svartalfar built their next trireme.

Obviously, other people have played games in which the Svartalfar cast their world spell and built ships without crashing. Is there something I can do keep the game from crashing every time they build a ship (and I supect want to load onto it?)

Best wishes,

Breunor

P.S. Ok, I changed the last build Svartalfar trireme to Hidden Nationality. So far no crashes for another 70 turns or so. Fingers crossed!
 
reloadEntity() (at least I think that's the culprit) causes the unit to cease to be IsSelected(). This causes issues like the promotion panel not being updated, or unit selection cycling no longer working (you have to manually click on another unit). Try it out with the Illian assassin and that spell that gives it the Hidden promotion for instance.

To fix the promotion list not being updated, you should move the stuff that causes an entity reload to the end of the :sethasPromotion function. To fix unit cycling, you should gDLL->getInterfaceIFace()->selectUnit(this,?,?,?) after reloadEntity().

This should work (using the 40x SDK files):

Code:
		if (IsSelected())
		{
			gDLL->getInterfaceIFace()->setDirty(SelectionButtons_DIRTY_BIT, true);
			gDLL->getInterfaceIFace()->setDirty(InfoPane_DIRTY_BIT, true);
		}

		//update graphics
		gDLL->getEntityIFace()->updatePromotionLayers(getUnitEntity());

        if (GC.getPromotionInfo(eIndex).getUnitArtStyleType() != NO_UNIT_ARTSTYLE)
        {
            if (iChange > 0)
            {
                setUnitArtStyleType(GC.getPromotionInfo(eIndex).getUnitArtStyleType());
            }
            else
            {
                if (GC.getPromotionInfo(eIndex).getUnitArtStyleType() == getUnitArtStyleType())
                {
                    setUnitArtStyleType(NO_UNIT_ARTSTYLE);
                }
            }
            reloadEntity();
			gDLL->getInterfaceIFace()->selectUnit(this, false, false, false);
        }
        if (GC.getPromotionInfo(eIndex).getGroupSize() != 0)
        {
            if (bNewValue)
            {
                setGroupSize(GC.getPromotionInfo(eIndex).getGroupSize());
            }
            else
            {
                setGroupSize(0);
            }
            reloadEntity();
			gDLL->getInterfaceIFace()->selectUnit(this, false, false, false);
        }

Sorry for the layout mixup. That's because you use four spaces while I use tabs.

Great stuff Maniac, I did have to make one small update otherwise it redirected the selection to any unit that promotes, even if the player doesnt control the unit. Wrapping it in the following resolved the issue:

Code:
            if (GC.getGameINLINE().getActivePlayer() == getOwnerINLINE())
            {
                gDLL->getInterfaceIFace()->selectUnit(this, false, false, false);
            }
 
In my game, the Mirror of Heaven has spawned in the middle of a moutain range, on a mountain tile. Using Huge Erebus map with BtD 3.19 + FFH2 0.41b (same Doviello game as previous post).
 
Thanks, you saved me from having to release two Planetfall patches in short order.

An idea I just had, a feature rather than a bugfix though:

One of the things I hate the most about FfH is the mouse-clicking and micromanagement required for summoning creatures. This selectunit function could probably also be used to automatically switch the selection from the summoner to the summoned. This would change the following procedure:

1) click the spell button to summon a creature, eg a fireball
2) find and click the button of the summoned creature within the plot' unit list, made harder if there are many units on the plot or you don't know by heart the button for the summoned unit
3) attack with the summoned creature

to a simple:

1) click the spell button to summon a creature, eg a fireball
2) attack with the summoned creature

Two quick mouseclicks.
 
We used to do it that way. The problem was that the switch was confusing for people. For example someone would summon a creature and then try to move their caster back to a city, but the automatic switch would cause them move the summon to the city instead.

So its a good idea, and I also thought hat would be the ideal way to handle it from an ease of use prespective. But automatcially switching selected units on the player is bad.
 
Patch "c" is linked in the first post. It won't break save games and fixes the following issues:

1. Into the Desert: fixed an error in the defensive pact assignment when dirage is razed.
2. Fixed an error with trait changes (most commonly seen with the Adaptive or Insane trait changes).
3. Fixed culture growth rates that were changed by 3.19.
4. Civics won't show up on the tech chart if you aren't the civ that requires them (so only the Bannor see that Fanaticism enables Crusade).
5. Fixed a crash that could occur during scenario loads.
6. Fixed an issue that can cause unit selection issues (fix by Maniac).

Patch: Patch "c"
 
Still got the same graphical problem, after re-installing (and re-downloading) ffh twice;the leaderheads are still distorted and the combat animations unusual (characters dont get removed based on unit health). I dont know if it might make a difference, but I installed 0.41 after installing patch 3.19 for civ 4;
 
Still got the same graphical problem, after re-installing (and re-downloading) ffh twice;the leaderheads are still distorted and the combat animations unusual (characters dont get removed based on unit health). I dont know if it might make a difference, but I installed 0.41 after installing patch 3.19 for civ 4;

Im not sure about the unit health issue. But the leaderhead problem requires a redownload of the full mod (not just the latest patch).

Whats the date on your "..\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Mods\Fall from Heaven 2\Assets\Pak0.fpk" file? It should be 5/18/2009.
 
the file says the 17 of may 09

I also noticed that adventurers that where not upgraded to actual units could not explore lairs
 
heck, the file even says it was created and modifed at exactly 5 o'clock, 58 minutes and 22 seconds
 
The FfH2 installer that is currently being supplied via the download link from the first post of this thread is an older version (the 374,664 KB version). Some users were experiencing CtD problems with that version, which were resolved when the newer (376,681 KB) version was made available. Users who download the version currently available may again experience problems which have been resolved in the newer version of the installer.
Repeated for emphasis. The leaderhead problem was also corrected in the 376,681 KB version, which has a Pak0.FPK date of 2009-05-18. The date of the Pak0.FPK file in the currently available version of the installer is 2009-05-17.
 
I dont quite understand wether or not the problem is fixed or will be soon?
 
The problem has been fixed, but in a version of the installer that is currently not available for download. You'll need to wait until the corrected version of the installer is again available, and then redownload and reinstall the Mod.
 
how long until it is expected to be available for download? Its would be nice to know so that I dont download the 'bad' version for a third time.
 
Still got the same graphical problem, after re-installing (and re-downloading) ffh twice;the leaderheads are still distorted and the combat animations unusual (characters dont get removed based on unit health).
Im not sure about the unit health issue. But the leaderhead problem requires a redownload of the full mod (not just the latest patch).
I think it is the problem identified by Xienwolf with iGroupSize from promotioninfo hijacking unitinfo one and vice versa, thus always setting unit to the max size defined in unitinfo. I have rewritten the promotion tag to iGroupSizeChange and it works fine (will release it with new version of Orbis soon).
By the way, I hope you remember to update the source :mischief: Especially that 041b is broken (CvGameCoreDLL.vcproj does not include files added by patch 3.19)
how long until it is expected to be available for download? Its would be nice to know so that I dont download the 'bad' version for a third time.
I thought that the one linked in the first post is the correct one...
 
Back
Top Bottom