Health and Plague

Could you please be so kind and explain in short the impact of halth on food increase and decreas?

I think you're making this mod more complicated than it actually is!

A city's health value adds to the food stores each turn. If city health is positive it adds a positive value (increases) food stores. If city health is negative it "adds" a negative value (reduces) food stores.

There are two exceptions: 1. If positive health would make the city increase in population, it won't be added. 2. If negative health would make the city decrease in population, it won't be added.

Finally, two types of cities are not affected by health: 1. Starving cities. 2. Plagued cities.

And that's it.
 
negativ empire health is not counted to city health, only positive. Does this work as intended?

Actually it does affect city health, but the value has to be less than -9%. I am thinking about re-calibrating the Empire Health effect on City Health to make it more meaningful. I've also decided to add a few religious beliefs that impact health for players to combat early game disease. All this will be in v.14
 
Actually it does affect city health, but the value has to be less than -9%. I am thinking about re-calibrating the Empire Health effect on City Health to make it more meaningful. I've also decided to add a few religious beliefs that impact health for players to combat early game disease. All this will be in v.14

ok. looking forward to it
 
Hello!

Loved the mod but on my recent games the units die to the plague inside cities and around it. I thought it wasn't supposed to kill the units just lower to low hp?
This makes ai lose too much troops as it doesn't move the units away from city. This very much breaks the game for me.
Playing it with this one http://forums.civfanatics.com/showthread.php?t=528034 and marathon speed.
 
This makes ai lose too much troops as it doesn't move the units away from city. This very much breaks the game for me.
Playing it with this one http://forums.civfanatics.com/showthread.php?t=528034 and marathon speed.

Hi, this aspect of the mod -- units taking damage near plagued cities -- hasn't changed in, literally, years. In my own recent testing, I noticed this feature still works as advertised: units cannot die from the plague. So I'm not sure how to respond....
 
Hi, this aspect of the mod -- units taking damage near plagued cities -- hasn't changed in, literally, years. In my own recent testing, I noticed this feature still works as advertised: units cannot die from the plague. So I'm not sure how to respond....

Hmm then it must be some other mod. Ill investigate moar!
 
Well it happened again in my newest game. units kept losing 25points of damage untill they die. Only the fortified units survive as they heal as much as the dmg done but doubt the ai will do that as i've seen in last games that it just wipes everything clean. Mod conflict?

I tried to see it in action for screens/video by loading the savegame to see if it was killing the ai aswell. The plague was gone on the cities when i loaded the savegame so i'm a bit confused. Savegames don't save the plague status?

http://imgur.com/a/qtVsw
 
I'm no programmer but i think i fixed it :D
I found in the plague_main.lua the following
326abd3051b9865491d298bc55a290bf.png

I changed it to local iMaxHP = pUnit:GetCurrHitPoints() . As i think the max hp read as 100 all the time and that's why it did always the 25. Now it reads the current hitpoints and deals less and less damage as it is intended. Hope i didn't break it :X
 
Savegames don't save the plague status?
Yes, plague data is persistent between saves. The plagued city icon will generally not show up until the turn after a save is loaded. Now that I think about that, I may know how to force a refresh on reload...

I'm no programmer but i think i fixed it Now it reads the current hitpoints and deals less and less damage as it is intended. Hope i didn't break it :X

Actually it wasn't my intention to decrement HPs in that way. As that code says, if the unit's current damage plus the damage from the plague is greater than its total hitpoints (i.e. it would die), then the unit's final damage is set to 98 (i.e. it lives with 2 HP). I think the issue may be that I should have used >= rather than >.

BTW you can post code here with the code wrapper ([ code][ /code]) which is a lot easier than posting images!
 
The new updates look nice!



Well, since the mod (and EUI) has been updated, I imagine a lot of that might not work anymore (I haven't looked into it yet, so I don't know).

In regards to the Health and Plague + EUI merge that you made... is it compatible with the updated versions of these mods? If not, would removing the City Banner, City View, and Top Panel components of EUI serve as a quick compatibility fix?

Edit: Using the edits Crixler made as a reference, I somewhat merged Health and Plague with EUI via the Community Patch EUI Compatibility Files. Its 'hacky' and the cityview is not EUI but everything seems to be working. Follow the link below

http://forums.civfanatics.com/showpost.php?p=13626895&postcount=32
 
A city's health value adds to the food stores each turn. If city health is positive it adds a positive value (increases) food stores. If city health is negative it "adds" a negative value (reduces) food stores.

There are two exceptions: 1. If positive health would make the city increase in population, it won't be added. 2. If negative health would make the city decrease in population, it won't be added.

Finally, two types of cities are not affected by health: 1. Starving cities. 2. Plagued cities.

So:
If I have +1 food production in a city, but -5 health, then I get -4 food/turn totally.
But if I move a 2 food producing citizen (to be a specialist or something) and I will have -1 food production in the city, the -5 health won't be counted because it's starving? So the city will only lose 1 food/turn, while you also have that extra citizen to work a mine or be a specialist?
I don't think this works as intended
 
... So the city will only lose 1 food/turn, while you also have that extra citizen to work a mine or be a specialist?...

Well I think this would be a very rare case requiring some pretty good micro -- but technically yes this is a possible exploit. But the idea is to punish players (particularly AI) as little as possible when things go wrong in a city... i.e invasion, pillaging, anarchy, etc. It seems unfair to heap more woe on such a situation.
 
v.14 Changes will conflict with v.13 saved games!

Add health-focused beliefs:
  • Shamanism (Pantheon adds to City Health)
  • Unity Prayer (Founder adds to Empire Health)
  • Reincarnation (Founder adds health in Holy City)
  • Gurdwaras (Follower faith purchase building; Adds science, faith, health)

Edit Universal Healthcare Policy: +5% to Empire Health

Adds health yield support for the following base game tables:
  • Belief_CityYieldChanges (City Health)
  • Belief_YieldChangePerForeignCity (Empire Health)
  • Belief_HolyCityYieldChanges (City Health)
  • Policy_YieldModifiers (Empire Health)
 
Well I think this would be a very rare case requiring some pretty good micro -- but technically yes this is a possible exploit. But the idea is to punish players (particularly AI) as little as possible when things go wrong in a city... i.e invasion, pillaging, anarchy, etc. It seems unfair to heap more woe on such a situation.

Actually, that's the minimal amount of micro I'm doing in my games ;)
I get the intention behind this restriction, but something would be really needed here IMO.
I would rather punish the players, than leave such a huge exploit there... but maybe that's just me
 
As you probably know, I've dedicated a page to the Health and Plague modcomp on my website; you can view it here.

On the page, you'll notice that I've got the doctor specialist in a shade of purple to stand out from the unemployed citizens. I'm not saying it's your "cup of tea" but if it is, I've attached the art files ;).

Doctor.jpg
 

Attachments

Back
Top Bottom