How to obtain culture and science progress?

g02703

Chieftain
Joined
Apr 2, 2016
Messages
33
In certain GameEvents functions, we might want to know how far the player is before they can grab a virtue, or complete a research/science (maybe to determine if you want to award them a building, energy, etc.)

I'm looking at the Civ 5 documentary on the Player Object (because I believe culture and science progress is specific to a player).

For culture, I can only see player:GetJONSCulture() (returns integer), which is actually player:GetCulture() in CivBE. I believe this gets us the current culture balance - the value which resets to zero when we obtain a virtue. What is the function that gets us the next culture goal (which gets larger for each subsequent virtue to work towards)? I don't see any function with the word Culture in it that describes this "next virtue/culture goal" number. Could it be player:GetCultureBombTimer() (returns integer)?

For science, there's player:GetCurrentResearch(), which returns TechType, which is the current research they're working on. There's also player:GetResearchProgress() which I'm not sure whether it's a percent (0-100) or the current number of beakers they have towards completion of current research.

I think I'm quite all set with the science. The culture, though - how do I get that "next virtue goal" number?
 
Those things are usually easy to find in the UI-Folder. The top panel has a "X out of Y"-Culture overview, so it must have a function that can get that number. Here it is:

player:GetNextPolicyCost()
 
Thank you! That function was in the Civ5 documentation, but it didn't occur to me immediately that Policy (in Civ5) is Virtue (in CivBE).
 
Top Bottom