WarKirby
Arty person
The sabathiel_CIV4UnitSpellSchema file is missing. I added it and it worked.
FFFFFFFFFFFF-

I thought it used the unit schema like promotions do.
Feels stupid now.
The sabathiel_CIV4UnitSpellSchema file is missing. I added it and it worked.

The research you gain will be toward the TechPrereq of the unit you killed or any promotions on the unit. It is meant as a "reverse engineering" concept, so you won't wind up learning Omniscience after killing a warrior.

if pPlayer.getLeaderType() == gc.getInfoTypeForString('LEADER_RISEN_EMPEROR'):
city.setNumRealBuilding(gc.getInfoTypeForString('BUILDING_EMPERORS_MARK'), 1)
The Emperor's mark is in def OnCityBuilt in CvEventManager.py.
Code:if pPlayer.getLeaderType() == gc.getInfoTypeForString('LEADER_RISEN_EMPEROR'): city.setNumRealBuilding(gc.getInfoTypeForString('BUILDING_EMPERORS_MARK'), 1)



So stupid, forgot to change the spell name from another doing the same without the beaker gain!![]()

<UnitInfo> <!-- Beastmaster -->
<Class>UNITCLASS_DOVIELLO_WEREWOLF</Class>
<Type>UNIT_DOVIELLO_WEREWOLF</Type>
<Combat>UNITCOMBAT_BEAST</Combat>
<DefaultUnitAI>UNITAI_EXPLORE</DefaultUnitAI>
<SeeInvisible>INVISIBLE_ANIMAL</SeeInvisible>
<Description>TXT_KEY_UNIT_DOVIELLO_WEREWOLF</Description>
<Civilopedia>TXT_KEY_UNIT_PLACEHOLDER_PEDIA</Civilopedia>
<Strategy>TXT_KEY_UNIT_WEREWOLF_STRATEGY</Strategy>
<Advisor>ADVISOR_GROWTH</Advisor>
<bMilitaryHappiness>1</bMilitaryHappiness>
<bMilitarySupport>1</bMilitarySupport>
<bMilitaryProduction>1</bMilitaryProduction>
<UnitAIs>
<UnitAI>
<UnitAIType>UNITAI_ATTACK</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
<UnitAI>
<UnitAIType>UNITAI_PILLAGE</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
</UnitAIs>
<PrereqTech>TECH_ANIMAL_MASTERY</PrereqTech>
<iCost>400</iCost>
<iMoves>3</iMoves>
<iCombat>11</iCombat>
<iCityAttack>-20</iCityAttack>
<iAsset>16</iAsset>
<iPower>33</iPower>
<UnitMeshGroups>
<iGroupSize>3</iGroupSize>
<iMeleeWaveSize>3</iMeleeWaveSize>
<iRangedWaveSize>0</iRangedWaveSize>
<UnitMeshGroup>
<iRequired>1</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_DUIN</EarlyArtDefineTag>
</UnitMeshGroup>
<UnitMeshGroup>
<iRequired>1</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_GREATER_WEREWOLF</EarlyArtDefineTag>
</UnitMeshGroup>
<UnitMeshGroup>
<iRequired>1</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_GREATER_WEREWOLF</EarlyArtDefineTag>
</UnitMeshGroup>
</UnitMeshGroups>
<FreePromotions>
<FreePromotion>
<PromotionType>PROMOTION_WEREWOLF</PromotionType>
<bFreePromotion>1</bFreePromotion>
</FreePromotion>
</FreePromotions>
<iTier>4</iTier>
<UnitCreateFromCombat>UNIT_RAVENOUS_WEREWOLF</UnitCreateFromCombat>
<iUnitCreateFromCombatChance>75</iUnitCreateFromCombatChance>
</UnitInfo>
Ugh. Trying to add a Baron only Hero, Varulv. Got him in game, only Baron can build him, everything works... Except for the werewolf part. He stubbornly refuses to create werewolves from combat... What am I doing wrong?
Code:<UnitInfo> <!-- Varulv --> <Class>UNITCLASS_DOVIELLO_WEREWOLF</Class> <Type>UNIT_DOVIELLO_WEREWOLF</Type> <Combat>UNITCOMBAT_BEAST</Combat> <DefaultUnitAI>UNITAI_ATTACK</DefaultUnitAI> <Description>TXT_KEY_UNIT_DOVIELLO_WEREWOLF</Description> <Civilopedia>TXT_KEY_UNIT_PLACEHOLDER_PEDIA</Civilopedia> <Strategy>TXT_KEY_UNIT_WEREWOLF_STRATEGY</Strategy> <Advisor>ADVISOR_MILITARY</Advisor> <bMilitaryHappiness>1</bMilitaryHappiness> <bMilitaryProduction>1</bMilitaryProduction> <bPillage>1</bPillage> <UnitAIs> <UnitAI> <UnitAIType>UNITAI_ATTACK</UnitAIType> <bUnitAI>1</bUnitAI> </UnitAI> <UnitAI> <UnitAIType>UNITAI_PILLAGE</UnitAIType> <bUnitAI>1</bUnitAI> </UnitAI> <UnitAI> <UnitAIType>UNITAI_RESERVE</UnitAIType> <bUnitAI>1</bUnitAI> </UnitAI> <UnitAI> <UnitAIType>UNITAI_COUNTER</UnitAIType> <bUnitAI>1</bUnitAI> </UnitAI> <UnitAI> <UnitAIType>UNITAI_CITY_DEFENSE</UnitAIType> <bUnitAI>1</bUnitAI> </UnitAI> </UnitAIs> <PrereqTech>TECH_ANIMAL_MASTERY</PrereqTech> <iAIWeight>200</iAIWeight> <iCost>500</iCost> <iMoves>3</iMoves> <iCombat>11</iCombat> <iXPValueAttack>32</iXPValueAttack> <iXPValueDefense>16</iXPValueDefense> <iCultureGarrison>16</iCultureGarrison> <iAsset>16</iAsset> <iPower>33</iPower> <UnitMeshGroups> <iGroupSize>3</iGroupSize> <iMeleeWaveSize>3</iMeleeWaveSize> <iRangedWaveSize>0</iRangedWaveSize> <UnitMeshGroup> <iRequired>1</iRequired> <EarlyArtDefineTag>ART_DEF_UNIT_DUIN</EarlyArtDefineTag> </UnitMeshGroup> <UnitMeshGroup> <iRequired>1</iRequired> <EarlyArtDefineTag>ART_DEF_UNIT_GREATER_WEREWOLF</EarlyArtDefineTag> </UnitMeshGroup> <UnitMeshGroup> <iRequired>1</iRequired> <EarlyArtDefineTag>ART_DEF_UNIT_GREATER_WEREWOLF</EarlyArtDefineTag> </UnitMeshGroup> </UnitMeshGroups> <FreePromotions> <FreePromotion> <PromotionType>PROMOTION_WEREWOLF</PromotionType> <bFreePromotion>1</bFreePromotion> </FreePromotion> <FreePromotion> <PromotionType>PROMOTION_CANNIBALIZE</PromotionType> <bFreePromotion>1</bFreePromotion> </FreePromotion> </FreePromotions> <iTier>3</iTier> <Image>Art/Interface/Popups/Baron Duin Halfmorn.dds</Image> <Quote>TXT_KEY_POPUP_BARON_DUIN_CREATION</Quote> <UnitCreateFromCombat>UNIT_RAVENOUS_WEREWOLF</UnitCreateFromCombat> <iUnitCreateFromCombatChance>75</iUnitCreateFromCombatChance> </UnitInfo>


