Building Unhappiness

Is there a way to make a building add unhappiness:( rather than happiness:)?

Can't you just put in a negative integer (rather than a positive one) into the same place that determines happiness effects?
 
Can't you just put in a negative integer ...

No. There is a test in the C++ code within the DLL that only adds happiness from buildings to the city total if the value for the building is positive.
 
I think I will change it in the DLL for my mod, as I need unhappiness from some buildings (for example Tax Collector).
 
There was a mod called Bio refinery (iirc), with a lua file created by Spatzimaus.
This lua file worked fine for me until something happened with my mod, cant say what.

Ask to Whoward69, could you include a feature for negativ happiness in your great:D DLL mod. Or is this only doable in C++ coding? Sorry if i understand your post wrong.:crazyeye:
 

Attachments

@Gilgamesch - the problem is that cities ignore negative happiness from buildings

Code:
if (pBuildingInfo->GetHappiness() > 0) {
  ChangeBaseHappinessFromBuildings(pBuildingInfo->GetHappiness() * iChange);
}

if (pBuildingInfo->GetUnmoddedHappiness() > 0) {
  ChangeUnmoddedHappinessFromBuildings(pBuildingInfo->GetUnmoddedHappiness() * iChange);
}

Would be a simple matter to remove the test, I'll add it to the list for v17 of the DLL
 
Thank you.:groucho:
 
Back
Top Bottom