Slaves, Hostages and Prisoners of War

While I was adding in the Specialists for disease control, already there just not activated, and Crime Prevention, I needed to revisit the code for ending slavery. I did find a bug but not the one TB suggested.

When you end slavery all the settled slaves are put into a two pools one which are converted into population, immigrants and freed slaves and the other where the specialist is converted into a special unit.

You should never get more than 2 freed slaves in any one city as each 3 in the first pool is either converted into a population in the city (up to city size 7) or an immigrant. (I am thinking of changing this so that instead of three Immigrants you get a Settler.)

Production and now Commerce slaves are converted into Caravans; Food slaves into Food Caravans; Entertain and now Tutor slaves are turned into Entertainers; Health and the new Sanitation slaves are turned into Healers; Crime Prevention slaves are turned into Crime Prevention units.

I am disabling the Military slaves as they don't work the way I wanted and are just the same as Production slaves currently.

The new Sanitation slave will provide a small amount of disease and pollution prevention. It requires Sanitation and a Sewer System.

The new Crime Prevention slave will provide a small amount of crime prevention and require the same buildings as the Crime Prevention units.

Still to do is to figure out which unit in the line the unit should be converted to. It will be the one before the one you can build so that you need to spend some money to get them "up to form" so to speak. At the moment you still only get the first in the line.
 
Military slaves? Do you mean military units formed from slaves? Wouldn't that just beg for a slave revolt?
 
He means the military production slave specialists, which currently just work as universal production rather than only applying to military unit production.

Regarding actual slave military units, I refer you to the Ottoman Janissaries for a real life example, though C2C's military captives don't really represent the same situation. The C2C captives upgraded to military units would be more along the lines of mercenaries or other soldiers lacking any kind of national identity or loyalty switching sides after being captured than anything else, I suppose.
 
Which is currently available.
That's what I mean, I was taking the current game mechanic and coming up with a historical example that more-or-less fits the mechanic, rather than the other way around.

Just a thought though, can we make military captives inherit the XP value (or a percentage thereof) of the unit they're captured from? I'm currently at work so I can't look at the capture code, but it seems like an interesting idea to me if possible.

Also, is it actually possible for specialists to apply a +/- Military Unit Production modifier? The main reason I'm interested is more due to Great Military Instructors and ways to implement some sort of diminishing returns on stacking them in one city, but it would be applicable to slaves as well. The idea for GMIs is for them to increase unit quality at the cost of unit quantity, and introduce a sort of "soft limit" on how many of them you can pile into one city.
 
While I was adding in the Specialists for disease control, already there just not activated, and Crime Prevention, I needed to revisit the code for ending slavery. I did find a bug but not the one TB suggested.

When you end slavery all the settled slaves are put into a two pools one which are converted into population, immigrants and freed slaves and the other where the specialist is converted into a special unit.

You should never get more than 2 freed slaves in any one city as each 3 in the first pool is either converted into a population in the city (up to city size 7) or an immigrant. (I am thinking of changing this so that instead of three Immigrants you get a Settler.)

Production and now Commerce slaves are converted into Caravans; Food slaves into Food Caravans; Entertain and now Tutor slaves are turned into Entertainers; Health and the new Sanitation slaves are turned into Healers; Crime Prevention slaves are turned into Crime Prevention units.

I am disabling the Military slaves as they don't work the way I wanted and are just the same as Production slaves currently.

The new Sanitation slave will provide a small amount of disease and pollution prevention. It requires Sanitation and a Sewer System.

The new Crime Prevention slave will provide a small amount of crime prevention and require the same buildings as the Crime Prevention units.

Still to do is to figure out which unit in the line the unit should be converted to. It will be the one before the one you can build so that you need to spend some money to get them "up to form" so to speak. At the moment you still only get the first in the line.
So all these specialists become units suddenly? That can't rejoin the city in any way other than as units on buildups? I suppose that's not terrible, particularly if we can get them some XP and ongoing training XP soon. The thing I struggle with here is the immigrant and worse with a settler. I really don't think the unit should be unable to join a city if the population is over a particular amount. Usually, by this time in the game, cities already far exceed the limit for the immigrant to join and there's no more space to settle for settlers. Furthermore, that's the whole thing I guess I would complain about is that your best cities take the worst hit. Maybe I'm not understanding everything fully though because freed slaves are also there and I'm not sure what capabilities you've given them yet.

