Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:BuildSiegeWeapon

From RoR Wiki
Revision as of 19:40, 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 · RvR functions
Version: WAR 1.4.8

Asks the server to build a siege weapon at the siege pad the player is interacting with.

BuildSiegeWeapon(weaponId)

Arguments

weaponId
number – The id of an entry from GetSiegePadBuildData. Only the low 16 bits are sent.

Returns

Nothing.

Details

  • The request is sent as an interaction with the object the player last interacted with. Nothing is sent if there is no such object or if the network connection is not ready.
  • The client does not check weaponId against the build list or the required items; the server decides.
  • The function takes exactly one argument.

Errors

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

Example

From default/ea_siegeweaponwindow/source/siegeweaponbuildwindow.lua:

local weaponId = SiegeWeaponBuildWindow.weaponsData[SiegeWeaponBuildWindow.selectedWeapon].id
...
BuildSiegeWeapon( weaponId )
SiegeWeaponBuildWindow.Hide()

See also