enum error

Hello

, I am trying to get All Citizens to recall such as Spider , It complains SpiderRecall is enum error - how do I declare this - I have tried the unitglobalstatdefs etc... to no avail , \Game\UnitPromotionsColonyStatDefs.xml(73,38): error:
value 'SpiderRecall' not in enumeration

<UnitColonyStats>
    <UnitType>SpiderRecall</UnitType>
  </UnitColonyStats>

<UnitGlobalStats>
    <UnitType>SpiderRecall</UnitType>
  </UnitGlobalStats>

Thank You

9,706 views 6 replies
Reply #1 Top

Your using something (SpiderRecall) that is not defined within the xml's scheme. UnitTypes are hardcoded. You need to use one of the Buffers located in the UnitGlobalTypes.xsd, its located in the Data\Scheme\Enums folder.

Reply #2 Top

Hi Horem,

I used the enum section but the recall promotion is greyed out (in game) on CELEBRITY  even when there are no requirements except the citizen is on a planet.The Spider  WORKS . I  tried this on celebrity ( after adding "CelebrityRecall" to enum ) with greying out result. hmmm:S  

I discovered that I could only accomplish one recall type with one enum - this made it exclusive. So now if I can , I need to know where the hardcode is to make each and every citizen re-callable. or what method can you use to accomplish this ?

What am I missing ?

<UnitSpecialization>
    <InternalName>Promotion_Celebrity_Recall</InternalName>
    <DisplayName>Promotion_Celebrity_Recall_Name</DisplayName>
    <Description>Promotion_Celebrity_Recall_Dec</Description>
    <GlobalType>CelebrityRecall</GlobalType>
    <Icon>Citizen_Celebrity.png</Icon>
    <Image>Crusade_Celebrity.png</Image>
    <Background>Citizen_BG_General.png</Background>
    <SelectSFX>UI/CITIZENS/CELEBRITY_SELECT</SelectSFX>
    <ImprovementType>Approval</ImprovementType>
   <!--<Cost>
      <EffectType>PromethionCost</EffectType>
      <Target>
        <TargetType>Faction</TargetType>
      </Target>
      <BonusType>OneTime</BonusType>
      <Value>10</Value>
    </Cost>-->
    <Triggers>
      <OnEvent>OnUnitGenerated</OnEvent>
      <PerformAction>
        <Action>ChangeUnitType</Action>
        <StringParam>Celebrity</StringParam>
      </PerformAction>
      <DescriptionText>Promotion_Celebrity_Recall_ActionTriggerDec_0</DescriptionText>
    </Triggers>
    <Triggers>
      <OnEvent>OnUnitGenerated</OnEvent>
      <PerformAction>
        <Action>RecallUnit</Action>
      </PerformAction>
    </Triggers>
    <Prerequ>
      <UnitTypeFrom>Celebrity</UnitTypeFrom>
      <MustBeOnPlanet>true</MustBeOnPlanet>
    </Prerequ>
  </UnitSpecialization>

-----------------------------------------

 <xs:enumeration value="SpiderRecall"/>
      <xs:enumeration value="CelebrityRecall"/>
    </xs:restriction>

Thanks !!

JJ

Reply #3 Top

You cant use a name you made up. You have to use one of the unused Buffer entries, like Buffer8. Do what I said in my first post. Read the files mentioned.

Reply #4 Top

ok , thanks , for some reason it worked for spider recall lol

Reply #5 Top

