A Modder's Guide to the Advanced Disease Structure of the Combat Mod

@Thunderbrd

While not every disease is the same have you considered not every poison is the same? Such as ones that stun, paralyze, cause hallucinations, blindness, blood hemorrhaging, sedation, etc. For instance a rogue may not be strong enough to take on an army but if it can paralyze or sedate a unit in order to get past them. While on the other hand in combat an archer may want a strong poison/venom that quickly takes out the enemy before they can reach them. Or even worse a hallucinogen that causes the units to attack their own units by accident.

I haven't detailed all the new tags we can use for poisons and other afflictions yet but yeah, almost all of that is already enabled and ready for setup. Differing poisoning enabling promos would most commonly be handled as equipments and its entirely within the plan for a wide variety of effects though some more exotic ones such as that hallucinogen you mention would take a bit more work to set up.

hmm... how to setup a promo that turns a unit against its own... while cool it would take a fairly major effort to make sure that we could turn it into a barbarian and back again after the effect wears off (It'd be a matter of destroying the unit, recreating it as a barb for as long as the affliction promo on the unit remains, then re-destroying it and recreating it back under the original owner's control without eliminating any of the unit data at all (and having the affliction processing work correctly in the process)... whew! Perhaps as a very long ways off project it'd be more easily accomplished down the road.)

Everything else you mentioned there and more is available though.

Apparently I need to get to explaining the tags you'd find useful for defining differing poisons, diseases and such. Its one of those loose ends I kinda forgot to touch on. I have a reserved post above for that so once I flesh that out I'll post here to let ya know.

Also, for anyone viewing this post, back up a page to get caught up on the latest adjustments to the Affliction mechanisms.
 
Spoiler :
101 Ways to Penalize a Unit
Tags for use in creating Affliction Promotions
(Beyond the usual -% Combat etc that we already have)

In the generation of this system, I have given due consideration to some extra nasty effects we may want to give our Afflictions.

  • iDamageperTurn: Each round the unit possesses the affliction with this tag, it takes this much health damage. This is the percentage of health that it is injured by each round. It doesn't stop the unit from healing, which obviously thus reduces, or potentially just balances out with, the damage being taken each round. If the unit moves and doesn't spend the round healing it still takes the damage. When the affliction is overcome, healing is what is necessary to recover. In many games, this is an effect known as DOT (Damage Over Time).

  • iOvercomeAdjperTurn: This affliction becomes easier or harder to overcome with each turn the affliction is possessed. This is a tag for the whole promotionline affliction definition. Every turn the Affliction is possessed (any promotion on the line), this # adjusts the chance of overcome cumulatively. Thus some afflictions can be very easy to eventually overcome while others can become runaway impossible to address without greatly improved technologies.

  • iStrAdjperTurn: This is also a form of Damage Over Time. It affects the unit strength directly and is a cumulative effect each round the affliction is possessed. As soon as a level of an affliction with this ability is overcome, the penalties inflicted from this tag (or in a more rare case, the BONUSES) are removed. So if the first level of a disease has a -1 in this value, that promo will reduce the unit's strength by one each round. If the unit's condition worsens and it thus winds up with the second level of the affliction and that level defines this value the same, only the amount of strength lost from the second level will be recovered when the condition improves back down to the first level - all the penalty points taken from that first level remain until it, too, is overcome. This can be fairly devastating but I believe the system makes 0 the minimum strength and it should thus not be inherently fatal to a unit regardless of how many - str pts they have lost as long as the unit can, at 0, be treated as any other unit that requires protection during its affliction.

  • iWeakenperTurn: This is a cumulative general combat % modifier that accumulates for each round the affliction is possessed and in its recovery, operates as the above strength penalties. Massive penalties to combat will not every inherently be fatal to a unit but can sure make it worthless til it overcomes the affliction.

  • bParalyze: Not to be confused with an inability to fight, this tag makes it so that the unit that has this affliction cannot move (is considered to be DOMAIN_IMMOBILE and operates under the same dynamics as the event that gets your ships stuck on reefs.) It should be coupled with large combat penalties, among other potential penalties, to indicate true paralysis. As soon as this tag is no longer on a promotion that the unit possesses, its ability to move returns.

We also have a few regulars that could be very useful for Afflictions:

  • iVisibilityChange: To inflict blindness.

  • iMovesChange: To create a reduction in movement.

  • iMoveDiscountChange: To create a terrain has greater hindrance factor effect.

  • iInterceptChange: Making it harder for the unit to hit an incoming air target.

  • iWithdrawalChange: To indicate a unit with the Affliction should have a harder
    time escaping battle.

  • iEnemyHealChange, iNeutralHealChange, iFriendlyHealChange: These 3 tags would be able to reduce the amount of injury healing the unit is capable of. For the sake of simplicity, I'd personally use all 3 equally in the case of applying any penalty to healing from an Affliction.

  • iCombatPercent: A no-brainer basic Affliction-handy tag. Negative to impede the unit's ability to fight in general. Differs from the weakeningperturn tag above that indicates a CUMULATIVE modifier as this one is static.

  • iExperiencePercent: A negative here would indicate a hindered ability to learn or recall any experiences while under the effect of the Affliction.

And some of the other Combat Mod tags can be handy:
  • SubCombatChangeTypes: The affliction could ADD a whole combat class that could come with a sleu of various effects for a very complex interaction. NOTE: I don't currently have any uses for this kind of interaction in mind, just mentioning that it could be used and some design situations could call for it. It could simply be a combat class to designate a particular vulnerability to OTHER attack forms that are coming in with a bonus VS that combat class. There's a number of creative possibilities here.

  • RemovesUnitCombatTypes: Removing a combat class could cause a unit to drop all its weapons that it had qualified for, lose other promos, all kinds of possible problems. Just placing here so we can keep it in mind as a possible negative effect.

  • iAttackCombatModifierChange, iDefenseCombatModifierChange: One of the newest tags, if a state of mind or physical issue could somehow be more or less effective at impacting a unit's ability to attack or defend, these tags could be independently useful over use of the more generic Combat Modifier. It could also be useful to use combat modifiers of all kinds like terrain, features, combat classes, etc... if there's cause for it. For example: a penalty to attack and defense in Mountains and lesser so in Hills to indicate a portion of a Vertigo effect.

  • iPursuitChange: A weakened ability to track or pursue - could be useful in a specialized nasal injuring attack against canines for example.

  • iEarlyWithdrawChange: The unit might be a bit slower to attempt retreat, perhaps given to have less caution than normal as some disease and psychotropic effects or judgement hindering injuries may be capable of inflicting.

  • iDodgeModifierChange, iPrecisionModifierChange: The unit has lost its sense of caution, reflexes, or is simply suffering from an intoxication, but has not lost its strength or stamina.

  • iDigInChange, iFortCollatDefChange: The unit that loses an ability to develop proper defenses when fortifying could have a penalty here. Perhaps the unit is somewhat confused and in a daze and incapable of laboring to improve their defensive position. For many tags, like these ones, they should not be capable of penalizing beyond any benefits the unit might already have. But keep in mind that ALL defensible units can gain up to 5/rnd defense bonus from fortifying and that amount CAN be penalized with a negative iDigInChange. So if you have, say, a -10 Dig In, you'd lose all ability to gain any benefit from fortification UNLESS you had more than 5 Dig In value on that unit!

  • iUnyieldingChange: Unyielding in many ways often represents the first manifestation of a Morale structure in the mod. A high Unyielding value is generally reflective of a unit that is not afraid to lose its life in battle and will tend to power through any greatly threatening situation in battle as a result. This ability would be poignant for robotic or emotion-less units as well. Nevertheless, since all promotions can be crafted to only affect certain combat classes, including afflictions, this can be useful to represent a mild 'fear' effect as a negative value - the unit becomes less willing to face threatening situations that might cause them to flee from the fight (from Repel or Knockback.)

  • iStrAdjperRndChange: Already as a negative, this tag indicates the ability for the unit to lose strength (fatigue) each round in combat so it becomes EXTREMELY useful for affliction effects that indicate the unit is not fully up to the task and while it may feel somewhat capable at the beginning of the fight, would weary quickly and potentially lethally as the fight goes on.

  • iStrAdjperAttChange: Much as above, Tires is the negative form of this tag and it makes sense for mechanical units that have been sabotaged to perhaps feel the effects of that sabotage more with more activity in a small period of time. This is also useful when impeding Onslaughting or Stampeding units to make each attack less likely of success.

  • iStrAdjperDefChange: The Affliction with this as a negative value would be one that tends to wear at the emotional sense of determination and love of country that fuels a defender under onslaught. Each attack in a round would bring a greater sense of growing dread and loss of confidence and as a result, a lesser capacity to survive the next attack.

  • iWithdrawAdjperAttChange: This unit grows clumsier and slower with each flight from a fight within a given round if the value here is negative. Its nerves are 'Frayed' with each retreat.

  • iLungeChange: As a negative, reduces the ability of the unit to take advantage of a surround and destroy bonus when attacking. Could be coupled with other effects to indicate less movement, less conviction, and simply a reduced initiative.

  • iDynamicDefenseChange: As a negative, represents a unit that is jumping at shadows and is more unnerved by the near presence of other enemy units thus gaining an increased penalty when a Surround and Destroy benefit is being employed against it.

  • iStrengthChange: A static reduction to base Strength as long as the affliction remains on the unit. As its static, and since afflictions don't compile with previous affliction effects on the same line, its important that if you want it to remain or worsen, it should be reflected as the total Strength deficit at each promotion level of the affliction.

  • iFortitudeChange: Many diseases and poisons, even some injuries, reduce the effective immune system of the afflicted. This would be a good generic way to represent this effect in a static manner.

  • bStampedeChange: Some afflictions might make animals more prone to losing control in combat and carrying on the fight until either they or all opponents are destroyed.

  • bRemoveStampede: Other Afflictions might pacify a normally ultra aggressive animal, giving it less cause to attack until death.

  • bAnimalIgnoresBordersChange: Some afflictions, like the Rabies disease, would cause an animal to lose all fear of humans.

  • iEnduranceChange: Many afflictions open up a unit's overall tolerance to cold and heat damage and make them more likely to exhaust in battle. A negative here would indicate that.

  • PropertyManipulators: Obviously, a diseased unit would be more likely to make the whole region they are in more likely to suffer from diseases in general as their mere presence represents a microbial threat that can distract the immune system from any present threats, including the very disease they carry.

    But also consider that some affliction mental states might make one more prone to commit and promote others to commit crimes in their area as well.

Hopefully this begins to inspire some imaginable effects ;)
Updated the 3rd post with the above descriptions of new tags and how other already existing tags can be used to design Affliction Promotions.
 
