Trying to change the unhappiness values

Hamil

Chieftain
Joined
Oct 6, 2005
Messages
53
Hello everyone,

i was trying to edit the values for the unhappiness in the globaldefines.xml

Specifically i was trying to lower the unhappiness per population to 0.75 and raise the unhappiness per city to 3. Heres the code i am using:

Spoiler :


Code:
<GameData>
	<Defines>
		<Update>
			<Where Name="UNHAPPINESS_PER_POPULATION"/>
			<Set Value="0.50"/>
		</Update>
		<Update>
			<Where Name="UNHAPPINESS_PER_CITY"/>
			<Set Value="3"/>
		</Update>
	</Defines>
</GameData>


But im having no luck. The changes work for the cities, but not for the per pop value. The unhappiness stays always 0 per pop. It seems to me, that civ V does some rounding before calculating the unhappiness. Raising it to 2, 3 or 4 is no problem.

I also had the idea to use the indian trait and give it to all civs with changed values. But also without success. Anyone has got an idea or a workaround?

Greets,
Hamil
 
Perhaps it's because how could there be .5 happiness per citizen? It can't calculate it, so it defaults to 0. Most likely this is the case.
 
Perhaps it's because how could there be .5 happiness per citizen? It can't calculate it, so it defaults to 0. Most likely this is the case.

The system can calculate it. At least it does for the indian civ. The number it shows us are rounded. But the traits work with a percent value. Something i wasnt able to aply to all civs.
 
You've got your update tags backwards on the unhappiness per city..
 
You've got your update tags backwards on the unhappiness per city..

Yep, right you are. But i just checked against my original code. Was a copying error. The value for unhappines per city works.

Anyone got an idea how to reduce unhappiness per population?
 
It might not be capable of accepting decimal points. There are only a few fields that can. Try setting it to 1.5 and seeing if it changes anything. I presume you have been testing it by going into live tuner and setting the new population to 'whatever' rather than trying to test a save.
 
It might not be capable of accepting decimal points. There are only a few fields that can. Try setting it to 1.5 and seeing if it changes anything. I presume you have been testing it by going into live tuner and setting the new population to 'whatever' rather than trying to test a save.

Hm, i think it HAS to work with decimals cause there is this line in the globaldefines.xml

Code:
<Row Name="UNHAPPINESS_PER_OCCUPIED_POPULATION">
<Value>1.34</Value>

The question is, if it can work with decimals with a zero as first number.
And i tried both, safes and tuner and additional just playing 30+ turns.
 
Just because one field can accept it doesn't mean they all can. Perhaps that variable is a float and the other an integer.. in any case just try fiddling with it. Maybe all you need to do is remove the zero..
 
Just because one field can accept it doesn't mean they all can. Perhaps that variable is a float and the other an integer.. in any case just try fiddling with it. Maybe all you need to do is remove the zero..

Thanks for the idea but no. Without zero no success either.
The values are definied at the start of each file, right? So the values in the table defines are defined as type="variant". Whatever that means ...
 
Try it with 1.5 or another partial value, if it still messes up it probably is because the variable is an integrer, not a floating point. You'll need to do an workaround to adjust that, perhaps by adding a modfier much like how india works.
 
Top Bottom