Lua UnsyncedCtrl: Difference between revisions

From Spring
Jump to navigationJump to search
Argh (talk | contribs)
m Fixed comments for Spring.Echo()
Jk (talk | contribs)
77b update
Line 1: Line 1:
== Pipes ==
= UI =
'''Spring.SetLastMessagePosition'''
  ( number x, number y, number z ) -> nil
 
= Ingame Console =
'''Spring.Echo'''
'''Spring.Echo'''
   ( arg1 [, arg2 [, ... ] ] ) -> nil
   ( arg1 [, arg2 [, ... ] ] ) -> nil
Line 5: Line 9:
   <font color="#55ee99">Useful for debugging.<br> Prints values in the spring chat console.<br> Hint: the default print() writes to STDOUT.</font>
   <font color="#55ee99">Useful for debugging.<br> Prints values in the spring chat console.<br> Hint: the default print() writes to STDOUT.</font>


'''Spring.PlaySoundFile'''
'''Spring.SendCommands''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
   ( string "soundfile" [, number volume
   ( string command ) -> nil
    [, number x, number y, number z ] ] ) -> nil | boolean
  ( {string command1, string command2, ...} ) -> nil
 


  <font color="#55ee99">Plays WAV sounds. <i>By default</i>, the soundfile is expected to be in the "Sounds" folder.</font>
== GUI ==
'''Spring.SetActiveCommand''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( string action [, string actionExtra ] ) -> nil | boolean
  ( number cmdIndex [, number button = 1
    [, boolean leftClick, boolean rightClick,
    boolean alt, boolean ctrl, boolean meta, boolean shift]] ) -> nil | boolean
'''Spring.ForceLayoutUpdate''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( ) -> nil
'''Spring.SetDrawSelectionInfo''' <font color="#55ee99">disables the "Selected Units x" box in the GUI</font> <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( boolean enable ) -> nil


'''Spring.PlaySoundStream'''
== Mouse ==
   ( string "oggfile" [, number volume = 1.0
'''Spring.SetMouseCursor''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
    [, number x, number y, number z ]] ) -> nil | boolean true
   ( string cursorName [, number scale ] ) -> nil
  <font color="#55ee99">Allow you to play an Ogg Vorbis (.OGG) compressed sound file.<br> <b>Note:</b> you may only play _ONE_ stream at a time. If another stream is playing and<br> you try to start a second one the call will fail, and silence will result.<br> <b>Note2:</b> the file has to be on the local filesystem, so you can't playback ogg's<br> in your mod with this command, to do so you have to extract it before and save<br> it on the local filesystem.</font>
'''Spring.WarpMouse''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( number x, number y ) -> nil


'''Spring.StopSoundStream'''
== LOS Colors ==
  ( ) -> nil
'''Spring.SetLosViewColors''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  <font color="#55ee99">Terminates any SoundStream is running.<br> Since only one may play at any time (see above), this can be used as an interrupt.</font>
  ( table reds = { number always, number LOS, number radar, number jam },
    table greens = { number always, number LOS, number radar, number jam },
    table blues = { number always, number LOS, number radar, number jam } ) -> nil


== SendMessage ==
== SendMessage ==
'''Spring.SendMessage'''
'''Spring.SendMessage'''
   ( string "message" ) -> nil
   ( string "message" ) -> nil
'''Spring.SendMessageToPlayer'''
'''Spring.SendMessageToPlayer'''
   ( number playerID, string "message" ) -> nil
   ( number playerID, string "message" ) -> nil
'''Spring.SendMessageToTeam'''
'''Spring.SendMessageToTeam'''
   ( number teamID, string "message" ) -> nil
   ( number teamID, string "message" ) -> nil
'''Spring.SendMessageToAllyTeam'''
'''Spring.SendMessageToAllyTeam'''
   ( number allyID, string "message" ) -> nil
   ( number allyID, string "message" ) -> nil