I have to admit it's been a long time since I've experienced the transition and it may well be better balanced than it was when I experienced it last.
 
Just a thought though, can we make military captives inherit the XP value (or a percentage thereof) of the unit they're captured from? I'm currently at work so I can't look at the capture code, but it seems like an interesting idea to me if possible.
It's possible and was something intended for some time now. What complicates it is that captives can't have any XP, in part because they cannot have any promotions. There are some underlying DLL programming rules that would need to be altered and I haven't done the research on this yet fully. I really wanted to have the unit remember what it once was and what promotions it once had and if it were switched back to military or be liberated, it would return to what it once was. If somehow turned into a different unit type then have it pick up what promotions would still apply from what it had before as well.

Also, is it actually possible for specialists to apply a +/- Military Unit Production modifier? The main reason I'm interested is more due to Great Military Instructors and ways to implement some sort of diminishing returns on stacking them in one city, but it would be applicable to slaves as well. The idea for GMIs is for them to increase unit quality at the cost of unit quantity, and introduce a sort of "soft limit" on how many of them you can pile into one city
I THINK it would take a new tag but sure it's possible. I could guide you through the process of tag creation if you like. I believe that's the best way to take steps into learning how to work with the DLL anyhow. Quite easy to teach how to add a tag and since you have some aptitude for the programming, it would give you a good foundation on understanding the big picture of the code structure. That kind of tag, in particular, would be a very good type to start with. Let me know if you want to take this step.
 
I think they were abducted as children if not toddlers and then brainwashed. I don't think they really felt like slaves. And when they did revolt, well: https://en.wikipedia.org/wiki/Auspicious_Incident
The first official historical use of slaves was to use them as military. Seems funny today yes but back when Sumeria was doing it they made it work somehow. I can't say I understand how exactly.
 
So all these specialists become units suddenly?

Yes that is the way it has always been. The total number of settled slaves that can't become a special type of unit is divided by 3 and that value is added to the city population up to a maximum of 7 (matches the immigrant limit - both the immigrant limit and this one should probably be externalised into global variables MAX_POP_FOR_IMMIGRANT_TO_JOIN and MAX_POP_FOR_SLAVE_SPE_TO_JOIN perhaps.). Any excess become Immigrants and any left over after the division by 3 become Freed Slaves.

For each specialist slave that can become a unit you get a unit. This is currently the first unit in the line, I want to make it the one before the latest in the line.The reason for not giving the latest is because slaves would not normally have access to the latest and best training and equipment.

That can't rejoin the city in any way other than as units on buildups? I suppose that's not terrible, particularly if we can get them some XP and ongoing training XP soon.

They should be getting all the promotions and experience that a new unit of that type would get if built in the city. It is just a matter of changing a 1 to 0 or vice versa to get it to happen.

The thing I struggle with here is the immigrant and worse with a settler. I really don't think the unit should be unable to join a city if the population is over a particular amount. Usually, by this time in the game, cities already far exceed the limit for the immigrant to join and there's no more space to settle for settlers. Furthermore, that's the whole thing I guess I would complain about is that your best cities take the worst hit. Maybe I'm not understanding everything fully though because freed slaves are also there and I'm not sure what capabilities you've given them yet.

I have to admit it's been a long time since I've experienced the transition and it may well be better balanced than it was when I experienced it last.

This means you are keeping Slavery far too long and I need to implement the down side better. Do we have a tag that gives a percentage of the population unhappy? For example if you have Zoroastrianism in your city then 10% of your population should be unhappy and if it is your state religion 70% of your population should be unhappy.

Until we get the population limiting factors in place I don't see it as a problem but as a solution to an OP mechanism. Civ III and earlier had limits to population by infrastructure to represent the death from disease that was so common prior to the implementation of those infrastructure buildings. We don't want such "artificial" limits so we need to introduce diseases that will kill your population off. I have a test version of a couple of these but they are proving to be too "un-fun" when applied in a manner approaching reality.

