[MODCOMP] Building Civic Prereqs

TheLopez

Deity
Joined
Jan 16, 2006
Messages
2,525
Location
Oregon
Building Civic Prereqs
By: TheLopez

Last Update: 09/30/10

Version: v0.4BtS
Patch Compatibility: Beyond the Sword v3.19
MP Compatible: ?
Download Mod v0.4BtS

Version: v0.3w
Patch Compatibility: Warlords v2.0.8.0
MP Compatible: ?
Download Mod v0.3w

Version: v0.2
Patch Compatibility: v1.61
MP Compatible: ?
Download Mod v0.2

Description:
This mod adds new tags allowing for the specification of one or more civics as
prerequisites for constructing a building. As an example all "cathedrals" now
require the "Organized Religion" and "Hereditary Rule" civics to be
constructed. To achieve this the following has been added before the
<PrereqReligion> tag:
Code:
			<PrereqCivics>
				<PrereqCivic>
					<CivicType>CIVIC_ORGANIZED_RELIGION</CivicType>
					<bEnabled>1</bEnabled>
				</PrereqCivic>
				<PrereqCivic>
					<CivicType>CIVIC_HEREDITARY_RULE</CivicType>
					<bEnabled>1</bEnabled>
				</PrereqCivic>
			</PrereqCivics>

-----Notes to Modmakers-----

If you want to use this mod component in your mod I have tried to make things
as easy as possible for you. In the XML files I have added
<!-- Building Civic Prereqs Start --> and
<!-- Building Civic Prereqs End --> in all of the places where changes were
made, in the SDK files I have added // < Building Civic Prereqs Start > and
// < Building Civic Prereqs End > in all of the places where changes were
made and in the Python files I have added # < Building Civic Prereqs Start >
and # < Building Civic Prereqs End > in all of the places where changes were
made.

-----Version Information-----

-----v0.4BtS------

- Rewrote the mod to be compatible with Beyond the Sword v3.19

- Changed the tag structure so it is easier to maintain the SDK code.

- Removed the <bInactiveWithoutCivicPrereqs> tag since it doesn't make sense.
It can be added back in if someone wants it

Spoiler :

-----v0.3w------

- Updated to be compatible with Warlords v2.0.8.0 patch.


-----v0.2w------

- Changed the <PrereqCivic> tag to <PrereqCivics> to allow requiring more than
one civic to construct a building.

- Added the <bInactiveWithoutCivicPrereqs> tag to indicate that a building
should be automatically obsoleted if the civics required to construct the
building are no longer set.

- Updated the "cathedral" definitions so they require the "Hereditary Rule" and
"Organized Religion" civics and are obsoleted when those civics are no longer
set.

-----v0.1w------

- Setup the Building Civic Prereqs infrastructure

- Added the new <PrereqCivic> tag that allows the specification of a civic as a
prerequisite for construction of a building.

- As an example of how to use the new tag all "cathedral" definitions have been
updated in the CIV4BuildingInfos.xml to require the "Organized Religion" civic.


-----===Credits & Thanks===-----

- Exavier - Composite Mod - readme.txt format

- Peuri - For the idea for this mod
 
That will be included in the next version of the mod...
 
The building will remain in the city just like in real life... for example just because Russia switched from hereditary rule to communism doesn't mean all of the royal palaces, etc. were demolished right?
 
That's true... and makes perfect sense. Why tear down a perfectly good building just because you change civics?

But say for example, you make a "Slave Camp" that requires the civic Slavery. This Slave Camp could create a unit called a Slave that would work faster than a regular worker.... But then you switch from Slavery to Emancipation. Still having this Slave Camp building that can still generate Slaves wouldn't make much sense anymore.

Unless of course you also download and use the Unit Civic Prereqs and tag the Slave unit to also require Slavery. This would in turn make the Slave Camp useless.


Hmmm... Perhaps I just answered my own question... :lol:


Great work on this mod though! I love the concept... can't wait to start using it!
 
Can't remember if I proped this in this or the Unit Civic Prereqs Mod thread, but let me say theses little basic additions of control are the best changes as far as modding goes. :thanx:

Now that you have this added for Units and Buildings, how about a Improvements Civic Prereqs Mod so that workers can only build certain Improvements under certain Civics. :)
 
Dom Pedro II said:
Well, even if the building physically remains, it should become inactive.

Ah I like that, all the effects from the building should be negated except for the cost to maintain the building. How about that? Then people can add the old building demolition mod since it would make sense to have it.
 
Works for me :)


EDIT: I was also wondering about civic prereqs for Improvements too...

I was also wondering about Bonus prereqs for Improvements as well since I was a bit perplexed when I saw that you can only set a prerequisite bonus for constructing route types...

Yet another feature that was in Civ3 but was left out in Civ4...


Also, I was thinking that in addition to being able to only build certain improvements or buildings to get or extract bonuses, it might be good to also have bonuses that can be "banned" under certain civics..

For example, if you have Theocracy, you might not be able to have or trade for Wine. Or if (as in my mod) Slavery gives a Slave resource, you couldn't get a Slave resource from somebody else if you're under Emancipation, for example.
 
TheLopez said:
Ah I like that, all the effects from the building should be negated except for the cost to maintain the building. How about that? Then people can add the old building demolition mod since it would make sense to have it.

It would come in handy if you ever switch back to that Civic, though, because the building would already be in place.
 
Agreed.. it is important though that if not removed, the buildings must at least become inactive... (i prefer inactive to removed anyway)

Because otherwise, my Secret Police HQ will continue to rain fear and terror down upon the populace of my Representative Democracy instead of my Police State :)
 
Just my opinion, but if the building goes inactive or not should be controlled by an extra tag.

Something like
<PrereqCivic>CIVIC_ORGANIZED_RELIGION</PrereqCivic>
<DisableWithoutPrereq>1</DisableWithoutPrereq>
 
In the Unit Civic Prereq thread Jeckel wants a civic prereq for improvements, should I also do the disable tag for that mod too?
 
That would probably be best. I mean, it would probably be useful there too... I can already think of at least one example:

Wineries being disabled under Theocracy.
 
I agree with Jeckel that it is these smaller, functional flexibility mods that are often the best. Usually because the addition of just a few extra tags to something like BuildingInfos, TechInfos or CivicInfos can have such a HUGE knock on effect-as dozens of XML-only modders go to town with the new tags ;). Brilliant work, TheLopez, I LOVE your work :).

Aussie_Lurker.
 
TheLopez said:
Ah I like that, all the effects from the building should be negated except for the cost to maintain the building. How about that? Then people can add the old building demolition mod since it would make sense to have it.

But maybe some culture generating should be left? Some buildings is still turist attractions and such.
 
Zuul said:
But maybe some culture generating should be left? Some buildings is still turist attractions and such.
Yeah, like what happens when a building becomes obsolete. It loses its functionality, but the culture boni still remain.
 
Top Bottom