'''Spring.SendMessageToSpectators'''
'''Spring.SendMessageToSpectators'''
   ( string "message" ) -> nil
   ( string "message" ) -> nil


== Markers ==
'''Spring.MarkerAddPoint''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( number x, number y, number z [, string text = ""] ) -> nil
'''Spring.MarkerAddLine''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( number x1, number y1, number z1, number x2, number y2, number z2 ) -> nil
'''Spring.MarkerErasePosition''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( number x, number y, number z ) -> nil
= Sounds =
'''Spring.PlaySoundFile'''
  ( string "soundfile" [, number volume
    [, number x, number y, number z ] ] ) -> nil | boolean
  <font color="#55ee99">Plays WAV sounds. <i>By default</i>, the soundfile is expected to be in the "Sounds" folder.</font>
'''Spring.PlaySoundStream'''
  ( string "oggfile" [, number volume = 1.0
    [, number x, number y, number z ]] ) -> nil | boolean true
  <font color="#55ee99">Allow you to play an Ogg Vorbis (.OGG) compressed sound file.<br> <b>Note:</b> you may only play _ONE_ stream at a time. If another stream is playing and<br> you try to start a second one the call will fail, and silence will result.<br> <b>Note2:</b> the file has to be on the local filesystem, so you can't playback ogg's<br> in your mod with this command, to do so you have to extract it before and save<br> it on the local filesystem.</font>
'''Spring.StopSoundStream'''
  ( ) -> nil
  <font color="#55ee99">Terminates any SoundStream is running.<br> Since only one may play at any time (see above), this can be used as an interrupt.</font>
'''Spring.PauseSoundStream'''
  ( ) -> nil
'''Spring.SetSoundStreamVolume'''
  ( number volume ) -> nil
= SendLuaMessage =
<font color="#55ee99">Very important! (allows synced inter-lua-enviroment communications)</font>
'''Spring.SendLuaUIMsg''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( string message, string mode ) -> nil
  <font color="#55ee99">possible modes are:<br>"s"/"specs" & "a"/"allies"</font>
'''Spring.SendLuaGaiaMsg''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( string message ) -> nil
'''Spring.SendLuaRulesMsg''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( string message ) -> nil
= Units =
== Unit Selection ==
== Unit Selection ==
'''Spring.SelectUnitMap'''
'''Spring.SelectUnitMap'''
Line 41: Line 91:
'''Spring.SelectUnitArray'''
'''Spring.SelectUnitArray'''
   ( { [1] = unitID1 , [2] = unitID2 , ...} [,boolean append] ) -> nil
   ( { [1] = unitID1 , [2] = unitID2 , ...} [,boolean append] ) -> nil
'''Spring.GetDrawSelectionInfo'''
  ( ) -> boolean
<font color="#55ee99">Returns whether &quot;Selected units&quot; text is displayed.</font>


'''Spring.GetDrawSelectionInfo'''
'''Spring.GetDrawSelectionInfo'''
   ( boolean drawSelectionInfo ) -> nil
   ( boolean drawSelectionInfo ) -> nil


== Unit Control ==
== Unit Group ==
'''Spring.SetUnitGroup''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( number unitDefID, number groupID ) -> nil
 
== Give Order ==
'''Spring.GiveOrder''' <font color="#55ee99">gives order to all selected units</font> <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( number cmdID,
    params = {number, etc...},
    options = {"alt", "ctrl", "shift", "right"} ) -> nil | boolean true
'''Spring.GiveOrderToUnit''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( number unitID,
    number cmdID,
    params = {number, etc...},
    options = {"alt", "ctrl", "shift", "right"} ) -> nil | boolean true
'''Spring.GiveOrderToUnitMap''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( unitMap = { [unitID] = dontCare, etc... },
    number cmdID,
    params = {number, etc...},
    options = {"alt", "ctrl", "shift", "right"} ) -> nil | boolean true
'''Spring.GiveOrderToUnitArray''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( unitArray = { [1] = unitID, etc... },
    number cmdID,
    params = {number, etc...},
    options = {"alt", "ctrl", "shift", "right"} ) -> nil | boolean true
