Lua:Main: Difference between revisions

From Spring
Jump to navigationJump to search
Jk (talk | contribs)
Flozi (talk | contribs)
 
(49 intermediate revisions by 13 users not shown)
Line 1: Line 1:
[[Engine_Development|Development]] < {{FULLPAGENAME}}
[[Engine_Development|Development]] < {{FULLPAGENAME}}


===Lua FAQ===
=Lua FAQ=
[[Lua_Beginners_FAQ]]<br>
Lua scripting is the primary way for developers to customize their games and add new features. Most aspects of the Spring engine can be controlled and extensively modified through the Lua API.
[http://spring.clan-sy.com/phpbb/viewtopic.php?f=23&t=15596 Forum topic with some basic information about gadgets]<br>
[http://spring.clan-sy.com/phpbb/viewtopic.php?f=23&t=16223 Forum topic with a manual on Spring lua scripting]<br>


[[:Category:Lua]] (shows which interfaces are loaded by LuaUI,LuaRules,etc.)<br>
[[Lua_Beginners_FAQ|Introduction to Lua in Spring]]<br>
[[Lua:Tutorial_GettingStarted|Easy widget examples]]


'''Interfaces''' <font color=#55ee99>(last update: 76b1)</font><br>
=Interfaces {{HeaderNotice|(last update: 104)}}=
[[Lua:Environments]] (Details the available environments and shows which interfaces are loaded by each)
 
[[Lua:Callins]] (Entry points to lua addons)
{{LuaInterfaces}}
{{LuaInterfaces}}
<br>
'''Other useful information'''<br>
[[LuaCallinReturn]]<br>
[http://spring.clan-sy.com/wiki/COB_Constants#Custom_Variables COB Custom Variables] <br>
[http://springrts.com/phpbb/viewtopic.php?f=12&t=19560 Font Drawing System] <br>
[[UI_commands]]


'''Official Lua documentation'''<br>
=Tutorials=
* [[Lua:Tutorial_GettingStarted|Easy example widgets]]
* [[LuaTutorials::InterCommunications]] (i.e. synced <-> unsynced communications)
* [[Animation:LuaExamples| Lua animation UnitScript examples]]
 
=Other useful information=
* [[Lua_Libraries | Lua libraries]]
* [[Lua_Performance | Lua performance tips]]
* [[UI_commands]]
* [[Animation-LuaScripting | Unit animation scripting with Lua]]
* [https://github.com/spring/spring/tree/develop/rts/Lua#Source_Code Source code for Lua API]
 
=Official Lua documentation=
[http://www.lua.org/pil/ 'Programming in Lua' book online]<br>
[http://www.lua.org/pil/ 'Programming in Lua' book online]<br>
[http://www.lua.org/manual/5.1/ Lua 5.1 Reference manual]<br>
[http://www.lua.org/manual/5.1/ Lua 5.1 Reference manual]<br>
[http://lua-users.org/wiki/TutorialDirectory Lua tutorials]
[http://lua-users.org/wiki/TutorialDirectory Lua tutorials]
 
[[Category: Lua]]
 
'''old Wikis''' <font color=red>(outdated)<br>
[[Lua_SyncedInterface]]<br>
[[Units:LuaCOB]]<br></font>

Latest revision as of 20:43, 17 November 2022

Development < Lua:Main

Lua FAQ

Lua scripting is the primary way for developers to customize their games and add new features. Most aspects of the Spring engine can be controlled and extensively modified through the Lua API.

Introduction to Lua in Spring
Easy widget examples

Interfaces (last update: 104)

Lua:Environments (Details the available environments and shows which interfaces are loaded by each)

Lua:Callins (Entry points to lua addons)

System
Lua_System

Const
Lua_ConstGame (holds game relevant constants)
Lua_ConstEngine (version & buildflags)
Lua_ConstPlatform (Current OS, video driver etc)
Lua_ConstCOB (COB, Explode, EmitSfx)
Lua_CMDs (documents all CMDs and CMDTYPEs)

Defs
Lua_UnitDefs
Lua_WeaponDefs
Lua_FeatureDefs

GameState
Lua_SyncedCtrl
Lua_SyncedRead
Lua_SaveLoad (engine-assisted Lua save/load)

Client
Lua_UnsyncedCtrl
Lua_UnsyncedRead
Lua_Lobby

OpenGL
Lua_OpenGL_Api
Lua_GLSL_Api (OpenGL Shading Language)
Lua_FBO_and_RBO (Framebuffer and Renderbuffer Objects)
Lua_UnitRendering (manage unit LODs and materials)
Lua_ConstGL (some OpenGL constants)
Lua_Fonts

Unit Physics
Lua_MoveCtrl (changes the physics of single units)
Lua_PathFinder

Engine
Lua_VFS (used to access files in the virtual filesystem, e.g. modfiles)
Lua_Scream
Lua_BitOps
Lua_MathExtra
Lua_Socket

Tutorials

Other useful information

Official Lua documentation

'Programming in Lua' book online
Lua 5.1 Reference manual
Lua tutorials