Slaver Promotion

frekk

Scourge of St. Lawrence
Joined
Jun 21, 2003
Messages
3,151
Location
Kingston, Ontario
This little modcomp gives you a Slaver promotion, available with Bronze Working to units who have the Combat I promotion. Only horse-mounted and foot units are eligible. Naval units, siege units, mechanized units etc cannot have the promotion (nor are they eligible to be enslaved by units with the promotion).

A unit with the Slaver promotion has a 60% chance to capture and enslave another unit, receiving a slave unit. N.B.: The slave promotion will only work if you have the Slavery civic; this promotion will not function under other civics.

A slave unit is like a worker, but there are some important differences. Slaves have only 1 move, but work 50% harder than regular workers. However, they can only build 1 improvement and then they are used up. So if you switch out of the slavery civic, it should not be long before you have no more slaves left.

There are a few things I'd like to do with this, but don't have the skills to do. I don't really know how to do Python per se, but I deduced a few simple things by looking at other mods. I wanted to try and rip the code for sacrificing units from the Mesoamerica mod, but I couldn't figure out how; I also wanted to make it so that if you capture workers or settlers, the captured unit would be a slave, but only if you have the slavery civic. Alas, I couldn't figure out how to do this either.


Credits

-Gurra09, for some of the gametext and his slaves modcomp which inspired this
- Little Red Point for the slave skins
- the promotion button was borrowed from FFH
- the unit icon and event icon button was adapted from a civics button made by frenchman
- the major portion of the Python code for enslaving was by Chrill; some additional parts were supplied by The_J; and some small parts (namely, turning it into a promotion, and making sure panthers and catapults couldn't be enslaved) I managed to do myself.

Use

Unrestricted; feel free to use or modify this in any way you see fit.

Screens:





Download
 
Interesting ... I really like this :). I'm planning to merge it with my mod, if you don't mind :D.

BTW, thanks for sharing your modcomp :goodjob:
 
I having been using this for a little now and I have noticed that you can still get the Slaver promotion even if you are not running under the Slavery civic, is there a way to make it totally unavailable unless you have the Slavery civic?
 
I'm sure it's not that hard for someone who knows Python fairly well, but unfortunately, I don't. It doesn't work if you don't have the slavery civic; but I don't know how to make it so that the promotion is unavailable if you don't have the slavery civic.
 
Sounds like a mod I would release...an incomplete one :( . From a conquered Canadian to a Conquerer Canadian...Screw civics !!! Only economy and brainwashing counts.

None the less...If you permit me...I will try to make this thing adaptable for my RTW mod of Dale's RTW Mod.
 
None the less...If you permit me...I will try to make this thing adaptable for my RTW mod of Dale's RTW Mod.

Anybody can do anything they want with it.

I put it out in the hope that people would find use for it, but also in the hope that people would adapt and modify it and do things with it that I can't do.
 
I having been using this for a little now and I have noticed that you can still get the Slaver promotion even if you are not running under the Slavery civic, is there a way to make it totally unavailable unless you have the Slavery civic?

I don't know Python but I assume the code to prevent the Slaver-promotion should be put here somewhere (in CvEventManager.py):

Code:
	def onUnitPromoted(self, argsList):
		'Unit Promoted'
		pUnit, iPromotion = argsList
		player = PyPlayer(pUnit.getOwner())
		if (not self.__LOG_UNITPROMOTED):
			return
		CvUtil.pyPrint('Unit Promotion Event: %s - %s' %(player.getCivilizationName(), pUnit.getName(),))

Just a wild guess :)
 
I think a tag in the promo.xml is needed like PreReqCivic. This requires changes in the SDK. Not my cup of tea :(

Or maybe this'll work in Python:

def onUnitPromoted(self, argsList):
....
*** code to check if Slaver promo is given ***
*** if not return ***
*** else check for Slavery Civic ***
*** if Slavery = Civic return ***
*** else remove Slaver Promotion, give back XP-points to unit ***
 
Top Bottom