'''Spring.GiveOrderArrayToUnitMap''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( unitMap = { [number unitID] = dontCare, etc... },
    orderArray = {
      { number cmdID,
        params = {number, etc...},
        options = {"alt", "ctrl", "shift", "right"}
      }, ..
    }
  ) -> nil | boolean true
'''Spring.GiveOrderArrayToUnitArray''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( unitArray = { [1] = number unitID, etc... },
    orderArray = {
      { number cmdID,
        params = {number, etc...},
        options = {"alt", "ctrl", "shift", "right"}
      }, ..
    }
  ) -> nil | boolean true
 
== Unit NoDraw,NoSelect,NoMinimap ==
'''Spring.SetUnitNoDraw''' <font color="red">LuaGadgets only!</font>
'''Spring.SetUnitNoDraw''' <font color="red">LuaGadgets only!</font>
   ( number unitID, boolean noDraw ) -> nil
   ( number unitID, boolean noDraw ) -> nil
Line 56: Line 146:
   ( number unitID, boolean noMinimap ) -> nil
   ( number unitID, boolean noMinimap ) -> nil


== GUI ==
= GUI =
'''Spring.SetDrawSky'''
'''Spring.SetDrawSky'''
   ( boolean drawSky ) -> nil
   ( boolean drawSky ) -> nil
Line 71: Line 161:
'''Spring.SetTeamColor'''
'''Spring.SetTeamColor'''
   ( number teamID, number r, number g, number b ) -> nil
   ( number teamID, number r, number g, number b ) -> nil
'''Spring.AssignMouseCursor''' <font color="#55ee99">default hotspot is center!</font>
'''Spring.AssignMouseCursor''' <font color="#55ee99">default hotspot is center!</font>
   ( string "cmdName", string "iconFileName"
   ( string "cmdName", string "iconFileName"
Line 82: Line 173:
     { number r, number g, number b, number a } [, boolean showArea ] ) -> nil | true
     { number r, number g, number b, number a } [, boolean showArea ] ) -> nil | true


== Camera ==
= Sharing =
'''Spring.SetShareLevel''' <font color="#55ee99">note: shareLevel is 0<= x <= 1</font> <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( string "metal" | "energy", number shareLevel ) -> nil
'''Spring.ShareResources''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( number teamID, string "units" ) -> nil
  ( number teamID, string "metal" | "energy", number amount ) -> nil
 
= UnitDefIcon & BuildPics =
'''Spring.AddUnitIcon''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( string iconName, string texFile [, number size [, number dist [, boolean radAdjust ]]] ) -> nil | boolean
'''Spring.FreeUnitIcon''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( string iconName ) -> nil | boolean
'''Spring.SetUnitDefIcon''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( number unitDefID, string iconName ) -> nil
'''Spring.SetUnitDefImage''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( number unitDefID, luaTexture | string texFile ) -> nil
 
= Camera =
'''Spring.SetCameraState'''
'''Spring.SetCameraState'''
   ( table camState, number camTime) -> nil | boolean
   ( table camState, number camTime) -> nil | boolean
<font color="#55ee99">camState = {
<font color="#55ee99">For more info of the format of camState check Spring.GetCameraState().</font>
  mode = cameraID,
    1 = cameraID,
    2 = posX,
    3 = posY,
    4 = posZ,
    5 = dirX,
    6 = dirY,
    7 = dirZ,
    ... and more (depending on the camera ...
}</font>


'''Spring.SetCameraTarget'''
'''Spring.SetCameraTarget'''
   ( number x, number y, number z [,number transTime] ) -> nil
   ( number x, number y, number z [,number transTime] ) -> nil
'''Spring.SetCameraOffset''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( [number px = 0 [, number py = 0 [, number pz = 0
    [, number tx = 0 [, number ty = 0 [, number tz = 0]]]]]] ) -> nil