I do need to teach it a few tricks in dealing with afflictions, and perhaps a few for inflicting them (although that's largely covered by assisting it in understanding how to select promos). I need to develop a more detailed Healer AI because the Cure mission AI is a bit weak at the moment, and how to quarantine its diseased units. I'm sure playtesting will reveal some more AI work that can be done too. Anyhow, it won't be a forgotten element but it could take a bit to make the AI FULLY compensate for Afflictions like a master player would.

I'm glad you can see the potential here though :D
 
Well, I was almost to the point where I was going back to work on this but every week has added more work than I could accomplish to the queue and my ability to do more has been greatly diminished by my 50+ hr work weeks now so I'm hoping eventually I can get to it but I'm not making promises for the immediate future ;)
 
*nods* Yeah I know you have a ton on your plate. So which do you think you will do first, disease or equipment? And I am wondering which SHOULD be done first. On the one hand equipment would bring a lot of depth to combat. However disease seems like its really needed to help balance things out.

I personally love both ideas a lot so I am on the fence on which I personally would prefer done first.
 
I completely 100% agree.

But please, no more HUGE projects all at one time, commit them a little at a time, thx.

Are you saying this in response to something recent? I feel I've kept it better since the initial Combat Mod push.
 
Are you saying this in response to something recent? I feel I've kept it better since the initial Combat Mod push.

