Nearly all "GetSomething" methods return an integer ID # that associates to the ID # of a row within an XML game-table. So, Plot:GetContinentType() is going to return the integer ID # for the plot's continent which tracks back to table "Continents". To determine the In-Game Text name of the continent thus returned, do so
Code:
local iContinentType = Plot:GetContinentType()
local sContinentName = Locale.Lookup(GameInfo.Continents[iContinentType].Description)
You can then print the resulting Text value into the log, etc.
If you want to look at the actual "ContinentType" designation from table "Continents" such as "CONTINENT_AFRICA" then you can do as:
Code:
local iContinentType = Plot:GetContinentType()
local sContinentType = GameInfo.Continents[iContinentType].ContinentType
You would thus be translating the integer ID # returned from the Plot:GetContinentType() method into the text-string for the appropriate ContinentType as registered within game-table "Continents"
Game-table "Continents" can be found in file Maps.xml in folder
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.