Modders Guide to FfH2

The source code in the first post is updated to patch "c".
 
It's possible to merge those messages
"~ Your <mighty_unit> has destroyed <i_don't_know_who> while defending".
"~ Your forces are under attack by <some_idiot>."

to only this
"~ Your <mighty_unit> has destroyed <some_idiot>'s <i_don't_know_who> while defending."
?? I didn't find it in python ... ):
 
Has to be changed in the DLL, but a fairly simple change if you are set up to compile the DLL yourself already. Just delete this lines in CvUnit::updateCombat

Code:
			else
			{
				PlayerTypes eAttacker = getVisualOwner(pDefender->getTeam());
				CvWString szMessage;
				if (BARBARIAN_PLAYER != eAttacker)
				{
					szMessage = gDLL->getText("TXT_KEY_MISC_YOU_UNITS_UNDER_ATTACK", GET_PLAYER(getOwnerINLINE()).getNameKey());
				}
				else
				{
					szMessage = gDLL->getText("TXT_KEY_MISC_YOU_UNITS_UNDER_ATTACK_UNKNOWN");
				}

				gDLL->getInterfaceIFace()->addMessage(pDefender->getOwnerINLINE(), true, GC.getEVENT_MESSAGE_TIME(), szMessage, "AS2D_COMBAT", MESSAGE_TYPE_DISPLAY_ONLY, getButton(), (ColorTypes)GC.getInfoTypeForString("COLOR_RED"), pPlot->getX_INLINE(), pPlot->getY_INLINE(), true);
			}

And again in CvUnit::attackForDamage

Code:
		else
		{
			PlayerTypes eAttacker = getVisualOwner(pDefender->getTeam());
			CvWString szMessage;
			if (BARBARIAN_PLAYER != eAttacker)
			{
				szMessage = gDLL->getText("TXT_KEY_MISC_YOU_UNITS_UNDER_ATTACK", GET_PLAYER(getOwnerINLINE()).getNameKey());
			}
			else
			{
				szMessage = gDLL->getText("TXT_KEY_MISC_YOU_UNITS_UNDER_ATTACK_UNKNOWN");
			}

			gDLL->getInterfaceIFace()->addMessage(pDefender->getOwnerINLINE(), true, GC.getEVENT_MESSAGE_TIME(), szMessage, "AS2D_COMBAT", MESSAGE_TYPE_DISPLAY_ONLY, getButton(), (ColorTypes)GC.getInfoTypeForString("COLOR_RED"), pPlot->getX_INLINE(), pPlot->getY_INLINE(), true);
		}
 
Are there special requirements for the promotion tag that gives XP to casters? I used that tag to give a version of "Aptitude" as in Xienwolf's mod but it doesn't seem to give the units who get it XP. I didn't see anything else checked, but I could have missed it.
 
Did you set FreeXp to 1 in the unitinfo? That's what I forgot to do when first using Aptitude.
 
Ahh, I wasn't sure if the unit needed a tag of some sort, I didn't see one. Thanks!
 
A unit must have <bFreeXP>1</bFreeXP> in order to get free xp from promotions (channeling, etc.)


Xienwolf used to have another promotion tag in his xml modcomp/FF that would make a unit without <bFreeXP> still get free xp (which he used for aptitude), but I don't see that tag anymore.
 
It can't be restored in python. It is a SDK change, so you will have to recompile the DLL. The change itself, however, is very simple. Go to CvUnit.cpp, find bool CvUnit::canGift(bool bTestVisible, bool bTestTransport), delete (or comment out) the return false; Kael placed in the beginning of this function, save, and recompile.
 
Waiting for other Civilizations. It is a bug caused by indecisive AI's, usually if their reasoning gets caught in infinite loops.
 
