In the end, I used something like this to compare every quest description until I found a match:
local questLocName = "LOC_"..questType.."_INSTANCE_NAME"
for info in GameInfo.Units() do
if questName == Locale.Lookup(questLocName, info.Name) then
iconName = info.UnitType...
I need to determine what specifically a City-State wants in its quest, such as a campus or a spearman, and use this info to determine the name of the icon for that unit/district/etc.
My original method was to take a substring of the quest name (ex. "Build a Campus District"), but this does not...
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.