Sea Great General

Sleepwalker91

Chieftain
Joined
Jan 25, 2011
Messages
36
I'm trying to create a UU similar to the Mongolian Khan, with the regular bonus of the Great General applied to naval units. The result should be an Admiral.

Anyone could help me with the XML for this unit?
 
So you want it to be like a ship, but replacing a great general? If so, try something like this
<UnitClass> UNITCLASS_GREAT_GENERAL </UnitClass>
<Type> UNIT_GREAT_ADMIRAL </Type
<Cost> -1 </Cost>
<Moves> Whatever you want </Moves>

etc...

Just carry on like the Great General unit is set out, only adding naval bits where appropriate.
Let me know if you need any help
 
<GameData>
<Units>
<Row>
<Class>UNITCLASS_GREAT_GENERAL</Class>
<Type>UNIT_ADMIRAL</Type>
<Cost>-1</Cost>
<Moves>3</Moves>
<Special>SPECIALUNIT_PEOPLE</Special>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_GENERAL</DefaultUnitAI>
<Description>TXT_KEY_UNIT_ADMIRAL</Description>
<Civilopedia>TXT_KEY_CIV5_GREATGENERALS_TEXT</Civilopedia>
<Strategy>TXT_KEY_UNIT_GREAT_GENERAL_STRATEGY</Strategy>
<Help>TXT_KEY_UNIT_ADMIRAL_HELP</Help>
<AdvancedStartCost>-1</AdvancedStartCost>
<WorkRate>1</WorkRate>
<CombatLimit>0</CombatLimit>
<GoldenAgeTurns>8</GoldenAgeTurns>
<UnitArtInfo>ART_DEF_UNIT_GENERAL</UnitArtInfo>
<UnitArtInfoEraVariation>true</UnitArtInfoEraVariation>
<IconAtlas>GENGHIS_UNIT_ATLAS</IconAtlas>
<UnitFlagAtlas>DLC02_UNIT_FLAG_ATLAS</UnitFlagAtlas>
<UnitFlagIconOffset>2</UnitFlagIconOffset>
<PortraitIndex>1</PortraitIndex>
<MoveRate>GREAT_PERSON</MoveRate>
</Row>
</Units>
<Unit_AITypes>
<Row>
<UnitType>UNIT_ADMIRAL</UnitType>
<UnitAIType>UNITAI_GENERAL</UnitAIType>
</Row>
</Unit_AITypes>
<Unit_Builds>
<Row>
<UnitType>UNIT_ADMIRAL</UnitType>
<BuildType>BUILD_CITADEL</BuildType>
</Row>
</Unit_Builds>
<Unit_FreePromotions>
<Row>
<UnitType>UNIT_ADMIRAL</UnitType>
<PromotionType>PROMOTION_MEDIC_GENERAL</PromotionType>
</Row>
<Row>
<UnitType>UNIT_ADMIRAL</UnitType>
<PromotionType>PROMOTION_GREAT_GENERAL</PromotionType>
</Row>
</Unit_FreePromotions>
</GameData>

I copied down the Mongol Khan, replacing "Khan" with "Admiral" where I needed to.
What I'm looking for is, how do I give the Great General fighting bonus to surrounding vessels?
 
The XML for that promotion is the following:

<Row><Type>PROMOTION_GREAT_GENERAL</Type><Description>TXT_KEY_PROMOTION_GREAT_GENERAL</Description><Help>TXT_KEY_PROMOTION_GREAT_GENERAL_HELP</Help><Sound>AS2D_IF_LEVELUP</Sound><GreatGeneral>true</GreatGeneral><PortraitIndex>59</PortraitIndex><IconAtlas>ABILITY_ATLAS</IconAtlas><PediaType>PEDIA_ATTRIBUTES</PediaType><PediaEntry>TXT_KEY_PEDIA_PROMOTION_GREAT_GENERAL</PediaEntry></Row>

I can't see how I can make a new promotion exclusive for adjacent naval units. And no, the standard Great General promotion doesn't cover this.
 
Just change DOMAIN_LAND of the unit to DOMAIN_SEA. The great general effect is hardcoded to only provide the bonus to the same domain.
 
Back
Top Bottom