a lot of updates

master
runs 2022-02-06 13:59:00 +01:00
parent 94da77c278
commit 89ee2aab86
72 changed files with 2232 additions and 40 deletions

View File

@ -1,3 +1,9 @@
#Sizes
hud_scaling = 1.5
gui_scaling = 1.3
font_size = 22
player_transfer_distance = 60
# Temperature variation for biomes.
# type: noise_params_2d
mg_biome_np_heat = {

View File

@ -1,5 +1,17 @@
local mg_name = minetest.get_mapgen_setting("mg_name")
biomes = {}
if mg_name == "valleys" then
biomes.peaky_mountain_height = 85
elseif mg_name == "carphatian" then
biomes.peaky_mountain_height = 65
elseif mg_name == "v7" then
biomes.peaky_mountain_height = 45
else
biomes.peaky_mountain_height = 55
end
--
-- Aliases for map generator outputs
--
@ -91,8 +103,8 @@ minetest.register_biome({
node_dungeon_stair = "stairs:stair_cobble",
y_max = 0,
y_min = -255,
heat_point = 50,
humidity_point = 50,
heat_point = 45.5,
humidity_point = 55.5,
})
minetest.register_biome({
@ -109,8 +121,8 @@ minetest.register_biome({
node_dungeon_stair = "stairs:stair_cobble",
y_max = 3,
y_min = -255,
heat_point = 55,
humidity_point = 55,
heat_point = 55.2,
humidity_point = 56.2,
})
minetest.register_biome({
@ -121,8 +133,54 @@ minetest.register_biome({
node_dungeon_stair = "stairs:stair_cobble",
y_max = -256,
y_min = -31000,
heat_point = 50,
humidity_point = 50,
heat_point = 43.7,
humidity_point = 40.7,
})
--Desert Biome
minetest.register_biome({
name = "desert",
node_top = "nodez:desert_sand",
depth_top = 1,
node_filler = "nodez:sandstone",
depth_filler = 6,
node_riverbed = "nodez:desert_sand",
depth_riverbed = 2,
node_cave_liquid = "nodez:water_source",
node_dungeon = "nodez:cobble",
node_dungeon_alt = "nodez:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = 31000,
y_min = -4,
heat_point = 85,
humidity_point = 15,
})
-- Register Ores
--Coal
minetest.register_ore({
ore_type = "scatter",
ore = "nodez:coal_ore",
wherein = "nodez:stone",
clust_scarcity = 8 * 8 * 8,
clust_num_ores = 8,
clust_size = 3,
y_max = 16,
y_min = -512,
})
--Iron
minetest.register_ore({
ore_type = "scatter",
ore = "nodez:iron_ore",
wherein = "nodez:stone",
clust_scarcity = 7 * 7 * 7,
clust_num_ores = 5,
clust_size = 3,
y_max = 0,
y_min = -512,
})
--Clay
@ -173,6 +231,53 @@ minetest.register_decoration({
flags = "place_center_x, place_center_z, force_placement",
})
--Ice
minetest.register_decoration({
decoration = "nodez:ice",
deco_type = "simple",
place_on = {"nodez:dirt_with_grass"},
sidelen = 16,
fill_ratio = 0.1,
biomes = {"forest", "beach"},
noise_params = {
offset = -0.005,
scale = 0.008,
spread = {x = 64, y = 64, z = 64},
seed = 1342,
octaves = 3,
persist = 0.66
},
y_min = biomes.peaky_mountain_height,
y_max = 200,
place_offset_y = -1,
flags = "place_center_x, place_center_z, force_placement",
})
minetest.register_decoration({
decoration = "nodez:ice",
deco_type = "simple",
place_on = {"nodez:dirt_with_grass"},
spawn_by = "nodez:ice",
num_spawn_by = 1,
sidelen = 16,
fill_ratio = 0.1,
biomes = {"forest", "beach"},
noise_params = {
offset = 2.5,
scale = 2.5,
spread = {x = 64, y = 64, z = 64},
seed = 402,
octaves = 3,
persist = 0.66
},
y_min = biomes.peaky_mountain_height,
y_max = 200,
place_offset_y = -1,
flags = "place_center_x, place_center_z, force_placement",
})
--Snow
minetest.register_decoration({
@ -190,7 +295,7 @@ minetest.register_decoration({
octaves = 3,
persist = 0.66
},
y_min = 65,
y_min = biomes.peaky_mountain_height,
y_max = 200,
place_offset_y = -1,
flags = "place_center_x, place_center_z, force_placement",
@ -211,7 +316,7 @@ minetest.register_decoration({
octaves = 3,
persist = 0.66
},
y_min = 65,
y_min = biomes.peaky_mountain_height,
y_max = 200,
spawn_by = "nodez:dirt_with_snow",
num_spawn_by = 1,
@ -219,3 +324,16 @@ minetest.register_decoration({
flags = "place_center_x, place_center_z, force_placement",
})
--Gems
minetest.register_ore({
ore_type = "scatter",
ore = "nodez:ruby_ore",
wherein = "nodez:stone",
clust_scarcity = 17 * 17 * 17,
clust_num_ores = 4,
clust_size = 3,
y_max = -384,
y_min = -512,
})

View File

@ -0,0 +1,16 @@
MIT License
Copyright (c) 2017-2020 Elijah Duffy and Wuzzy
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,39 @@
# Schematic Editor [`schemedit`]
## Version
1.5.0
## Description
This is a mod which allows you to edit and export schematics (`.mts` files).
This mod works in Minetest 5.0.0 or later, but recommended is version 5.1.0
or later.
It supports node probabilities, forced node placement and slice probabilities.
It adds 3 items:
* Schematic Creator: Used to mark a region and export or import it as schematic
* Schematic Void: Marks a position in a schematic which should not replace anything when placed as a schematic
* Schematic Node Probability Tool: Set per-node probabilities and forced node placement
Note: The import feature requires Minetest 5.1.0 or later.
It also adds these server commands:
* `placeschem` to place a schematic
* `mts2lua` to convert .mts files to .lua files (Lua code)
There's also a setting `schemedit_export_lua` to enable automatic export to .lua files.
## Usage help
This mod assumes you already have a basic understanding about how schematics in Minetest work.
If not, refer to the Minetest Lua API documentation to understand more about schematics.
To learn how to use all the items in this mod, read `USAGE.md`.
You can also find the same help texts in-game if you if you use the optional Help modpack
(mods `doc` and `doc_items`).
## License of everything
MIT License

View File

@ -0,0 +1,44 @@
## Usage help
In this section you'll learn how to use the items of this mod.
Note: If you have the `doc` and `doc_items` mods installed, you can also access the same help texts in-game (possibly translated).
### Schematic Creator
The schematic creator is used to save a region of the world into a schematic file (.mts).
#### Usage
To get started, place the block facing directly in front of any bottom left corner of the structure you want to save. This block can only be accessed by the placer or by anyone with the “`schematic_override`” privilege.
To save a region, use the block, enter the size and a schematic name and hit “Export schematic”. The file will always be saved in the world directory. Note you can use this name in the /placeschem command to place the schematic again.
Importing a schematic will load a schematic from the world directory, place it in front of the schematic creator and sets probability and force-place data accordingly.
The other features of the schematic creator are optional and are used to allow to add randomness and fine-tuning.
Y slices are used to remove entire slices based on chance. For each slice of the schematic region along the Y axis, you can specify that it occurs only with a certain chance. In the Y slice tab, you have to specify the Y slice height (0 = bottom) and a probability from 0 to 255 (255 is for 100%). By default, all Y slices occur always.
With a schematic node probability tool, you can set a probability for each node and enable them to overwrite all nodes when placed as schematic. This tool must be used prior to the file export.
### Schematic Node Probability Tool
This is an advanced tool which only makes sense when used together with a schematic creator. It is used to finetune the way how nodes from a schematic are placed.
It allows you to set two things:
1) Set probability: Chance for any particular node to be actually placed (default: always placed)
2) Enable force placement: These nodes replace node other than air and ignore when placed in a schematic (default: off)
#### Usage
BASIC USAGE:
Punch to configure the tool. Select a probability (0-255; 255 is for 100%) and enable or disable force placement. Now place the tool on any node to apply these values to the node. This information is preserved in the node until it is destroyed or changed by the tool again. This tool has no effect on schematic voids.
Now you can use a schematic creator to save a region as usual, the nodes will now be saved with the special node settings applied.
NODE HUD:
To help you remember the node values, the nodes with special values are labelled in the HUD. The first line shows probability and force placement (with “[F]”). The second line is the current distance to the node. Nodes with default settings and schematic voids are not labelled.
To disable the node HUD, unselect the tool or hit “place” while not pointing anything.
UPDATING THE NODE HUD:
The node HUD is not updated automatically and may be outdated. The node HUD only updates the HUD for nodes close to you whenever you place the tool or press the punch and sneak keys simultaneously. If you sneak-punch a schematic creator, then the node HUD is updated for all nodes within the schematic creator's region, even if this region is very big.
### Schematic Void
This is an utility block used in the creation of schematic files. It should be used together with a schematic creator. When saving a schematic, all nodes with a schematic void will be left unchanged when the schematic is placed again. Technically, this is equivalent to a block with the node probability set to 0.
#### Usage
Just place the schematic void like any other block and use the schematic creator to save a portion of the world.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,82 @@
# textdomain: schemedit
<world path>=<Weltpfad>
Insufficient privileges! You need the “@1” privilege to use this.=Unzureichende Privilegien! Sie benötigen das „@1“-Privileg, um dies benutzen zu können.
Probability: @1=Wahrscheinlichkeit: @1
Not Set=Nicht gesetzt
Force placement=Platzierung erzwingen
Import schematic=Schematic importieren
Main=Grundeinstellungen
Hide border=Rand verbergen
Show border=Rand anzeigen
Position: @1=Position: @1
Owner: @1=Eigentümer: @1
Schematic name: @1=Schematic-Name: @1
Size: @1=Größe: @1
Schematic name:=Schematic-Name:
OK=OK
Save schematic name=Schematic-Name speichern
Export schematic=Schematic exportieren
Export/import path:@n@1=Export-/Importpfad:@n@1
<name>=<Name>
Air to voids=Luft zu Lücken
Voids to air=Lücken zu Luft
Turn all air nodes into schematic void nodes=Alle Luft-Nodes zu Schematic-Lücken umwandeln
Turn all schematic void nodes into air nodes=Alle Schematic-Lücken zu Luft-Nodes umwandeln
X size:=X-Größe:
Y size:=Y-Größe:
Z size:=Z-Größe:
Save size=Größe speichern
Help=Hilfe
Exported schematic to @1=Schematic nach @1 exportiert
Failed to export schematic to @1=Schematic konnte nicht nach @1 exportiert werden
Imported schematic from @1=Schematic von @1 importiert
Failed to import schematic from @1=Schematic konnte nicht von @1 importiert werden
Y Slices=Y-Scheiben
Y @= @1; Probability @= @2=Y @= @1; Wahrscheinlichkeit @= @2
Add=Hinzufügen
Apply=Anwenden
Y position (max. @1):=Y-Position (max. @1):
Probability (0-255):=Wahrscheinlichkeit (0-255):
Cancel=Abbrechen
Add slice=Neue Scheibe
Remove slice=Scheibe entfernen
Edit slice=Scheibe anpassen
Back=Zurück
Schematic Node Probability Tool=Schematic-Node-Wahrscheinlichkeitswerkzeug
Probability (0-255)=Wahrscheinlichkeit
Probability that the node will be placed=Wahrscheinlichkeit, dass der Node platizert wird
If enabled, the node will replace nodes other than air and ignore=Wenn aktiviert, wird der Node alle Nodes außer Luft und Ignorieren ersetzen
Allows you to access schemedit nodes not owned by you=Damit können Sie auf Schemedit-Nodes, die ihnen nicht gehören, zugreifen
Importing a schematic will load a schematic from the world directory, place it in front of the schematic creator and sets probability and force-place data accordingly.=Das Importieren eines Schematics wird eine Schematicdatei aus dem Weltverzeichnis laden, sie vor dem Schematic-Macher platzieren und die Wahrscheinlichkeits- und Zwangsplatzierungsdaten entsprechend setzen.
Schematic Creator=Schematic-Macher
The schematic creator is used to save a region of the world into a schematic file (.mts).=Der Schematic-Macher wird benutzt, um eine Region der Welt in eine Schematic-Datei (.mts) zu speichern.
To get started, place the block facing directly in front of any bottom left corner of the structure you want to save. This block can only be accessed by the placer or by anyone with the “schematic_override” privilege.=Um anzufangen, platzieren Sie den Block direkt vor einer beliebigen unteren linken Ecke des Gebäudes, das Sie speichern möchten. Dieser Block kann nur vom Platzierer oder von Spielern mit dem „schematic_override“-Privileg benutzt werden.
To save a region, use the block, enter the size and a schematic name and hit “Export schematic”. The file will always be saved in the world directory. Note you can use this name in the /placeschem command to place the schematic again.=Um eine Region zu speichern, benutzen Sie den Block, geben Sie die Größe und einen Schematic-Namen ein und klicken Sie auf „Schematic exportieren“. Die Datei wird immer im Weltverzeichnis gespeichert. Beachten Sie, dass Sie diesen Namen im „/placeschem“-Befehl benutzen können, um das Schematic erneut zu platzieren.
The other features of the schematic creator are optional and are used to allow to add randomness and fine-tuning.=Die anderen Funktionen des Schematic-Machers sind optional und werden für Zufälligkeit und Feinjustierungen benutzt.
Y slices are used to remove entire slices based on chance. For each slice of the schematic region along the Y axis, you can specify that it occurs only with a certain chance. In the Y slice tab, you have to specify the Y slice height (0 @= bottom) and a probability from 0 to 255 (255 is for 100%). By default, all Y slices occur always.=Y-Scheiben werden benutzt, um ganze Scheiben mit einer gewissen Wahrscheinlichkeit auszulassen. Für jede Scheibe der Schematic-Region entlang der Y-Achse können Sie festlegen, dass sie nur mit einer gewissen Wahrscheinlichkeit auftritt. In der Registerkarte „Y-Scheiben“ müssen Sie die Höhe der Y-Scheibe festlegen (0 @= Boden) sowie eine Wahrscheinlichkeit zwischen 0 und 255 (255 steht für 100%). Standardmäßig treten alle Y-Scheiben immer auf.
With a schematic node probability tool, you can set a probability for each node and enable them to overwrite all nodes when placed as schematic. This tool must be used prior to the file export.=Mit einem Schematic-Node-Wahrscheinlichkeitswerkzeug können Sie die Wahrscheinlichkeit für jeden Node setzen und sie dazu aktivieren, alle Nodes zu ersetzen, wenn sie als Schematic platziert werden. Dieses Werkzeug muss vor dem Dateiexport benutzt werden.
(owned by @1)=(Eigentümer: @1)
This is an advanced tool which only makes sense when used together with a schematic creator. It is used to finetune the way how nodes from a schematic are placed.=Dies ist ein fortgeschrittenes Werkzeug, der nur sinnvoll in Verwendung mit einem Schematic-Macher benutzt werden kann. Er wird benutzt, um die Art und Weise, wie Nodes aus einem Schematic platziert werden, feinzujustieren.
It allows you to set two things:=Damit können Sie zwei Dinge setzen:
1) Set probability: Chance for any particular node to be actually placed (default: always placed)=1) Wahrscheinlichkeit setzen: Wahrscheinlichkeit für einen bestimmten Node, dass er tatsächlich platziert wird (Standard: immer platziert)
2) Enable force placement: These nodes replace node other than air and ignore when placed in a schematic (default: off)=2) Zwangsplatzierung aktivieren: Diese Nodes ersetzen alle Nodes außer Luft und Ignorieren, wenn Sie in einem Schematic platziert werden (Standard: aus)
BASIC USAGE:=GRUNDLEGENDE BENUTZUNG:
Punch to configure the tool. Select a probability (0-255; 255 is for 100%) and enable or disable force placement. Now place the tool on any node to apply these values to the node. This information is preserved in the node until it is destroyed or changed by the tool again. This tool has no effect on schematic voids.=Schlagen Sie zu, um das Werkzeug zu konfigurieren. Wählen Sie eine Wahrscheinlichkeit (0-255; 255 steht für 100%) und aktivieren oder deaktivieren Sie die erzwungene Platzierung. Platzieren Sie nun das Werkzeug auf einen beliebigen Node, um diese Werte auf dem Node anzuwenden. Diese Information bleibt im Node erhalten, bis er zerstört oder erneut vom Werkzeug geändert wird. Dieses Werkzeug hat keine Auswirkung auf Schematic-Lücken.
Now you can use a schematic creator to save a region as usual, the nodes will now be saved with the special node settings applied.=Anschließend können Sie einen Schematic-Macher benutzen, um eine Region wie gewöhnlich zu speichern, die Nodes werden nun mit den besonderen Node-Einstellungen gespeichert.
NODE HUD:=NODE-HUD:
To help you remember the node values, the nodes with special values are labelled in the HUD. The first line shows probability and force placement (with “[F]”). The second line is the current distance to the node. Nodes with default settings and schematic voids are not labelled.=Um Ihnen dabei zu helfen, sich die Node-Werte zu merken, werden die Nodes mit besonderen Werten in der Benutzeroberfläche gekennzeichnet. Die erste Zeile zeigt die Wahrscheinlichkeit und die Zwangsplatzierung (mit „[F]“) an. Die zweite Zeile zeigt die momentane Entfernung zum Node an. Nodes mit den Standardeinstellungen und Schematic-Lücken werden nicht gekennzeichnet.
To disable the node HUD, unselect the tool or hit “place” while not pointing anything.=Um die Node-HUD zu deaktivieren, wählen Sie das Werkzeug ab oder drücken Sie die Platzierentaste, während Sie auf nichts zeigen.
UPDATING THE NODE HUD:=NODE-HUD AKTUALISIEREN:
The node HUD is not updated automatically and may be outdated. The node HUD only updates the HUD for nodes close to you whenever you place the tool or press the punch and sneak keys simultaneously. If you sneak-punch a schematic creator, then the node HUD is updated for all nodes within the schematic creator's region, even if this region is very big.=Die Node-HUD wird nicht automatisch aktualisiert und kann veraltet sein. Die Node-HUD wird nur die HUD für Nodes in Ihrer Nähe aktualisieren oder wenn Sie das Werkzeug benutzen oder gleichzeitig die Schlag- und Schleichtaste drücken. Wenn Sie auf einen Schematic-Macher schleichschlagen, wird die Node-HUD für alle Nodes innerhalb der Region des Schematic-Machers aktualisiert, selbst, wenn diese Region sehr groß ist.
Schematic Void=Schematic-Lücke
This is an utility block used in the creation of schematic files. It should be used together with a schematic creator. When saving a schematic, all nodes with a schematic void will be left unchanged when the schematic is placed again. Technically, this is equivalent to a block with the node probability set to 0.=Dies ist ein Hilfsblock, der bei der Erstellung von Schematic-Dateien benutzt wird. Er sollte zusammen mit einem Schematic-Macher benutzt werden. Wenn ein Schematic gespeichert wird, werden alle Nodes mit einer Schematic-Lücke unverändert gelassen, wenn das Schematic erneut platziert wird. Technisch gesehen ist dieses Verhalten identisch mit einem Block, der eine Node-Wahrscheinlichkeit von 0 hat.
Just place the schematic void like any other block and use the schematic creator to save a portion of the world.=Platzieren Sie einfach die Schematic-Lücke wie jeden anderen Block und benutzen Sie den Schematic-Macher, um einen Teil der Welt zu speichern.
Place schematic at the position specified or the current player position (loaded from @1). “-c” will clear the area first=Schematic an der angegebenen Position oder der aktuellen Spielerposition platzieren (geladen von @1). Mit „-c“ wird das Gebiet zuerst geleert
<schematic name>[.mts] [-c] [<x> <y> <z>]=<Schematic-Name>[.mts] [-c] [<x> <y> <z>]
No schematic file specified.=Keinen Schematic-Namen angegeben.
Schematic file could not be loaded!=Schematic-Datei konnte nicht geladen werden!
List schematic files in world path=Schematic-Dateien im Weltpfad auflisten
No schematic files.=Keine Schematic-Dateien.
Convert .mts schematic file to .lua file (loaded from @1)=„.mts“-Schematicdatei zu „.lua“-Datei konvertieren (geladen von @1)
<schematic name>[.mts] [comments]=<Schematic-Name>[.mts] [comments]
Failed!=Fehlgeschlagen!

View File

@ -0,0 +1,82 @@
# textdomain: schemedit
<world path>=
Insufficient privileges! You need the “@1” privilege to use this.=
Probability: @1=
Not Set=
Force placement=
Import schematic=
Main=
Hide border=
Show border=
Position: @1=
Owner: @1=
Schematic name: @1=
Size: @1=
Schematic name:=
OK=
Save schematic name=
Export schematic=
Export/import path:@n@1=
<name>=
Air to voids=
Voids to air=
Turn all air nodes into schematic void nodes=
Turn all schematic void nodes into air nodes=
X size:=
Y size:=
Z size:=
Save size=
Help=
Exported schematic to @1=
Failed to export schematic to @1=
Imported schematic from @1=
Failed to import schematic from @1=
Y Slices=
Y @= @1; Probability @= @2=
Add=
Apply=
Y position (max. @1):=
Probability (0-255):=
Cancel=
Add slice=
Remove slice=
Edit slice=
Back=
Schematic Node Probability Tool=
Probability (0-255)=
Probability that the node will be placed=
If enabled, the node will replace nodes other than air and ignore=
Allows you to access schemedit nodes not owned by you=
Importing a schematic will load a schematic from the world directory, place it in front of the schematic creator and sets probability and force-place data accordingly.=
Schematic Creator=
The schematic creator is used to save a region of the world into a schematic file (.mts).=
To get started, place the block facing directly in front of any bottom left corner of the structure you want to save. This block can only be accessed by the placer or by anyone with the “schematic_override” privilege.=
To save a region, use the block, enter the size and a schematic name and hit “Export schematic”. The file will always be saved in the world directory. Note you can use this name in the /placeschem command to place the schematic again.=
The other features of the schematic creator are optional and are used to allow to add randomness and fine-tuning.=
Y slices are used to remove entire slices based on chance. For each slice of the schematic region along the Y axis, you can specify that it occurs only with a certain chance. In the Y slice tab, you have to specify the Y slice height (0 @= bottom) and a probability from 0 to 255 (255 is for 100%). By default, all Y slices occur always.=
With a schematic node probability tool, you can set a probability for each node and enable them to overwrite all nodes when placed as schematic. This tool must be used prior to the file export.=
(owned by @1)=
This is an advanced tool which only makes sense when used together with a schematic creator. It is used to finetune the way how nodes from a schematic are placed.=
It allows you to set two things:=
1) Set probability: Chance for any particular node to be actually placed (default: always placed)=
2) Enable force placement: These nodes replace node other than air and ignore when placed in a schematic (default: off)=
BASIC USAGE:=
Punch to configure the tool. Select a probability (0-255; 255 is for 100%) and enable or disable force placement. Now place the tool on any node to apply these values to the node. This information is preserved in the node until it is destroyed or changed by the tool again. This tool has no effect on schematic voids.=
Now you can use a schematic creator to save a region as usual, the nodes will now be saved with the special node settings applied.=
NODE HUD:=
To help you remember the node values, the nodes with special values are labelled in the HUD. The first line shows probability and force placement (with “[F]”). The second line is the current distance to the node. Nodes with default settings and schematic voids are not labelled.=
To disable the node HUD, unselect the tool or hit “place” while not pointing anything.=
UPDATING THE NODE HUD:=
The node HUD is not updated automatically and may be outdated. The node HUD only updates the HUD for nodes close to you whenever you place the tool or press the punch and sneak keys simultaneously. If you sneak-punch a schematic creator, then the node HUD is updated for all nodes within the schematic creator's region, even if this region is very big.=
Schematic Void=
This is an utility block used in the creation of schematic files. It should be used together with a schematic creator. When saving a schematic, all nodes with a schematic void will be left unchanged when the schematic is placed again. Technically, this is equivalent to a block with the node probability set to 0.=
Just place the schematic void like any other block and use the schematic creator to save a portion of the world.=
Place schematic at the position specified or the current player position (loaded from @1). “-c” will clear the area first=
<schematic name>[.mts] [-c] [<x> <y> <z>]=
No schematic file specified.=
Schematic file could not be loaded!=
List schematic files in world path=
No schematic files.=
Convert .mts schematic file to .lua file (loaded from @1)=
<schematic name>[.mts] [comments]=
Failed!=

View File

@ -0,0 +1,69 @@
-- This file adds a command for generating the schemedit usage help readme
-- file, in Markdown format. The text is extracted from the metadata of
-- the items. This is only used for development purposes, after the
-- help text of any of the items was changed.
-- How to use: Temporarily set MAKE_README to true in init.lua, then
-- start the game as admin and run “/make_schemedit_readme”. Copy the
-- generated file back to the mod directory (USAGE.md).
-- Everything here is intentionally NOT translated because it is for text
-- files only.
-- Extract text from item definition
local get_text = function(item, field)
local text = minetest.registered_items[item][field]
-- Remove translation escapes
text = string.gsub(text, "\x1BE", "")
text = string.gsub(text, "\x1B%(T@schemedit%)", "")
-- Fix Markdown syntax error
text = string.gsub(text, "schematic_override", "`schematic_override`")
return text
end
-- Schemedit items to generate the readme from
local items = { "creator", "probtool", "void" }
minetest.register_chatcommand("make_schemedit_readme", {
description = "Generate the schemedit usage help readme file",
privs = {server=true},
func = function(name, param)
local readme = "## Usage help".."\n"
readme = readme .. "In this section you'll learn how to use the items of this mod.".."\n"
readme = readme .. "Note: If you have the `doc` and `doc_items` mods installed, you can also access the same help texts in-game (possibly translated).".."\n\n"
local entries = {}
for i=1, #items do
local item = items[i]
local desc = get_text("schemedit:"..item, "description")
local longdesc = get_text("schemedit:"..item, "_doc_items_longdesc")
local usagehelp = get_text("schemedit:"..item, "_doc_items_usagehelp")
readme = readme .. "### "..desc.."\n"
readme = readme .. longdesc .."\n\n"
readme = readme .. "#### Usage\n"
readme = readme .. usagehelp
if i < #items then
readme = readme .. "\n\n\n"
end
end
local path = minetest.get_worldpath().."/schemedit_readme.md"
local file = io.open(path, "w")
if not file then
return false, "Failed to open file!"
end
local ok = file:write(readme)
file:close()
if ok then
return true, "File written to: "..path
else
return false, "Failed to write file!"
end
end
})

View File

@ -0,0 +1,4 @@
name = schemedit
optional_depends = doc
description = Advanced tool for modders and advanced users to create and edit schematics.
min_minetest_version = 5.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -0,0 +1,3 @@
# If enabled, exporting a schematic will also create a .lua file
# in addition to the .mts file.
schemedit_export_lua (.lua file schematic export) bool false

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

14
mods/nodez/gems.lua Normal file
View File

@ -0,0 +1,14 @@
local S = ...
minetest.register_node("nodez:ruby_ore", {
description = S("Ruby Ore"),
tiles = {"nodez_stone.png^nodez_ruby_ore.png"},
groups = {cracky = 1},
drop = "nodez:ruby",
sounds = sound:stone(),
})
minetest.register_craftitem("nodez:ruby", {
description = S("Ruby"),
inventory_image = "nodez_ruby.png",
})

View File

@ -9,8 +9,10 @@ local modpath = minetest.get_modpath(modname)
local S = minetest.get_translator(modname)
assert(loadfile(modpath .. "/dirt.lua"))(S)
assert(loadfile(modpath .. "/gems.lua"))(S)
assert(loadfile(modpath .. "/grass.lua"))(S)
assert(loadfile(modpath .. "/lava.lua"))(S)
assert(loadfile(modpath .. "/ore.lua"))(S)
assert(loadfile(modpath .. "/sand.lua"))(S)
assert(loadfile(modpath .. "/stone.lua"))(S)
assert(loadfile(modpath .. "/water.lua"))(S)

View File

@ -10,6 +10,7 @@ Flowing Water=Corriente de agua
Flowing River Water=Corriente de agua de río
Flowing Lava=Corriente de lava
Gravel=Gravilla
Ice=Hielo
Lava Source=Fuente de lava
Mossy Cobblestone=Empredrado musgoso
River Water Source=Fuente de agua de río

38
mods/nodez/ore.lua Normal file
View File

@ -0,0 +1,38 @@
local S = ...
--Coal
minetest.register_node("nodez:coal_ore", {
description = S("Coal Ore"),
tiles = {"nodez_stone.png^nodez_coal_ore.png"},
groups = {cracky = 3},
drop = "nodez:coal_lump 4",
sounds = sound.stone(),
})
minetest.register_craftitem("nodez:coal_lump", {
description = S("Coal Lump"),
inventory_image = "nodez_coal_lump.png",
groups = {coal = 1, flammable = 1}
})
minetest.register_craft({
type = "fuel",
recipe = "nodez:coal_lump",
burntime = 40,
})
--Iron
minetest.register_node("nodez:iron_ore", {
description = S("Iron Ore"),
tiles = {"nodez_stone.png^nodez_iron_ore.png"},
groups = {cracky = 2},
drop = "nodez:iron_lump 3",
sounds = sound.stone(),
})
minetest.register_craftitem("nodez:iron_lump", {
description = S("Irom Lump"),
inventory_image = "nodez_iron_lump.png"
})

View File

@ -3,6 +3,43 @@ local S = ...
minetest.register_node("nodez:sand", {
description = S("Sand"),
tiles ={"nodez_sand.png"},
groups = {crumbly=3},
sounds = sound.sand ()
groups = {crumbly=3, sand=1},
sounds = sound.sand()
})
minetest.register_node("nodez:desert_sand", {
description = S("Desert Sand"),
tiles ={"nodez_desert_sand.png"},
groups = {crumbly=3, sand=1},
sounds = sound.sand()
})
minetest.register_node("nodez:sandstone", {
description = S("Sandstone"),
tiles ={"nodez_sandstone.png"},
groups = {crumbly=3, sandstone=1},
sounds = sound.stone()
})
--Glass
minetest.register_node("nodez:glass", {
description = S("Glass"),
drawtype = "glasslike_framed_optional",
inventory_image = "nodez_glass_inv.png",
tiles = {"nodez_glass.png", "nodez_glass_detail.png"},
use_texture_alpha = "blend", -- only needed for stairs API
paramtype = "light",
paramtype2 = "glasslikeliquidlevel",
sunlight_propagates = true,
is_ground_content = false,
groups = {cracky= 3, glass= 1,
oddly_breakable_by_hand = 3},
sounds = sound.glass(),
})
minetest.register_craft({
type = "cooking",
output = "nodez:glass",
recipe = "group:sand",
})

View File

@ -1,4 +1,4 @@
local S = ...
local S = ...
minetest.register_node("nodez:stone", {
description = S("Stone"),

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 970 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 690 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 617 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

View File

@ -116,3 +116,15 @@ minetest.register_node("nodez:river_water_flowing", {
post_effect_color = {a = 103, r = 30, g = 76, b = 90},
groups = {water = 3, liquid = 3, },
})
minetest.register_node("nodez:ice", {
description = S("Ice"),
tiles = {"nodez_ice.png"},
is_ground_content = false,
drawtype = "glasslike",
use_texture_alpha = "blend",
paramtype = "light",
paramtype2 = "glasslikeliquidlevel",
groups = {cracky = 3, cools_lava = 1, slippery = 3},
sounds = sound.ice(),
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

168
mods/treez/api.lua Normal file
View File

@ -0,0 +1,168 @@
local S, modpath, mg_name = ...
local variability = 0.2 --20%
local fruit_grow_time = 1200 --1200 by default
local tree_grow_time = 5 --3600 by default
function treez.register_tree(name, def)
--Fruit
if def.fruit then
minetest.register_node("treez:"..def.fruit.name, {
description = S(def.fruit.description),
drawtype = "plantlike",
tiles = {"treez_"..def.fruit.name..".png"},
inventory_image = "treez_"..def.fruit.name.."_inv.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
is_ground_content = false,
selection_box = {
type = "fixed",
fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16}
},
groups = {fleshy = 3, dig_immediate = 3, flammable = 2,
leafdecay = 3, leafdecay_drop = 1},
on_use = minetest.item_eat(2),
after_place_node = function(pos, placer, itemstack)
minetest.set_node(pos, {name = "treez:"..def.fruit.name, param2 = 1})
end,
on_dig = function(pos, node, digger)
if digger:is_player() then
local inv = digger:get_inventory()
if inv:room_for_item("main", "treez:"..def.fruit.name) then
inv:add_item("main", "treez:"..def.fruit.name)
end
end
minetest.remove_node(pos)
pos.y = pos.y + 1
local node_above = minetest.get_node_or_nil(pos)
if node_above and node_above.param2 == 0 and node_above.name == "treez:"..name.."_leaves" then
--20% of variation on time
local grow_time = math.random(fruit_grow_time - (fruit_grow_time * variability),
fruit_grow_time + (fruit_grow_time * variability))
minetest.get_node_timer(pos):start(grow_time)
end
end,
})
end
--Sapling
minetest.register_node("treez:"..name.."_sapling", {
description = S("@1 Sapling", S(def.description)),
drawtype = "plantlike",
tiles = {"treez_"..name.."_sapling.png"},
inventory_image = "treez_"..name.."_sapling.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
on_timer = function(pos)
minetest.remove_node(pos)
minetest.place_schematic({x = pos.x-2, y = pos.y, z = pos.z-2}, modpath.."/schematics/"..name..".mts", "0", nil, false)
end,
selection_box = {
type = "fixed",
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
},
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
attached_node = 1, sapling = 1},
on_construct = function(pos)
minetest.get_node_timer(pos):start(math.random(tree_grow_time - (tree_grow_time * variability),
tree_grow_time + (tree_grow_time * variability)))
end,
})
--Trunk
minetest.register_node("treez:"..name.."_trunk", {
description = S("@1 Trunk", S(def.description)),
tiles = {
"treez_"..name.."_trunk_top.png",
"treez_"..name.."_trunk_top.png",
"treez_"..name.."_trunk.png"
},
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
paramtype2 = "facedir",
is_ground_content = false,
on_place = minetest.rotate_node,
})
--Wood
minetest.register_node("treez:"..name.."_wood", {
description = S("@1 Wood", S(def.description)),
tiles = {"treez_"..name.."_wood.png"},
paramtype2 = "facedir",
place_param2 = 0,
is_ground_content = false,
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
})
--Leaves
minetest.register_node("treez:"..name.."_leaves", {
description =S("@1 Leaves", S(def.description)),
drawtype = "allfaces_optional",
tiles = {"treez_"..name.."_leaves.png"},
paramtype = "light",
walkable = true,
waving = 1,
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
drop = {
max_items = 1,
items = {
{items = {"treez:"..name.."_sapling"}, rarity = 20},
{items = {"treez:"..name.."_leaves"}}
}
},
})
--
-- Recipes
--
minetest.register_craft({
output = "treez:"..name.."_wood 4",
recipe = {{"treez:"..name.."_trunk"}}
})
minetest.register_craft({
type = "fuel",
recipe = "treez:"..name.."_trunk",
burntime = 30,
})
minetest.register_craft({
type = "fuel",
recipe = "treez:"..name.."_wood",
burntime = 7,
})
--Decoration
if mg_name ~= "v6" and mg_name ~= "singlenode" then
minetest.register_decoration({
name = "treez:"..name,
deco_type = "schematic",
place_on = def.deco.place_on,
sidelen = 16,
noise_params = {
offset = -0.005,
scale = 0.02,
spread = {x = 250, y = 250, z = 250},
seed = 729,
octaves = 3,
persist = 0.66
},
biomes = def.deco.biomes,
y_min = 1,
y_max = biomes.peaky_mountain_height,
place_offset_y = 1,
schematic = modpath.."/schematics/"..name..".mts",
flags = "place_center_x, place_center_z, force_placement",
rotation = "random",
})
end
end

View File

@ -4,31 +4,27 @@
local S, modpath, mg_name = ...
local fruit_grow_time = 1200
local variability = 0.2 --20%
local fruit_grow_time = 1200 --1200 by default
local tree_grow_time = 5 --3600 by default
-- Apple Fruit
minetest.register_node("treez:apple", {
description = S("Apple"),
drawtype = "plantlike",
tiles = {"treez_apple.png"},
inventory_image = "treez_apple_inv.png",
tiles = {
"treez_apple_side.png",
"treez_apple_side.png",
"treez_apple_top.png",
},
drawtype = "nodebox",
paramtype = "light",
node_box = {
type = "fixed",
fixed = {
{-0.125, -0.5, -0.1875, 0.1875, -0.1875, 0.125}, -- NodeBox1
{0, -0.1875, -0.0625, 0.0624999, -0.0625, -5.21541e-08}, -- NodeBox2
{0.0625, -0.125, 0, 0.125, -0.0625, 0.0625}, -- NodeBox5
}
},
sunlight_propagates = true,
walkable = false,
is_ground_content = false,
groups = {fleshy = 3, dig_immediate = 3, flammable = 2, leafdecay = 3, leafdecay_drop = 1},
selection_box = {
type = "fixed",
fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16}
},
groups = {fleshy = 3, dig_immediate = 3, flammable = 2,
leafdecay = 3, leafdecay_drop = 1},
on_use = minetest.item_eat(2),
@ -48,8 +44,8 @@ minetest.register_node("treez:apple", {
local node_above = minetest.get_node_or_nil(pos)
if node_above and node_above.param2 == 0 and node_above.name == "treez:apple_tree_leaves" then
--20% of variation on time
local twenty_percent = fruit_grow_time * 0.2
local grow_time = math.random(fruit_grow_time - twenty_percent, fruit_grow_time + twenty_percent)
local grow_time = math.random(fruit_grow_time - (fruit_grow_time * variability),
fruit_grow_time + (fruit_grow_time * variability))
minetest.get_node_timer(pos):start(grow_time)
end
end,
@ -73,16 +69,17 @@ if mg_name ~= "v6" and mg_name ~= "singlenode" then
place_on = "nodez:dirt_with_grass",
sidelen = 16,
noise_params = {
offset = 0.0005,
scale = 0.00005,
offset = -0.005,
scale = 0.02,
spread = {x = 250, y = 250, z = 250},
seed = 1242,
seed = 729,
octaves = 3,
persist = 0.66
},
biomes = {"forest"},
y_min = 1,
y_max = 32,
y_max = biomes.peaky_mountain_height,
place_offset_y = 1,
schematic = modpath.."/schematics/apple_tree.mts",
flags = "place_center_x, place_center_z, force_placement",
rotation = "random",
@ -111,7 +108,8 @@ minetest.register_node("treez:apple_tree_sapling", {
attached_node = 1, sapling = 1},
on_construct = function(pos)
minetest.get_node_timer(pos):start(math.random(2400, 4800))
minetest.get_node_timer(pos):start(math.random(tree_grow_time - (tree_grow_time * variability),
tree_grow_time + (tree_grow_time * variability)))
end,
})
@ -138,7 +136,7 @@ minetest.register_node("treez:apple_tree_wood", {
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
})
minetest.register_node("treez:appletree_leaves", {
minetest.register_node("treez:apple_tree_leaves", {
description = S("Apple Tree Leaves"),
drawtype = "allfaces_optional",
tiles = {"treez_apple_tree_leaves.png"},

View File

@ -5,4 +5,5 @@ local modpath = minetest.get_modpath(modname)
local S = minetest.get_translator(modname)
local mg_name = minetest.get_mapgen_setting("mg_name")
assert(loadfile(modpath .. "/apple_tree.lua"))(S, modpath, mg_name)
assert(loadfile(modpath .. "/api.lua"))(S, modpath, mg_name)
assert(loadfile(modpath .. "/trees.lua"))()

View File

@ -1,6 +1,9 @@
# textdomain: treez
@1 Leaves=Hojas @1
@1 Sapling=Retoño @1
@1 Trunk=Tronco @1
@1 Wood=Madera @1
Apple=Manzana
Apple Tree Leaves=Hojas de manzano
Apple Tree Sapling=Brote de manzano
Apple Tree Trunk=Tronco de manzano
Apple Tree Wood=Madera de manzano
Apple Tree=de manzano
Cherries=Cerezas
Cherry Tree=de cerezo

View File

@ -1,2 +1,3 @@
name = treez
description = Trees
depends = mapgen

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 629 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

View File

Before

Width:  |  Height:  |  Size: 575 B

After

Width:  |  Height:  |  Size: 575 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

25
mods/treez/trees.lua Normal file
View File

@ -0,0 +1,25 @@
--Apple Tree
treez.register_tree("apple_tree", {
description = "Apple Tree",
fruit = {
name = "apple",
description = "Apple"
},
deco = {
biomes = {"forest"},
place_on = "nodez:dirt_with_grass"
}
})
--Cherry Tree
treez.register_tree("cherry_tree", {
description = "Cherry Tree",
fruit = {
name = "cherries",
description = "Cherries"
},
deco = {
biomes = {"forest"},
place_on = "nodez:dirt_with_grass"
}
})