User:DonQuich: Difference between revisions

From Civilization Modding Wiki
Jump to navigationJump to search
m (testing my bot)
mNo edit summary
 
(60 intermediate revisions by the same user not shown)
Line 1: Line 1:
''This page is a part of the [[Lua and UI Reference]].''
Developer of the bot that generated the initial versions of the [[Lua and UI Reference (Civ5)]] on mid-2012.


Parameters flagged with this pseudo-type are actually '''integers'''. <br/>
CivFanatics profile: [http://forums.civfanatics.com/member.php?u=210491 DonQuiche]
Pseudo-types do not exist in LUA, they only serve a documentation purpose on the wiki.<br/>
Integers labeled as 'PlotTypeID' corresponds to the constants defined in the '''PlotTypes''' LUA enumeration.<br/>


==PlotTypes enumeration ==
A LUA enumeration is a just a regular table. It is commonly used to store constants, the keys being the constants' names and the pairs the corresponding values.
Below are the values found in this enumeration.


== Mods ==
* [http://forums.civfanatics.com/showthread.php?t=436912 Ingame Editor (IGE)]
* [http://forums.civfanatics.com/showthread.php?p=11646470 Reseed]


{|
|-
!align="left" |Key
!
!align="left" |Value
|-
| "NO_PLOT"
|
| -1
|-
| "PLOT_MOUNTAIN"
|
| 0
|-
| "PLOT_HILLS"
|
| 1
|-
| "PLOT_LAND"
|
| 2
|-
| "PLOT_OCEAN"
|
| 3
|-
| "NUM_PLOT_TYPES"
|
| 4
|}


==Examples==
== My scratchpad: pages to salvage ==
 
* [[Lua Game Objects/NotificationTypes]]
Here is how to use the LUA enumeration to retrieve the ID from the 'type'. The variable 'id' will be assigned the value 4.<pre>
* [[SetHappiness]] - Warning and link
local id = PlotTypes.NUM_PLOT_TYPES
* [[HasPolicy]] Good example for HasPolicy and [[SetHasPolicy]]
local id = PlotTypes["NUM_PLOT_TYPES"]
* [[GetMinorCivType]] - Good example for player name (add it to Player.GetName?)
</pre>
* Warning about graphics refresh on SetTerrainType
 
* Warning and code snippet on SetOwner.
[[Category:Civ5Lua]]
* Events.ActivePlayerTurnStart - specify human besides of "active" - exclude AI
* [[GameEvents.PlayerCanConstruct(playerID, buildingTypeID)]] - Example of building constructible with a policy.
* [[Events.SerialEventCityDestroyed (Civ5 API)]] Advise the reader to see SerialEventCityCaptured or copy/paste.
* [[Events.SpecificCityInfoDirty (Civ5 API)]] : add "Fired when something in a particular city was changed. E.g. building created/sold, specialists reallocated, and some other things. ".
* [[SerialEventCityPopulationChanged]]: fixes the 2k wiki description. Also copy example.
* Events.SerialEventCityCaptured: "fired when city is captured or traded to an another civ. "
* GameEvents.UnitGetSpecialExploreTarget(iPlayerID, iUnitID) - appears to be triggered when the 'explore' order is given, or some subset thereof. The unit structure for the relevant unit is manipulated to set the explore target.

Latest revision as of 08:21, 22 September 2012

Developer of the bot that generated the initial versions of the Lua and UI Reference (Civ5) on mid-2012.

CivFanatics profile: DonQuiche


Mods


My scratchpad: pages to salvage