How to change a civic from giving a building +1 unhappiness to giving it 0 unhappiness?

b14ckm4g1c

Chieftain
Joined
Jan 12, 2016
Messages
6
Basically I decided to play a round of TAM and in that mod the slave market gives +1 unhealthiness and +1 unhappiness by default, and these two disadvantages are supposed to be removed if you pick "slavery" as your labor civic. Problem is, the dev made it so picking "slavery" makes the slave market be +2 unhealthiness +2 unhappiness. So I dug around the xml files and tried modifying them. So here's how the part of the slavery civic in Civ4CivicInfos.xml that effects the slave market looks:
1667772723316.png

So this was making 1 unhappiness into 2. So I made the integers in <iHealthChange> positive by removing the minuses and now for some reason the effect is this:
1667772899580.png

So which other files do I have to edit so that it goes from +1 unhappiness to just nothing instead of +1 happy & +1 unhappy?
 
The screenshot is from Civilopedia, I assume. Surely, Civilopedia shouldn't just omit the health and happiness effects just because they'll cancel out when in Slavery. You might switch out of Slavery later, or Civilopedia could be accessed from the opening menu. Maybe it should say "-1 unhappy with Slavery". I'm guessing that the city screen is the bigger problem? I assume that +1 happy and +1 unhappy get listed there. To avoid this, I think you'd have to make a change in the DLL. These lines
CvGameTextMgr.cpp#L8520
CvGameTextMgr.cpp#L8653
append the anger and happiness text. Unfortunately, the "BuildingBadHappiness" and "BuildingExtraBadHappiness" values are already tallied up across all buildings, so one can't tell at that point whether some building is causing both negative happiness and positive extra happiness (which you'd like to cancel out). So this is going to be a bit tricky to implement, I think. In any case, you'd have to set up a development environment to recompile the DLL after your changes.

It might be worth pointing out that, because of the BuildingOnlyHealthy effect (Recycling Center in BtS), this is not purely a visual issue. Making the effects cancel out should (I suppose) mean that they'll also cancel out when there's a Recycling Center. With the current implementation, I expect that Slave Market with a Recycling Center provides +1 health.
 
Top Bottom