Folders: update
This commit is contained in:
parent
d2bea4fda2
commit
a49fb394d4
@ -1,6 +1,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<script async src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
|
<script src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
|
||||||
<script async src="{{ page.root }}static/script.js"></script>
|
<script src="{{ page.root }}static/script.js"></script>
|
||||||
<link rel="stylesheet" href="{{ page.root }}static/style.css">
|
<link rel="stylesheet" href="{{ page.root }}static/style.css">
|
||||||
<link rel="stylesheet" href="{{ page.root }}static/syntax.css">
|
<link rel="stylesheet" href="{{ page.root }}static/syntax.css">
|
||||||
</body>
|
</body>
|
||||||
|
@ -7,8 +7,8 @@ root: ../
|
|||||||
Introduction
|
Introduction
|
||||||
------------
|
------------
|
||||||
|
|
||||||
In this chapter we will learn how the basic structure of a mod's folder.
|
In this chapter we will learn the basic structure of a mod's folder.
|
||||||
This is essential for creating mods.
|
This is an essential skill when creating mods.
|
||||||
|
|
||||||
* Mod Folders
|
* Mod Folders
|
||||||
* Dependencies
|
* Dependencies
|
||||||
@ -17,18 +17,19 @@ This is essential for creating mods.
|
|||||||
Mod Folders
|
Mod Folders
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
![Find the mod's folder]({{ page.root }}/static/folder_modfolder.png)
|
![Find the mod's folder]({{ page.root }}/static/folder_modfolder.jpg)
|
||||||
|
|
||||||
Each mod has its own folder, where all its Lua code, textures, models and sounds are placed.
|
Each mod has its own folder, where all its Lua code, textures, models and sounds
|
||||||
These folders need to be placed in a mod location, such as minetest/mods, and they can be
|
are placed. These folders need to be placed in a mod location, such as
|
||||||
placed in mod packs: as explained below.
|
minetest/mods. Mods can be grouped into mod packs, which are explained below.
|
||||||
|
|
||||||
The modname is used to refer to a mod. Each mod should have a unique modname, which you can choose -
|
A "mod name" is used to refer to a mod. Each mod should have a unique mod name,
|
||||||
it should describe what the mod does. Modnames can be make up of letters, numbers
|
which you can choose - a good mod name can describes what the mod does.
|
||||||
or underscores.
|
Mod names can be make up of letters, numbers or underscores. The folder a mod is
|
||||||
|
in needs to be called the same as the mod name.
|
||||||
|
|
||||||
### Mod Folder Structure
|
### Mod Folder Structure
|
||||||
Modname
|
Mod name (eg: "mymod")
|
||||||
- init.lua - the main scripting code file, which is run when the game loads.
|
- init.lua - the main scripting code file, which is run when the game loads.
|
||||||
- (optional) depends.txt - a list of mod names that needs to be loaded before this mod.
|
- (optional) depends.txt - a list of mod names that needs to be loaded before this mod.
|
||||||
- (optional) textures/ - place images here, commonly in the format modname_itemname.png
|
- (optional) textures/ - place images here, commonly in the format modname_itemname.png
|
||||||
@ -36,8 +37,8 @@ or underscores.
|
|||||||
- (optional) models/ - place 3d models in here
|
- (optional) models/ - place 3d models in here
|
||||||
...and any other lua files to be included by init.lua
|
...and any other lua files to be included by init.lua
|
||||||
|
|
||||||
Only the init.lua file is required in a mod for it to run on game load, however the other
|
Only the init.lua file is required in a mod for it to run on game load, however
|
||||||
items are needed by some mods to perform its functionality.
|
the other items are needed by some mods to perform their functionality.
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
------------
|
------------
|
||||||
@ -63,7 +64,7 @@ Mod Packs
|
|||||||
---------
|
---------
|
||||||
|
|
||||||
Modpacks allow multiple mods to be packaged together, and move together.
|
Modpacks allow multiple mods to be packaged together, and move together.
|
||||||
They are useful if you want to supply multiple mods to an end user, and don't
|
They are useful if you want to supply multiple mods to a player but don't
|
||||||
want to make them download each one individually.
|
want to make them download each one individually.
|
||||||
|
|
||||||
### Mod Pack Folder Structure
|
### Mod Pack Folder Structure
|
||||||
|
BIN
static/folder_modfolder.jpg
Normal file
BIN
static/folder_modfolder.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
Binary file not shown.
Before Width: | Height: | Size: 241 KiB |
Loading…
Reference in New Issue
Block a user