For some reason, this code says in the Civilopedia that this spell will add + 1 population to the city it is cast in but <iChangePopulation>0</iChangePopulation> is 0 so I'm not sure what I'm missing.
Spoiler :
Code:
        <SpellInfo>
            <Type>SPELL_TACTICS1</Type>
            <Description>TXT_KEY_SPELL_TACTICS1</Description>
            <Civilopedia>TXT_KEY_SPELL_PLACEHOLDER_PEDIA</Civilopedia>
            <Strategy></Strategy>
            <Help></Help>
            <PromotionPrereq1></PromotionPrereq1>
            <PromotionPrereq2></PromotionPrereq2>
            <UnitPrereq></UnitPrereq>
            <UnitClassPrereq></UnitClassPrereq>
            <UnitCombatPrereq></UnitCombatPrereq>
            <UnitInStackPrereq></UnitInStackPrereq>
            <BuildingPrereq>BUILDING_TRAINING_CENTER</BuildingPrereq>
            <BuildingClassOwnedPrereq></BuildingClassOwnedPrereq>
            <CivilizationPrereq></CivilizationPrereq>
            <CorporationPrereq></CorporationPrereq>
            <FeatureOrPrereq1></FeatureOrPrereq1>
            <FeatureOrPrereq2></FeatureOrPrereq2>
            <ImprovementPrereq></ImprovementPrereq>
            <PromotionInStackPrereq></PromotionInStackPrereq>
            <ReligionPrereq></ReligionPrereq>
            <StateReligionPrereq></StateReligionPrereq>
            <TechPrereq></TechPrereq>
            <bAllowAI>1</bAllowAI>
            <bAdjacentToWaterOnly>0</bAdjacentToWaterOnly>
            <bCasterMustBeAlive>0</bCasterMustBeAlive>
            <bCasterNoDuration>0</bCasterNoDuration>
            <bCausesWar>0</bCausesWar>
            <bGlobal>0</bGlobal>
            <bInBordersOnly>1</bInBordersOnly>
            <bInCityOnly>1</bInCityOnly>
            <bPrereqSlaveTrade>0</bPrereqSlaveTrade>
            <iAIWeight>15</iAIWeight>
            <iCasterMinLevel>0</iCasterMinLevel>
            <bDisplayWhenDisabled>0</bDisplayWhenDisabled>
            <bHasCasted>1</bHasCasted>
            <bIgnoreHasCasted>0</bIgnoreHasCasted>
            <bResistable>0</bResistable>
            <iRange>0</iRange>
            <iResistModify>0</iResistModify>
            <iDamage>0</iDamage>
            <iDamageLimit>0</iDamageLimit>
            <DamageType></DamageType>
            <AddPromotionType1>PROMOTION_TACTICS1</AddPromotionType1>
            <AddPromotionType2></AddPromotionType2>
            <AddPromotionType3></AddPromotionType3>
            <RemovePromotionType1></RemovePromotionType1>
            <RemovePromotionType2></RemovePromotionType2>
            <RemovePromotionType3></RemovePromotionType3>
            <bBuffCasterOnly>1</bBuffCasterOnly>
            <ConvertUnitType></ConvertUnitType>
            <CreateBuildingType></CreateBuildingType>
            <CreateFeatureType></CreateFeatureType>
            <CreateImprovementType></CreateImprovementType>
            <SpreadReligion></SpreadReligion>
            <CreateUnitType></CreateUnitType>
            <iCreateUnitNum>0</iCreateUnitNum>
            <bCopyCastersPromotions>0</bCopyCastersPromotions>
            <bPermanentUnitCreate>0</bPermanentUnitCreate>
            <CreateUnitPromotion></CreateUnitPromotion>
            <bImmuneTeam>0</bImmuneTeam>
            <bImmuneNeutral>0</bImmuneNeutral>
            <bImmuneEnemy>0</bImmuneEnemy>
            <bImmuneFlying>0</bImmuneFlying>
            <bImmuneNotAlive>0</bImmuneNotAlive>
            <bDispel>0</bDispel>
            <bPush>0</bPush>
            <bRemoveHasCasted>0</bRemoveHasCasted>
            <bSacrificeCaster>0</bSacrificeCaster>
            <iChangePopulation>0</iChangePopulation>
            <iCost>0</iCost>
            <iDelay>10</iDelay>
            <iImmobileTurns>0</iImmobileTurns>
            <iMiscastChance>0</iMiscastChance>
            <PyMiscast></PyMiscast>
            <PyResult></PyResult>
            <PyRequirement></PyRequirement>
            <Effect>NONE</Effect>
            <Sound>AS3D_SPELL_COMMANDER_JOIN</Sound>
            <HotKey></HotKey>
            <bAltDown>0</bAltDown>
            <bShiftDown>0</bShiftDown>
            <bCtrlDown>0</bCtrlDown>
            <bGraphicalOnly>0</bGraphicalOnly>
            <iHotKeyPriority>0</iHotKeyPriority>
            <Button>,Art/Interface/Buttons/Promotions/Combat5.dds,Art/Interface/Buttons/Warlords_Atlas_1.dds,6,16</Button>
        </SpellInfo>
 
Not seeing where the issue is either. Mildly odd. Is the rest of the XML data correct for the spell, and that of the neighboring entries in the Pedia/XML?


While reviewing the XML for that, it dawned on me that <bPrereqSlaveTrade> would have been better used as a <PrereqResolution> tag, where you enter the TXT_KEY Type of the resolution you want as a prereq. Then you could readily create more resolutions which enable spells for the council members (like something for anti-Demon/Undead to the Overcouncil)
 
Not seeing where the issue is either. Mildly odd. Is the rest of the XML data correct for the spell, and that of the neighboring entries in the Pedia/XML?


While reviewing the XML for that, it dawned on me that <bPrereqSlaveTrade> would have been better used as a <PrereqResolution> tag, where you enter the TXT_KEY Type of the resolution you want as a prereq. Then you could readily create more resolutions which enable spells for the council members (like something for anti-Demon/Undead to the Overcouncil)

Yeah, other than the four spells that I added, everything else is ok. I managed to fix it by adding -1 to the popchange field but that's strange because everything else works with 0. I did copy it from the Add_to_City code but I have no idea why it would persist after changing the proper values.
 
When I move cursor on middlesized stack it shows me something like that:
<Nation> <Unit>, <Promotion list>, <Str, move>
<Nation> <Unit>, <Promotion list>, <Str, move>
...
Grigori Hunter, CombatIII, 4Str, 2Move

But behind some treshold it changes view to this:
<Count> <Nation> <Unit>, <Combat1 icon>:5 <Combat2 icon>:4 <Combat3 icon>:3, etc...
10 Grigori Hunter, c1: 5, c2: 4, c3:3
15 Grigori Adept, Fire1: 10, Spirit1:7

Is there any possibility of forcing the second view?
 
Just wondering if the source for patch F would be posted or not. Reasonably certain that at least 2 of those fixes required DLL work.

Sorry, I forgot about it. Its linked in the first post.
 
Back
Top Bottom