Introduction
Last updated
Was this helpful?
Last updated
Was this helpful?
To create a mod, you first need to learn Lua. If you don't know Lua, you can either search video tutorials on websites like YouTube or just search a text tutorial using a search engine.
The page or a Lua Tutorial (maybe ?), once you get a grasp of Lua, you can start modding Blocksworld!
Each Lua mod is in a directory. So to create a mod, you will have first to create a directory, the directory's name can only contain alphabetical characters (A to Z, upper case and lower case), digits (0 to 9) and underscores.
Once it is created you MUST move it to (Documents)/blocksworld_develop/user_[somenumber]/user/lua_mods
Where (Documents) is your Documents folder.
To create a mod you just have to create an init.lua
file:
As you learnt Lua, you might have spoted that name
and dependencies
are global variables. This is necessary and they should not be set as local variables.
As you might have guessed, the name
variable is the mod's name, dependencies
is something we will see later, all this mean for now is that the mod needs to run on Exdilin 0.5.0 (the first version to support Lua mods).
Now to make actual modding requires you to grasp the Modding Concepts.
Let's add a pre-init function, replace the file content's with the following:
Great! In the next chapter, we will add blocks.
Pre-initialization (see ) is an important step and is where we will register most things.