Unique Improvements

EvanMeisterX

Warlord
Joined
Sep 20, 2009
Messages
162
Location
Behind you.
Is it possible to give every civ their own unique improvement? For example, the Chinese could have a Paddy that replaces a Farm. Any thoughts?
 
This might work. Create a new tech that is associated with the improvement. Disable the tech for all civs except one in Civ4CivilizationInfos.xml. Then make that tech the PrereqTech for that improvement's build type in Civ4BuildInfos.xml. That way it can't be built until a civ has that tech and only one civ can get that tech. You can set the tech as a free tech if you want the civ to start the game with it.
 
No, the tech is better, because there's a bit of AI lack connected to this.
Seems that Civ4 was not designed for multiple/different worker units.
If an improvement doesn't have a tech requirement, even workers which don't have the ability to build it will try to, and this will seriously cripple the AI.
Made that experience myself with my mod, and changed it now to the technology, it's way better.
 
So I could just put a bunch of techs under the tech tree, and give each one to a civ, allowing them to build it? Is there a way to make an improvement require two techs, so that if I make a windmill replacement, they can't build it at the beginning and don't need to research an additional tech?
 
So I could just put a bunch of techs under the tech tree,

That's not even needed, you can place techs "outside" of the tech tree.
Techs have to coordinates, X and Y. If both are positive, then they show up in the tech tree, if one or both are negative, they'll be placed outside of the tech tree.

and give each one to a civ, allowing them to build it?

:yup:

Is there a way to make an improvement require two techs, so that if I make a windmill replacement, they can't build it at the beginning and don't need to research an additional tech?

That's not possible.
But you could place the tech there, unresearchable, and if the civ has acquired the normal windmill tech, you could give them the special tech via python.
 
Okay, so how could i make the unique improvement 'replace' the original one? So the Chinese can't build farms, only paddies, and paddies can be built on resources?
 
Not sure if it can be done...you'd have to try something out:
For the normal workers, giving them the abilities to build improvements look like this:
PHP:
				<Build>
					<BuildType>BUILD_FARM</BuildType>
					<bBuild>1</bBuild>
				</Build>

I don't know, if the AI will be able to understand it, if you set it to 0, but for what you want you have to try it.
 
Is there a way to make a resource require one of two things, to allow the Chinese to build paddies on rice, corn, wheat, etc?

Yes, you set the requirement in the Improvement, not the Resource (its called Resource makes valid).

I think the easiest thing to do, would be:
A) Make a new Improvement (Paddy), that is a copy in every form (except name) as the Farm. If you want the Paddy to be different (i.e. more food/commerece, here is where you adjust it)
B) Make a new unit (Chinese Worker), that is a copy in every from (except name) as the Worker, make sure to give this the same unit_type as the worker, thus allowing you to set it up as a Unique unit later (see the "Fast Worker" for India)
C) On this Chinese Worker Unit, within the "<BUILD> bracket, change the <BUILD_FARM> to <BUILD_PADDY> (or whatever you named the new improvement).
D) Assign the New unit as a Unique Unit for China.

E) Not sure if this is needed, but in the leaderheads.xml, for mao and qin, you might have to change their improvement build adjustment (or whatever its called) from Farm to Paddy (if they build a farm). I honestly cant remember. This isn't necessary, but its will clean things up.

That should allow the AI to treat the Paddy as a Farm for building purposes. China will be the only civilization able to build a paddy (and they wont build a farm).
Note that this will make China build Paddy's on regular Grasslands and Plains (since they cannot build a farm). If you want them to just be able to build the Paddy on the Resources, and the Farm on flatlants, that might be a bit more challanging and I cannot think about how to do that at the moment, without making a 2nd farm improvement, that only China can build that is not valid on the resources, etc..

now as a disclaimer, I havent played CIV, or done much modding for a number of months now, so I am a bit rusty.
 
Yes, you set the requirement in the Improvement, not the Resource (its called Resource makes valid).

I think the easiest thing to do, would be:
A) Make a new Improvement (Paddy), that is a copy in every form (except name) as the Farm. If you want the Paddy to be different (i.e. more food/commerece, here is where you adjust it)
B) Make a new unit (Chinese Worker), that is a copy in every from (except name) as the Worker, make sure to give this the same unit_type as the worker, thus allowing you to set it up as a Unique unit later (see the "Fast Worker" for India)
C) On this Chinese Worker Unit, within the "<BUILD> bracket, change the <BUILD_FARM> to <BUILD_PADDY> (or whatever you named the new improvement).
D) Assign the New unit as a Unique Unit for China.

E) Not sure if this is needed, but in the leaderheads.xml, for mao and qin, you might have to change their improvement build adjustment (or whatever its called) from Farm to Paddy (if they build a farm). I honestly cant remember. This isn't necessary, but its will clean things up.

That should allow the AI to treat the Paddy as a Farm for building purposes. China will be the only civilization able to build a paddy (and they wont build a farm).
Note that this will make China build Paddy's on regular Grasslands and Plains (since they cannot build a farm). If you want them to just be able to build the Paddy on the Resources, and the Farm on flatlants, that might be a bit more challanging and I cannot think about how to do that at the moment, without making a 2nd farm improvement, that only China can build that is not valid on the resources, etc..

now as a disclaimer, I havent played CIV, or done much modding for a number of months now, so I am a bit rusty.
So, if I gave every civ its own unique worker to build their own unique improvements, would that mean that they'd switch to another civ if they captured them? I.E: America is at war with China, and captures a Chinese Worker. Would the Americans capture a Chinese Worker or an American Worker?
 
So, if I gave every civ its own unique worker to build their own unique improvements, would that mean that they'd switch to another civ if they captured them? I.E: America is at war with China, and captures a Chinese Worker. Would the Americans capture a Chinese Worker or an American Worker?
No I don't think so, a captured Indian Fast Worker becomes part of your civ and switches to normal worker. So (if I've remembered it rightly) in this case the captured Chinese worker should become an American Worker on being captured.
 
The Chinese Worker would switch to the American Worker, even if both are unique versions of the generic worker.
If India captures a worker, chinese worker etc... they would become a fast worker.

Each Civ can only build/capture/have one UNIT of each UNITCLASS. Fast Workers, Workers, these new Chinese Workers and the American Worker, would all be the same unitclass (if the xml is correct).
 
The Chinese Worker would switch to the American Worker, even if both are unique versions of the generic worker.
If India captures a worker, chinese worker etc... they would become a fast worker.

Each Civ can only build/capture/have one UNIT of each UNITCLASS. Fast Workers, Workers, these new Chinese Workers and the American Worker, would all be the same unitclass (if the xml is correct).
:goodjob: Well thought out and explained
 
Top Bottom