@@ -30,7 +30,7 @@ Startup
30
30
Mods are loaded during client startup from the mod load paths by running
31
31
the `init.lua` scripts in a shared environment.
32
32
33
- In order to load client-side mods in a world , the following conditions need to be satisfied:
33
+ In order to load client-side mods, the following conditions need to be satisfied:
34
34
35
35
1) `$path_user/minetest.conf` contains the setting `enable_client_modding = true`
36
36
@@ -43,14 +43,10 @@ be loaded or have limited functionality. See setting `csm_restriction_flags` for
43
43
Paths
44
44
-----
45
45
* `RUN_IN_PLACE=1` (Windows release, local build)
46
- * `$path_user`:
47
- * Linux: `<build directory>`
48
- * Windows: `<build directory>`
49
- * `$path_share`
50
- * Linux: `<build directory>`
51
- * Windows: `<build directory>`
46
+ * `$path_user`: `<build directory>`
47
+ * `$path_share`: `<build directory>`
52
48
* `RUN_IN_PLACE=0`: (Linux release)
53
- * `$path_share`
49
+ * `$path_share`:
54
50
* Linux: `/usr/share/minetest`
55
51
* Windows: `<install directory>/minetest-0.4.x`
56
52
* `$path_user`:
@@ -75,7 +71,6 @@ On an installed version on Linux:
75
71
76
72
Modpack support
77
73
----------------
78
- **NOTE: Not implemented yet.**
79
74
80
75
Mods can be put in a subdirectory, if the parent directory, which otherwise
81
76
should be a mod, contains a file named `modpack.conf`.
@@ -90,30 +85,36 @@ Mod directory structure
90
85
91
86
clientmods
92
87
├── modname
93
- | ├── depends.txt
94
- | ├── init.lua
88
+ │ ├── mod.conf
89
+ │ ├── init.lua
95
90
└── another
96
91
97
92
### modname
93
+
98
94
The location of this directory.
99
95
100
- ### depends.txt
101
- List of mods that have to be loaded before loading this mod.
96
+ ### mod.conf
97
+
98
+ An (optional) settings file that provides meta information about the mod.
102
99
103
- A single line contains a single modname.
100
+ * `name`: The mod name. Allows Minetest to determine the mod name even if the
101
+ folder is wrongly named.
102
+ * `description`: Description of mod to be shown in the Mods tab of the main
103
+ menu.
104
+ * `depends`: A comma separated list of dependencies. These are mods that must be
105
+ loaded before this mod.
106
+ * `optional_depends`: A comma separated list of optional dependencies.
107
+ Like a dependency, but no error if the mod doesn't exist.
104
108
105
- Optional dependencies can be defined by appending a question mark
106
- to a single modname. Their meaning is that if the specified mod
107
- is missing, that does not prevent this mod from being loaded.
109
+ ### `init.lua`
108
110
109
- ### init.lua
110
111
The main Lua script. Running this script should register everything it
111
112
wants to register. Subsequent execution depends on minetest calling the
112
113
registered callbacks.
113
114
114
- ### ` sounds`
115
- Media files (sounds) that will be transferred to the
116
- client and will be available for use by the mod .
115
+ **NOTE**: Client mods currently can't provide and textures, sounds or models by
116
+ themselves. Any media referenced in function calls must already be loaded
117
+ (provided by mods that exist on the server) .
117
118
118
119
Naming convention for registered textual names
119
120
----------------------------------------------
@@ -142,7 +143,7 @@ The `:` prefix can also be used for maintaining backwards compatibility.
142
143
143
144
Sounds
144
145
------
145
- **NOTE: max_hear_distance and connecting to objects is not implemented.**
146
+ **NOTE: Connecting sounds to objects is not implemented.**
146
147
147
148
Only Ogg Vorbis files are supported.
148
149
@@ -182,13 +183,11 @@ Examples of sound parameter tables:
182
183
{
183
184
pos = {x = 1, y = 2, z = 3},
184
185
gain = 1.0, -- default
185
- max_hear_distance = 32, -- default, uses an euclidean metric
186
186
}
187
187
-- Play connected to an object, looped
188
188
{
189
189
object = <an ObjectRef>,
190
190
gain = 1.0, -- default
191
- max_hear_distance = 32, -- default, uses an euclidean metric
192
191
loop = true,
193
192
}
194
193
0 commit comments