Capture Slaves

strategyonly

C2C Supreme Commander
Joined
Mar 13, 2006
Messages
20,994
Location
MN
This mod component adds a Slave unit that is available only when the Slavery civic is adopted.

UPDATED: 25 Apr 10 2:30 PM

with the help from NotSoGood, thx.

  1. You can get slaves only if you've adopted the slavery civic
  2. There's a chance, that defines the probability to get the slave after combat
  3. Only the attacker gets slaves
  4. You can't get slaves from killing animals
  5. You can't get slaves from killing units in cities
  6. You can't get slaves from killing units (well maybe) that have capture unit type defined (Basically it means units that can be captured. Like workers, settlers.
  7. You get atleast two slaves from razing a city, it should be about 2/3 of the city population


When captured this "slave" has alot of different choices you can do with it. Use it for Joining City, Hurry Production, Trade Mission, Upgrade to other types of units, and the last screenie shows what the Upgrade looks like when completed after selecting the unit.

Once you upgrade to a unit, you can only use for one battle, even if it wins the slave/unit is lost forever.

Each area is now marked: #mod#

Download:

http://forums.civfanatics.com/downloads.php?do=file&id=13322

Spoiler :
credits:
Original code by Roh_Z
African Modern Worker -Bakuel
African Worker (Medieval) -Chugginator
Arabian Worker (Medieval) -Chugginator
NotSoGood updated EventManager



Dancing Hoskuld, has made a modular for this, thx alot, i really appreciate it.:goodjob:

http://forums.civfanatics.com/showpost.php?p=9155258&postcount=122

in the contrib folder look for the init file, then use this:

<events module="CaptureSlaves"/>
 
You've done that yourself?
Great :goodjob:, welcome to python modding :D.


You should label your changes in the CvEventManager with the name of the modcomp's name, so that everybody can easily find it ;).

Btw, when i read the code right, you'll also get slaves when you have serfdom as civic.
I don't know, it that's intended.
 
You should label your changes in the CvEventManager with the name of the modcomp's name, so that everybody can easily find it ;).

Btw, when i read the code right, you'll also get slaves when you have serfdom as civic.
I don't know, it that's intended.

Dang i know i forgot two things, i forgot the first marking of the EventManager but the second one is and so are the XML files
I also forgot those darn credits, but is up there now, to much on my mind, i am working on another slavery one also. Cant get the Immigrants and Great Person mods to work correctly?? Also am working on Military Bases.
 
You should label your changes in the CvEventManager with the name of the modcomp's name, so that everybody can easily find it ;).


OK all are marked by ##mod## now, thx;)
 
Well done SO :goodjob:

Few little suggestions/questions:
1. Maybe you should allow slaves to build roads and improvements, but at a slower rate than normal workers
2. Slaves doing trade missions seems a tad odd to me :p
3. The citizen specialist is from your mod. The code isn't included ;)
I suppose the idea is that slaves can join the city as free citizens, which I think is a good idea. What do those citizens produce in terms of hammers, gold, culture, GPP etc?
4. What happens with the slaves when a civ gets out of slavery? Maybe they should become normal workers or be removed somehow :)
 
I know FFH has something like this already, but this is the first time I've seen a separate modcomp. You may still want to peek at it's code though, since I know they have a script for unit abandonment if you change civics(though it isn't actually applied to slaves; look for Royal Guards)
 
They are probably being sold.

That is correct. Thx

This loks OK,but is he always black?

Thats why if you look at the credits I have one Arabic slave, but then after that it was predominantly mostly blacks that were enslaved.

The modern slave is put there because of this:
In Mauritania alone, it is estimated that up to 600,000 men, women and children, or 20% of the population, are enslaved with many used as bonded labour. Slavery in Mauritania was criminalized in August 2007. In Niger, slavery is also a current phenomenon. A Nigerien study has found that more than 800,000 people are enslaved, almost 8% of the population. Pygmies, the people of Central Africa's rain forest, live in servitude to the Bantus. Some tribal sheiks in Iraq still keep blacks, called Abd, which means servant or slave in Arabic, as slaves. Child slavery has commonly been used in the production of cash crops and mining. According to the U.S. Department of State, more than 109,000 children were working on cocoa farms alone in Côte d'Ivoire (Ivory Coast) in "the worst forms of child labor" in 2002.

And PLS no arguing that all country's had slaves of many different types, thx.
 
Looking at the unit xml i have a few questions?

Why is the Unit ai set to "UNITAI_SLAVE"? that AI type is not defined in the SDK and will probably not work? Haven't tested it out, but the AI will probably have no idea how to use this unit regardless if the function is defined in the XML.

the unit has no "builds" defined either so the unit cannot do any improvements at all (despite the work rate is set to 100). Dunno if you want this unit to be able to do this but it seems reasonable.
 
Well done SO :goodjob:

Few little suggestions/questions:
1. Maybe you should allow slaves to build roads and improvements, but at a slower rate than normal workers
3. The citizen specialist is from your mod. The code isn't included ;)
I suppose the idea is that slaves can join the city as free citizens, which I think is a good idea. What do those citizens produce in terms of hammers, gold, culture, GPP etc? (See below pics), s.o.
4. What happens with the slaves when a civ gets out of slavery? Maybe they should become normal workers or be removed somehow :)
Looking at the unit xml i have a few questions?

the unit has no "builds" defined either so the unit cannot do any improvements at all (despite the work rate is set to 100). Dunno if you want this unit to be able to do this but it seems reasonable.


In the XML i have it that WORKERs are an OPTION, to change the slave to, but i didnt use it. If you want the build options, just erase the <!-- in front and the --> on the other side. (See third pic when you have worker.)
 
Question: The real problem I have with all these slavery modcomps is that slaves are always kept even after switching out of slavery. Is there a way to make it so the slaves disappear (emancipated) after the civilization abandons slavery?
 
Question: The real problem I have with all these slavery modcomps is that slaves are always kept even after switching out of slavery. Is there a way to make it so the slaves disappear (emancipated) after the civilization abandons slavery?

See thats the beauty in this modcomp, you can make your own decisions what to do, if you dont like the slave just promote IT to any of the choices it gives you. And like i said above, if you want a normal worker to be added do what i listed in the above thread.

http://forums.civfanatics.com/showpost.php?p=8502223&postcount=14
 
Top Bottom