Gunship tweak/development thread

Viperace

Warlord
Joined
Nov 8, 2005
Messages
217
Hi all,

I am not really modder type, but sometime ago I started a thread about Gunship not being able to use railroad, we have some hot discussion gunship in the general forum:
http://forums.civfanatics.com/showthread.php?t=140628
Some nice ideas about gunship spawn :)

The patch didn't really fix its main problem 'unable to use railroad/road'. It does fix its 'amphibous penalty' though.

The general consensus about gunship fix is the following:

Main fix:
-Gunship need to be able to use railroad (Road not sure)

Other fix:
-Able to cross coastal tile
-Limited ocean movement?
-be able to load into carrier

Ideas:
-Pocket carrier
-Hovercraft
-Transport chopper


Any modder kind enough to help with gunship tweak?;)
 
Another idea to add would be allowing Choppers to land on destroyers. I am planning on that if we can get them to fly over coast. I'll be adding an ASW chopper, like the Seahawk of the US Navy.

Actually for my idea, it will need to fly over any water, but maybe crash if it ends over the water.
 
I would like to see GUnship being loaded into either carrier or destroyer.

Should not be hard to mod a ASW destroyer 'Oliver Hazard Perry' :goodjob:


But right now i m going to fix the railroad "bug" first. I have found the following line from http://civ4wiki.com/wiki/index.php/CIV4UnitInfos

Boolean Tags
bFlatMovementCost = Unit ignores Terrain costs and Roads/Railroads
bIgnoreTerrainCost = Unit ignores Terrain costs, but uses Roads/Railroads

I don't have civ4 in my current pc now, but i guess this is where the bug came in. Gunship probably have bFlatMovementCost checked but not bIgnoreTerrainCost. That makes it not able to use railroad. A simple edit should do.

In the meantime, i m wondering how to categorized Gunship so that it can be loaded into both transport AND carrier. From my limited understanding, GUnship is being categorized as a 'landunit', whilst carrier can only carry 'air unit' . If we mod the carrier so that it can carry landunit as well, then those warrior,axemen may also get onboard which we don't want :crazyeye: .
thoughts ?
 
One idea what i don't like in civ 4 is that gunship is land unit. It should be air unit, with air strike mode so that it can kill enemy units.

- 4 moves on land but can't attack, can be captured.
- rebase,
- airstrike radius 4-6
- can kill with airstrike
- cavarly can't upgrade to Gunship
- fighters, and sam infantry can intercept it
- can be loaded on carrier (3) and cruiser(1) or destroyer(1)
 
Viperace said:
Boolean Tags
bFlatMovementCost = Unit ignores Terrain costs and Roads/Railroads
bIgnoreTerrainCost = Unit ignores Terrain costs, but uses Roads/Railroads

I don't have civ4 in my current pc now, but i guess this is where the bug came in. Gunship probably have bFlatMovementCost checked but not bIgnoreTerrainCost. That makes it not able to use railroad. A simple edit should do.
Changing those tags would acomplish what you seek. I have already messed with that some. I think what you want is a 0 FlatMovmentCost and a 1 in IgnoreTerrainCost. That would make it use it's base movment value on unimproved terrain, but will still be boosted my routes.
Viperace said:
In the meantime, i m wondering how to categorized Gunship so that it can be loaded into both transport AND carrier. From my limited understanding, GUnship is being categorized as a 'landunit', whilst carrier can only carry 'air unit' . If we mod the carrier so that it can carry landunit as well, then those warrior,axemen may also get onboard which we don't want :crazyeye: .
thoughts ?
I think this would be accomplished through the CIV4SpecialUnitInfos, but there are a couple of problems.

The way it works is like this. The carrier has this tag:

<SpecialCargo>SPECIALUNIT_FIGHTER</SpecialCargo>

The program looks in the CIV4SpecialUnitInfos file for the same key as what's in this tag (SPECIALUNIT_FIGHTER). This allows the carrier to carry only fighters, no bombers.

