@@ -154,7 +154,7 @@ The location of this directory can be fetched by using
154
154
155
155
### mod.conf
156
156
157
- A key-value store of mod details .
157
+ A `Settings` file that provides meta information about the mod .
158
158
159
159
* `name`: The mod name. Allows Minetest to determine the mod name even if the
160
160
folder is wrongly named.
@@ -196,8 +196,9 @@ A file containing a description to be shown in the Mods tab of the main menu.
196
196
197
197
### `settingtypes.txt`
198
198
199
- A file in the same format as the one in builtin. It will be parsed by the
200
- settings menu and the settings will be displayed in the "Mods" category.
199
+ The format is documented in `builtin/settingtypes.txt`.
200
+ It is parsed by the main menu settings dialogue to list mod-specific
201
+ settings in the "Mods" category.
201
202
202
203
### `init.lua`
203
204
@@ -856,6 +857,15 @@ A positional sound will only be heard by players that are within
856
857
* e.g. `{name = "default_place_node", gain = 1.0, pitch = 1.0}`
857
858
858
859
860
+ Special sound files
861
+ -------------------
862
+
863
+ These sound files are played back by the engine if provided.
864
+
865
+ * `main_menu`: Looped sound in the main menu (gain = 1.0)
866
+ * `player_damage`: Played when the local player takes damage (gain = 0.5)
867
+ * `player_falling_damage`: Played when the local player takes
868
+ damage by falling (gain = 0.5)
859
869
860
870
861
871
Registered definitions
@@ -1537,36 +1547,59 @@ Another example: Make red wool from white wool and red dye:
1537
1547
Special groups
1538
1548
--------------
1539
1549
1540
- * `immortal`: Skips all damage and breath handling for an object. This group
1541
- will also hide the integrated HUD status bars for players, and is
1542
- automatically set to all players when damage is disabled on the server.
1543
- * `punch_operable`: For entities; disables the regular damage mechanism for
1544
- players punching it by hand or a non-tool item, so that it can do something
1545
- else than take damage.
1546
- * `level`: Can be used to give an additional sense of progression in the game.
1547
- * A larger level will cause e.g. a weapon of a lower level make much less
1548
- damage, and get worn out much faster, or not be able to get drops
1549
- from destroyed nodes.
1550
- * `0` is something that is directly accessible at the start of gameplay
1551
- * There is no upper limit
1550
+ The asterisk `(*)` after a group name describes that there is no engine
1551
+ functionality bound to it, and implementation is left up as a suggestion
1552
+ to games.
1553
+
1554
+ ### Node, item and tool groups
1555
+
1556
+ * `not_in_creative_inventory`: (*) Special group for inventory mods to indicate
1557
+ that the item should be hidden in item lists.
1558
+
1559
+
1560
+ ### Node-only groups
1561
+
1562
+ * `attached_node`: if the node under it is not a walkable block the node will be
1563
+ dropped as an item. If the node is wallmounted the wallmounted direction is
1564
+ checked.
1565
+ * `bouncy`: value is bounce speed in percent
1566
+ * `connect_to_raillike`: makes nodes of raillike drawtype with same group value
1567
+ connect to each other
1552
1568
* `dig_immediate`: Player can always pick up node without reducing tool wear
1553
1569
* `2`: the node always gets the digging time 0.5 seconds (rail, sign)
1554
1570
* `3`: the node always gets the digging time 0 seconds (torch)
1555
1571
* `disable_jump`: Player (and possibly other things) cannot jump from node
1556
1572
* `fall_damage_add_percent`: damage speed = `speed * (1 + value/100)`
1557
- * `bouncy`: value is bounce speed in percent
1558
1573
* `falling_node`: if there is no walkable block under the node it will fall
1559
1574
* `float`: the node will not fall through liquids
1560
- * `attached_node`: if the node under it is not a walkable block the node will be
1561
- dropped as an item. If the node is wallmounted the wallmounted direction is
1562
- checked.
1563
- * `connect_to_raillike`: makes nodes of raillike drawtype with same group value
1564
- connect to each other
1575
+ * `level`: Can be used to give an additional sense of progression in the game.
1576
+ * A larger level will cause e.g. a weapon of a lower level make much less
1577
+ damage, and get worn out much faster, or not be able to get drops
1578
+ from destroyed nodes.
1579
+ * `0` is something that is directly accessible at the start of gameplay
1580
+ * There is no upper limit
1581
+ * See also: `leveldiff` in [Tools]
1565
1582
* `slippery`: Players and items will slide on the node.
1566
1583
Slipperiness rises steadily with `slippery` value, starting at 1.
1584
+
1585
+
1586
+ ### Tool-only groups
1587
+
1567
1588
* `disable_repair`: If set to 1 for a tool, it cannot be repaired using the
1568
1589
`"toolrepair"` crafting recipe
1569
1590
1591
+
1592
+ ### `ObjectRef` groups
1593
+
1594
+ * `immortal`: Skips all damage and breath handling for an object. This group
1595
+ will also hide the integrated HUD status bars for players, and is
1596
+ automatically set to all players when damage is disabled on the server.
1597
+ * `punch_operable`: For entities; disables the regular damage mechanism for
1598
+ players punching it by hand or a non-tool item, so that it can do something
1599
+ else than take damage.
1600
+
1601
+
1602
+
1570
1603
Known damage and digging time defining groups
1571
1604
---------------------------------------------
1572
1605
@@ -1656,6 +1689,8 @@ to implement this.
1656
1689
Determines how many uses the tool has when it is used for digging a node,
1657
1690
of this group, of the maximum level. For lower leveled nodes, the use count
1658
1691
is multiplied by `3^leveldiff`.
1692
+ `leveldiff` is the difference of the tool's `maxlevel` `groupcaps` and the
1693
+ node's `level` group. The node cannot be dug if `leveldiff` is less than zero.
1659
1694
1660
1695
* `uses=10, leveldiff=0`: actual uses: 10
1661
1696
* `uses=10, leveldiff=1`: actual uses: 30
@@ -5303,7 +5338,8 @@ Can be obtained via `item:get_meta()`.
5303
5338
`MetaDataRef`
5304
5339
-------------
5305
5340
5306
- See [`StorageRef`], [`NodeMetaRef`], [`ItemStackMetaRef`], and [`PlayerMetaRef`].
5341
+ Base class used by [`StorageRef`], [`NodeMetaRef`], [`ItemStackMetaRef`],
5342
+ and [`PlayerMetaRef`].
5307
5343
5308
5344
### Methods
5309
5345
@@ -5828,12 +5864,26 @@ It can be created via `Settings(filename)`.
5828
5864
* Writes changes to file.
5829
5865
* `to_table()`: returns `{[key1]=value1,...}`
5830
5866
5867
+ ### Format
5868
+
5869
+ The settings have the format `key = value`. Example:
5870
+
5871
+ foo = example text
5872
+ bar = """
5873
+ Multiline
5874
+ value
5875
+ """
5876
+
5877
+
5831
5878
`StorageRef`
5832
5879
------------
5833
5880
5834
5881
Mod metadata: per mod metadata, saved automatically.
5835
5882
Can be obtained via `minetest.get_mod_storage()` during load time.
5836
5883
5884
+ WARNING: This storage backend is incaptable to save raw binary data due
5885
+ to restrictions of JSON.
5886
+
5837
5887
### Methods
5838
5888
5839
5889
* All methods in MetaDataRef
@@ -5848,6 +5898,9 @@ Object properties
5848
5898
-----------------
5849
5899
5850
5900
Used by `ObjectRef` methods. Part of an Entity definition.
5901
+ These properties are not persistent, but are applied automatically to the
5902
+ corresponding Lua entity using the given registration fields.
5903
+ Player properties need to be saved manually.
5851
5904
5852
5905
{
5853
5906
hp_max = 1,
0 commit comments