No, just stating its easier for US to try stuff out in small pockets rather than large pockets is all, "I'm Just Sayin.":p
 
This project has been shelved long enough.

v38 should include the first steps into implementation here. However, with comments like these floating about, I think we need to have a more clear discussion on direction first:
DH said:
Real Diseases - this is a BIG problem, the current disease system will not work with it and TBs proposal is almost exactly the opposite of what I want. A lot of detailed discussion is needed here. It is currently looking like a mod breaker to me but that may just be to much pavlova over Christmas.

I tried rereading everything I wrote here and can empathize with anyone who gets lost in it all. Let me try to break this down a bit from another angle how this would work:

  1. Everything about the current system of disease and crime would remain true but we would have an option for advanced outbreaks that would adjust the rules in the following manner:

  2. Although I will say Disease to reference the subject of an outbreak, crimes and any other property can be made to operate the same way. I'm quite intrigued by this for crime.

  3. Diseases would not automatically emerge when the iMinimum level for the disease building is reached as they currently do now.

  4. Instead, every round that a city can qualify for the first (or next) building of a disease chain, and the disease property value is currently in range of an outbreak, it checks a 100% roll to see if it experiences an outbreak. The chance of the outbreak is 50% at the iMinimum level for the disease building. Thus if you have a disease level 50 pts less than the iMinimum tag for that disease (or generically the property autobuilding) then your city is out of the range of potentially experiencing an outbreak. And if your city is over the disease level for the outbreak by 50 pts then by all means you should already be experiencing an outbreak or you unfailingly will the next round (assuming some other modifying factors haven't taken place previously.)

  5. There are other factors which modify the outbreak level.
    • Aid: This is going to be the trickiest thing to adjust. Aid was specifically to work for Disease and should remain so, imo. Another value should be used for crimes if we're going to implement the outbreak system for crime. Something like 'Rehabilitation' would be a different value and used to fill in for Aid in all crime cases rather than disease cases. However, in short, this value is important. Existing total Aid levels in the city would INCREASE the outbreak level, in essence keeping outbreaks at bay.

    • Trade: an adjustment for each disease can be defined that makes it easier for a city to experience an outbreak of that disease due to connection via trade route to each other city that has the disease.

    • Units that have the disease that are in the city can be a huge factor in causing an outbreak

    • Techs can directly influence the outbreak threshold level of a particular disease.

    • Buildings can directly influence the outbreak threshold level of a particular disease.

    • Tolerance can be earned by having previously experienced and overcoming a disease, defined by the disease itself as to how powerful the tolerance is and how long it takes for that tolerance to wear off, if ever. And if it can compile with previous tolerances.
  6. To overcome an outbreak, the city needs to address the outbreak. To do this, the city must:
    • First get it's disease level under the iMinimum level of the disease (outbreak level, which is/was the point at which the disease has a 50% chance of breaking out if the disease doesn't exist in the city yet), adjusted by all the same factors as listed above.

    • Every pt the Disease Property is under the Outbreak level is a % value of recovery for the city. Just like Outbreaks are checked every round, the chance of recovery is also checked every round once recovery has become possible.

    • A disease tends to run its course naturally so every round it gets easier to overcome. Thus its outbreak level increases every round (was initially established as increases by one every round but the latest replan is for diseases to be able to specify this amount... some diseases might even make it harder to overcome every round! Suffice it to say, this will be its own new integer value.)
  7. Diseases are represented, most centrally by a promotionline. Many features of the disease are placed there.

  8. If the disease property keeps growing after an outbreak, it begins to be possible to experience the next level of that outbreak (if one is defined.) Each point OVER the Outbreak level is a % pt chance each round of the disease worsening. Thus the outbreak level of the next layer of the disease is 50 pts higher than the original CURRENTLY is. Each autobuilding representing the disease in worsening layers should be attached to a promotionline for the disease. Overcoming a layer of the disease is the same as the base level, just with the outbreak level 50 pts higher. One recovery event removes a layer of the disease, which can impart more resistance to the disease and make the next layer easier to overcome and harder to re-experience.

  9. Unit interactions with these outbreak systems are intensely complex but rational. For a first wave of development I figure we should leave that out of consideration for the most part. But it's at the core the purpose for working out a more refined system so that units can contract diseases and cities can contract them from units and units can contract them from other units in proximity or through battle. But it seems like the greatest concern at the moment is how to work with diseases for cities so let's zoom in on just that for now.

  10. DH has requested that diseases can cause a sudden loss in population when they first oubreak. I was thinking, based on the deeper discussion on that, that a tag for iPopulationDestruction be put in place for disease buildings that represents the amount of population loss when a disease breaks out, that gets reduced or increased every time the disease is experienced by another integer on the building, iPopulationDestructionAdjustmentPerInstance. There are many other ways to inflict pain on the city for a disease building but this is one specifically requested.

  11. We MAY want to not use iMinimum on the autobuildings for the advanced system because with the advanced system, we might want even more serious diseases to be easier to contract. I'd love to see the diseases designed on real world principles rather than just a gamey system where the seriousness of the disease is the primary factor in determining the likelihood of experiencing it. So we may want to be able to use a different base outbreak level definition than the non-advanced system utilizes.

