Increase Anger in a City

OrionVeteran

Deity
Joined
Dec 25, 2003
Messages
2,443
Location
Newport News VA
I want to add anger to every city having the state religion.

My question is: How can I add anger to a city using python only.


Code:
# Code to Anger people in City
pCity.ChangeAnger(-1) ????? (does this exist?)
pCity.SetAnger(-1) ????? (does this exist?)
pCity.changeHurryAngerTimer(10)

Any ideas?

Orion Veteran :cool:
 
Do you mean permanent unhappiness? If so:

.changeExtraHappiness() + or - whatever amount.

.changeHurryAngerTimer() is the timer associated with sacrificing population (aka slavery). I guess it would work to give 1 unhappiness for how many turns your specify.

There's also .changeHappinessTimer() I think, which I'm pretty sure is the temporary like 10 turn happiness you get from events and such.
 
Do you mean permanent unhappiness? If so:

.changeExtraHappiness() + or - whatever amount.

.changeHurryAngerTimer() is the timer associated with sacrificing population (aka slavery). I guess it would work to give 1 unhappiness for how many turns your specify.

There's also .changeHappinessTimer() I think, which I'm pretty sure is the temporary like 10 turn happiness you get from events and such.

So, if I'm looking for a temporary event, say 15 rounds, then the code should look like this?"

Code:
pCity.changeExtraHappiness(-1)   
pCity.changeHappinessTimer(15)


Orion Veteran :cool:
 
You'd just use

Code:
pCity.changeHurryAngerTimer(pCity.flatHurryAngerLength())

The timer itself creates the unhappiness, so you don't need to do it separately. And flatHuttyAngerLength() returns 15 under Epic, 10 under Normal, etc. If you want it for 10 rounds no matter what, just pass in 10 instead.
 
Is there a way to set what the reason for the anger is?

One thing that I've always thought was missing is that a city is ignorant of nearby baddies. Something like "we are worried about the enemy army that is outside the gates". Oh wait, we have silver and fur, let the good times roll! :rolleyes:
 
To create a new source of unhappiness, you'd have to add a new field (or calculation) to CvCity to track it and change CvGameTextMgr to check for it and display your message. You could still have its effects apply through Extra Unhappiness or the counter, but you'd need to track it separately so you could show your message.

At that point, you might as well not add it into Extra Unhappiness since you're doing all the tracking separately anyway.
 
Top Bottom