Unfortunatly, there are 2 problems here. One is I don't know how to add new units to CIV4SpecialUnitInfos. As far as I can tell, this file doesn't actually designate a special unit, it just handels the processing of one. So I wouldn't know how to add the Gunship as a special unit.

The second problem is the <DomainCargo> tag. Near as I can tell, this will only allow one domain to be cargo. You can't load a land unit unless this domain is set to land, but if you do that, you can no longer load any aircraft. I haven't tried removing the info from this tag yet. I know that when you do that to the regular domain tag, it allows the unit to move over all tiles, including water, but it also causes an error when civ starts.
 
LittleRedPoint said:
One idea what i don't like in civ 4 is that gunship is land unit. It should be air unit, with air strike mode so that it can kill enemy units.

- 4 moves on land but can't attack, can be captured.
- rebase,
- airstrike radius 4-6
- can kill with airstrike
- cavarly can't upgrade to Gunship
- fighters, and sam infantry can intercept it
- can be loaded on carrier (3) and cruiser(1) or destroyer(1)
Unfortuantly, there is a problem here. I have tried making the Gunship's domain Air, and it then gets recon and rebase missions, but unfortunatly, it can't move. Somthing about the way Firaxis coded the Air domain, it ignores the movement value. As such, we cannot make an aircraft that moves like a land unit, and there is no way to add air missions to a land unit, that I know of.

I have been told that this is something that is truly hard coded into the game, and that even when the SDK comes, we will still not be able to change this. If that is so, I am really dissapointed, since one of the mods I am developing is a Crimson Skies universe, which make extreamly heavy use of airships. I can't make an airship with the current air rules.

I also had plans of developing UAVs and UCAVs, light, short range air units that move along with your troops, and can recon, and in the case of the UCAV, air strike. I think I can still do this using a land unit as a "carrier" for the UAVs.
 
" I have tried making the Gunship's domain Air, and it then gets recon and rebase missions, but unfortunatly, it can't move"

Thats a big deal ! That probably means no rebase for gunship, too bad. The air unit category seems hardcoded.. Beside that, i think naval and land unit is probably coded by default such that :

-naval unit can never cross into land tile
-land unit can never cross into ocean tile

That means it will be very complicated to make a hybrid naval/land unit like gunship. And air/naval or air/land unit might be even impossible.

Also, notice that on land, there is only one type of impassable tile: mountain. At sea,the impassable tile is ice. So, whenever the XML refers to 'impassable', it don't have to specify Ice or mountain, because

if it is a landunit, then impassable means mountain.
if it is a naval unit, impassable means ice
if it is a air unit , no such thing is needed as air unit cant move

Landunit air unit and naval unit is being hardcoded as different thing
 
So make gunship air_domain and specal unit "gunship". Add new unit "mobile air comando" use mix of soldiers and workers. Put this unit act as carrier that can only carry gunship and you have what is needed. It can bomb land and sea units. I try it out when i get home.
 
I'll try switching the move costs to match Explorers and see what happens.