= (Virtual-)FileSystem =
'''Spring.ExtractModArchiveFile'''
  ( string modfile ) -> boolean
'''Spring.CreateDir''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( number path ) -> nil | boolean
= Engine Config =
<font color="#55ee99">The following functions read the engine configs saved in .springrc, registry or what ever your os prefers.</font>
'''Spring.GetConfigInt''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( string name [, number default] ) -> nil | number
'''Spring.SetConfigInt''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( string name, number value ) -> nil
'''Spring.GetConfigString''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( string name [, string default] ) -> nil | string
'''Spring.SetConfigString''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( string name, string value ) -> nil
= Make Font =
'''Spring.MakeFont''' <font color="red" style="font-weight:600">(needs ModUICtrl)</font>
  ( [string inputFile], table options ) -> nil | boolean
<font color="#55ee99">options = {
  outName = string,
  inData = string,
  height = number,
  texWidth = number,
  minChar = number,
  maxChar = number,
  outlineMode = number,
  outlineRadius = number,
  outlineWeight = number,
  padding = number,
  stuffing = number,
  debug = number,
}</font>


== World Primitives ==
= World Primitives =
<font color="red">outdated! use opengl api instead!</font>
<font color="red" style="font-weight:600">outdated! use opengl api instead!</font>


'''Spring.AddWorldIcon'''
'''Spring.AddWorldIcon'''

Revision as of 23:36, 29 December 2008

UI

Spring.SetLastMessagePosition

 ( number x, number y, number z ) -> nil

Ingame Console

Spring.Echo

 ( arg1 [, arg2 [, ... ] ] ) -> nil
 Useful for debugging.
Prints values in the spring chat console.
Hint: the default print() writes to STDOUT.

Spring.SendCommands (needs ModUICtrl)

 ( string command ) -> nil
 ( {string command1, string command2, ...} ) -> nil


GUI

Spring.SetActiveCommand (needs ModUICtrl)

 ( string action [, string actionExtra ] ) -> nil | boolean
 ( number cmdIndex [, number button = 1
   [, boolean leftClick, boolean rightClick,
    boolean alt, boolean ctrl, boolean meta, boolean shift]] ) -> nil | boolean

Spring.ForceLayoutUpdate (needs ModUICtrl)

 ( ) -> nil

Spring.SetDrawSelectionInfo disables the "Selected Units x" box in the GUI (needs ModUICtrl)

 ( boolean enable ) -> nil

Mouse

Spring.SetMouseCursor (needs ModUICtrl)

 ( string cursorName [, number scale ] ) -> nil

Spring.WarpMouse (needs ModUICtrl)

 ( number x, number y ) -> nil

LOS Colors

Spring.SetLosViewColors (needs ModUICtrl)

 ( table reds = { number always, number LOS, number radar, number jam }, 
   table greens = { number always, number LOS, number radar, number jam },
   table blues = { number always, number LOS, number radar, number jam } ) -> nil

SendMessage

Spring.SendMessage

 ( string "message" ) -> nil

Spring.SendMessageToPlayer

 ( number playerID, string "message" ) -> nil

Spring.SendMessageToTeam

 ( number teamID, string "message" ) -> nil

Spring.SendMessageToAllyTeam

 ( number allyID, string "message" ) -> nil

Spring.SendMessageToSpectators

 ( string "message" ) -> nil

Markers

Spring.MarkerAddPoint (needs ModUICtrl)

 ( number x, number y, number z [, string text = ""] ) -> nil

Spring.MarkerAddLine (needs ModUICtrl)

 ( number x1, number y1, number z1, number x2, number y2, number z2 ) -> nil

Spring.MarkerErasePosition (needs ModUICtrl)

 ( number x, number y, number z ) -> nil

Sounds

Spring.PlaySoundFile

 ( string "soundfile" [, number volume
   [, number x, number y, number z ] ] ) -> nil | boolean
 Plays WAV sounds. By default, the soundfile is expected to be in the "Sounds" folder.

Spring.PlaySoundStream

 ( string "oggfile" [, number volume = 1.0
   [, number x, number y, number z ]] ) -> nil | boolean true
 Allow you to play an Ogg Vorbis (.OGG) compressed sound file.
Note: you may only play _ONE_ stream at a time. If another stream is playing and
you try to start a second one the call will fail, and silence will result.
Note2: the file has to be on the local filesystem, so you can't playback ogg's
in your mod with this command, to do so you have to extract it before and save
it on the local filesystem.

Spring.StopSoundStream

 ( ) -> nil
 Terminates any SoundStream is running.
Since only one may play at any time (see above), this can be used as an interrupt.

Spring.PauseSoundStream

 ( ) -> nil

Spring.SetSoundStreamVolume

 ( number volume ) -> nil

SendLuaMessage

Very important! (allows synced inter-lua-enviroment communications)

Spring.SendLuaUIMsg (needs ModUICtrl)

 ( string message, string mode ) -> nil
 possible modes are:
"s"/"specs" & "a"/"allies"

Spring.SendLuaGaiaMsg (needs ModUICtrl)

 ( string message ) -> nil

Spring.SendLuaRulesMsg (needs ModUICtrl)

 ( string message ) -> nil

Units

Unit Selection

Spring.SelectUnitMap

 ( { [unitID] = anything, ...} [,boolean append] ) -> nil

Spring.SelectUnitArray

 ( { [1] = unitID1 , [2] = unitID2 , ...} [,boolean append] ) -> nil

Spring.GetDrawSelectionInfo

 ( boolean drawSelectionInfo ) -> nil

Unit Group

Spring.SetUnitGroup (needs ModUICtrl)

 ( number unitDefID, number groupID ) -> nil

Give Order

Spring.GiveOrder gives order to all selected units (needs ModUICtrl)

 ( number cmdID,
   params = {number, etc...},
   options = {"alt", "ctrl", "shift", "right"} ) -> nil | boolean true

Spring.GiveOrderToUnit (needs ModUICtrl)

 ( number unitID,
   number cmdID,
   params = {number, etc...},
   options = {"alt", "ctrl", "shift", "right"} ) -> nil | boolean true

Spring.GiveOrderToUnitMap (needs ModUICtrl)

 ( unitMap = { [unitID] = dontCare, etc... },
   number cmdID,
   params = {number, etc...},
   options = {"alt", "ctrl", "shift", "right"} ) -> nil | boolean true

Spring.GiveOrderToUnitArray (needs ModUICtrl)

 ( unitArray = { [1] = unitID, etc... },
   number cmdID,
   params = {number, etc...},
   options = {"alt", "ctrl", "shift", "right"} ) -> nil | boolean true

Spring.GiveOrderArrayToUnitMap (needs ModUICtrl)

 ( unitMap = { [number unitID] = dontCare, etc... },
   orderArray = {
     { number cmdID,
       params = {number, etc...},
       options = {"alt", "ctrl", "shift", "right"}
     }, ..
   }
 ) -> nil | boolean true

Spring.GiveOrderArrayToUnitArray (needs ModUICtrl)

 ( unitArray = { [1] = number unitID, etc... },
   orderArray = {
     { number cmdID,
       params = {number, etc...},
       options = {"alt", "ctrl", "shift", "right"}
     }, ..
   }
 ) -> nil | boolean true

Unit NoDraw,NoSelect,NoMinimap

Spring.SetUnitNoDraw LuaGadgets only!

 ( number unitID, boolean noDraw ) -> nil

Spring.SetUnitNoSelect LuaGadgets only!

 ( number unitID, boolean noSelect ) -> nil

Spring.SetUnitNoMinimap LuaGadgets only!

 ( number unitID, boolean noMinimap ) -> nil

GUI

Spring.SetDrawSky

 ( boolean drawSky ) -> nil

Spring.SetDrawWater

 ( boolean drawWater ) -> nil

Spring.SetDrawGround

 ( boolean drawGround ) -> nil

Spring.DrawUnitCommands

 ( number unitID ) -> nil
 ( { [1] = unitID, ... } [, false ] ) -> nil
 ( { [unitID] = anything, ... }, true  ) -> nil

Spring.SetTeamColor

 ( number teamID, number r, number g, number b ) -> nil

Spring.AssignMouseCursor default hotspot is center!

 ( string "cmdName", string "iconFileName"
   [, boolean overwrite [, boolean hotSpotTopLeft] ] ) -> nil | boolean

Spring.ReplaceMouseCursor default hotspot is center!

 ( string "oldFileName", string "newFileName" [, boolean hotSpotTopLeft] ) -> nil | boolean

Spring.SetCustomCommandDrawData register your custom cmd so it gets visible in the unit's cmd queue

 ( number cmdID,
   number cmdIconID | string iconname | nil,
   { number r, number g, number b, number a } [, boolean showArea ] ) -> nil | true

Sharing

Spring.SetShareLevel note: shareLevel is 0<= x <= 1 (needs ModUICtrl)

 ( string "metal" | "energy", number shareLevel ) -> nil

Spring.ShareResources (needs ModUICtrl)

 ( number teamID, string "units" ) -> nil
 ( number teamID, string "metal" | "energy", number amount ) -> nil

UnitDefIcon & BuildPics

Spring.AddUnitIcon (needs ModUICtrl)

 ( string iconName, string texFile [, number size [, number dist [, boolean radAdjust ]]] ) -> nil | boolean

Spring.FreeUnitIcon (needs ModUICtrl)

 ( string iconName ) -> nil | boolean

Spring.SetUnitDefIcon (needs ModUICtrl)

 ( number unitDefID, string iconName ) -> nil

Spring.SetUnitDefImage (needs ModUICtrl)

 ( number unitDefID, luaTexture | string texFile ) -> nil

Camera

Spring.SetCameraState

 ( table camState, number camTime) -> nil | boolean

For more info of the format of camState check Spring.GetCameraState().

Spring.SetCameraTarget

 ( number x, number y, number z [,number transTime] ) -> nil

Spring.SetCameraOffset (needs ModUICtrl)

 ( [number px = 0 [, number py = 0 [, number pz = 0
    [, number tx = 0 [, number ty = 0 [, number tz = 0]]]]]] ) -> nil

(Virtual-)FileSystem

Spring.ExtractModArchiveFile

 ( string modfile ) -> boolean

Spring.CreateDir (needs ModUICtrl)

 ( number path ) -> nil | boolean

Engine Config

The following functions read the engine configs saved in .springrc, registry or what ever your os prefers.

Spring.GetConfigInt (needs ModUICtrl)

 ( string name [, number default] ) -> nil | number

Spring.SetConfigInt (needs ModUICtrl)

 ( string name, number value ) -> nil

Spring.GetConfigString (needs ModUICtrl)

 ( string name [, string default] ) -> nil | string

Spring.SetConfigString (needs ModUICtrl)

 ( string name, string value ) -> nil 

Make Font

Spring.MakeFont (needs ModUICtrl)

 ( [string inputFile], table options ) -> nil | boolean

options = {

 outName = string,
 inData = string,
 height = number,
 texWidth = number,
 minChar = number,
 maxChar = number,
 outlineMode = number,
 outlineRadius = number,
 outlineWeight = number,
 padding = number,
 stuffing = number,
 debug = number,

}

World Primitives

outdated! use opengl api instead!

Spring.AddWorldIcon

 ( number cmdID, number x, number y, number z ) -> nil

Spring.AddWorldText

 ( string "text", number x, number y, number z ) -> nil

Spring.AddWorldUnit

 ( number unitDefID,
   number x, number y, number z,
   number team, number facing) -> nil