[Lua] Getting GPT from a city?

3335d

CCtP Player
Joined
Jun 15, 2012
Messages
642
From looking at the Lua reference there seems to be no method for this. Is there a way in which the various yields produced by a city could be gotten through Lua? I want to make a modmod of Gedemon's cultural diffusion mod to incorporate these factors.
 
Isn't it what City.GetBaseYieldRate is used for?
Not sure, i havn't messed up with yields yet, so didn't test it. Should be relatively easy to test it with FireTuner.
 
From looking at the Lua reference there seems to be no method for this. Is there a way in which the various yields produced by a city could be gotten through Lua? I want to make a modmod of Gedemon's cultural diffusion mod to incorporate these factors.

The **BEST** Lua reference is the standard game UI code. So the question isn't "where is this in the reference" but "where is this in the UI".

The answer is almost certainly "in the city view screens" (and in this case is the table of yields in the top left hand corner) and that code can be found in (surprise, surprise) CityView.lua - so go take a peek in there to see how it's done :)
 
Back
Top Bottom