zResource Promotions

Zebra 9

Emperor
Joined
May 17, 2006
Messages
1,554
Location
Middle of Cyberspace
zResource Promotions v0.1

Version: v0.1
Type: Python MOD COMP w/ INI config
Compatability: Warlords (BtS Maybe, hoping)
Multiplayer: Maybe, would require all human players to have the same copy
File DB Entry: Download Here

Description:
This allows anyone who has an understanding of how to use INI files to give units promotion when the player has a certain resource. For example if I set the INI config w/ code like such:
Code:
[UNITCLASS_SWORDSMAN]
BONUS_IRON = PROMOTION_COMBAT5
Now when the player has iron all of their Swordsmen (Praetorians also count as swordsmen) will receive Combat 5. Now so you know this doesn't remove promotions.

How to use:
This is probably my most user friendly MOD COMP ever. You can enter bonus types, promotion types, and unit classes as their in game name (ie. Warrior instead of UNITCLASS_WARRIOR or Combat III instead of PROMOTION_COMBAT3). Now even though this works on unit classes you can enter a unit type and it will automatically get the unitclass (ie. You could put UNIT_QUECHUA instead of UNITCLASS_WARRIOR or you could put Samuri instead of UNITCLASS_MACEMAN). Now the INI coding is very simple. In the option tag (the tag that looks like [UNITCLASS_WARRIOR], has square braces around it) tells what unitclass the following information goes for. Next you can place the values. This is done by putting the resource type (ie. BONUS_IRON or you could put Iron) then an equals sign telling what promotion this resource gives. So some example code looks like this:
Code:
[Swordsman]
Iron = Combat5
BONUS_COPPER = PROMOTION_COMBAT4
stone = Combat III
[UNIT_AXEMAN]
COPPER = Combat V
BONUS_STONE = COMBAT4
[UNITCLASS_WARRIOR]
STONE = PROMOTION_COMBAT5
This should be strait forward enough. It gives swordsmen Combat V when the player has iron, Combat IV when the player has copper, and Combat III w/ stone. Now it also gives axemen Combat V w/ copper, and Combat IV w/ stone. Then lastly we have warriors getting Combat V w/ stone. Now there is one more thig that can be done. We can tell the game only to give the promotion to the unit if they are inside of their cultural borders. This is done by adding the boolean value True (or yes, 1, or ok) after the promotion type. The resultant line would look like Iron = Combat V, True.

Credits:
Ambreville for the idea
Dr. Elmer Jiggle's for the INI parser
Firaxis for this most awesome game
And course the whole civfanatics community
 
First copy all of this MOD COMPs files in the Python Folder over to zMaxUnits Python folder. Then CvCustomEventManager.py after import zResource_Promos put import zMaxUnitsEventManager then where it sayes
Code:
	# --> INSERT EVENT HANDLER INITIALIZATION HERE <--
		zResource_Promos.zResource_Promos(self)
add zMaxUnitsEventManager.zMaxUnitsEventManager(self). This should do it.:thumbsup:
 
Very nice. So many possible uses, especially if one is thinking of revamping the promotion system at some point....
 
Sort of by the same token, since I was thinking of adding something like a "Stone Weapons" promotion, a "Bronze Weapons" one, an "Iron Weapons" one, then eliminate the resource requirement from units.
 
similar to my thoughts, and it would be awkward to see a stone weapons promotion a copper a bronze, an iron all at once. I mean I like backwards compatability in my video game systems, but not my civ promotions. :D
 
similar to my thoughts, and it would be awkward to see a stone weapons promotion a copper a bronze, an iron all at once. I mean I like backwards compatability in my video game systems, but not my civ promotions. :D
Well I was thinking more alogn the lines of a civilization having Stone and Iron having stronger units then a civilization that only had Iron
 
Having Tin and Copper yes. But mixing stone and iron? How does that make your units stronger?
That's exactly my point. Using the current Modcomp, if I gave resource specific promotions (Like say, Stone gives +5% strength, Copper +10%, Iron +15%) and they didn't cancel out, then havign Stone and Iron would give +20%, while Stone, Copper and Iron would give +30%, while onlt Iron would only give +10%. That is exactly what I don't want.
 
Back
Top Bottom