Promotion Creation Problem

Decimatus

King
Joined
Oct 22, 2005
Messages
853
Anything special with creating promotions? I can't seem to get mine to work.

Here is my code.

Spoiler :
<UnitPromotions>
<Row>
<Type>PROMOTION_MAGELLAN_VOYAGE</Type>
<Description>TXT_KEY_PROMOTION_MAGELLAN_VOYAGE</Description>
<Help>TXT_KEY_PROMOTION_MAGELLAN_VOYAGE_HELP</Help>
<Sound>AS2D_IF_LEVELUP</Sound>
<CannotBeChosen>true</CannotBeChosen>
<MovesChange>1</MovesChange>
<PortraitIndex>33</PortraitIndex>
<IconAtlas>PROMOTION_ATLAS</IconAtlas>
<PediaType>PEDIA_SHARED</PediaType>
<PediaEntry>TXT_KEY_PROMOTION_MAGELLAN_VOYAGE</PediaEntry>
</Row>
</UnitPromotions>


<UnitPromotions_UnitCombats>
<Row>
<PromotionType>PROMOTION_MAGELLAN_VOYAGE</PromotionType>
<UnitCombatType>UNITCOMBAT_NAVAL</UnitCombatType>
</Row>
</UnitPromotions_UnitCombats>


Spoiler :
<Buildings>
<Row>
<Type>BUILDING_MAGELLAN_VOYAGE</Type>
<BuildingClass>BUILDINGCLASS_MAGELLAN_VOYAGE</BuildingClass>
<Cost>900</Cost>
<PrereqTech>TECH_NAVIGATION</PrereqTech>
<Help>TXT_KEY_WONDER_MAGELLAN_VOYAGE_HELP</Help>
<Description>TXT_KEY_BUILDING_MAGELLAN_VOYAGE</Description>
<Civilopedia>TXT_KEY_WONDER_MAGELLAN_VOYAGE_DESC</Civilopedia>
<Quote>TXT_KEY_WONDER_MAGELLAN_VOYAGE_QUOTE</Quote>
<MaxStartEra>ERA_MODERN</MaxStartEra>
<FreePromotion>PROMOTION_MAGELLAN_VOYAGE</FreePromotion>
<Water>true</Water>
<SpecialistType>SPECIALIST_MERCHANT</SpecialistType>
<GreatPeopleRateChange>2</GreatPeopleRateChange>
<NukeImmune>true</NukeImmune>
<HurryCostModifier>-1</HurryCostModifier>
<MinAreaSize>-1</MinAreaSize>
<ConquestProb>100</ConquestProb>
<Culture>2</Culture>
<DisplayPosition>1</DisplayPosition>
<IconAtlas>BW_ATLAS_2</IconAtlas>
<PortraitIndex>5</PortraitIndex>
</Row>
</Buildings>

<BuildingClasses>
<Row>
<Type>BUILDINGCLASS_MAGELLAN_VOYAGE</Type>
<DefaultBuilding>BUILDING_MAGELLAN_VOYAGE</DefaultBuilding>
<Description>TXT_KEY_BUILDING_MAGELLAN_VOYAGE</Description>
<MaxGlobalInstances>1</MaxGlobalInstances>
</Row>
</BuildingClasses>


I mostly copied the great lighthouse's example, but it is jacking my mod over. Most times when you mess up a building it doesn't do anything to the rest of your mod, so I assume it is the promotion that is wrong.

Probably going to try and move the <FreePromotion> block around and see if that helps. Sometimes it won't take that at certain positions in the building string, though the lighthouse was formated in this order...
 
First things first, if you're going to post huge chunks of code, please use to code tag so that it's easy to read: :)

Code:
<UnitPromotions>
    <Row>
        <Type>PROMOTION_MAGELLAN_VOYAGE</Type>
        <Description>TXT_KEY_PROMOTION_MAGELLAN_VOYAGE</Description>
        <Help>TXT_KEY_PROMOTION_MAGELLAN_VOYAGE_HELP</Help>
        <Sound>AS2D_IF_LEVELUP</Sound>
        <CannotBeChosen>true</CannotBeChosen>
        <MovesChange>1</MovesChange>
        <PortraitIndex>33</PortraitIndex>
        <IconAtlas>PROMOTION_ATLAS</IconAtlas>
        <PediaType>PEDIA_SHARED</PediaType>
        <PediaEntry>TXT_KEY_PROMOTION_MAGELLAN_VOYAGE</PediaEntry>
    </Row>
</UnitPromotions>

Indentation is pretty.

Now, as for your mod, I can't see anythign terribly wrong with it at a glance. Could you upload the package so that we could take a look at it?
 
The order is largely irrelevant though it does make it easier to doublecheck when things went wrong.. Have you created and included the text for the reference you give in the stat blocks? Err this part I mean:

Code:
<GameData>
   <Language_en_US>
          <Row Tag = "name of text">
               <Text>Insert Text here</text>
          </Row>
  <Language_en_US>
</GameData>
 
The order is largely irrelevant though it does make it easier to doublecheck when things went wrong.. Have you created and included the text for the reference you give in the stat blocks? Err this part I mean:

Code:
<GameData>
   <Language_en_US>
          <Row Tag = "name of text">
               <Text>Insert Text here</text>
          </Row>
  <Language_en_US>
</GameData>

The order does make a difference for certain buildings I have found.

And you can screw up the text tags all day long and it will simply display it in the game however you messed it up. And you could not create them at all and it would just be blank in game. But yes, it is created for both parts.
 
Well somehow I got it to work. Don't ask me how.

I deleted everything about magellen's voyage, the promotion, everything. Mod still didn't work. I tinkered around for half an hour with no luck.

Then I removed some extra space between my end tags and the last item in those tags. Suddenly the buildings showed up in game again.

I went back, added in all the space, even extra space. Mod still worked.

Went back, added magellan and the promotion into the game. Still works.

Must be ghosts.
 
Back
Top Bottom