GetNumResourceRequiredForUnit ( UnitType unit, ResourceType resource ) CityPushOrder ( City city, OrderType order, UnitType data, bool alt, bool shift, bool ctrl ) CityPurchaseUnit ( City city, UnitType unitType, int buildingType, ProjectType projectTypes ) CityPurchaseProject ( City city, UnitType unitType, int buildingType, ProjectType projectTypes ) CityPurchaseBuilding ( City city, UnitType unitType, int buildingType, ProjectType projectTypes ) GetHelpTextForUnit ( UnitType unit, bool includeRequirementsInfo )Ĭity: AllUpgradesAvailable ( UnitType unit, int upgradeCount = 0 )Ĭity: CanTrain ( UnitType unit, int continue, int testVisible, bool ignoreCost, bool ignoreUpgrades )Ĭity: ChangeGreatPeopleUnitProgress ( UnitType index, int change )Ĭity: ChangeUnitProduction ( UnitType index, int change )Ĭity: ChooseProduction ( UnitType trainUnit, BuildingType constructBuilding, ProjectType createProject, bool finish, bool front )Ĭity: CreateGreatGeneral ( UnitType greatPersonUnit )Ĭity: GetFaithPurchaseUnitTooltip ( UnitType id )Ĭity: GetFirstUnitOrder ( UnitType unit )Ĭity: GetGreatPeopleUnitProgress ( UnitType index )Ĭity: GetGreatPeopleUnitRate ( UnitType index )Ĭity: GetProductionExperience ( UnitType unit )Ĭity: GetPurchaseUnitTooltip ( UnitType id )Ĭity: GetUnitFaithPurchaseCost ( UnitType unit, bool arg1 )Ĭity: GetUnitProductionModifier ( UnitType unit )Ĭity: GetUnitProductionTurnsLeft ( UnitType unit, int num )Ĭity: GetUnitPurchaseCost ( UnitType unit )Ĭity: IsCanPurchase ( UnitType unitType, int buildingType, int projectType, int projectID, int projectID = nil, YieldType yield = nil )Ĭity: IsUnitFoodProduction ( UnitType unit )Ĭity: SetGreatPeopleUnitProgress ( UnitType index, int newValue ) Local description = GameInfo.Units().Description Those examples will return and assign the integer value 0. Here are different ways to query the database to retrieve the ID from the type. Here are the ID and Type columns found in this table. Integers labeled as UnitType corresponds to the ID column of the Units XML table.Pseudo-types do not exist in Lua, they only serve a documentation purpose on the wiki! The UnitType pseudo-type is actually a regular integer. This page is a part of the Lua and UI Reference (Civ5).