Unhealth/unhappiness removing wonders/buildings/civics and properties.

Not quite what I meant.
The special building is not supposed to have the opposite effect. It is just there to store the effect so you can remove it by removing the special building. And that would be what the wonder would do.
Example:
Autobuilt special building "Superstition" with construct condition to be there unless you reach tech X or have built wonder Y or Z.
Different buildings and stuff then adds happiness and unhappiness to "Superstition" with BuildingHappinessChanges.
When you build wonder Y, the construct condition for "Superstition" is no more true so the building is removed and therefore all the happiness and unhappiness that was added to it with BuildingHappinessChanges.
I'm following what AIAndy is saying and it would work similar to the effect of replacing the pests when you get a building like the cat breeder. Separate out the effect of the unhealth/unhappiness from the building that is its source into a secondary derivative special building that can then be replaced by a later building that counters it but leaves the original building doing its thing.

I tried doing something similiar with a "demand" set of buildings to reflect what people in a city would want and would get upset at not having eg a market or a temple of the state religion but it did not work for the player.
Thi was because the "actual" values provided when selecting a building do not take into account (or show) local changes due to buildings local/auto being replaced.
 
If I understoon AIAndy correctly, he wants this system:

A new Autobuilding "Diseases" is created.
Common Cold, for example, would not have any :yuck: attached to it.
Instead, "Diseases" would read: gets +2 :yuck: if Common Cold is present in this city.
Also it would have "gets +3 :yuck: if HIV is present in the city and "gets +5 :yuck: if Syphillis is present in the city.
The buildings from HIV, Common Cold and Syphillis would not have any :yuck: but the "Disease" building would get worse the more diseases are present. (in this case 2 if only the Common Cold is active, 5 (2+3) if Common Cold and HIV is present and 10 if all three are present).

So you'd only need one Autobuilding to cover a set of buildings (in this case diseases). Then, at a certain tech X, "Diseases" could obsolete and you'd still have the diseases like HIV in the city, but all the :yuck: from all diseases would be gone.

This could be replicated for Crimes, Pollutions etc...

I also like to mention (again) that even properties can be affected by tech. For example, Factories could read "gets +5 Air Pollution with Industrialism" or "gets -5 Flammability with Robotics". Resources can also modify Properties, like Houses get "-5 Pollution with Organic Chloroplasts" or something.
 
Last edited:
Is it possible to invert logic of it and remove unhealth from all buildings EXCEPT properties?
Basically smarter version of <bBuildingOnlyHealthy> tag, that removes all unhealth from all buildings.
 
Well if you'd set it up in a way that you have some "master buildings" for certain categories, it should be.

