Avahz Darkwood
Emperor
I havent look at this one yet, but why was it changed?
11. Switched back to the 0.33 Amurite Wizard model.
11. Switched back to the 0.33 Amurite Wizard model.
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.
I havent look at this one yet, but why was it changed?
11. Switched back to the 0.33 Amurite Wizard model.
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 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)
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...
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.Non of these things are in Fall from Heaven. What version are you looking at?
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);
}
}
}
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);
}
FAssert(m_aiCommerceRate[eIndex] >= 0);
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);
}
}
}
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.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 DLLThen it is quite vital and useful information.
Project
CvGameCoreDLL Properties
Final Debug
Linker
Output file (I changed it to ..\Assets\CvGameCoreDLL.dll)