Valkrionn
The Hamster King
As a way of explaining my relative silence lately... Been involved working on some things.
A small taste (this is finished, but not publicly available):
A small taste (this is finished, but not publicly available):
Changelog:
- Happiness per Luxury Type reduced to 3, from 5
- Excess Luxuries of the same type now grant +1 Happiness
- Please note, this is only excess. The first instance of a resource is not considered.
- New tag, ExtraHappiness, added to Resources. This tag controls the amount of happiness granted; Opted for a tag rather than hardcoding for easy tweaking of values. Currently set to 1 for all Luxuries, others are 0.
- The code does not check specifically for luxury resources, it simply checks for a resource you possess more than one of, and then checks the ExtraHappiness tag. This means if you set that to a non-zero value on, say, Iron, it will grant happiness. Or, potentially, remove happiness. I have not tested negative values, but there is no reason it shouldn't work.
Comments:
I have made sure to output debugging data to FireTuner... A sample output:
Code:LuxuryHappiness: Resource ID: 22, Available: 3, Happiness per Extra Instance: 1 LuxuryHappiness: Total Extra Happiness: 2 LuxuryHappiness: Happiness Change: 2, Total Happiness: 14
If you have no excess luxuries, it will only output the middle line. The others are embedded inside of checks that would have been failed already. The first line will be duplicated for any applicable resource.
One thing I found out in the process of adding this... The SetHappiness() function is temporary. Happiness is recalculated each turn; I assumed it would be a constant addition. Meaning I figured out the scriptdata system, and then had to junk the entire thing.