(For "realism" I'll assume that if you're in your own territory or in the territory of a civ you have Open Borders with the Gunship's being moved around by trucks and trains, or has more access to logistical resupply and can move around better. Or something like that.) ;)
 
Other than things like letting choppers use roads/rail or landing on various types of ships, I'd think it is more of a land unit than an air unit. Mainly because of the uses & capabilities of the varying systems.

Found a random link that you might like to dig into - Federation of American Scientists - Military Analysis Network.

Although to be honest, it seems there coule be a greater variety of air units. As is, the chopper is more of a low altitude, ground attack/support unit, while fighters & bombers duel it out way up in the air. But, with the varying civ's tech levels, you could have the more advanced helicopters dueling with low-flying biplanes of a lower tech civ. Or problems like in 'The Final Countdown', where the modern jets from the Nimitz couldn't slow down enough to take on the WWII prop fighters, nor get a good lock with heat seakers.

So perhaps there should be... grades, I guess, of air units. Low level, early planes, helicopters & such, and the upper level craft like modern (jet) fighters & bombmers, to stick with two simple types.
 
MikeC said:
Other than things like letting choppers use roads/rail or landing on various types of ships, I'd think it is more of a land unit than an air unit. Mainly because of the uses & capabilities of the varying systems.

That definition makes an A-10 sound like a land unit.

I do agree that it would mostly only be used to attack ground targets, so the way Firaxis did it seems logical on the surface. I just don't think its right that an aircraft should be treated like a ground unit.

I also agree that there is a lot of room for expansion of the air units in the game. I would like to add a number of aircraft, from early biplanes ow WWI, all the way to near future planes like the JSF and "fantasy" planes of my own design.

Anyhow, back to working on the Gunships.
 
an idea for a transport chopper....
why not implement it as an addition to the carriers in the matter of making them able to carry one marine unit and airdrop it within, fx. 5-6 tiles?
 
There is a problem with that.

First off, I don't know how to make an airdrop ability in the game. I bet it's possible with python, but I don't know how to do it. Somebody better at python could probably do it fairly quickly.

And the real probem. As far as I know, at this time, there is no way to allow a ship to carry units from multiple domains. The cargo tag in the UnitInfos file has a spot for cargo domain. I have not tried removing that entry yet, but I suspect it will cause an error if we do that. Unfortunatly, with that tag, we cannot put both land and air units on a single ship. At least I don't know of any way. If someone else has come up with something, I would like to know about it.
 
n003lb said:
That definition makes an A-10 sound like a land unit.

I do agree that it would mostly only be used to attack ground targets, so the way Firaxis did it seems logical on the surface. I just don't think its right that an aircraft should be treated like a ground unit.

Agreed, but within the games ruleset, modders don't seem to have a lot of options - no idea what the SDK will bring about. But, looking at it one way, an A-10 could be compared to a land unit - other than basing & ranges. Hmm, guess you could copy the jet fighter unit, limit it to recon/attack target & up the damage to ground targets.

Then again, after looking at the manual, they seem to make the distinction between rotary & fixed wing craft, which does make a bit of sense. Choppers could land about anywhere & refuel, where fixed wing craft would need runways. Although, the Interstate system was developed in part to act as emergency runways... possible Wonder mod there, I guess, although it sounds hard to implement.

Hmm... could also make an air unit, "Anti-Aircraft Artillery", based in cities, no movement range, limited to "intercept mission" only; as such, it'd provide air defense to cities.
 
Is there anyway using XML that you could mod it so that as long as the gunship ends the turn on a land square its okay. i.e. It would be able to cross say 2 square coasts etc.
?
 
ozza000 said:
Is there anyway using XML that you could mod it so that as long as the gunship ends the turn on a land square its okay. i.e. It would be able to cross say 2 square coasts etc.
?
Not at present. There is no way to allow the gunship to leave a land tile
 
MikeC said:
Hmm... could also make an air unit, "Anti-Aircraft Artillery", based in cities, no movement range, limited to "intercept mission" only; as such, it'd provide air defense to cities.

That is already there to an extent. Mech Infantry has a chance of bringing down aircraft. As do destroyers. There is an option in the xml file that lets you give a land unit the ability to intercept air missions. Just give that to something like artillery and you would have an AAA unit.
 
I just found this thread, so I'm sure this is not new news.

However just in case, I have successfully edited the Gunship to act as a true Chopper(ie. it can fly over every terrain.) The attack has been modded to attack any unit on land or sea. I also have an air cav version that allows you to carry 3 land units. The new version can't pilage but to me its a very small tradeoff. Because it now hovers over sea there is no need to have it land on carriers. Movement is 4.

Frankly, I hated the way Choppers were handled and thx to a little XML editing I have what I wanted. :D
 
Back
Top Bottom