Lua Game Objects/Player: Difference between revisions

From Civilization Modding Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 23: Line 23:
*[[SetPlayable]]
*[[SetPlayable]]
===Misc===
===Misc===
*[[CalculateTotalYield]](eYield)
*[[GetCurrentEra]]
*[[GetCurrentEra]]
*[[GetTotalTimePlayed]]
*[[GetTotalTimePlayed]]
*[[GetWorkerSpeedModifier]]
*[[IsFoundedFirstCity]]
*[[IsFoundedFirstCity]]
*[[IsHasLostCapital]]
*[[IsHasLostCapital]]
===Modifiers/Yields===
===Yields===
*[[CalculateTotalYield]](eYield)
*[[GetExtraYieldThreshold]](YieldTypes eIndex)
*[[GetExtraYieldThreshold]](YieldTypes eIndex)
*[[GetSpecialistExtraYield]]
*[[GetSpecialistExtraYield]]
*[[GetWorkerSpeedModifier]]
*[[GetYieldRateModifier]](YieldTypes eIndex)
*[[GetYieldRateModifier]](YieldTypes eIndex)
*[[SpecialistYield]](eSpecialist, eYield)
*[[SpecialistYield]](eSpecialist, eYield)
Line 379: Line 379:
*[[GetNumPolicyBranchesUnlocked]]
*[[GetNumPolicyBranchesUnlocked]]
*[[GetPolicyBranchChosen]]
*[[GetPolicyBranchChosen]]
*[[HasPolicy]]
*[[HasPolicy]](policyID) - returns true if a player has a specified policy.
*[[IsPolicyBlocked]]
*[[IsPolicyBlocked]]
*[[IsPolicyBranchBlocked]]
*[[IsPolicyBranchBlocked]]
Line 386: Line 386:
===Set===
===Set===
*[[DoAdoptPolicy]]
*[[DoAdoptPolicy]]
*[[SetHasPolicy]]
*[[SetHasPolicy]](policyID, bNewValue) - sets player having a specified policy. Increases next policy cost.
*[[SetNumFreePolicies]]
*[[SetNumFreePolicies]]
*[[SetPolicyBranchUnlocked]]
*[[SetPolicyBranchUnlocked]]
Line 394: Line 394:
*[[GetCapitalUnhappinessMod]]
*[[GetCapitalUnhappinessMod]]
*[[GetCityCountUnhappinessMod]]
*[[GetCityCountUnhappinessMod]]
*[[GetExcessHappiness]]
*[[GetExcessHappiness]]() - returns happiness minus unhappiness (whats shown to player on the top panel). If empire is unhappy, it will return a negative value. Otherwise positive or zero.
*[[GetExtraHappinessPerCity]]
*[[GetExtraHappinessPerCity]]
*[[GetExtraHappinessPerLuxury]]
*[[GetExtraHappinessPerLuxury]]
Line 497: Line 497:
*[[GetImprovementUpgradeRateModifier]]
*[[GetImprovementUpgradeRateModifier]]
*[[GetUnimprovedAvailableLuxuryResource]]
*[[GetUnimprovedAvailableLuxuryResource]]
*[[GetWorkerSpeedModifier]]
*[[IsAnyPlotImproved]]
*[[IsAnyPlotImproved]]



Latest revision as of 04:45, 18 February 2012

Up: Lua Game Objects


List on the official wiki: http://wiki.2kgames.com/civ5/index.php/Lua_Game_Objects/Player (parameters are listed for many methods).


Player Info

Self

Misc

Yields

Combat Experience

Score

Demographics

Script Data

Other Players / Diplomacy

City States

Dispute level

Get

Set

Units

  • CanTrain(eUnit, boolean bContinue, boolean bTestVisible)

Experience

Cost/Supply

Combat

Numbers

Get

Set

Cities

Get

Set

Population

Buildings

  • CanBuild
  • CanConstruct(BuildingTypes eBuilding, boolean bContinue, boolean bTestVisible, boolean bIgnoreCost)

Get

Set

Food

Production

Gold

Get

Set

Science

Get

Set

Culture

Get

Set

Policies

Get

Set

Happiness

Get

Set

GoldenAge

Get

Set

Great People

Great General

Get

Set

Resources

Get

Set

Improvements

Plots

Get

Set

Barbarians

Get

Set

Goodies

UI

Text

Get

Set

AI

AdvancedStart

Get

Set

Unsorted

Unused

Conscription

Hurry

Anarchy

Religion

Strike

UN/AP Resolutions


Related Events

See Lua Game Events (Player)