Creating new units

Zedd

Chieftain
Joined
May 6, 2002
Messages
23
Location
TENNESSEE
I have created a new unit for Civ two and have done everything as far as editing rules.txt and units.gif (and yes i have backups of the original) but i can't discover where to set my units abilities and limitations. for example I want this unit to function like a cruise missile but it is a ground unit. also i want it to only be available for production under certain government types (like fanatics requiring fundamentalism) This is my first attempt so i appreciate any help and advice you have.:goodjob:
 
Open the rules.txt and go to the units section where you put it the new unit. At the end of the line (with things like movement, attack, defense etc.) there are a bunch of 1's and 0's, that's the bit you'll be needing.
At the start of the units section it's explained for each of those 0's and 1's what they do.

Here's an example:

Cruise Msl., nil, 1, 12.,1, 18a,0d, 1h,3f, 6,0, 0, Roc, 001000000000000

The Cruise Missile doesn't get obsolete (nil), is an air unit (1), has a movement rate of 12, can stay in the air for 1 turn, has an attack value of 18, defense of 0, 1 hitpoint, 3 firepower, costs 60 shields (6), can't carry any other units (0), the AI uses it to attack (0) and you need Rocketry to build it (Roc)... But this is the part you already knew.
Each 1 in the sequence 001000000000000 assigns a certain property to the unit. Here's what the rules.txt says:
000000000000001 = Two space visibility
000000000000010 = Ignore zones of control
000000000000100 = Can make amphibious assaults
000000000001000 = Submarine advantages/disadvantages
000000000010000 = Can attack air units (fighter)
000000000100000 = Ship must stay near land (trireme)
000000001000000 = Negates city walls (howitzer)
000000010000000 = Can carry air units (carrier)
000000100000000 = Can make paradrops
000001000000000 = Alpine (treats all squares as road)
000010000000000 = x2 on defense versus horse (pikemen)
000100000000000 = Free support for fundamentalism (fanatics)
001000000000000 = Destroyed after attacking (missiles)
010000000000000 = x2 on defense versus air (AEGIS)
100000000000000 = Unit can spot submarines


As you can see, for the cruise missile, the 3rd digit is a 1, which means it's destroyed after attacking.

Limiting the availability of a unit to one government, however, is not possible, with only one exception: The unit in the Fanatics slot in the units.gif can only be built by Fundamentalists. Any other unit can be built by anyone.
You can let any unit have free support under Fundamentalism with the 4th digit in that sequence of 1's and 0's, though.
 
thanks mercator i did have that information and do acctually have the unit created. I was hoping to limit its ability to be created exept under fundementalism or communism and i wanted it to share some properties with diplomats or spy's. Is there a way that i could create another spy unit in addition to the one in the game? also i would could I increase this new spy's effectiveness when destroying a city improvement?

kobayashi..
I acctually have CIV 2 MPG with the upgrade patch.
 
You can create other Diplomat units, but only the diplomat type unit in the Spy slot will have the advanced Spy options.
So, nope... And there's no way to change a spy's effectiveness either.
The only way I can think of to limit units to certain governments would be to change the tech tree. E.g. let one of those governments make the diplomat/spy obsolete, or change the tech tree so that only certain civilizations can build those units. But I don't think those are the things you really want, and these things really only relate to the techs, not the governments themselves.
You'll just have to improvise, I'm afraid.
 
Thanks for all your help. Civ 2 seems a bit limiting when createing senarios mayby civ 3 will be easier.
 
Don't hold your breath.

Civ2 is capable of quite a bit. At least the sheer infinite amount of scenarios gives that impression. But it requires considerable effort to create something good, and a lot of work before you think you understand everything.
Civ3 isn't capable of making scenarios yet, you'll have to wait and see what that Play the World thing can really do...
 
Back
Top Bottom