In C2C we use Technology, unhealthiness and city population to define what diseases can occur in a city.
This is incorrect. The disease property does not indicate unhealthiness. It indicates vulnerability to disease. This can be by poor hygenic habits in the city, unhealthiness of the people to some degree, crowding which leads to a lot of potential for disease to spread among the people, but above all a maintained personal and interpersonal awareness of defensive practices to keep disease from entering the lives of the individual. A high disease rating is just a high rating for the potential for outbreak. That is somewhat true in the base system but would be even moreso true in the advanced system I'm discussing.
Plagues don't behave like that.
Again, somewhat untrue, even by your modelling. At a technology level and/or special conditions for outbreak level you can establish prerequisites for an outbreak. Disease level (community vulnerability level) should play a role since a society that is more in tune with how to avoid and control diseases and a community equipped with the right tools to do so (health care) will be more likely to resist or be hit less from an outbreak, and city population certainly does mean more people interacting and having the opportunity to contract from one another.
What you are pointing out has gone overlooked in the model is that there can, and I agree should, be special conditions to establish an initial outbreak. From there, the conditions are met by communicability, exposure via trade, other units etc... This is at the heart of much of the potential in this design but what this means is that I need a doorway through which the first event of a disease can take place (and can take place in muliple places... why not right?) and can then spread from there, ignoring those initial prereqs for an outbreak stemming from exposure.
It'll take the slightest bit of consideration on how to make that work but I can weave that in quite easily. Perhaps what I can do is have two versions of the first level of a disease, the first being impossible to contract except by exposure, the second being the initial opening of the disease, both being at the same first tier of the promotionline that defines the sets of buildings and promotions that define the disease. Thus a unit could be the first to contract the disease if he encounters it in his travels. A city could meet the prerequisites to start an initial outbreak. But from there, while the effect would be the same on both versions of the first tier of the disease building/promotion but both would act as a source for spreading the disease to those in contact with it. I think that might be pretty easily done actually. A cool way to work it so that diseases are introduced properly.
Another way would be to establish initial outbreak prerequisite tags that are ignored as prerequisites if the disease is possible to be contracted due to exposure to an existing outbreak. That could be much easier to program.
As I consider this further, I think I might just need some booleans to declare whether certain tags in use for prerequisites apply to both initial outbreak AND exposure or just outbreak. For example, it may be that you'd want to require a particular tech for an outbreak to occur but from there tech doesn't continue to be a prereq, but in another case you would want the tech to be a prereq in all situations because the disease couldn't even spread to those not using the tech. So we would assume that all established prerequisites are only for the outbreak UNLESS a boolean specifies that the tech or building or vicinity bonus or access to a bonus or whatever prerequisite is ALSO necessary for the disease to spread when communicability is the triggering factor. If a city or unit is not in contact with another entity that has the disease, then it must meet ALL prerequisites for an outbreak to potentially spontaneously occur. Seems to me that should work and would likely be the easiest and code light manner to craft this.
What I'd like to then propose is that, as I mentioned at the end of my last post, even severe diseases can spread quite easily (thus at low or very low disease property levels) at first but then after being experienced, the tolerance buildup factor pushes the vulnerability to that disease way up. It can mean that newer cities since a major nationwide outbreak and then complete recovery can be pretty vulnerable but since they never encounter the disease since it was eradicated (for a time) it doesn't get hit immediately but IS setup for taking a major hit via a second wave that can take place later, perhaps as tolerance reduces elsewhere or they end up triggering the emergence themselves.
Smallpox comes into existence when the first herd is domesticated.
- The first person to discover Animal Domestication gets the first outbreak upon discovery in one of their cities.
In C2C we would probably want to go with the first to Discover Animal Domestication and has a bovine herd or improved bovine improvement. It would appear first in one of those cities.
Naturally if no one has a bovine (cattle or bison) herd or improved bonus after ever everyone has Animal Husbandry then the first to get a one would trigger the disease.
Note: it turns out that being the first to get Smallpox is a huge advantage even though it might not seem so at first sight. Having said that it it is not as huge an advantage as what occurred in the New World in Civ because trade happens long enough before you can get troops across for the nations to have recovered.
So what this would mean is that the above would be modified to the following:
Smallpox would require Animal Domestication. It would require that a cow resource be 'within city vicinity'. Its initial oubreak point would be set at a fairly low disease level to make it pretty easy for it to emerge. Maybe 50 so that at 1 pt of Disease Property, the city has a 1% chance of starting an outbreak if the above 2 prereqs are met, +1% per property value above that. Trying to control disease to that extent is very difficult and does require a lot of sacrifice for something that is merely an insurance against a potential problem.
Then, once a city has contracted the disease, it proves to be highly communicable. The prerequisites are completely ignored for any city that is in contact with that city and the communicability rating makes the disease very likely to be contracted if there is a trade route, and makes it very likely for units to get it if they are in the city. Units can contract it and move to other cities, bringing it with them even if a trade route doesn't exist to the city experiencing an outbreak.
After the disease has run its course in the city, the resistance factor is pretty strong to smallpox, but it does decay over time as new generations haven't personally been exposed to it. This means that the disease level for an outbreak would increase by a very large margin after being overcome but would slowly reduce (at a rate we define by the disease).
At any time, a city that has a cow resource in vicinity can experience this outbreak and start the process all over again anew. Later there's more trade and more interaction and thus more danger to other newer cities that haven't experienced it. Later in the game, the near on immunity to the disease can be made possible with a variety of ways to model innoculation against it. And healers can learn how to directly combat and heal the disease.
The first time the disease hits a city the city looses all but the square root of its current population rounded up. The second time the disease hits a city it only looses 1/10th of its population due to immunity. There is a period of immunity where an outbreak can't reoccur in the city.
- In C2C we would probably need two things here a Smallpox Immunity city property that starts at 10 (say) reduces by 1 for each turn until it becomes zero and a flag to indicate that Smallpox has happened at some time in this city.
This would be a little easier to model with a formula of 1+(x% of population of the city, x being a definition given in the disease details and it could be made to adjust by the amount of times the outbreak takes place.) I wouldn't even know how to square root in code and it's been a while since school so the implication of a square root is tough to envision. I was never too solid with those.
An outbreak lasts one full turn, starting in one turn and ending in the next.
Why so static? With the outbreak system I suggest, this all depends on the disease level of the city. The first level would represent 10% of the population suffering the disease, the second 20% and so on, and it could get worse or get better depending on how the player reacts to it and how we program the disease to get harder or easier to control as it goes (this can vary based on the depth of the outbreak as well so that once a disease hits a % of the population, it really starts to naturally back off but until then it wants to grow.)
One of the reasons to base things on the disease property and to consider that property the vulnerability to disease is that when one disease is outbreaking, many times others will then piggyback on top of it because the vulnerability is increased due to weakened immune systems. Thus a disease (as an existing case being a building effect) should often increase disease levels in the city, even if it makes it easier to fight that particular disease as it exists. This can all be modelled according to the original tags but I do need some slight restructuring. I guess I just feel that it's better to have a disease be an event and an ongoing challenge to manage and a looming threat of increasing difficulty rather than an automatic retraction so quickly. Besides, if you did want it to retract fast it could be programmed to do so by making it fight itself tremendously as soon as the outbreak is introduced. There are tags for that that already exist. But there's gotta be some time to give the opportunity for other cities and local units to contract it.
Keep in mind that we should probably envision all this on a time scale that is much more like the tactical time scale we have to envision for units rather than the actual amount of time that is passing in a turn.
Spread is determined via trade routes and is instant between cities. In processing terms this is done just before the outbreak is ended in a city. Buildings in the city being spread from may affect the likelihood of the spread happening as may buildings in the city being spread to.
It would be well and good if we only have one disease and one model to establish a rule such as this for that disease. But we should be trying to establish a more generic model that requires mere xml controls to guide a very wide assortment of potential diseases. Furthermore, what you are advocating for ultimately is the destruction of the disease property and thus setting us back years in our efforts.
Spread to a city that has never had smallpox as an initial outbreak happens when it is connected by trade to a city which has had Smallpox at any stage
This is a newish thought... that could be managed by making the first level of the outbreak completely impossible to overcome but undamaging. The higher levels, which the disease would quickly make almost impossible not to experience but would quickly retract from, each level establishing its own new degree of resistance to the disease ever worsening. Yep... could be modelled with this system.
Random secondary outbreaks are handled by the Event system and also spread to all cities via trade.
- The Event would be based on the city Smallpox Immunity value which must be zero. The city would have had to have had Smallpox at some stage. The unhealthiness or disease property value of the city could also be used here.
I think above discussions about how the advanced model could operate show how we can manage this without having to resort to our exceedingly flawed event system. (That thing is really irritating me of late.)
This has been posted before but in case anybody missed it: the below video is a great inspiration for plagues:
Americapox: the missing plague
It tells how the most dangerous plagues originate from animals like cows etc. So a good system would be "founding" a specific plague (smallpox, syphilis, AIDS etc, there is a list in the video) much like founding a religion, based on the presence of specific animal resources plus an accumulated chance based on the general disease property (as it exists now) and perhaps tech level. Once a disease is "founded" it starts to spread (invisible to the player) through carriers (units, trade). Once a city is a carrier, the general disease property starts counting towards an outbreak (cumulative chance that increases faster as the disease property is higher) until an outbreak happens. Once an outbreak happens, people die en masse and the disease spreads much faster for a short time. After the outbreak, the city gets immunity, partly temporary (people who survived getting the disease are immune for the rest of their life) plus a small permanent immunity based on genetics. The higher this immunity, the more time it takes until the next outbreak and the less severe the effects.
The goal would be to use research and sources like this to model each disease we try to model. At the moment, I intend to design a system that can be used to model any and all diseases, including even psychological ones like crime waves.
So this would allow a disease to spread from city to city by trade routes and units? I do like the sound of that.
Also on the subject of diseases would it be possible to have a ranged attack add disease to the plot or city hit?
Something I’ve thought about before was if catapults and the like could be given a promotion that lets them sicken cites. The whole tossing dead bodies over the walls thing.
That's part of it. Much deeper of course. I definitely mean to make it possible to spread diseases via ranged assault but at the moment it's only in place for actual combat. Still, this side of things will be child's play once the interactive rules elsewhere are defined. Late game missiles and bombardment and all sorts of ways should be possible to enact bio-warfare, and the fallout of which would be how it spreads from there, which is what I'm first concerned with.
no matter what the population or unhealthiness of the city or technology level of the nation.
If you don't want the disease property level to matter much then you can establish the outbreak level on it as very very low, even negative. It's how it crafts resistance afterwards that then matters.