xienwolf
Deity
What all does your spell do? Maybe the issue is in there. And the PythonOnRemove happens before the promotion is actually removed so you can prevent that from happening, so that could be your issue here.
What all does your spell do? Maybe the issue is in there. And the PythonOnRemove happens before the promotion is actually removed so you can prevent that from happening, so that could be your issue here.
<SpellInfo> <!-- Become Wood Golem -->
<Type>SPELL_BECOME_WOOD_GOLEM</Type>
<Description>TXT_KEY_SPELL_BECOME_WOOD_GOLEM</Description>
<Civilopedia>TXT_KEY_SPELL_BECOME_WOOD_GOLEM_PEDIA</Civilopedia>
<TechPrereq>TECH_NEVER</TechPrereq>
<bDisplayWhenDisabled>0</bDisplayWhenDisabled>
<ConvertUnitType>UNIT_WOOD_GOLEM</ConvertUnitType>
<AddPromotionType1>PROMOTION_CLEAR_WORKSHOP_CONTRACT</AddPromotionType1>
<bBuffCasterOnly>1</bBuffCasterOnly>
<PyRequirement>False</PyRequirement>
<bGraphicalOnly>1</bGraphicalOnly>
<Button>Art/Interface/Buttons/Units/Wood Golem.dds</Button>
</SpellInfo>
Spoiler :Hey all,
I am currently trying to implement a Commander/Minion promotion couple and I have a big issue with "Commander Promotion"
I have the following chain:
A commands B
There are 3 promotions, P1, P2 and P3. P3 is stackable
A has P1 free promotion
P1 gives Minions promotion P2
P2 gives Commander promotion P3
So I have:
A(P1), B() becomes A(P1),B(P2) becomes A(P1,2xP3),B(P2) !
I should have at the end A(P1,P3), but I have 2xP3...
When adding C as minion of A, I have:
A(P1),B(),C() becomes A(P1),B(P2),C(P2) becomes A(P1,4xP3),B(P2),C(P2)
Of course as a result if B and C quit A, I have A(P1,2xP3) as only one P3 is removed when the minon quits.
Any thought ?
To test more I did the following:
A commands B
There are 4 promotions, P1, P2, P3 and P4. P4 is stackable
A has P1 free promotion
P1 gives Minions promotion P2
P3 is autoaquire with only condition to have P2
P3 gives Commander promotion P4
I still have:
A(P1),B() becomes A(P1),b5P2) becomes A(P1),B(P2,P3) becomes A(P1,2xP4),B(P2,P3) !
So it seems only a problem with stackable commander promotion.
Do you have the latest patch? There were quite a few little bugs with stackables early on, but I thought they were all sorted out now. What you describe is almost the exact format for the Bannor's extra XP trickle-up effect, which last I heard is working properly (finally)
I am modding a unit to require both a Library and a Mage's Guild.
I couldn't find any nested tags for units to allow requiring multiple buildings, so I thought I would try a bit of a hack and use both PrereqBuilding and PrereqBuildingClass.
When I enter these tags in the unit's info:
<PrereqBuilding>BUILDING_MAGE_GUILD</PrereqBuilding>
<PrereqBuildingClass>BUILDING_LIBRARY</PrereqBuildingClass>
Then the unit is listed in the Pedia as requiring a Mage's Guild, but also a Temple of the Order?? Very strange...
Tag: €Ø7□_SLAVE in Info class was incorrect
Current XML file is: xml\Civilizations/CIV4LeaderRelationInfos.xml
You could make a new prereq for promotions which is based on StrBoost of the unit, then have an AutoAcquire promo to swap unitcombat. Or you could rewrite the DLL routine which grants strength to also apply a special promotion on the 4th run (promo set by global define and changing unitcombat), or just to flat out change the unitcombat. Or you could cheat and since you know what age the unit will be when gaining the fourth boost, have an AA MinAge, CIV_ANIMAL promotion (not MustMaintain, so that the unitcombat remains beast after capture)
if (getTeam() == ANIMAL_TEAM)
{
if (pPlot->isCity() && atWar(pPlot->getTeam(), getTeam())[B] && !isRivalTerritoryExplore()[/B])
{
return false;
}
if (plot() != NULL)
{
if (!plot()->isOwned())
{
if (pPlot->isOwned() && atWar(pPlot->getTeam(), getTeam())[B] && !isRivalTerritoryExplore()[/B])
{
return false;
}
}
}
I was wondering if it was possible to add a line like 'import MyFile' in CvSpellInterface.py to make it import MyFile.py where I would stock the spells I added... Would it work?
(I'm not asking if it would be useful, I'm just wondering if it's possible)