bool CvPromotionInfo::read(CvXMLLoadUtility* pXML)
{
...
[B]pXML->GetChildXmlValByName(&m_fExtraXPValueAttack, "iExtraXPValueAttack");
pXML->GetChildXmlValByName(&m_fExtraXPValueDefense, "iExtraXPValueDefense");[/B]
[B] <ElementType name="iExtraXPValueAttack" content="textOnly" dt:type="float"/>
<ElementType name="iExtraXPValueDefense" content="textOnly" dt:type="float"/>[/B]
<ElementType name="PromotionInfo" content="eltOnly">
...
[B] <element type="iExtraXPValueAttack" minOccurs="0"/>
<element type="iExtraXPValueDefense" minOccurs="0"/>[/B]
class CvPromotionInfo : public CvHotkeyInfo
public:
...
[B] DllExport int getExtraXPValueAttack() const; // Exposed to Python
DllExport int getExtraXPValueDefense() const; // Exposed to Python[/B]
...
protected:
...
[B] float m_fExtraXPValueAttack;
float m_fExtraXPValueDefense;[/B]
CvPromotionInfo::CvPromotionInfo() :
...
[B]m_fExtraXPValueAttack(0.0f),
m_fExtraXPValueDefense(0.0f),[/B]
...
[B]int CvPromotionInfo::getExtraXPValueAttack() const
{
return (int)(m_fExtraXPValueAttack*100);
}
int CvPromotionInfo::getExtraXPValueDefense() const
{
return (int)(m_fExtraXPValueDefense*100);
}[/B]
void CvPromotionInfo::read(FDataStreamBase* stream)
{
...
[B] stream->Read(&m_fExtraXPValueAttack);
stream->Read(&m_fExtraXPValueDefense);[/B]
...
void CvPromotionInfo::write(FDataStreamBase* stream)
{
...
[B] stream->Write(m_fExtraXPValueAttack);
stream->Write(m_fExtraXPValueDefense);[/B]
...
bool CvPromotionInfo::read(CvXMLLoadUtility* pXML)
{
...
[B] pXML->GetChildXmlValByName(&m_fExtraXPValueAttack, "iExtraXPValueAttack");
pXML->GetChildXmlValByName(&m_fExtraXPValueDefense, "iExtraXPValueDefense");[/B]
