Health and Diseases

Gedemon

Modder
Super Moderator
Joined
Oct 4, 2004
Messages
11,592
Location
France
Initial draft

  • Each City has a base "Health" value relative to it's population size that is:
    • Raised by :
      • Health-related buildings (Herborist, Hospital, Sewer, ...)
      • Forests
      • Food Variety
    • Lowered by:
      • Surpopulation
      • Jungle, Marsh
      • Pollution (production from Buildings)
      • Food rationing, Famine
      • No fresh water supply
  • Each Turn:
    • Health = BaseHealth + (RaiseValue -LowerValue) with -100 < Health < 100
    • x% "generic" disease in population, based on Health value
    • "Medecine" resource (produced from Plants) consumption growth with % disease
    • shortage of Medecine raise Mortality rate
  • Epidemic Diseases
    • There is a defined set of possible Epidemic Diseases with specific properties like:
      • Frequency
      • Mortality
      • Contagion
      • Max Acquired Immunity
    • Each Epidemic as it's own "Spawning Probability" value in each City
    • Spawning Probability start at a negative value (for ex -100) and change each turn, pondered by Health value (+/-) and some (optional or required) conditions that may be specific to a Disease type like for example:
      • No fresh water (Cholera)
      • Overpopulation (Typhus)
      • Specific Features (Jungle, Marsh for Malaria)
    • An Epidemic can not spawn before its Spawning Probability > 0
    • When an Epidemic starts, its Spawning Probability is restored to -100 and won't change until the Epidemic has ended in the city
    • The Epidemic may spread to other linked Cities by raising their own Spawning Probability for that Disease, if it has a Contagion value (Influenza, Plague, ...)
    • Units can also be affected, either by being linked to (or attacking) cities/units with a contagious disease, or by being on terrain/features related to diseases)
    • Units carrying a contagious Diseases can affect enemy cities when attacking (and friendly units/cities by proximity/link)
    • When started, an Epidemic in a city has a "strength" value that is lowered each turn based on the city Health value and available Medecine resource
    • Each turn, a percentage of population is killed based on the Disease mortality value until its strength reach 0.

Possible formatting for Diseases table:

Code:
<Diseases>
     <Row DiseaseType="DISEASE_MALARIA"        SpawnFrequency="80"    Mortality="25"    Contagion="0"    MaxImmunity="90"    />
     <Row DiseaseType="DISEASE_CHOLERA"        SpawnFrequency="80"    Mortality="50"    Contagion="0"    MaxImmunity="0"        />
     <Row DiseaseType="DISEASE_PLAGUE"        SpawnFrequency="10"    Mortality="75"    Contagion="50"    MaxImmunity="0"        />
     <Row DiseaseType="DISEASE_INFLUENZA"    SpawnFrequency="50"    Mortality="15"    Contagion="75"    MaxImmunity="50"    />
     <Row DiseaseType="DISEASE_TYPHUS"        SpawnFrequency="25"    Mortality="40"    Contagion="25"    MaxImmunity="0"        />
</Diseases>

<DiseaseCauses>
     <Row DiseaseType="DISEASE_CHOLERA"        Condition="NO_FRESH_WATER"    Value="2"    Required="true"/>
     <Row DiseaseType="DISEASE_CHOLERA"     Condition="LOW_HEALTH"        Value="1"    />
     <Row DiseaseType="DISEASE_PLAGUE"        Condition="LOW_HEALTH"        Value="2"    />
     <Row DiseaseType="DISEASE_TYPHUS"        Condition="LOW_HEALTH"        Value="1"    />
     <Row DiseaseType="DISEASE_TYPHUS"        Condition="OVERPOPULATION"    Value="2"    Required="true"/>
</DiseaseCauses>

<DiseaseFeatures>
     <Row DiseaseType="DISEASE_MALARIA" FeatureType="FEATURE_MARSH"    Value="2" />
     <Row DiseaseType="DISEASE_MALARIA" FeatureType="FEATURE_JUNGLE"   Value="1" />
</DiseaseFeatures>
 
Last edited:
I like the draft, but I think that health should be lowered simply by having an increasing number of inhabitants (density of people). Some of the unhealthiness could be mitigated by housing/aqueducts/wells/sewers etc. I think Civ4 was good in this regard, that your big cities became pretty unhealthy in the early Eras, and you couldn't do much about it until the latter Eras. Maybe Upper- and middle class housing can be more resistant to generic diseases? Of course, the plague should hit everyone as hard, no matter social classes.

An epidemic or even an unhealthy city should increase emigration, as well as increasing mortality.
Having units/trade carry and spread diseases will bring a lot of interesting events and dynamics :)
 
Last edited:
Ho, yes right, Population should be the base factor.
 
I'd have disease spread primarily through trade routes, with some form of strength scaling based on population.
E.g. an active trade route to city B from city A when city A is undergoing plague P means the strength of plague in city B increases by some factor population(A) * constant as long as the trade route is there.
 
repost, modified to accomodate initial draft:

For a future suggestion on health: below is a suggested plague system when health is low enough.
  • Plague, if not managed, should be capable of killing up to 75-90% of a city's entire population, 95-99% if health is at 0
  • Have a special project available to "counteract diseases/plagues", that provides a boost to city health production, scaling with number of medical buildings (e.g. herbalist)
Regarding the actual plague system itself, the following are mechanic suggestions:
  • Troops stationed in plagued cities should get a massive hit to their health
  • Troops supplied but not stationed in plagued cities should get a moderate hit to their health
  • Troops get hits to their health by being in unhealthy environments: e.g. tundra/snow, marsh, forest
  • The city has a chance of generating plagues depending on a variety of factors: sanitation, generic low health, [proximity to animals (are any supplied) or local deforestation]
  • The system should allow for the possibility of multiple simultaneous plagues, potentially with multiple from the same source
  • Each turn, each plague should calculate how many new people to infect, and how many people should die/recover
  • The number of people infected should be determined by the plague's randomly-generated infectivity, and mitigated by current health, + an extra bonus from running the "counteract diseases/plagues" project
  • ^ For a disease caused by sanitation, building sanitation buildings should massively decrease the infectivity
  • Every person infected on a given turn, should either recover, and be counted among the immune, or die, on the next turn. Mortality rate should be calculated based on: city health, presence of health buildings, randomly-generated plague mortality
  • The counter for how many are immune should be affected by the mortality rate of the city, excluding all plague each turn, to prevent immune population counter from increasing indefinitely, and allow immune population to eventually die off after the plague ends, allowing re-occurence (for hardcoded plagues like typhoid)
  • There's a chance for plague to spread to connected cities (by road/river/trade route), scaling similar to 1/distance. Can be ignored if plot-based spread is implemented
  • In the same vein as the scenario, Plague can also spread to non-city plots. Each plague instance should only be able to affect a given plot once, though, and kills population based on base mortality rate
  • ^ population killed by plague on plots can be mitigated by advanced tech, like hospitals or something idk
  • The reverse should also be true: There should be a chance, low, though, for zoonotic plagues to emerge from pastures, and spread to adjacent plots, until it reaches a city
  • Spread should be chance-based, with dramatic increases of spread along roads (close to 80% without mitigation), and boosted by rivers. will not spread to uninhabited tiles, spread chance increases with more population in tiles
 
For performance, I think we shouldn't add more per tiles calculations each turn, the death rate in cities and the migration mechanism should lead to a loss of rural population too when there is a plague.

A project boosting the production of "Medecine" resources is a good idea, not just when there is a plague.

I think the rest is already covered in the OP, let me know if there is a difference I've not spotted.
 
Top Bottom