Difference between revisions of "Lua Development"
(Begin mirroring springrts lua development page) |
m |
||
Line 53: | Line 53: | ||
[[Lua_Socket]]<br> | [[Lua_Socket]]<br> | ||
</div> | </div> | ||
− | |||
=Tutorials= | =Tutorials= |
Latest revision as of 00:31, 10 September 2020
Contents
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.
Interfaces (last update: 104)
Environments (Details the available environments and shows which interfaces are loaded by each)
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
- Easy widget examples
- InterCommunications (i.e. synced <-> unsynced communications)
Other useful information
- Lua libraries
- Lua performance tips
- UI_commands
- Unit animation scripting with Lua
- Source code for Lua API
Official Lua documentation
'Programming in Lua' book online
Lua 5.1 Reference manual
Lua tutorials
Debug data:
[SQLBagOStuff] MainObjectStash using store ReplicatedBagOStuff
[objectcache] MainWANObjectCache using store EmptyBagOStuff
IP: 18.225.235.148
Start request GET /mediawiki/index.php?diff=prev&oldid=6864&title=Lua_Development
HTTP HEADERS:
CONTENT-TYPE:
CONTENT-LENGTH: 0
USER-AGENT: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HOST: zero-k.info
ACCEPT-ENCODING: gzip, br, zstd, deflate
ACCEPT: */*
CONNECTION: close[localisation] LocalisationCache: using store LCStoreDB
[session] SessionManager using store SqlBagOStuff
[DBReplication] Cannot use ChronologyProtector with EmptyBagOStuff
[DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: request info {
"IPAddress": "18.225.235.148",
"UserAgent": "Mozilla\/5.0 AppleWebKit\/537.36 (KHTML, like Gecko; compatible; ClaudeBot\/1.0; +claudebot@anthropic.com)",
"ChronologyProtection": false,
"ChronologyPositionIndex": 0,
"ChronologyClientId": false
}[DBConnection] Wikimedia\Rdbms\LoadBalancer::lazyLoadReplicationPositions: executed chronology callback.
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[session] SessionBackend "h8rjmekpmh6vgcmhkiue91rsnp8nvlat" is unsaved, marking dirty in constructor
[session] SessionBackend "h8rjmekpmh6vgcmhkiue91rsnp8nvlat" save: dataDirty=1 metaDirty=1 forcePersist=0
[cookie] already deleted setcookie: "wikidb229_mw__session", "", "1713188507", "/", "", "", "1"
[cookie] already deleted setcookie: "wikidb229_mw_UserID", "", "1713188507", "/", "", "", "1"
[cookie] already deleted setcookie: "wikidb229_mw_Token", "", "1713188507", "/", "", "", "1"
[cookie] already deleted setcookie: "forceHTTPS", "", "1713188507", "/", "", "", "1"
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.
Title::getRestrictionTypes: applicable restrictions to [[Lua Development]] are {edit,move}
[ContentHandler] Created handler for wikitext: WikitextContentHandler
Article::view: showing diff page
DifferenceEngine old '6864' new 'prev' rcid ''
[MessageCache] MessageCache using store SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] SqlBagOStuff::lock failed due to timeout for wikidb229-mw_:messages:en.
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is expired/volatile, loading from database
ParserFactory: using preprocessor: Preprocessor_Hash
Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions->__construct
DifferenceEngine old '0' new '0' rcid '0'
WikiPage::getParserOutput: using parser cache: yes
[caches] parser: SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[Preprocessor] Cached preprocessor output (key: wikidb229-mw_:preprocess-hash:e924b5096b23ed0e96ad8411b2814452:0)
[Preprocessor] Cached preprocessor output (key: wikidb229-mw_:preprocess-hash:e924b5096b23ed0e96ad8411b2814452:0)
Saved in parser cache with key wikidb229-mw_:pcache:idhash:1261-0!canonical and timestamp 20250415134147 and revision id 6864
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
MediaWiki::preOutputCommit: primary transaction round committed
MediaWiki::preOutputCommit: pre-send deferred updates completed
MediaWiki::preOutputCommit: session changes committed
MediaWiki::preOutputCommit: LBFactory shutdown completed
Title::getRestrictionTypes: applicable restrictions to [[Lua Development]] are {edit,move}