You can use these for some recall I made if you havent made it untill now

 

  <UnitSpecialization>
    <InternalName>Promotion_Celebrity_Recall</InternalName>
    <DisplayName>Promotion_Celebrity_Recall_Name</DisplayName>
    <Description>Promotion_Celebrity_Recall_Dec</Description>
    <GlobalType>MercyKill</GlobalType>
    <Icon>GC3_Approval_Stat_Icon.png</Icon>
    <Image>Promotion_Recall.png</Image>
    <Background>Citizen_BG_Celebrity.png</Background>
    <ImprovementType>Approval</ImprovementType>
    <Cost>
      <EffectType>PromethionCost</EffectType>
      <Target>
        <TargetType>Faction</TargetType>
      </Target>
      <BonusType>OneTime</BonusType>
      <Value>5</Value>
    </Cost>
    <Triggers>
      <OnEvent>OnUnitGenerated</OnEvent>
      <PerformAction>
        <Action>ChangeUnitType</Action>
        <StringParam>Celebrity</StringParam>
      </PerformAction>
      <DescriptionText>Promotion_Celebrity_Recall_ActionTriggerDec_0</DescriptionText>
    </Triggers>
    <Triggers>
      <OnEvent>OnUnitGenerated</OnEvent>
      <PerformAction>
        <Action>RecallUnit</Action>
      </PerformAction>
    </Triggers>
    <Prerequ>
      <UnitTypeFrom>Celebrity</UnitTypeFrom>
      <MustBeOnPlanet>true</MustBeOnPlanet>
    </Prerequ>
  </UnitSpecialization>
 
  <UnitSpecialization>
    <InternalName>Promotion_Entrepreneur_Recall</InternalName>
    <DisplayName>Promotion_Entrepreneur_Recall_Name</DisplayName>
    <Description>Promotion_Entrepreneur_Recall_Dec</Description>
    <GlobalType>Cure</GlobalType>
    <Icon>GC3_Credits_Stat_Icon.png</Icon>
    <Image>Promotion_Recall.png</Image>
    <Background>Citizen_BG_Entreprenuer.png</Background>
    <ImprovementType>Wealth</ImprovementType>
    <Cost>
      <EffectType>PromethionCost</EffectType>
      <Target>
        <TargetType>Faction</TargetType>
      </Target>
      <BonusType>OneTime</BonusType>
      <Value>5</Value>
    </Cost>
    <Triggers>
      <OnEvent>OnUnitGenerated</OnEvent>
      <PerformAction>
        <Action>ChangeUnitType</Action>
        <StringParam>Entrepreneur</StringParam>
      </PerformAction>
      <DescriptionText>Promotion_Entrepreneur_Recall_ActionTriggerDec_0</DescriptionText>
    </Triggers>
    <Triggers>
      <OnEvent>OnUnitGenerated</OnEvent>
      <PerformAction>
        <Action>RecallUnit</Action>
      </PerformAction>
    </Triggers>
    <Prerequ>
      <UnitTypeFrom>Entrepreneur</UnitTypeFrom>
      <MustBeOnPlanet>true</MustBeOnPlanet>
    </Prerequ>
  </UnitSpecialization>

  <UnitSpecialization>
    <InternalName>Promotion_Farmer_Recall</InternalName>
    <DisplayName>Promotion_Farmer_Recall_Name</DisplayName>
    <Description>Promotion_Farmer_Recall_Dec</Description>
    <GlobalType>Recruit</GlobalType>
    <Icon>GC3_Food_Stat_Icon.png</Icon>
    <Image>Promotion_Recall.png</Image>
    <Background>Citizen_BG_Farmer.png</Background>
    <ImprovementType>Wealth</ImprovementType>
    <Cost>
      <EffectType>PromethionCost</EffectType>
      <Target>
        <TargetType>Faction</TargetType>
      </Target>
      <BonusType>OneTime</BonusType>
      <Value>5</Value>
    </Cost>
    <Triggers>
      <OnEvent>OnUnitGenerated</OnEvent>
      <PerformAction>
        <Action>ChangeUnitType</Action>
        <StringParam>Farmer</StringParam>
      </PerformAction>
      <DescriptionText>Promotion_Farmer_Recall_ActionTriggerDec_0</DescriptionText>
    </Triggers>
    <Triggers>
      <OnEvent>OnUnitGenerated</OnEvent>
      <PerformAction>
        <Action>RecallUnit</Action>
      </PerformAction>
    </Triggers>
    <Prerequ>
      <UnitTypeFrom>Farmer</UnitTypeFrom>
      <MustBeOnPlanet>true</MustBeOnPlanet>
    </Prerequ>
  </UnitSpecialization>

  <UnitSpecialization>
    <InternalName>Promotion_Agent_Recall</InternalName>
    <DisplayName>Promotion_Agent_Recall_Name</DisplayName>
    <Description>Promotion_Agent_Recall_Dec</Description>
    <GlobalType>Silence</GlobalType>
    <Icon>GC3_Spy_Temp_Icon.png</Icon>
    <Image>Promotion_Recall.png</Image>
    <Background>Citizen_BG_Spy.png</Background>
    <ImprovementType>Military</ImprovementType>
    <Cost>
      <EffectType>PromethionCost</EffectType>
      <Target>
        <TargetType>Faction</TargetType>
      </Target>
      <BonusType>OneTime</BonusType>
      <Value>5</Value>
    </Cost>
    <Triggers>
      <OnEvent>OnUnitGenerated</OnEvent>
      <PerformAction>
        <Action>ChangeUnitType</Action>
        <StringParam>Agent</StringParam>
      </PerformAction>
      <DescriptionText>Promotion_Agent_Recall_ActionTriggerDec_0</DescriptionText>
    </Triggers>
    <Triggers>
      <OnEvent>OnUnitGenerated</OnEvent>
      <PerformAction>
        <Action>RecallUnit</Action>
      </PerformAction>
    </Triggers>
    <Prerequ>
      <UnitTypeFrom>Agent</UnitTypeFrom>
      <MustBeOnPlanet>true</MustBeOnPlanet>
    </Prerequ>
  </UnitSpecialization>
 
  <UnitSpecialization>
    <InternalName>Promotion_General_Recall</InternalName>
    <DisplayName>Promotion_General_Recall_Name</DisplayName>
    <Description>Promotion_General_Recall_Dec</Description>
    <GlobalType>Hero</GlobalType>
    <Icon>Stat_Faction_Power_Icon.png</Icon>
    <Image>Promotion_Recall.png</Image>
    <Background>Citizen_BG_General.png</Background>
    <ImprovementType>Military</ImprovementType>
    <Cost>
      <EffectType>PromethionCost</EffectType>
      <Target>
        <TargetType>Faction</TargetType>
      </Target>
      <BonusType>OneTime</BonusType>
      <Value>5</Value>
    </Cost>
    <Triggers>
      <OnEvent>OnUnitGenerated</OnEvent>
      <PerformAction>
        <Action>ChangeUnitType</Action>
        <StringParam>General</StringParam>
      </PerformAction>
      <DescriptionText>Promotion_General_Recall_ActionTriggerDec_0</DescriptionText>
    </Triggers>
    <Triggers>
      <OnEvent>OnUnitGenerated</OnEvent>
      <PerformAction>
        <Action>RecallUnit</Action>
      </PerformAction>
    </Triggers>
    <Prerequ>
      <UnitTypeFrom>General</UnitTypeFrom>
      <MustBeOnPlanet>true</MustBeOnPlanet>
    </Prerequ>
  </UnitSpecialization>

  <UnitSpecialization>
    <InternalName>Promotion_Diplomat_Recall</InternalName>
    <DisplayName>Promotion_Diplomat_Recall_Name</DisplayName>
    <Description>Promotion_Diplomat_Recall_Dec</Description>
    <GlobalType>DiplomatRecall</GlobalType>
    <Icon>GC3_Influence_Stat_Icon.png</Icon>
    <Image>Promotion_Recall.png</Image>
    <Background>Citizen_BG_Emissary.png</Background>
    <ImprovementType>Influence</ImprovementType>
    <Cost>
      <EffectType>PromethionCost</EffectType>
      <Target>
        <TargetType>Faction</TargetType>
      </Target>
      <BonusType>OneTime</BonusType>
      <Value>5</Value>
    </Cost>
    <Triggers>
      <OnEvent>OnUnitGenerated</OnEvent>
      <PerformAction>
        <Action>ChangeUnitType</Action>
        <StringParam>Diplomat</StringParam>
      </PerformAction>
      <DescriptionText>Promotion_Diplomat_Recall_ActionTriggerDec_0</DescriptionText>
    </Triggers>
    <Triggers>
      <OnEvent>OnUnitGenerated</OnEvent>
      <PerformAction>
        <Action>RecallUnit</Action>
      </PerformAction>
    </Triggers>
    <Prerequ>
      <UnitTypeFrom>Diplomat</UnitTypeFrom>
      <MustBeOnPlanet>true</MustBeOnPlanet>
    </Prerequ>
  </UnitSpecialization>

 

 

