[MODCOMP] Unit Civic Prereqs

TheLopez

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

Last Update: 11/08/06

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 building a unit. As an example all missionaries now require
the "Organized Religion" and "Hereditary Rule" civics to be built. To achieve
this the following has been added after the <PrereqReligion> tag:
[TAB][TAB][TAB]<PrereqCivics>
[TAB][TAB][TAB][TAB]<PrereqCivic>CIVIC_ORGANIZED_RELIGION</PrereqCivic>
[TAB][TAB][TAB][TAB]<PrereqCivic>CIVIC_HEREDITARY_RULE</PrereqCivic>
[TAB][TAB][TAB]</PrereqCivics>
[TAB][TAB][TAB]
Also, a tag has been added to indicate that a unit should be automatically
disbanded if the civics required to build the unit are no longer set.


-----Images-----
Spoiler :








-----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
<!-- Unit Civic Prereqs Start --> and <!-- Unit Civic Prereqs End --> in all
of the places where changes were made, in the SDK files I have added
// < Unit Civic Prereqs Start > and // < Unit Civic Prereqs End > in all of
the places where changes were made and in the Python files I have added
# < Unit Civic Prereqs Start > and # < Unit Civic Prereqs End > in all of the
places where changes were made.

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

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

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

- Added the <bDisbandWithoutCivicPrereqs> tag to indicate that a unit should be
automatically disbanded if the civics required to build the unit are no
longer set.

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

-----v0.1------
Spoiler :

- Setup the Unit Civic Prereqs infrastructure

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

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


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

- Exavier
[TAB]Composite Mod - readme.txt format
[TAB]
- Peuri
[TAB]For the idea for this mod[TAB]
 
I think another good point would be that units created under a particular civic should be destroyed if the player switches to another one... but that might just be as easy as a bit of python coding.

Like the Slave unit in some mods I've seen.
 
Yet another fantastic mod by the massively talented TheLopez :). Well done, mate, this is truly amazing stuff!!!

Aussie_Lurker.
 
I'm going to use this to create a nasty little secret policesque unit for Police State that will be used for city defense and "dealing" with dissenters and would-be revolutionaries.
 
Perhaps an additional datamember on units <bDestroyWithoutCivic>
It only has an effect if the first <PrereqCivic> is being used and it defaults to false if not specified. When it is set to true changing out of the Required Civic will result in imediate deletion of all the units of that type, otherwise they can continue to exist (but ofcorse no more can be built).
 
I think the extra tag Impaler[WrG] proposes would be a good addition. There are many situations that will require the units being destroyed when you leave a civic, and there are also plenty of situations where you would want to let the player keep the units. This is definetly a circumstance that would behove a new tag. :)
 
Updated to v0.2
 
Updated Warlords version to be compatible with the v2.0.8.0 patch.
 
Top Bottom