Please help me change a unit upgrade!

anansethespider

Warlord
Joined
Oct 27, 2016
Messages
288
I am trying to change the code so that the galley unit upgrades to a new unit called Bireme. The Bireme is already in the game and is working fine.

The first thing I tried was adding:

<Row Unit="UNIT_GALLEY" UpgradeUnit="UNIT_BIREME"/>

to the appropriate place in the modified units.xml file. But this had no effect. I believe the issue is that the Galley already has a designated upgrade, and it can't have two. So the next thing I tried was adding:


<Update>
<Where Unit="UNIT_GALLEY"/>
<Set UpgradeUnit="UNIT_BIREME"/>
</Update>

But that also had no effect. Has anyone had success with altering the base game's unit upgrades? Or have any ideas about what else I could try?
 
I am pretty sure it's in the right place. But I'm seeing now that neither of the two upgrades in there are working. Neither the galley nor liburna will upgrade to anything. Here, take a look at my units.xml file. Keep in mind that all the units work, just not the upgrades.

I have not checked to see if galley upgrades to caravel because I don't have that tech in my test game and I don't want to click next turn 100 more times. :)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<GameInfo>
<Types>
<Row Type="UNIT_BIREME" Kind="KIND_UNIT"/>
<Row Type="UNIT_DECERES" Kind="KIND_UNIT"/>
<Row Type="UNIT_HERBALIST" Kind="KIND_UNIT"/>
<Row Type="UNIT_HORSE_ARCHER" Kind="KIND_UNIT"/>
<Row Type="UNIT_LIBURNA" Kind="KIND_UNIT"/>

</Types>

<Units>
<Update>
<Where UnitType="UNIT_BATTERING_RAM"/>
<Set PrereqTech="TECH_THE_WHEEL"/>
</Update>
<Update>
<Where UnitType="UNIT_GALLEY"/>
<Set BaseMoves="2"/>
</Update>
<Update>
<Where UnitType="UNIT_GALLEY"/>
<Set Cost="60"/>
</Update>
<Update>
<Where UnitType="UNIT_GALLEY"/>
<Set Combat="20"/>
</Update>
<Update>
<Where UnitType="UNIT_QUADRIREME"/>
<Set Combat="30"/>
</Update>
<Update>
<Where UnitType="UNIT_QUADRIREME"/>
<Set RangedCombat="20"/>
</Update>
<Update>
<Where UnitType="UNIT_SPEARMAN"/>
<Set RangedCombat="10"/>
</Update>
<Update>
<Where UnitType="UNIT_SPEARMAN"/>
<Set Range="1"/>
</Update>