and for text file

 

  <StringTable>
    <Label>Promotion_Celebrity_Recall_Name</Label>
    <String>Recall</String>
  </StringTable>
  <StringTable>
    <Label>Promotion_Celebrity_Recall_Dec</Label>
    <String>Sometimes you need to move a celebrity where no one hates him or her.</String>
  </StringTable>
  <StringTable>
    <Label>Promotion_Celebrity_Recall_ActionTriggerDec_0</Label>
    <String>Celebrity is recalled to global pool.</String>
  </StringTable>
 
  <StringTable>
    <Label>Promotion_Entrepreneur_Recall_Name</Label>
    <String>Recall</String>
  </StringTable>
  <StringTable>
    <Label>Promotion_Entrepreneur_Recall_Dec</Label>
    <String>#1: Once you have their money, you never give it back.</String>
  </StringTable>
  <StringTable>
    <Label>Promotion_Entrepreneur_Recall_ActionTriggerDec_0</Label>
    <String>Entrepreneur is recalled to global pool.</String>
  </StringTable>
 
   <StringTable>
    <Label>Promotion_Farmer_Recall_Name</Label>
    <String>Recall</String>
  </StringTable>
  <StringTable>
    <Label>Promotion_Farmer_Recall_Dec</Label>
    <String>Know you food, know your farmers, and know your kitchen.</String>
  </StringTable>
  <StringTable>
    <Label>Promotion_Farmer_Recall_ActionTriggerDec_0</Label>
    <String>Farmer is recalled to global pool.</String>
  </StringTable>
 
   <StringTable>
    <Label>Promotion_Agent_Recall_Name</Label>
    <String>Recall</String>
  </StringTable>
  <StringTable>
    <Label>Promotion_Agent_Recall_Dec</Label>
    <String>Execute order 666.</String>
  </StringTable>
  <StringTable>
    <Label>Promotion_Agent_Recall_ActionTriggerDec_0</Label>
    <String>Agent is recalled to global pool.</String>
  </StringTable>
 
  <StringTable>
    <Label>Promotion_General_Recall_Name</Label>
    <String>Recall</String>
  </StringTable>
  <StringTable>
    <Label>Promotion_General_Recall_Dec</Label>
    <String>Nobody ever defended anything successfully, there is only attack and attack and attack some more.</String>
  </StringTable>
  <StringTable>
    <Label>Promotion_General_Recall_ActionTriggerDec_0</Label>
    <String>General is recalled to global pool.</String>
  </StringTable>

 

  <StringTable>
    <Label>Promotion_Diplomat_Recall_Name</Label>
    <String>Recall</String>
  </StringTable>
  <StringTable>
    <Label>Promotion_Diplomat_Recall_Dec</Label>
    <String>Move your Diplomat where they're needed most. To the people who really like you, maybe. Or the ones who really, really hate you.</String>
  </StringTable>
  <StringTable>
    <Label>Promotion_Diplomat_Recall_ActionTriggerDec_0</Label>
    <String>Diplomat is recalled to global pool.</String>
  </StringTable>

 

You will only need to add "Promotion_Recall.png"

I dont remember but I think Diplomat Recall is already there but inactive or incomplete

Also I don't remember if Scientist recall is av by default or I did that one also, let me know if need it.

 

Reply #6 Top

thank you ! |-)