Question about Gunships

TheLopez

Deity
Joined
Jan 16, 2006
Messages
2,525
Location
Oregon
Last night I was going through the Civ4 XML files and noticied something strange. In the definition for the Gunship unit they're DomainType is set to DOMAIN_LAND, not DOMAIN_AIR as I was expecting. Does that seem strange to anyone else?

Also, does it seem strange that carriers aren't able to carry gunships when in real life carriers frequently do carry helicopters?

TheLopez
 
Anything that is DOMAIN_AIR is based in a city and flies missions nearby, but never appears on the map. Firaxis wanted helicopters to be more like normal units.

As far as I know, carriers can only transport units from a single domain, so if you make a helicopter carrier it won't be able to hold fixed-wing aircraft.

Some people have been experimenting with setting helicopters to "NONE" domain, which allows them to cross water as well as land.
 
Yeah, DOMAIN_LAND means they're treated like normal land-based military units (can be attacked, cannot be "intercepted", cannot enter ocean)
 
Kidinnu said:
Anything that is DOMAIN_AIR is based in a city and flies missions nearby, but never appears on the map. Firaxis wanted helicopters to be more like normal units.
Ok, that makes sense.

Kidinnu said:
As far as I know, carriers can only transport units from a single domain, so if you make a helicopter carrier it won't be able to hold fixed-wing aircraft.

Some people have been experimenting with setting helicopters to "NONE" domain, which allows them to cross water as well as land.

Kidinnu,
I checked the CIV4UnitSchema.xml file and you are correct, they defined the DomainCargo as text only element. Though they did not make it a requirement that a unit must have the DomainCargo set if the iCargo value is set. Hmmmm..... I'll have to test that to see if by removing the <DomainCargo> tag makes it so you can carry anything in the Carrier.

Then of course there is also this in the Carrier definition: <SpecialCargo>SPECIALUNIT_FIGHTER</SpecialCargo>

and this in the Fighter definition :
<Special>SPECIALUNIT_FIGHTER</Special>

but Gunships don't have the <Special> tag set:
<UnitInfo>
<Class>UNITCLASS_GUNSHIP</Class>
<Type>UNIT_GUNSHIP</Type>
<UniqueNames/>
<Special>NONE</Special>
...

Thats something else to consider...

::sigh::

No I really want to go home to test these ideas out.
 
You can give anything a special cargo.... I had artillery units which could carry bombers (my first attempt at ranged combat), for example.
 
Sorry to Necromancy this thread but:


I was just looking at the same things. Did you figure Gunships out yet?

Does changing gunships domain to air still allow it to move like land units or does domain air cancel movement?

Is there a place that defines each domain? If so it should be possible to create a new domain. This new domain can be used for unships and heliocopters so they don't get treated like tanks. (Example: Land Domain have the attack across river issue that helicopters shouldn't have)

I will have to look into this after work when I can test stuff out.
 
Domain_Air completely eliminates the ability to move like a normal unit, instead you do air missions based on your air range. Domain types are hard coded and can not be changed (at this time). As for you specific example you can give them a promotion on creation that removes the attacking across river penalty... Not that that was your point 8).
 
Also note that DOMAIN_LAND units can be loaded onto transport ships but not aircraft carriers, destroyers or battleships (though they are loaded on them in real life). I'm sure that could be changed though, hint, hint...
 
If you edit

<DOMAIN>DOMAIN_LAND</DOMAIN>

TO

<DOMAIN>NONE</DOMAIN>

the unit will fly on land and water
also if you edit

<SpecialCargo>NONE</SpecialCargo>
<DomainCargo>NONE</DomainCargo>
<iCargo>0</iCargo>

TO

<SpecialCargo>NONE</SpecialCargo>
<DomainCargo>DOMAIN_LAND</DomainCargo>
<iCargo>2</iCargo>

you can transport 2 land units i'm trying this out at the moment but I'm trying to limit the land units it can carry to just the artillery unit.
 
Lord Olleus said:
to do that try changing it to <SpecialCargo>ARTILLERY</SpecialCargo>
and making the artillery speacial unit tag <Special>ARTILLERY</Special> Something like that should work. Just copy the mechanism for caravels, which can only carry missonaries and GP.


yeah try'd that one also try'd
for the gunship
<SpecialCargo>SPECIALUNIT_ARTILLERY</SpecialCargo>

and for the artillery
unit tag <Special>SPECIALUNIT_ARTILLERY</Special>

like the carrier for the jet fighters but i'm getting this error when the game boots up

XML ERROR
Tag: ARTILLERY in info class was incorrect
current XML file is units\civ4unitinfos.xml

or

XML ERROR
Tag: SPECIALUNIT_ARTILLERY in info class was incorrect
current XML file is units\civ4unitinfos.xml

any ideas for fixing this? I get it twice once for the gunship and again for the artillery


ITS OK

found the problem i needed to add

<SpecialUnitInfo>
<Type>SPECIALUNIT_ARTILLERY</Type>
<Description>TXT_KEY_SPECIALUNIT_ARTILLERY</Description>
<bValid>1</bValid>
<ProductionTraits/>
</SpecialUnitInfo>

to the specialunitinfos.xml file its fix it i can now only load artillery units into my MI24 and KA50 gunships
 
Back
Top Bottom