Affinity Gain

Starrynite120

Prince
Joined
Jul 15, 2015
Messages
472
I'm trying to add affinity gain to improvements and buildings, not a a yield like affinity as yields, but as a one time boost like with technologies. I'm looking for the code that allows technologies to grant affinity experience, and I was just going to mimic that code for buildings and improvements, but I can't find that code in the game files. Does anyone know where it is?
 
You may be better off looking at how the lua scripts of quests do it.

The function
Code:
Player:ChangeAffinityScore(Affinity_ID, NumberOfPoints)
will add affinity points, and the event
Code:
GameEvents.BuildingProcessed(playerID, buildingID, cityID, buildingAdded)
will trigger when a building is constructed.
 
Back
Top Bottom