Help! How can I set buildings to require multiple technologies?

kamex

Emperor
Joined
Sep 13, 2008
Messages
1,272
Location
UK
Hello all, I am new to modding and trying to make a simple mod where some buildings require multiple technologies before than can be built.

For example, I would like Stonehenge to require both Mysticism and Masonry before it can be built.

I have tried modding the code in the file CIV4BuildingInfos.xml but keep getting an error when loading the mod.

The code i have tried to add is the following:
Spoiler :

<PrereqTech>TECH_MYSTICISM</PrereqTech>
<TechTypes>
<PrereqTech>TECH_MASONRY</PrereqTech>

</TechTypes>


I have added the techtypes tag after looking at the macman unit, which requires two technologies before being built. Apprarently this tag doesn't work for units.... :(

Can anybody help me please?

Thanks in advance.
 
It would help if you posted the error message that you are getting. Also, I'm not sure if you've left out the formatting or if the post ate it. Anyway, there are numerous examples within the BuildingInfos file itself. Try looking at BUILDINGCLASS_AQUEDUCT which requires both Mathematics and Masonry.

Code:
			<PrereqTech>TECH_MATHEMATICS</PrereqTech>
			<TechTypes>
				<PrereqTech>TECH_MASONRY</PrereqTech>
				<PrereqTech>NONE</PrereqTech>
				<PrereqTech>NONE</PrereqTech>
			</TechTypes>
 
Yes, I have just realised this. There are also multiple wonders with multiple Prereq techs such as the Great Lighthouse. I have now fixed the problem. I think it was because I had missed out the two <PrereqTech>NONE</PrereqTech> lines as posted above, or i had a blank line..

Thanks anyway. :)

Problem solved. :)
 
Back
Top Bottom