Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:UpdateCraftingStatus

From RoR Wiki
Revision as of 19:51, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · Crafting functions
Version: WAR 1.4.8

Sends a cultivation command for one plot to the server.

UpdateCraftingStatus(tradeSkill, command, plotNumber)

Arguments

tradeSkill
number – Must be 3 (GameData.TradeSkills.CULTIVATION).
command
number – Cultivation command. The stock UI uses 3 (reset the plot) and 4 (request the plot's info).
plotNumber
number – Plot number, starting at 1.

Returns

Nothing.

Details

  • Nothing is sent unless tradeSkill is 3.
  • Commands 1 and 2 are not sent either. Every other command value is sent as a single byte with the plot.
  • The plot data arrives later from the server. Read it with GetCultivationInfo.
  • The function needs at least three arguments and only reads the last three.

Errors

None besides the generic Invalid Parameters message when an argument is not a number.

Example

From default/ea_cultivationwindow/source/cultivationwindow.lua:

for plotNum = 1, CultivationWindow.NUM_OF_PLOTS do
    -- TODO: expose these enum values from C++
    -- crafting type 3 = ETRADE_SKILL_CULTIVATION, action 4 = ECLTCMD_GET_INFO
    UpdateCraftingStatus(3, 4, plotNum)
    ...
end
function CultivationWindow.AbortPlant()
    -- crafting type 3 = ETRADE_SKILL_CULTIVATION, action 3 = ECLTCMD_RESET_PLOT
    UpdateCraftingStatus( 3, 3, GameData.Player.Cultivation.CurrentPlot )
end

See also