Fix for production from unhappy people

Maniac

Apolyton Sage
Joined
Nov 27, 2004
Messages
5,603
Location
Gent, Belgium
I wanted to borrow the free production from unhappy people (Governor's Manor) from FfH for Planetfall. However in doing so I noticed the code is in fact bugged. The GameTextMgr constructs a message using a city's angry population (unhappy people minus happy people). The actual production code however uses a city's 'unhappylevel', which actually is all unhappy people from all sources, not the difference of unhappy minus happy.

I corrected this, and while I was at it, I figured I'd change this XML tag from a boolean to an integer. For FfH this would have as a consequence the Pillar of Chains has a use for the Calabim. Perhaps this is of interest to a modmodder.

The attached files are for Planetfall, not FfH. But a search for "unhappyproduction" will find you all related code.
in BuildingSchema.xml you'll need to change bUnhappyProduction to the integer iUnhappyProduction.
 
Thanks Maniac, I'll get it in.
 
Precisely in which manner did you "fix" it? It was changed (SDK) recently to make it use the UnhappyLevel, the Python is the one which is currently incorrect. So if you swapped the SDK to match the python then you have moved backwards. But the move to INT vice Bool is most certainly a good one.
 
I'm not sure how python is involved with bUnhappyProduction. :confused:

Currently a city of size 10 with Governor's Manor gets 10 extra hammers from the unhappy people due to population size alone. Do you mean that's intended? :confused: Sounds rather overpowered.
 
I figured Python was used for the tooltip. Most of those are either Python or a widget define (temporarily forgot about widget defines, even though I was editing one just this morning....).


And yes, current implementation is desired to be that for every :( you get 1 :hammers:, instead of the previous method of 1 :hammers: per :( beyond your number of :) Because at that level you would get 2 or 3 tops typically.
 
I see...
That creates an even bigger synergy between the Calabim and the Order: whip as much you can, get your war weariness as high as you can, and place cheap bloodpets in your bases to counter the resulting unhappiness, but still get +1 hammer.
 
And yes, current implementation is desired to be that for every :( you get 1 :hammers:, instead of the previous method of 1 :hammers: per :( beyond your number of :) Because at that level you would get 2 or 3 tops typically.

Wow. I thought that was just a bug. You are essentially adding a free levee as well as +1 hammer/specialist.

Darrell
 
Not sure where/how it blocks the unhappy. Most likely it causes the Governor's Mannor/Pillar of Chains to become pointless, but there is a small chance it was coded such that it does not.


And yes, allowing 1 :hammers: per population is pretty sweet, but it is also a tough call for the Calabim then: Build up massive population to take advantage of that, or continue to eat the population to take advantage of Vampirism. And of course in a size 24 city an extra 24 hammers won't mean too much. Though if it is 24 extra BASE hammers it could be quite impressive indeed after modifiers.
 
I've been trying to mod an earlier version of FFH to have this feature, but I can't find those files you zipped up anywhere in the mod. Could you let me know where they are located?
 
Back
Top Bottom