<Row UnitType="UNIT_BIREME" BaseMoves="3" Cost="90" AdvisorType="ADVISOR_CONQUEST" BaseSightRange="2" ZoneOfControl="true" Domain="DOMAIN_SEA" FormationClass="FORMATION_CLASS_NAVAL" Name="LOC_UNIT_BIREME_NAME" Description="LOC_UNIT_BIREME_DESCRIPTION" PurchaseYield="YIELD_GOLD" PseudoYieldType="PSEUDOYIELD_UNIT_NAVAL_COMBAT" PromotionClass="PROMOTION_CLASS_NAVAL_MELEE" Maintenance="1.5" Combat="25" PrereqTech="TECH_CELESTIAL_NAVIGATION"/>
<Row UnitType="UNIT_DECERES" BaseMoves="2" Cost="180" AdvisorType="ADVISOR_CONQUEST" BaseSightRange="2" ZoneOfControl="true" Domain="DOMAIN_SEA" FormationClass="FORMATION_CLASS_NAVAL" Name="LOC_UNIT_DECERES_NAME" Description="LOC_UNIT_DECERES_DESCRIPTION" PurchaseYield="YIELD_GOLD" PseudoYieldType="PSEUDOYIELD_UNIT_NAVAL_COMBAT" PromotionClass="PROMOTION_CLASS_NAVAL_RANGED" Maintenance="4" Combat="40" RangedCombat="30" Range="2" PrereqTech="TECH_SHIPBUILDING"/>
<Row UnitType="UNIT_HERBALIST" BaseMoves="2" Cost="60" AdvisorType="ADVISOR_CONQUEST" BaseSightRange="2" ZoneOfControl="false" Domain="DOMAIN_LAND" FormationClass="FORMATION_CLASS_SUPPORT" Name="LOC_UNIT_HERBALIST_NAME" Description="LOC_UNIT_HERBALIST_DESCRIPTION" PurchaseYield="YIELD_GOLD" PromotionClass="PROMOTION_CLASS_SUPPORT" Maintenance="2" PrereqTech="TECH_HERBALISM"/>
<Row UnitType="UNIT_HORSE_ARCHER" BaseMoves="4" Cost="100" AdvisorType="ADVISOR_CONQUEST" BaseSightRange="2" ZoneOfControl="false" Domain="DOMAIN_LAND" FormationClass="FORMATION_CLASS_LAND_COMBAT" Name="LOC_UNIT_HORSE_ARCHER_NAME" Description="LOC_UNIT_HORSE_ARCHER_DESCRIPTION" PurchaseYield="YIELD_GOLD" PromotionClass="PROMOTION_CLASS_RANGED" Maintenance="2" Combat="10" RangedCombat="25" Range="1" PrereqTech="TECH_SADDLES" />
<Row UnitType="UNIT_LIBURNA" BaseMoves="4" Cost="100" AdvisorType="ADVISOR_CONQUEST" BaseSightRange="2" ZoneOfControl="true" Domain="DOMAIN_SEA" FormationClass="FORMATION_CLASS_NAVAL" Name="LOC_UNIT_LIBURNA_NAME" Description="LOC_UNIT_LIBURNA_DESCRIPTION" PurchaseYield="YIELD_GOLD" PseudoYieldType="PSEUDOYIELD_UNIT_NAVAL_COMBAT" PromotionClass="PROMOTION_CLASS_NAVAL_MELEE" Maintenance="2" Combat="28" PrereqTech="TECH_SHIPBUILDING"/>

</Units>
<UnitAiInfos>

<Row UnitType="UNIT_BIREME" AiType="UNITAI_COMBAT"/>
<Row UnitType="UNIT_BIREME" AiType="UNITTYPE_NAVAL"/>
<Row UnitType="UNIT_DECERES" AiType="UNITAI_COMBAT"/>
<Row UnitType="UNIT_DECERES" AiType="UNITTYPE_RANGED"/>
<Row UnitType="UNIT_DECERES" AiType="UNITTYPE_NAVAL"/>
<Row UnitType="UNIT_HERBALIST" AiType="UNITTYPE_SIEGE_SUPPORT"/>
<Row UnitType="UNIT_HORSE_ARCHER" AiType="UNITAI_COMBAT"/>
<Row UnitType="UNIT_HORSE_ARCHER" AiType="UNITTYPE_RANGED"/>
<Row UnitType="UNIT_LIBURNA" AiType="UNITAI_COMBAT"/>
<Row UnitType="UNIT_LIBURNA" AiType="UNITTYPE_NAVAL"/>



</UnitAiInfos>
<TypeTag>
<Row Type="UNIT_BIREME" Tag="CLASS_NAVAL_MELEE"/>
<Row Type="UNIT_DECERES" Tag="CLASS_NAVAL_RANGED"/>
<Row Type="UNIT_HORSE_ARCHER" Tag="CLASS_RANGED"/>
<Row Type="UNIT_LIBURNA" Tag="CLASS_LONGSHIP"/>
<Row Type="UNIT_LIBURNA" Tag="CLASS_NAVAL_MELEE"/>
<Row Type="UNIT_LIBURNA" Tag="CLASS_NAVAL_RAIDER"/>

</TypeTag>

<UnitUpgrades>

<Update>
<Where Unit="UNIT_GALLEY"/>
<Set UpgradeUnit="UNIT_BIREME"/>
</Update>

<Row Unit="UNIT_BIREME" UpgradeUnit="UNIT_LIBURNA"/>

</UnitUpgrades>


</GameInfo>
 
Back
Top Bottom