1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

FfH2 0.23 Bug Thread

Discussion in 'Civ4 - Fall from Heaven' started by Kael, Jul 13, 2007.

  1. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,177
    Location:
    Kael's head
    I'd prefer the techs granting a free priest rather than first level disciple unit. The found temple ability always works, plus a priest could be useful if you already had the religion in your cities, had already converted, but lacked the prerequisite resource to build your own priests.
     
  2. bcr1776

    bcr1776 Warlord

    Joined:
    Dec 27, 2005
    Messages:
    184
    I have the same problem, if I Cntl-L game and load the same turn again it comes back. Alt-I seems to be defeated in this version.
     
  3. Chandrasekhar

    Chandrasekhar Determined

    Joined:
    Mar 30, 2006
    Messages:
    4,415
    Location:
    Seattle, WA
    Well, the problem with that is that you'd get a priest before you converted to the religion. It'd be way too easy to hit all of the religious techs just to get every divine spell at your disposal.
     
  4. Sureshot

    Sureshot Goddess

    Joined:
    Feb 2, 2006
    Messages:
    3,771
    you get to choose this way. but also, its 100% if you do it in a city that has no religion yet.
     
  5. Calavente

    Calavente Richard's voice

    Joined:
    Jun 4, 2006
    Messages:
    2,803
    Location:
    France
    hmm... it's almost 100%, sometimes it doesn't work, even in no-religion city.
     
  6. Sarisin

    Sarisin Deity

    Joined:
    May 15, 2006
    Messages:
    2,795
    Location:
    NJ
    That's true. I just had it happen in my game yesterday when I sent a Zealot gained from researching OO to a city with no religion. It didn't spread.

    Interestingly, in my game there is a load of barb cities (what else is new), and my Runes of Kilmorph seems to be spreading to ALL of them. ;)
     
  7. Sureshot

    Sureshot Goddess

    Joined:
    Feb 2, 2006
    Messages:
    3,771
    ive never had a religion fail to spread into a city with none lol
     
  8. Calavente

    Calavente Richard's voice

    Joined:
    Jun 4, 2006
    Messages:
    2,803
    Location:
    France
    lucky you!!
     
  9. BeefontheBone

    BeefontheBone Windbag of the sea

    Joined:
    Nov 7, 2005
    Messages:
    2,018
    Not lucky, I'm positive that's how it's coded. It's very small for a city with 1 in it, then increases pretty quick.
     
  10. Dora190

    Dora190 Warlord

    Joined:
    Oct 17, 2006
    Messages:
    132
    Built the baron and sent him on a killing spree, but despite numerous kills he has failed to raise a single werewolf. Wondering if this is just me or a bug.
     
  11. TheBoatman

    TheBoatman Warlord

    Joined:
    Nov 6, 2005
    Messages:
    298
    By any chance, did he have hidden nationality? HN prevents creating new werewolves.
     
  12. Dora190

    Dora190 Warlord

    Joined:
    Oct 17, 2006
    Messages:
    132
    Oh Bugger! Yup thats it....
     
  13. xanaqui42

    xanaqui42 King

    Joined:
    Sep 5, 2006
    Messages:
    780
    Here is an apparent Vanilla defect. Essentially, if you try to trade away bonus resources (from buildings), the call to this function's iChange is -1, even if m_paiNumBonuses[eIndex] == 0. This causes several problems, the least of which is an assert (if asserts are on). The following code seems to fix it; note that this breaks saved games:

    Spoiler :
    Code:
    void CvCity::changeNumBonuses(BonusTypes eIndex, int iChange)
    {
    	bool bOldHasBonus;
    
    	FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
    	FAssertMsg(eIndex < GC.getNumBonusInfos(), "eIndex expected to be < GC.getNumBonusInfos()");
    
    	if (iChange != 0)
    	{
    		bOldHasBonus = hasBonus(eIndex);
    		// Smarter Orcs start - patch for number of bonuses.
    		if ((iChange > 0) && (m_paiFreeBonus[eIndex] < m_paiMaxFreeBonus[eIndex]))
    		{	
    			m_paiFreeBonus[eIndex] += iChange;
    		}
    		else
    		{
    			m_paiNumBonuses[eIndex] = (m_paiNumBonuses[eIndex] + iChange);
    		}
    		if (m_paiNumBonuses[eIndex] < 0)
    		{
    			if (m_paiFreeBonus[eIndex] > 0)
    			{
    				m_paiFreeBonus[eIndex] += m_paiNumBonuses[eIndex];
    				m_paiNumBonuses[eIndex] = 0; // for breakpoint.
    			}
    		}
    		// Smarter Orcs end
    		if (bOldHasBonus != hasBonus(eIndex))
    		{
    			if (hasBonus(eIndex))
    			{
    				processBonus(eIndex, 1);
    			}
    			else
    			{
    				processBonus(eIndex, -1);
    			}
    		}
    	}
    }
    
    void CvCity::read(FDataStreamBase* pStream)
    .
    .
    .
    	pStream->Read(GC.getNumBonusInfos(), m_paiMaxFreeBonus); // Smarter Orcs
    
    void CvCity::write(FDataStreamBase* pStream)
    .
    .
    .
    	pStream->Write(GC.getNumBonusInfos(), m_paiMaxFreeBonus); // Smarter Orcs
    
    CvCity::CvCity()
    .
    .
    .
    	m_paiMaxFreeBonus = NULL; // Smarter Orcs
    
    void CvCity::uninit()
    .
    .
    .
    	SAFE_DELETE_ARRAY(m_paiMaxFreeBonus); // Smarter Orcs
    
    void CvCity::reset(int iID, PlayerTypes eOwner, int iX, int iY, bool bConstructorCall)
    .
    .
    .
    	if (!bConstructorCall)
    	{
    		FAssertMsg((0 < GC.getNumBonusInfos()),  "GC.getNumBonusInfos() is not greater than zero but an array is being allocated in CvCity::reset");
    		m_paiFreeBonus = new int[GC.getNumBonusInfos()];
    		m_paiMaxFreeBonus = new int[GC.getNumBonusInfos()]; // Smarter Orcs
    		m_paiNumBonuses = new int[GC.getNumBonusInfos()];
    
    void CvCity::changeFreeBonus(BonusTypes eIndex, int iChange)
    {
    	FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
    	FAssertMsg(eIndex < GC.getNumBonusInfos(), "eIndex expected to be < GC.getNumBonusInfos()");
    
    	if (iChange != 0)
    	{
    		plot()->updatePlotGroupBonus(false);
    		m_paiFreeBonus[eIndex] = (m_paiFreeBonus[eIndex] + iChange);
    		m_paiMaxFreeBonus[eIndex] += iChange; // Smarter Orcs
    		FAssert(getFreeBonus(eIndex) >= 0);
    		plot()->updatePlotGroupBonus(true);
    	}
    }
    
    In CvCity.h:
    	int* m_paiMaxFreeBonus; // Smarter Orcs
    
     
  14. TheBoatman

    TheBoatman Warlord

    Joined:
    Nov 6, 2005
    Messages:
    298
    This should go to FAQ. It is asked too often.
     
  15. Horacio

    Horacio Chieftain

    Joined:
    May 26, 2006
    Messages:
    35
    Location:
    Germany
    I do not know if it has been reported before.

    I had Typhoid Mary defeat an opponent (she attacked) and after she won she got herself plagued!!! :confused:

    And since I did not have a chance to heal her at that time, I lost her to her own plague.
     
  16. xanaqui42

    xanaqui42 King

    Joined:
    Sep 5, 2006
    Messages:
    780
    However, the combat odds code (which is the most visible indicator of if combat odds is working) doesn't. Here's a reference to my detailed post on the topic. The short form is that it seems that the change made to getCombatOdds during 0.23 is erroneous.

    Note that I have a comment on this later.
     
  17. vorshlumpf

    vorshlumpf Emperor

    Joined:
    Dec 5, 2003
    Messages:
    1,096
    Location:
    Victoria, BC, Canada
    I've also noticed that you can get slightly different combat odds when you are more than one space away from your target than if you are adjacent.
     
  18. xanaqui42

    xanaqui42 King

    Joined:
    Sep 5, 2006
    Messages:
    780
    The above is somewhat erroneous. While reverting this change during 0.23 will give you corrected combat odds (i.e. the odds will match how combat works), it won't allow the defender's resistances to be taken into account (which I think is why this change was made in the first place; the problem is that it doesn't look like it can work correctly). I'll work on a fix, and post the solution I come up with here.
     
  19. Calavente

    Calavente Richard's voice

    Joined:
    Jun 4, 2006
    Messages:
    2,803
    Location:
    France
    couldn't it be the opposite ??
    ie : make the combat match the combat odds ... :)

    because having a lvl (many) str (many) having 99,9 against a spearman and loosing (uncorrected) or having 0.01% (combat odds match combat) changes nothing :)

    the issue is that it should be 99.9 and almost never loose.

    from what I gathered, the issue seems to be more about the combat calculation itself than odd's calculation...

    but maybe I'm totally off.
     
  20. Gabriel21

    Gabriel21 Warlord

    Joined:
    Jun 5, 2007
    Messages:
    207
    Yes, it's annonying indeed. You check it and getting close you always find lower odds. I cannot find a reasonable priniciple in this.
     

Share This Page