Slavery Mod

Discussion in 'Civ5 - Mod Components' started by Leugi, Jun 17, 2013.

  1. Leugi

    Leugi Supreme Libertador

    Joined:
    Jan 25, 2013
    Messages:
    1,675
    Location:
    Bolivia
    Alrighteous! I've been working on an interesting idea in order to allow some sort of Slavery into the game... Still on a Beta level, testing will be appreciated, specially for suggestions and balance issues... Click on the Chart Image to download:



    Features:

    • New Elements:
      • Slave Worker: A special Slave unit, which may not be produced through normal means. The slave has faster work rate than the normal worker, and may be expended to rush production in a city. However, it adds :c5angry: Unhappiness, and its health drops each turn.
      • Slave Prison (Building): May only be built on :c5occupied: Occupied cities. It has 3 Slave Slots, which allow generation toward Slave Workers. May not be built if a Courthouse is built and doesn’t remove :c5angry: Unhappiness. Becomes obsolete upon discovery of Radio.
      • Slave (Citizen): Yields +3 :c5production: Production, and +2 :c5gold: Gold. Works towards generation of Slave Workers.
    • How to get Slaves?
      • The main way of getting slaves is by conquering a city. Once you conquer a city you may be able of building a Slave Prison, and then use Slave Citizens. Using Slave Citizens will work towards generating Slave Workers.
        This way you can assure yourself to get Slaves, at the price of unhappiness, however. You may sell the Slave Prison if you want to switch to a Courthouse.
      • Another way is capturing another player’s Settlers or Workers. Instead of becoming simply workers, they become Slaves.
      • More ways of getting slaves are planned for future releases.
    • How to free or stop using Slaves?
      • If you own a Slave Prison, you may sell it. Once you do, build a Courthouse and stop thinking about slaves and their Unhappiness.
      • If you are at war with an enemy, and capture their Slave, you will technically free him, transforming him into a Worker. Freed Workers work faster than normal workers but slower than Slaves.
      • You may also “upgrade” a Slave to a Worker with gold. This requires a costy sum of gold however.
      • After researching Radio, you will lose the benefits of the Slave Prison.

    Screenshots:
    Spoiler :










    TODO LIST:
    • Find a way of changing the Worker adquired from bullying a city-state to a Slave.
    • Find ways for AI to make use of Slaves (they mostly puppet cities, so...)
    • Find ways of making AI hate you more if you use Slaves? Maybe?
    • Add Slaves to some policies and/or Wonders
    • Find a way of changing the "A Slave was born" notification, to make it a bit less happy than the Great Person notification, and using another sound...
    • (Post BNW) See if a World Congress resolution banning Slaves is possible to mod.
     
  2. lp_04

    lp_04 Prince

    Joined:
    Sep 2, 2012
    Messages:
    342
    Location:
    Leiria, Portugal
    You never stop impressioning me :) Amazing concept, really, and interesting art. The world congress for BNW is a nice idea, seriously. By the way, can we change the XML for providing the ability to a civ of generating the slave prision in their own cities or something? (I was thinking about african civs, like kongo, who traded slaves) It would be great. Just a question. With time, I will play this mod and send you the results of my testing, Leugi
     
  3. Leugi

    Leugi Supreme Libertador

    Joined:
    Jan 25, 2013
    Messages:
    1,675
    Location:
    Bolivia
    Yeah, it shouldn't be too hard as my mod isn't any complex at all anyway (and in fact, my original plan was doing this for a UA of a Civ (which I didn't know yet which one would it be), but I didn't know which so in the end I made it a whole mod)... Pretty much it could work as a UB replacing the Courthouse, would make sense. (But perhaps, for balance issues, the Slave Worker could be a Great Engineer override too or something...)
     
  4. Buridan

    Buridan Chieftain

    Joined:
    Aug 9, 2011
    Messages:
    48
    Location:
    Germany
    haven't tried out this mod yet - but first I have some questions.
    Does it mean you can get a slave via great persons and via capturing a settler/worker? IMO a great person should be much stronger than a slave that was captured. Especially since the progress towards new greater persons becomes longer with each great person you get.
    I don't know if it is possible - but can you make a puppet-city automatically choose to build a slave prison? (I think about allowing the slave prison to be built when the current owner is not the founder of the city and the city must not have a courthouse - thus the puppet-city can build it itself and I don't have to annex it)
    About the AI hating you for using slaves - I think it is enough if you make it analogical to the "we hate you for having the SP Order - since we have SP freedom" - etc...
    Freedom-civs will of course hate slaves; while Autocracy-civs maybe like you - but I'm really not sure if its plausible =)

    And last thing - what about including religion? You could make new beliefs that work especially good for slaves.
    E.g. reducing the unhappiness for annexing a city, adding a free slave slot withouth having to build the slave prison, ...
     
  5. Leugi

    Leugi Supreme Libertador

    Joined:
    Jan 25, 2013
    Messages:
    1,675
    Location:
    Bolivia
    Yeah well, it's actually quite strong if you ask me (and slaves work towards Slave Units faster than other specialists, like 10 points or so), and actually the progress for other persons is also some kind of penalty for Slaves.

    Slaves work twice faster than workers, and although they will eventually die, they last about 20 turns. And they can hurry production half as an Engineer. So they may count as a Great Worker to some extent.

    The problem with capturing though is their Enslaved! promotion, since you will lose some or many turns in getting the Slave to your city, hence your Slave will last less than producing it directly on the city.

    Puppeted cities can build Slave Prisons, however as you can't directly control them, it seems it isn't their priority. In my last game a Puppet built a Slave Prison as its 3rd building, but didn't use the Slave Specialists after some more time... So, although you can get Slaves from Puppets, it is a very uncontrolling way of doing so.

    I mostly go for Order actually :p ... But yeah, Ideologies' interaction could work nicely on that extent, as in Autocracy may build Concentration Camps instead of Prisons in all their cities; Order produces Engineers instead of Slaves and Freedom can't produce Slaves at all but has some other bonus...


    Hmn... yeah, that could work... New Beliefs for Slavery (or against if there's some way of doing so) could work well for the next version :goodjob:

    Thanks for the comments!
     
  6. lp_04

    lp_04 Prince

    Joined:
    Sep 2, 2012
    Messages:
    342
    Location:
    Leiria, Portugal
    I tried to play this without any other MOD activated and the TechTree did not displayed well. There were only the first 5 techs and everything else was blank. Maybe I'm doing something wrong that is obvious, but with the exams I have not time to go deep into this.

    Ps: First testing not that produtive... sorry
     
  7. Leugi

    Leugi Supreme Libertador

    Joined:
    Jan 25, 2013
    Messages:
    1,675
    Location:
    Bolivia
    Actually its very useful... And now its fixed. So download again, I wouldn't have noticed the problem otherwise Thanks
     
  8. lp_04

    lp_04 Prince

    Joined:
    Sep 2, 2012
    Messages:
    342
    Location:
    Leiria, Portugal
    I just tried a little but. It is awsom Leugi, really. Only one problem: captured setlers turned into workers. Can they turn into slaver AND workers or is it a problem in the mod? These new slaves should be with less life I think, but its a minor thing. Maybe the slave citizen could provide 4 production and only 1 gold (so we must consider gold and the huge maintenance of the prision when building slaves). Just ideas. The overall is very good.

    By the way, their ability to hurry production makes it easier to play with Puokai's Wonders. Thank you both

    EDIT: I've moved the slave prision to a Code of Laws, a classical era tech in a changed tech tree mod I'm working on. I think it is more balancing. I played a game with russia, conquered London in 30 turns (quick) and built slaves too easily, because slave prision was at minning. Code of laws (or other early classical tech) makes this ability of enslave more balanced as it apears later (but not too late) in the game.
     
  9. FramedArchitect

    FramedArchitect Reluctant Modder

    Joined:
    Mar 25, 2012
    Messages:
    798
    Location:
    Missouri
    Great idea! I had implemented something like this as a UU/UA for a civ, but I like the mechanic being universal, too.
     
  10. Genghis.Khan

    Genghis.Khan Person

    Joined:
    Jun 9, 2012
    Messages:
    934
    Location:
    Somewhere
    a small suggestion:

    Code:
    -- PuppetCityPopup.lua
    
    -- Initialize 'Enslave Population' button.
    	local OnEnslaveClicked = function()
        local iCityPopulation = city.GetPopulation() 
    	local iUnhappinessForEnslaving = math.floor(iCityPopulation * 0.5) 
    		pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_SLAVEMARKET"], math.floor(iCityPopulation * 0.25);		
    	end
    	
    	local buttonText = Locale.ConvertTextKey("TXT_KEY_POPUP_ENSLAVE_CITY");
    	local strToolTip = Locale.ConvertTextKey("TXT_KEY_POPUP_CITY_ENSLAVE_INFO_ANNEX", iUnhappinessForEnslaving);
    	AddButton(buttonText, OnEnslaveClicked, strToolTip);
    
    -- Basically add a button in the Puppet/Annex/Raze Dialogue that would grant you free Slaves equal to 1/4 of the City's population. You would have to chose wheter -- to Puppet/Raze/Annex Anyway
    Warning. This code does not probably work, it's ust a suggestion pseudo-code
     
  11. Ekmek

    Ekmek on steam: ekmek_e

    Joined:
    Aug 7, 2002
    Messages:
    6,060
    Location:
    San Diego, California
    nice!

    I actually thought it would be cool to change the unemployed specialists to be slaves and they create slave unit points. This idea would probably work best if production outside the city was limited more (mines only for resources for example) and only from inside a city (slaves or buildings).
     
  12. Leugi

    Leugi Supreme Libertador

    Joined:
    Jan 25, 2013
    Messages:
    1,675
    Location:
    Bolivia
    I'd have both. Unemployed are a nice way of getting internal Slaves (and makes sense historically). While conquering is a more safe way of getting them.

    I'll test your code Genghis, sounds like a nice idea... Might you have a way of changing the unit that one gets from Bullying a city-state to a slave?

    Also, yes, it might be a good idea to make it classical age.
     
  13. Ekmek

    Ekmek on steam: ekmek_e

    Joined:
    Aug 7, 2002
    Messages:
    6,060
    Location:
    San Diego, California
    Is there a way to make specialists more unhappy? I think the slave specialists should be equal to engineers but more unhappy


    OT - I also wanted to make a mod that had a more crowded map (probably twice the CS) and you didn't build settlers. you only got settlers from wonders, SPs, and as great people but using the unemployed specialist in the early era. then around the caravel time you'd get colonists. I just feel that the open expanse settling of the early game (although fun) isnt really historical. so the coonists and the big expansions would be mid game not early game.
     
  14. Leugi

    Leugi Supreme Libertador

    Joined:
    Jan 25, 2013
    Messages:
    1,675
    Location:
    Bolivia
    There could be an interesting way of achieving this. Unit Classes actually can have a Max Player Instances (<MaxPlayerInstances>n</MaxPlayerInstances>) like wonders, it's on the very UnitClasses table. However, I don't know if these instances count if the unit is death or expended like a settler would be...
     
  15. Ekmek

    Ekmek on steam: ekmek_e

    Joined:
    Aug 7, 2002
    Messages:
    6,060
    Location:
    San Diego, California
    hmm. thats a way to do it. But I think just not making them buildable like great people would work for the early areas would do it.

    Another OT - can you make it so you only rush buy units but cant build them? I know its the other way around but I wonder if it can be done to rush units but make it so a player cannot build them.
     
  16. Leugi

    Leugi Supreme Libertador

    Joined:
    Jan 25, 2013
    Messages:
    1,675
    Location:
    Bolivia
    The biggest issue with making a relatively normal unit work with the GP system is that A: when it's born it says "Great Person Born" even if its a normal warrior unit, and B: every time it appears it adds more turns to wait to all other GPs.

    With the slaves that's useful as it makes sense as some kind of penalty, but I don't know if that would be well with Settlers.

    About only rushing not building... I don't know if there's a way of doing this, it's almost like a variant of the Buy from Faith... Hmn...
     
  17. mjjepper

    mjjepper Chieftain

    Joined:
    Jan 16, 2012
    Messages:
    29
    I don't care for how slaves are more productive then engineers...

    Slave populations are generally less productive than free citizens all things being equal. I want to mod it so that slave specialists only produce 1 [hammer] 1[gold]. However do not contribute to unhappiness ( they don't really get a vote do they? and you can conquer more territory and negate some of that unhappiness) and maybe only require 1 [food]. Is it possible to selectively have just one of the specialist types not contribute to unhappiness (or would this conflict with the freedom tenants?).

    Overall a very good idea and implementation. I hope I can figure out how you did it all so that I can mod it for my own purposes.
     
  18. Leugi

    Leugi Supreme Libertador

    Joined:
    Jan 25, 2013
    Messages:
    1,675
    Location:
    Bolivia
    I usually treat "Unhappiness" as Unstability though, and having slaves becomes progressively more unstable, as they can end up rebeling (though not much in early ages, because they grow accustomed to it)

    It is possible to select specialists, you just have to manually assign citizens, and that's very useful... Also, the mod by itself is truly simple, as I'm not truly a lua programmer, its mostly xml. I use the system for creating Great People to create the slaves, it works nicely...

    Aaaaaaaaaaaaaaaaanyway... As soon as I update some of my civs, I'll be working on an update for this Mod. The changes are roughly as follows
    • Move the Slave Prison to another technology (Classic)
    • Change the slave specialists yields, a mixture of balance and historically adequate.
    • Add a new not so great slave for when you capture Settlers and Workers.
    • Search for a way of making unemployed citizens contribute to slaves.
    • Add some interaction with Ideologies and Beliefs, and maybe policies. For Freedom, I want a bonus to tourism to civs that have a Slave Prison (as in, we want to influence you guys to get free)... For Order, stop using slaves but having ennaced workers instead, for Autocracy, I don't know.
    • Add a World Congress Resolution: Abolish Slavery. What it will do is stopping the production of Slave Great People, and provide +1 happiness to cities with courthouses.
    • Implement Genghis Khan's code up.
     
  19. JFD

    JFD Kathigitarkh

    Joined:
    Oct 19, 2010
    Messages:
    9,129
    Location:
    The Kingdom of New Zealand
    Hi Leugi,

    I want to ask if you would give permission for me to use the Slave unit icon that you have in my Sovereignty Revised mod (http://forums.civfanatics.com/showthread.php?t=498864) - full credit would of course be given. Slavery is to be a policy under the Might tree and this policy grants the ability to upgrade Workers into Slaves and to capture them from cities. If I can use the icon that you have, it would save me the time for making other arrangements for its creation.

    This is a great mod and it is actually what inspired that policy, so I would be grateful if you obliged.

    Thanks for your consideration.
     
  20. Leugi

    Leugi Supreme Libertador

    Joined:
    Jan 25, 2013
    Messages:
    1,675
    Location:
    Bolivia
    Sure! You may use the Slaver's modelskin if you wish too :goodjob:
     

Share This Page