Lets say you have these master buildings "Disease", "Pollution", "Crime", "Traffic" and "Production".
Then you sort the other buildings to only add their former :yuck: to their representive master buildings (IE Factories would not have :yuck:, but instead add +1 :yuck: on "Production", if Factory X is present in the city".
Then a building, lets say a wonder, should remove all :yuck: from production buildings. Then "Production" needs the tag "requires NOT Wonder X". If you then build the Wonder, "Production" would disappear, and with it all the :yuck: from factories. If you extend that to also Traffic (Traffic requires NOT Wonder X", then this wonder would also get rid of all :yuck: from traffic.
 
Well if you'd set it up in a way that you have some "master buildings" for certain categories, it should be.

Lets say you have these master buildings "Disease", "Pollution", "Crime", "Traffic" and "Production".
Then you sort the other buildings to only add their former :yuck: to their representive master buildings (IE Factories would not have :yuck:, but instead add +1 :yuck: on "Production", if Factory X is present in the city".
Then a building, lets say a wonder, should remove all :yuck: from production buildings. Then "Production" needs the tag "requires NOT Wonder X". If you then build the Wonder, "Production" would disappear, and with it all the :yuck: from factories. If you extend that to also Traffic (Traffic requires NOT Wonder X", then this wonder would also get rid of all :yuck: from traffic.
I did global scan of all *building*.xml files in mod folder (notepad++ has scan in all files feature)
There are 524 entries using <iHealth> (8 entries using <IGlobalHealth>) tag with negative modifiers (searched for "<iHealth>-")
There are 250 entries using <iHappiness> (9 entries using <iGobalHappiness>) tag with negative modifiers (searched for "<iHappiness>-")
Converting them into several containers sounds like another project.
Number of building using positive values: (total - negative)
694 (23) buildings use positive value for <i(Global)Happiness> tag.
491 (32) buildings use positive value for <i(Global)Health> tag.
Also why the hell there are <iSOMETHING>0</iSOMETHING>?
It seems like someone copycat some shema without pruning unneeded data.
For example nukerandchance or global modifiers of 0 are present in module buildings.
Notepad++ allows for total annihilation of given string in all specified files.
 
Last edited:
Also why the hell there are <iSOMETHING>0</iSOMETHING>?
Vanilla BtS did not handle that an XML tag was not listed in a xml, it didn't even handle that the order of the tags were changed. This is no longer a problem for most xml types in C2C, some still demand tags to be listed (those that have no default value set in the dll), and the dll still expect tags to be listed in a specific order for a few xml types (By xml type I mean a group of xml's that use the same schema, if it use a different schema it is a different xml type).
Some time after I joined the team I started removing unnecessary tags in xml whenever I did not do anything more important, I did this mainly between v36 and v37, I probably reduced the XML size of the mod by many MB back then, but I didn't do this for all XML's (it only reduces the time it takes to launch the game, so it isn't terribly important).

Edit: Here's an example in case you are curious, SVN rev 8813 (31. Oct. 2015) ▬ CIV4UnitInfos.xml & CIV4TechInfos.xml
 
Last edited:
Vanilla BtS did not handle that an XML tag was not listed in a xml, it didn't even handle that the order of the tags were changed. This is no longer a problem for most xml types in C2C, some still demand tags to be listed (those that have no default value set in the dll), and the dll still expect tags to be listed in a specific order for a few xml types (By xml type I mean a group of xml's that use the same schema, if it use a different schema it is a different xml type).
When I joined the team I started removing unnecessary tags in xml whenever I did not do anything more important, I probably reduced the XML size of the mod by around 100 MB, but I didn't do this for all XML's (it only reduces the time it takes to launch the game, so it isn't terribly important).
I guess some still are here, as it seems like Alt_Timelines, Custom_Religions, Custom_World_Views, Platyping and Vokarya (not sure about last one - I modified it to remove unhappiness removing tag in world wonder or something) have such null tags.
They are annoying at mass counting tags with notepad++
 
I guess some still are here, as it seems like Alt_Timelines, Custom_Religions, Custom_World_Views, Platyping and Vokarya (not sure about last one - I modified it to remove unhappiness removing tag in world wonder or something) have such null tags.
They are annoying at mass counting tags with notepad++
I didn't touch the modules very much as those were personal and often WIP project of other modders, and I didn't want to step on any toes.

Edit: e.g. I think DH likes to, when he makes a new building/unit/whatever, to just add in all possible tags with a 0 value and then fill them in until he is satisfied with the end result.
 
I didn't touch the modules very much as those were personal and often WIP project of other modders, and I didn't want to step on any toes.

Edit: e.g. I think DH likes to, when he makes a new building/unit/whatever, to just add in all possible tags with a 0 value and then fill them in until he is satisfied with the end result.
Entire Modules folder is just 150 MB in size, so I guess there won't be much improvement in loading speed time, if null tags would be removed from them anyway.
 
I guess some still are here, as it seems like Alt_Timelines, Custom_Religions, Custom_World_Views, Platyping and Vokarya (not sure about last one - I modified it to remove unhappiness removing tag in world wonder or something) have such null tags.
They are annoying at mass counting tags with notepad++
Basically there is so much that we only do this when we have to change the file for some other reason.

Mind you whoever added in the comment lines into the XML made it very difficult to find that one bit of XML that is causing an unknown error. Before you could do a binary search by commenting out sections. That is no longer possible making debugging that much harder. Similarly for allowing the XML tags to be in any order, you have to check all the XML for an entry rather than just search on line X of the entry.
 
Basically there is so much that we only do this when we have to change the file for some other reason.

Mind you whoever added in the comment lines into the XML made it very difficult to find that one bit of XML that is causing an unknown error. Before you could do a binary search by commenting out sections. That is no longer possible making debugging that much harder. Similarly for allowing the XML tags to be in any order, you have to check all the XML for an entry rather than just search on line X of the entry.
Ah so basically it is for standardization purposes.
 
What is your opinion on removal of unhealthiness/unhappiness blockers?
They block properties from working health/happiness wise in case of building unhealth/happiness removing buildings.

Buildings removing unhappiness from city (<bNoUnhappiness>)
Disneyland WW <Volkyria module>
Ark of the Covenant WW
Globe Theatre WW
Sydney Opera House WW
Theatre of Dionysus WW
Mind-Control Center - THIS ONE IS HIGH-TECH

Buildings removing unhealthiness from city.
CITY SIZE UNHEALTH (<bNoUnhealthyPopulation>)
Kotoku-in WW
Park Arcology - THIS ONE IS HIGH-TECH
Body Exchange Clinic - THIS ONE IS HIGH-TECH
Following civics can do this too: Superhuman (Welfare) (late era civic)

BUILDINGS UNHEALTH (<bBuildingOnlyHealthy>)
Matter Decompiler - THIS ONE IS HIGH-TECH
Shaman Cathedral <Custom_religions module>
Druid Cathedral <Custom_religions module>

Unhappiness removals:
You have 5 world wonders, that remove unhappiness.
Congratulations, moods of 5 random city citizens can't be ruined by rape, toxic atmosphere and fleas.

City size building unhealth removal:
You have one religious world wonder.
Congrats, one of your (or AIs) cities can grow huge as it doesn't have major contribution of unhealth.
It makes one city indirectly immune to property and other sources unhealth.

In case of building unhealth removal:
This one seems to be most extreme as PREHISTORIC buildings are capable of what FAR FUTURE buildings are doing.
This smells like druids/shamans being aliens and healing people, that got hurt by properties and accidents.
Hehehe prehistoric druids/shamans (or whenever these buildings get unlocked) running around with matter manipulators.

That is remove these tags from non hi-tech buildings.
 
I'm strongly of the opinion that we do remove all uses of those tags. I'd like to see them changed to something like .5 per population at most. .2 per population should be pretty extreme.
 
I'm strongly of the opinion that we do remove all uses of those tags. I'd like to see them changed to something like .5 per population at most. .2 per population should be pretty extreme.
Complete annihilation of NoUnhappiness/NoUnhealthyPopulation/BuildingOnlyHealthy tags is good idea too :D
These are all things using such tags, that I found in all *.xml files when searched with notepad++ in base caveman2cosmos and inside folders.
 
Last edited:
Naw... the per pop tags are good but we need to use them the other way with some effects as well so as to balance out the system as a whole.
Wasn't clear here, I meant these no unhealth/unhappiness tags :p

I'm for using per pop tags to fight unhealth/unappiness from city size.
 
Wasn't clear here, I meant these no unhealth/unhappiness tags :p

I'm for using per pop tags to fight unhealth/unappiness from city size.
Still carrying on about 3 Gorges Dam.........:rolleyes::nono:
 
@Thunderbrd
So when we are removing these NoUnhappiness/NoUnhealthyPopulation/BuildingOnlyHealthy tags from buildings/civic, that I listed?
It seems like no one objects here.
 
Top Bottom