Lua:Libarylinks: Difference between revisions
Created page with "== Lua libraries == Many things you think you will need for spring-lua scripting, have been allready developed (and even tested while loudly swearing at all gods/sweating bloo..." |
|||
| Line 1: | Line 1: | ||
== Lua libraries == | == Lua libraries == | ||
Many things you think you will need for spring-lua scripting, have been allready developed | Many things you think you will need for spring-lua scripting, | ||
have been allready developed and tested by others. It is considered good practice in allmost every software project to not reinvent the wheel. | |||
Other Projects have created lua-Librarys, lua files which you can include after copying (or referencing them on GitHub) into your project: | |||
To use them in | To use them in lua Units-scripts, download them into the same folder the Unitscript resides in and add | ||
<sub>include "LibraryFileName.lua"</sub> | <sub>include "LibraryFileName.lua"</sub> | ||
Journeywar | The referenced functions are now available. Many Librarys also include a Headerfile of all Functions made available. | ||
If you want to include a Lua-Function into your gadget or widget | |||
<sub>VFS.Include("Gamefolder/Relative/Path/ToLibrary/Library.lua</sub> | |||
<big> Librarys</big> | |||
=Journeywar = | |||
Quality: Poor | |||
Table and UnitScript Operations | |||
https://bitbucket.org/PicassoCT/journeywar/src/8cbe713fe3e1027a88f40f9a70f87b788a448048/scripts/lib_TableOp.lua?at=master | |||
Library for Procedural Units and Buildings from Pieces | |||
https://bitbucket.org/PicassoCT/journeywar/src/8cbe713fe3e1027a88f40f9a70f87b788a448048/scripts/lib_Build.lua?at=master | |||
Miniature Operatings Systems and Statemachines | |||
https://bitbucket.org/PicassoCT/journeywar/src/scripts/lib_OS.lua?at=master | |||
=Zero-K= | |||
Quality: Unknown | |||
=S44= | |||
Quality: Unknown | |||
=BAR= | |||
Quality: Unknown | |||
Revision as of 10:54, 6 July 2015
Lua libraries
Many things you think you will need for spring-lua scripting, have been allready developed and tested by others. It is considered good practice in allmost every software project to not reinvent the wheel. Other Projects have created lua-Librarys, lua files which you can include after copying (or referencing them on GitHub) into your project:
To use them in lua Units-scripts, download them into the same folder the Unitscript resides in and add
include "LibraryFileName.lua"
The referenced functions are now available. Many Librarys also include a Headerfile of all Functions made available.
If you want to include a Lua-Function into your gadget or widget
VFS.Include("Gamefolder/Relative/Path/ToLibrary/Library.lua
Librarys
Journeywar
Quality: Poor Table and UnitScript Operations https://bitbucket.org/PicassoCT/journeywar/src/8cbe713fe3e1027a88f40f9a70f87b788a448048/scripts/lib_TableOp.lua?at=master
Library for Procedural Units and Buildings from Pieces https://bitbucket.org/PicassoCT/journeywar/src/8cbe713fe3e1027a88f40f9a70f87b788a448048/scripts/lib_Build.lua?at=master
Miniature Operatings Systems and Statemachines https://bitbucket.org/PicassoCT/journeywar/src/scripts/lib_OS.lua?at=master
Zero-K
Quality: Unknown
S44
Quality: Unknown
BAR
Quality: Unknown