There is the idea still to be explored of Refugees these would be able to settle in a city but we need a mechanism for them to provide an initial malus that declines over time. They need to be able to take their cultural identity with them.. and so on. They would also be able to build Refugee Camps on a plot destroying any improvement on the plot. Others may join them. Such a Camp in your territory would cause problems unless you did something about it... With enough effort it may become a city or you may be able to disperse it to your other cities.

We can do the happiness/unhealthiness malus that ends at a set turn but we don't have a similar mechanism for auto builds which would be useful. Eg we could have an three auto builds each giving -1:happy: and +5 crime, one lasting 15 turns, one lasting 10 turns and one lasting 5 turns. Or some other mechanism that would allow this. Rev used to be the mechanism until it broke.

If we had that then we could have Freed Slave Immigrants as well.

Freed Slaves can still join the city as food/population points. The problem with that is that they count as 1/3rd of the first population point not the latest.
 
This means you are keeping Slavery far too long and I need to implement the down side better.
Really? Slavery should end around the beginning of the Industrial right? This situation is usually in place by the end of the Ancient at the moment. In the MP game, I'm hedged in with nowhere to grow (though I suppose this could be a cool way to get some filler cities founded without having to try to go about doing so.) Sure I might open up some more land later with naval advancements but I'm pretty sure those spots are covered by other civs already too.
Do we have a tag that gives a percentage of the population unhappy?
I THINK there is a happiness % tag. It would work with the same wording as the health% tag in use on the aqueducts. Negative happiness is unhappiness.
We don't want such "artificial" limits so we need to introduce diseases that will kill your population off. I have a test version of a couple of these but they are proving to be too "un-fun" when applied in a manner approaching reality.
This is why I figured disease would inflict unhealth by % of population to represent the mortality rate. This way you have a crisis to manage rather than an outright slap in the face. We'll get to working on that stuff together fairly soon now I think.
There is the idea still to be explored of Refugees these would be able to settle in a city but we need a mechanism for them to provide an initial malus that declines over time. They need to be able to take their cultural identity with them.. and so on. They would also be able to build Refugee Camps on a plot destroying any improvement on the plot. Others may join them. Such a Camp in your territory would cause problems unless you did something about it... With enough effort it may become a city or you may be able to disperse it to your other cities.
The idea project has the intent to setup exactly this sort of functioning, where refugees bring their 'ideas' with them and it's not always a good thing - though sometimes there is some desired enrichment from it.
Freed Slaves can still join the city as food/population points. The problem with that is that they count as 1/3rd of the first population point not the latest.
Ok. This makes sense. I've been thinking lately that we may be better served by having a static rather than exponential increase in population per point. See if you can play with that math in your head a bit and come up with a suitable answer to how many people a population point really should represent on a static basis. Something I toy with mentally now and then. Would make a lot of things a whole lot easier to model.
 
Really? Slavery should end around the beginning of the Industrial right? .

State run - probably yes. But there is a lot of private slavery still happening. e.g. In the UK (who I believe abolished state run slavery first) because we are still currently in the EU and can not control our borders (until Brexit ) - a lot of slaves are brought in from Europe and other countries. Also a lot of Chinese are smuggled in and are used as slaves. A lot were drowned a few years ago as they were being used to collect seafood in Morecombe bay, they did not know the tidal patterns.
 
Last edited:
This is why I figured disease would inflict unhealth by % of population to represent the mortality rate. This way you have a crisis to manage rather than an outright slap in the face. We'll get to working on that stuff together fairly soon now I think.

You keep using "slap in the face" for things that I see as a minor inconvenience that allow some interesting tactical and stratigic decisions in non combat situations.

The most memorable game I have had was in Warlords with a mod that did religion and disease very differently.

One disease Smallpox had a two level effect one (extreme) when you had never had it before and a minor follow up one later in the game which is smaller than our current plague effect. The first effect was to reduce the population in a city to the integer square root, so a pop 20 becomes a pop 4 city. Optionally units would go to 10% health if they had higher health. The disease spreads extremely fast, it would sweep a moderately sized pangea in 3 turns making it balanced.

