![]() ![]() On_init() will run when the game starts (or in mod cases, when you add it to an existing save). The Lua script has some special functions it runs outside of events: This is the number 1 resource for scripting in the game. The full scripting API is generated and updated each release, and is available here. Serpent cannot serialize a lot of Lua objects, such as functions, metatables and coroutines.Serpent is relatively slow and inefficient.If found, the game will then load that script, and any other scripts required in the control script.įactorio uses Serpent for serialization - This comes with some big drawbacks: The game looks for a file called 'a', in the mod directory or the scenario directory. When you load a game, scenario and mod scripts are loaded. To be more specific, we call these runtime scripts 'control scripts', as they assert direct control on the game as it runs. This guide only covers usages of runtime scripts. There are 2 usages of scripts, loading of prototype data, and runtime scripting of the game and its entities. Within the context of Factorio, a script refers to a Lua script, packaged with a mod or scenario. In general, you can learn the definition of a script here.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |