thelijah
Chieftain
Hey all.
So I've been playing with carriers and I understand that SPECIALUNITS dictate what a carrier can hold, but beyond that, I don't really know how to expand off of them.
I've created a new unit that is supposed to serve as a hovering carrier that can travel both sea and land. I've accomplished the hovering part and it can carry aircraft or missiles.
I have two problems:
1) I want it to carry land units. Now; I've looked into threads of people trying to figure out how to make a land unit carry a land unit, and before you say "its not possible", my unit is simply a sea unit that can carry cargo and travel over land tiles, and yes it works. I found Redox's Amphibious Assault Ship Mod, which creates carriers for land units so I downloaded the mod and took a look at the code, but I had trouble pulling [and deciphering] the code to allow carriers to carry land units.
In theory, shouldn't it be possible to just create a new SPECIALUNIT (in the CIV5SpecialUnits.xml file) that refers to land units (or combat classes? (or domains?))? And is this possible without LUA?
2) [Minor] Is it possible to allow a carrier to carry different types of SPECIALUNITS as long as they fit the cargo number limit?
eg. A carrier that can hold 10 units, with 4 missiles, and 6 aircraft.
Thanks all.
So I've been playing with carriers and I understand that SPECIALUNITS dictate what a carrier can hold, but beyond that, I don't really know how to expand off of them.
I've created a new unit that is supposed to serve as a hovering carrier that can travel both sea and land. I've accomplished the hovering part and it can carry aircraft or missiles.
Spoiler :
<Units>
<Row>
<Type>UNIT_HOVERING</Type>
<Class>UNITCLASS_CAPITAL</Class>
<PrereqTech>TECH_AGRICULTURE</PrereqTech>
<Combat>150</Combat>
<RangedCombat>150</RangedCombat>
<Cost>1500</Cost>
<Moves>6</Moves>
<Range>2</Range>
<CombatClass>UNITCOMBAT_HELICOPTER</CombatClass>
<Domain>DOMAIN_SEA</Domain>
<DefaultUnitAI>UNITAI_CARRIER_SEA</DefaultUnitAI>
<Description>TXT_KEY_UNIT_HOVERING</Description>
<Civilopedia>TXT_KEY_UNIT_HOVERING_TEXT</Civilopedia>
<Strategy>TXT_KEY_UNIT_HOVERING_STRATEGY</Strategy>
<Help>TXT_KEY_UNIT_HOVERING_HELP</Help>
<MilitarySupport>true</MilitarySupport>
<MilitaryProduction>true</MilitaryProduction>
<Pillage>false</Pillage>
<IgnoreBuildingDefense>true</IgnoreBuildingDefense>
<Mechanized>true</Mechanized>
<AdvancedStartCost>100</AdvancedStartCost>
<XPValueAttack>3</XPValueAttack>
<XPValueDefense>3</XPValueDefense>
<SpecialCargo>SPECIALUNIT_FIGHTER</SpecialCargo>
<DomainCargo>DOMAIN_AIR</DomainCargo>
<UnitArtInfo>ART_DEF_UNIT_SMOKEY_STEAM_AIRSHIP</UnitArtInfo>
<MoveRate>BOAT</MoveRate>
<UnitFlagIconOffset>8</UnitFlagIconOffset>
<UnitFlagAtlas>EXPANSION_SCEN_UNIT_FLAG_ATLAS</UnitFlagAtlas>
<PortraitIndex>8</PortraitIndex>
<IconAtlas>EXPANSION_SCEN_UNIT_ATLAS</IconAtlas>
</Row>
</Units>
<Row>
<Type>UNIT_HOVERING</Type>
<Class>UNITCLASS_CAPITAL</Class>
<PrereqTech>TECH_AGRICULTURE</PrereqTech>
<Combat>150</Combat>
<RangedCombat>150</RangedCombat>
<Cost>1500</Cost>
<Moves>6</Moves>
<Range>2</Range>
<CombatClass>UNITCOMBAT_HELICOPTER</CombatClass>
<Domain>DOMAIN_SEA</Domain>
<DefaultUnitAI>UNITAI_CARRIER_SEA</DefaultUnitAI>
<Description>TXT_KEY_UNIT_HOVERING</Description>
<Civilopedia>TXT_KEY_UNIT_HOVERING_TEXT</Civilopedia>
<Strategy>TXT_KEY_UNIT_HOVERING_STRATEGY</Strategy>
<Help>TXT_KEY_UNIT_HOVERING_HELP</Help>
<MilitarySupport>true</MilitarySupport>
<MilitaryProduction>true</MilitaryProduction>
<Pillage>false</Pillage>
<IgnoreBuildingDefense>true</IgnoreBuildingDefense>
<Mechanized>true</Mechanized>
<AdvancedStartCost>100</AdvancedStartCost>
<XPValueAttack>3</XPValueAttack>
<XPValueDefense>3</XPValueDefense>
<SpecialCargo>SPECIALUNIT_FIGHTER</SpecialCargo>
<DomainCargo>DOMAIN_AIR</DomainCargo>
<UnitArtInfo>ART_DEF_UNIT_SMOKEY_STEAM_AIRSHIP</UnitArtInfo>
<MoveRate>BOAT</MoveRate>
<UnitFlagIconOffset>8</UnitFlagIconOffset>
<UnitFlagAtlas>EXPANSION_SCEN_UNIT_FLAG_ATLAS</UnitFlagAtlas>
<PortraitIndex>8</PortraitIndex>
<IconAtlas>EXPANSION_SCEN_UNIT_ATLAS</IconAtlas>
</Row>
</Units>
I have two problems:
1) I want it to carry land units. Now; I've looked into threads of people trying to figure out how to make a land unit carry a land unit, and before you say "its not possible", my unit is simply a sea unit that can carry cargo and travel over land tiles, and yes it works. I found Redox's Amphibious Assault Ship Mod, which creates carriers for land units so I downloaded the mod and took a look at the code, but I had trouble pulling [and deciphering] the code to allow carriers to carry land units.
In theory, shouldn't it be possible to just create a new SPECIALUNIT (in the CIV5SpecialUnits.xml file) that refers to land units (or combat classes? (or domains?))? And is this possible without LUA?
Spoiler :
None of these pre-existing SPECIALUNIT types are of much use; although I'm not sure about SPECIALUNIT_PEOPLE (I think that's for specialists).CIV5SpecialUnits.xml said:<SpecialUnits>
<Row>
<ID>0</ID>
<Type>SPECIALUNIT_FIGHTER</Type>
<Description>TXT_KEY_SPECIALUNIT_FIGHTER</Description>
<Valid>true</Valid>
<CityLoad>true</CityLoad>
</Row>
<Row>
<Type>SPECIALUNIT_PEOPLE</Type>
<Description>TXT_KEY_SPECIALUNIT_PEOPLE</Description>
<Valid>true</Valid>
<CityLoad>false</CityLoad>
</Row>
<Row>
<Type>SPECIALUNIT_MISSILE</Type>
<Description>TXT_KEY_SPECIALUNIT_MISSILE</Description>
<Valid>true</Valid>
<CityLoad>true</CityLoad>
</Row>
<Row>
<Type>SPECIALUNIT_STEALTH</Type>
<Description>TXT_KEY_SPECIALUNIT_FIGHTER</Description>
<Valid>true</Valid>
<CityLoad>true</CityLoad>
</Row>
</SpecialUnits>
<SpecialUnit_CarrierUnitAI>
<Row>
<SpecialUnitType>SPECIALUNIT_FIGHTER</SpecialUnitType>
<UnitAIType>UNITAI_CARRIER_SEA</UnitAIType>
</Row>
<Row>
<SpecialUnitType>SPECIALUNIT_PEOPLE</SpecialUnitType>
<UnitAIType>UNITAI_MISSIONARY_SEA</UnitAIType>
</Row>
<Row>
<SpecialUnitType>SPECIALUNIT_PEOPLE</SpecialUnitType>
<UnitAIType>UNITAI_ASSAULT_SEA</UnitAIType>
</Row>
<Row>
<SpecialUnitType>SPECIALUNIT_MISSILE</SpecialUnitType>
<UnitAIType>UNITAI_MISSILE_CARRIER_SEA</UnitAIType>
</Row>
</SpecialUnit_CarrierUnitAI>
2) [Minor] Is it possible to allow a carrier to carry different types of SPECIALUNITS as long as they fit the cargo number limit?
eg. A carrier that can hold 10 units, with 4 missiles, and 6 aircraft.
Thanks all.