The first to discover Animal Husbandry would get the disease. This meant that if no one on your continent discovered it first that you would get the disease when ocean sailing and trade became available; but that means that you get it before those nations can get any units across to benefit in attacking you as you will mostly be recovered by then. Unlike what happened in the New World historically.

The memorable game was one where someone on the other continent got "Animal Husbandry" first. This meant I saw all my cities shrink in size dramatically and my armies very damaged. Since it happened to all my neighbours also, those agreed to a truce. Our cities with infrastructure grew very fast in part because most had enough food in store for a 3-5 population growth on the next turn.​

Ok. This makes sense. I've been thinking lately that we may be better served by having a static rather than exponential increase in population per point. See if you can play with that math in your head a bit and come up with a suitable answer to how many people a population point really should represent on a static basis. Something I toy with mentally now and then. Would make a lot of things a whole lot easier to model.

It is not that easy since the food required for the next population growth also goes up and I am sure there are other assumptions and mechanisms which are based on the current model.​

I suppose that the "food from settling slaves" does count as a constant number of people so it is probably fine as is.

Another thought I had on settling immigrants and migrants is to allow the Administration line of buildings to increase the cut off level for allowing settlement. This we can do.
 
Another thought I had on settling immigrants and migrants is to allow the Administration line of buildings to increase the cut off level for allowing settlement. This we can do.
What's the justification, exactly, for having a limit at all?
 
What's the justification, exactly, for having a limit at all?

The limit came with the mod we got them from. If you would allow more dynamic population limits or my suggestions for disease I would not have a problem removing the limit. It is just a bit over powered at the moment with slavery.

Which probably means I could remove the limit if I made Slavery an option. Na that would not work because of the Slavery tech.
 
Last edited:
I think I could code the following including adjusting the AI for it

Administration Building in target city --- up to population --- extra effect
none, 5, -
Village Hall, 12, -
Town Hall, 24, +1:( for 5 turns (adjusted for game speed)
City Hall, 35, +1:( for 5 turns
Capital/Metro, unlimited, +1:( for 5 turns​
 
I think I could code the following including adjusting the AI for it

Administration Building in target city --- up to population --- extra effect
none, 5, -
Village Hall, 12, -
Town Hall, 24, +1:( for 5 turns (adjusted for game speed)
City Hall, 35, +1:( for 5 turns
Capital/Metro, unlimited, +1:( for 5 turns​
As limits for the immigrant units? That sounds good actually.
 
As limits for the immigrant units? That sounds good actually.
Yes for Immigrant and the later Refugee units although Refugees would probably cause an extra +1:( and unhealthiness for those 5 turns and have slightly higher population limits to reflect the less controlled nature of their settlement, ie it is an emergency settlement not a planed for by the city settlement.

Refugees would be those fleeing from a city under attack. Would only happen from larger cities with 13+ pop. I need to figure out how to handle them as most times they should be of the nation of the city and fleeing to other cities in that nation but sometimes they will want to go elsewhere if possible eg nearest nation not at war. They wont be under the control of anyone, sort of. If you click on one of yours you will be able to give it orders but otherwise they will do their own thing.
 
Perhaps some housings with a few really bad attributes should be reserved for refugees (including, possibly, some :mad:)?
 
Refugees would be those fleeing from a city under attack. Would only happen from larger cities with 13+ pop. I need to figure out how to handle them as most times they should be of the nation of the city and fleeing to other cities in that nation but sometimes they will want to go elsewhere if possible eg nearest nation not at war. They wont be under the control of anyone, sort of. If you click on one of yours you will be able to give it orders but otherwise they will do their own thing.
Make them Barbarians that cannot be attacked or even seen with the <bInvisible>1</bInvisible> tag (in use on UNITCOMBAT_IDEA). Then give them a basic AI to determine where they want to go cause trouble. Perhaps they shouldn't be able to enter lands with the closed borders civic. Not sure how we should set that up though. That might take a little cloning and adaptation of the Great Wall effect.
 
Back
Top Bottom