At this point, I'm wondering, how exactly is this looking like the exact opposite of what you're looking for DH?
 
Last edited:
The big problem I have with your proposal and the disease system in general is that it is a very poor model for plague like diseases.

In C2C we use Technology, unhealthiness and city population to define what diseases can occur in a city. Plagues don't behave like that. (@TB this is the main problem) They will spread to cities and towns because people or animals take them there no matter what the city size is or what technology the nation has. Smallpox is a good example as we all know what happened when Europeans took it to the New World.

Lets look at just Smallpox in the mod by Euseibius which models disease much the way I would like.
  1. 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.

  2. 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.

  3. An outbreak lasts one full turn, starting in one turn and ending in the next.

  4. 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.

  5. 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

  6. 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.

By having the major historical plagues not represented as a building in the disease property system gives us a better way to model plagues in general; as plagues do and did travel to cities, towns and villages no matter what the population or unhealthiness of the city or technology level of the nation.
 
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.
 
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.
 
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.
 
I would like to make a couple of points.
1) For game play purposes, multiple simultaneous disease outbteaks are going to be potential game wreckers or at the very least frustrating to the point of being 'unfun'.

2) Some level of immunity would spread from city to city as well. Particularly within a nation. A new/young city would not be as completely vulnerable as a foreign city, particularly one on a different land mass. The newer/young city would have the immunity from the city where the settler was 'built'. Additionally immigration, and breading (e.g. traders breeding with locals) would pass some immunity as well. The immigration point might actually be a little extra benefit to encourage the use of the immigrant unit. (Personally I've never used them, it just seemed not worth the effort/cost).
 
1) For game play purposes, multiple simultaneous disease outbteaks are going to be potential game wreckers or at the very least frustrating to the point of being 'unfun'.
I've gotta respectfully disagree. But then not every disease should be population crushing either. The current system makes it possible for some diseases to happen only when other lesser diseases are already taking place and that seems a little twisted.

Still, when it rains it pours. It would be interesting to see how things tend to pace out when we're looking at a system where diseases that have struck make it harder for themselves to strike again. But a major collapse of a system often does take place when it's been too long since the threats to that system have been experienced. This is much like a forest fire... they aren't that dangerous to a forest unless it's been a long time since one has hit.

2) Some level of immunity would spread from city to city as well. Particularly within a nation. A new/young city would not be as completely vulnerable as a foreign city, particularly one on a different land mass. The newer/young city would have the immunity from the city where the settler was 'built'. Additionally immigration, and breading (e.g. traders breeding with locals) would pass some immunity as well. The immigration point might actually be a little extra benefit to encourage the use of the immigrant unit. (Personally I've never used them, it just seemed not worth the effort/cost).
Good thinking here. It'd be a secondary consideration and another bleed over structure to build but as part of an underlying immigration and population shifting system I can certainly huge value in this - perhaps it can be somehow woven into the Idea system design... I'll have to think on it.
 
What I dislike about spreading by trade route is that you have almost no tools to control which city you are trading with. Most cities are on rivers / coast so you can't just pillage all roads leading from a city. There has to be a tool implented as well that allow you to stop trading with a plagued city.
 
Back
Top Bottom