<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AGetCultivationInfo</id>
	<title>API:GetCultivationInfo - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AGetCultivationInfo"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetCultivationInfo&amp;action=history"/>
	<updated>2026-10-17T20:46:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:GetCultivationInfo&amp;diff=30369&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetCultivationInfo&amp;diff=30369&amp;oldid=prev"/>
		<updated>2026-10-16T19:43:28Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=Crafting}}&lt;br /&gt;
Returns the state of one of the player&amp;#039;s cultivation plots.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
plot = GetCultivationInfo(plotNumber)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;plotNumber : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Plot number, starting at 1. It is rounded down.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
;plot : &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; – Plot table, see below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Type !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;StageNum&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Growth stage, 0–5. 255 for an empty plot.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;TotalTimer&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Seconds left until the plant is done. 0 for an empty plot.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;StageTimer&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Seconds left in the current stage. 0 for an empty plot.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Locked&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; || –&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Seed&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; || [[API:GetInventoryItemData#Item data table|Item data table]] of the planted seed. A blank item table for an empty plot.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Additives&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; || Three item data tables with the keys &amp;#039;&amp;#039;&amp;#039;2, 3 and 4&amp;#039;&amp;#039;&amp;#039;, one per additive type. The stock UI indexes it with &amp;lt;code&amp;gt;GameData.CultivationTypes.SOIL&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;WATERCAN&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;NUTRIENT&amp;lt;/code&amp;gt;. Blank item tables for an empty plot.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;PlantName&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;wstring&amp;lt;/code&amp;gt; || Name of the plant. In stages 4 and 5 this is the name the client received for the grown plant; in earlier stages it is the seed&amp;#039;s name. &amp;lt;code&amp;gt;L&amp;quot;&amp;quot;&amp;lt;/code&amp;gt; for an empty plot.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;PlantCount&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || In stages 4 and 5, the number received for the grown plant; in earlier stages 1. 0 for an empty plot.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* Timers are stored by the client in milliseconds and returned in whole seconds.&lt;br /&gt;
* The data is what the client last received for the plot. The stock UI asks the server for fresh data with [[API:UpdateCraftingStatus|UpdateCraftingStatus]]&amp;lt;code&amp;gt;(3, 4, plotNumber)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The client does not range-check &amp;lt;code&amp;gt;plotNumber&amp;lt;/code&amp;gt;. Use the plot numbers the stock UI uses (1 to &amp;lt;code&amp;gt;CultivationWindow.NUM_OF_PLOTS&amp;lt;/code&amp;gt;).&lt;br /&gt;
* If there is no player object or the Lua state is not available, nothing is returned.&lt;br /&gt;
* Exactly one argument must be passed.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None besides the generic &amp;#039;&amp;#039;Invalid Parameters&amp;#039;&amp;#039; message when the argument is missing or not a number.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;default/ea_cultivationwindow/source/cultivationwindow.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local plotData = GetCultivationInfo( plotNum )&lt;br /&gt;
CultivationWindow.plot[plotNum] = plotData&lt;br /&gt;
local stageInfo = CultivationWindow.stageInfo[plotData.StageNum]&lt;br /&gt;
...&lt;br /&gt;
elseif plotData.StageNum == 255&lt;br /&gt;
then&lt;br /&gt;
    stageInfo = CultivationWindow.stageInfo[GameData.CultivationStage.EMPTY]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checking the additives, from the same file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WindowSetShowing( windowName..&amp;quot;SinglePlotNutrientIcon&amp;quot;, plotData.Additives[GameData.CultivationTypes.NUTRIENT].id ~= 0 )&lt;br /&gt;
WindowSetShowing( windowName..&amp;quot;SinglePlotWaterIcon&amp;quot;,    plotData.Additives[GameData.CultivationTypes.WATERCAN].id ~= 0  )&lt;br /&gt;
WindowSetShowing( windowName..&amp;quot;SinglePlotSoilIcon&amp;quot;,     plotData.Additives[GameData.CultivationTypes.SOIL].id ~= 0  )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:UpdateCraftingStatus|UpdateCraftingStatus]]&lt;br /&gt;
* [[API:AddCraftingItem|AddCraftingItem]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>