Difference between revisions of "Worlds"

From Minetest Wiki
Jump to navigation Jump to search
m (added more space, duh)
Line 6: Line 6:
 
== Installation ==
 
== Installation ==
  
'''To install worlds:''' You have to extract them first—most of them are in <code>.zip</code>, some of them can be in <code>.rar</code> or <code>.tar.gz</code> format. To extract <code>.tar.gz</code> and <code>.rar</code> files on Windows, you need 7-Zip.
+
'''To install worlds:''' You have to extract them first. Most of them are in <code>.zip</code>, some of them can be in <code>.7z</code>, <code>.rar</code> or <code>.tar.gz</code> format. To extract archive files other than <code>.zip</code> on Windows, you need [https://7-zip.org/ 7-Zip].
  
Put the extracted files in the “<code>worlds</code>” folder of your Minetest installation folder. The files such as <code>env_meta.txt</code> must be directly in the world’s folder (eg. “<code>worlds/my_world/env_meta.txt</code>).
+
For world creators, <code>.7z</code> is the recommended archive format as it is a free format (as compared to <code>.rar</code>) that typically allows for the best compression.
  
Often, the compressed file also contains a “<code>mods</code>” folder, his files have to be put into your “<code>mods</code>” folder to show some additional blocks.
+
Put the extracted files in the “<code>worlds</code>” folder of your Minetest installation folder. The files such as <code>env_meta.txt</code> must be in the root of the world’s folder (eg. “<code>worlds/my_world/env_meta.txt</code>”).
  
 
* Location of the <code>worlds</code> directory within the directory structure of a run-in-place installation of Minetest, including some of the folders Minetest adds after some usage as client and server, as well as the positions (…) that custom-made content goes. Irrelevant folders are not expanded.
 
* Location of the <code>worlds</code> directory within the directory structure of a run-in-place installation of Minetest, including some of the folders Minetest adds after some usage as client and server, as well as the positions (…) that custom-made content goes. Irrelevant folders are not expanded.
Line 19: Line 19:
 
     ├── worlds/        (this folder will be created when the first local/singleplayer world is created)
 
     ├── worlds/        (this folder will be created when the first local/singleplayer world is created)
 
     │  ├── someworld        (the name given to the world by the user when it is created)
 
     │  ├── someworld        (the name given to the world by the user when it is created)
     │  │  ├── players/    (ingame data for each player)
+
     │  │  ├── players.sqlite (ingame data for each player)
     │  │  ├── worldmods/   (create this folder for world exclusive mods)
+
     │  │  ├── worldmods/     (create this folder for world exclusive mods)
     │  │  ├── auth.txt    (player login data)
+
     │  │  ├── auth.sqlite    (player login data)
     │  │  ├── env_meta.txt (contains mostly time related information)
+
     │  │  ├── env_meta.txt   (contains mostly time related information)
     │  │  ├── map.sqlite   (database containing the map. The name may differ depending on backend used)
+
     │  │  ├── map.sqlite     (database containing the map. The name may differ depending on backend used)
     │  │  ├── map_meta.txt (defines which mapgen is used and how)
+
     │  │  ├── map_meta.txt   (defines which mapgen is used and how)
     │  │  └── world.mt     (should at least contain the game ID without which the world  
+
     │  │  └── world.mt       (should at least contain the game ID without which the world  
     │  │                     will not show up in the singleplayer tab)
+
     │  │                       will not show up in the singleplayer tab)
 
     │  └── … (more saved worlds. Some with exclusive world mods)
 
     │  └── … (more saved worlds. Some with exclusive world mods)
    │
 
 
     └── (other files and directories)
 
     └── (other files and directories)
 
</pre>
 
</pre>
 
 
  
 
== World directory content ==
 
== World directory content ==
As described in the file [https://github.com/minetest/minetest/blob/master/doc/world_format.txt world_format.txt] shipped with each Minetest in the docs folder.
+
For documentation about the structure of e.g. databases and the mapblock binary format, see [https://github.com/minetest/minetest/blob/master/doc/world_format.txt world_format.txt] in the Minetest source tree.
 
 
 
 
===auth.txt===
 
 
 
Contains authentication data, player per line.
 
  <name>:<password hash>:<privilege1,...>
 
 
 
Legacy format (until 0.4.12) of password hash is <name><password> SHA1'd,
 
in the base64 encoding.
 
 
 
Format (since 0.4.13) of password hash is #1#<salt>#<verifier>, with the
 
parts inside <> encoded in the base64 encoding.
 
<verifier> is an RFC 2945 compatible SRP verifier,
 
of the given salt, password, and the player's name lowercased,
 
using the 2048-bit group specified in RFC 5054 and the SHA-256 hash function.
 
  
 +
===auth.sqlite===
 +
The authentication database. Name may differ according to the [[Database backends|database backend]] type used.
  
 
===env_meta.txt===
 
===env_meta.txt===
 
 
Simple global environment variables.
 
Simple global environment variables.
 
Example content:
 
Example content:
 +
 
   game_time = 73471
 
   game_time = 73471
 
   time_of_day = 19118
 
   time_of_day = 19118
 
   EnvArgsEnd
 
   EnvArgsEnd
  
 +
===force_loaded.txt===
 +
Lua table containing forcibly loaded MapBlocks.
  
 
===ipban.txt===
 
===ipban.txt===
 
 
Banned IP addresses and usernames.
 
Banned IP addresses and usernames.
 
Example content:
 
Example content:
 
   123.456.78.9|foo
 
   123.456.78.9|foo
 
   123.456.78.10|bar
 
   123.456.78.10|bar
 
  
 
===map_meta.txt===
 
===map_meta.txt===
 
+
Simple global map variables. The [[Map generator]] is defined here along with [[Map generator/settings|its parameters]].
Simple global map variables. The [[map generator]] may be defined here and [[Map generator/settings|tweaked with parameters]].
 
 
Example content:
 
Example content:
 
   seed = 7980462765762429666
 
   seed = 7980462765762429666
 +
  mg_name = v7
 
   [end_of_params]
 
   [end_of_params]
 
  
 
===map.sqlite===
 
===map.sqlite===
 +
Map database. Name may differ according to the [[Database backends|database backend]] type used.
  
Map data.
+
===mod_storage.sqlite===
Name may differ according to the [[Database backends|database backend]] type used.
+
Mod storage database. Name may differ according to the [[Database backends|database backend]] type used.
  
 +
===players.sqlite===
 +
Player database. Name may differ according to the [[Database backends|database backend]] type used.
  
 
===world.mt===
 
===world.mt===
Line 89: Line 75:
 
At least this file should be present together with a database file as minetest will not list the world if it does not know which game is needed for the map.  
 
At least this file should be present together with a database file as minetest will not list the world if it does not know which game is needed for the map.  
 
Example content:
 
Example content:
   gameid = mesetint
+
   gameid = nodecore
The file may also include lines stating what type of database backend is used and a list of installed mods with information wether they are activated for this world.
 
Some third party software such as the mt-mapper may also only consider the folder a valid minetest world when the world.mt is present.
 
  
 +
The file may also include lines stating what type of database backend is used and a list of installed mods with information whether they are activated for this world.
 +
Some third party software such as minetestmapper may also only consider the folder a valid minetest world when the world.mt is present.
  
===/player (folder)===
+
===/worldmods (folder)===
 +
This optional folder may contain mods that are needed for this map exclusively.
  
Player data.
+
===Legacy===
Filename can be anything.
 
Contains ingame data for each player in a file named after the player.
 
  
 +
====auth.txt====
 +
If the world uses the obsolete ''files'' backend for authentication, this file contains authentication data, player per line.
 +
  <name>:<password hash>:<privilege1,...>
  
===/worldmods (folder)===
+
Legacy format (until 0.4.12) of password hash is <name><password> SHA1'd,
 +
in the base64 encoding.
  
This optional folder may contain mods that are needed for this map exclusivly.
+
Format (since 0.4.13) of password hash is #1#<salt>#<verifier>, with the
 +
parts inside <> encoded in the base64 encoding.
 +
<verifier> is an RFC 2945 compatible SRP verifier,
 +
of the given salt, password, and the player's name lowercased,
 +
using the 2048-bit group specified in RFC 5054 and the SHA-256 hash function.
  
 +
====/player (folder)====
 +
If the world uses the obsolete ''files'' backend for player data, this folder will contain player data.
 +
Filename can be anything.
 +
Contains ingame data for each player in a file named after the player.
  
 
== Finding worlds ==
 
== Finding worlds ==
 
 
* See [https://forum.minetest.net/viewforum.php?f=12 Maps] in the [http://forum.minetest.net Forum]
 
* See [https://forum.minetest.net/viewforum.php?f=12 Maps] in the [http://forum.minetest.net Forum]
 
  
 
== Schem file Creation / Import ==  
 
== Schem file Creation / Import ==  
 
+
A '''schem file (<code>.mts</code>)''' is used to import building(s) into a world with the [https://content.minetest.net/packages/sfan5/worldedit/ WorldEdit mod]. This file can be found in “<code>worlds/<my_world>/schems</code>” folder.
A '''schem file (<code>.mts</code>)''' is used to import building(s) into a world with the [https://forum.minetest.net/viewtopic.php?id=572 WorldEdit mod]. This file can be found in “<code>worlds/<my_world>/schems</code>” folder.
 
 
 
  
 
* To '''create a schem file''' :  
 
* To '''create a schem file''' :  
Line 123: Line 116:
 
# Select the area to export by commands with <code>//pos1</code> and <code>//pos2</code> (these positions corresponds to an invisible diagonal of a cuboid selection).
 
# Select the area to export by commands with <code>//pos1</code> and <code>//pos2</code> (these positions corresponds to an invisible diagonal of a cuboid selection).
 
# Create your schem file with <code>//mtschemcreate <name of your schem file></code>. The file will be created into your “<code>worlds/<my_world>/schems</code>” folder.
 
# Create your schem file with <code>//mtschemcreate <name of your schem file></code>. The file will be created into your “<code>worlds/<my_world>/schems</code>” folder.
 
  
 
* To '''import a schem file''' :  
 
* To '''import a schem file''' :  
Line 133: Line 125:
 
# Place a position where you want with command: <code>//pos1</code>
 
# Place a position where you want with command: <code>//pos1</code>
 
# Import your schem file with <code>//mtschemplace <name of your schem file></code>
 
# Import your schem file with <code>//mtschemplace <name of your schem file></code>
 
  
 
== See also ==
 
== See also ==
 
 
* [[Minetestmapper]], a program to draw a 2D map of a Minetest world.
 
* [[Minetestmapper]], a program to draw a 2D map of a Minetest world.
 
  
 
[[Category:Map]]
 
[[Category:Map]]
 
[[Category:Tutorials]]
 
[[Category:Tutorials]]

Revision as of 16:26, 20 October 2022

Languages Language: English • Deutsch • Bahasa Melayu
Mbox important.png This article is incomplete.
Please help expand this article to include more useful information.

A world contains an environment and/or building(s) you can play in. A world also includes all saved data associated with a world, like player data, mob positions, health, breath, and the like.

Installation

To install worlds: You have to extract them first. Most of them are in .zip, some of them can be in .7z, .rar or .tar.gz format. To extract archive files other than .zip on Windows, you need 7-Zip.

For world creators, .7z is the recommended archive format as it is a free format (as compared to .rar) that typically allows for the best compression.

Put the extracted files in the “worlds” folder of your Minetest installation folder. The files such as env_meta.txt must be in the root of the world’s folder (eg. “worlds/my_world/env_meta.txt”).

  • Location of the worlds directory within the directory structure of a run-in-place installation of Minetest, including some of the folders Minetest adds after some usage as client and server, as well as the positions (…) that custom-made content goes. Irrelevant folders are not expanded.
This commented example shows the location and structure of a world called "someworld":

    minetest/
    ├── worlds/         (this folder will be created when the first local/singleplayer world is created)
    │   ├── someworld        (the name given to the world by the user when it is created)
    │   │   ├── players.sqlite (ingame data for each player)
    │   │   ├── worldmods/     (create this folder for world exclusive mods)
    │   │   ├── auth.sqlite    (player login data)
    │   │   ├── env_meta.txt   (contains mostly time related information)
    │   │   ├── map.sqlite     (database containing the map. The name may differ depending on backend used)
    │   │   ├── map_meta.txt   (defines which mapgen is used and how)
    │   │   └── world.mt       (should at least contain the game ID without which the world 
    │   │                       will not show up in the singleplayer tab)
    │   └── … (more saved worlds. Some with exclusive world mods)
    └── (other files and directories)

World directory content

For documentation about the structure of e.g. databases and the mapblock binary format, see world_format.txt in the Minetest source tree.

auth.sqlite

The authentication database. Name may differ according to the database backend type used.

env_meta.txt

Simple global environment variables. Example content:

 game_time = 73471
 time_of_day = 19118
 EnvArgsEnd

force_loaded.txt

Lua table containing forcibly loaded MapBlocks.

ipban.txt

Banned IP addresses and usernames. Example content:

 123.456.78.9|foo
 123.456.78.10|bar

map_meta.txt

Simple global map variables. The Map generator is defined here along with its parameters. Example content:

 seed = 7980462765762429666
 mg_name = v7
 [end_of_params]

map.sqlite

Map database. Name may differ according to the database backend type used.

mod_storage.sqlite

Mod storage database. Name may differ according to the database backend type used.

players.sqlite

Player database. Name may differ according to the database backend type used.

world.mt

World metadata. At least this file should be present together with a database file as minetest will not list the world if it does not know which game is needed for the map. Example content:

 gameid = nodecore

The file may also include lines stating what type of database backend is used and a list of installed mods with information whether they are activated for this world. Some third party software such as minetestmapper may also only consider the folder a valid minetest world when the world.mt is present.

/worldmods (folder)

This optional folder may contain mods that are needed for this map exclusively.

Legacy

auth.txt

If the world uses the obsolete files backend for authentication, this file contains authentication data, player per line.

 <name>:<password hash>:<privilege1,...>

Legacy format (until 0.4.12) of password hash is <name><password> SHA1'd, in the base64 encoding.

Format (since 0.4.13) of password hash is #1#<salt>#<verifier>, with the parts inside <> encoded in the base64 encoding. <verifier> is an RFC 2945 compatible SRP verifier, of the given salt, password, and the player's name lowercased, using the 2048-bit group specified in RFC 5054 and the SHA-256 hash function.

/player (folder)

If the world uses the obsolete files backend for player data, this folder will contain player data. Filename can be anything. Contains ingame data for each player in a file named after the player.

Finding worlds

Schem file Creation / Import

A schem file (.mts) is used to import building(s) into a world with the WorldEdit mod. This file can be found in “worlds/<my_world>/schems” folder.

  • To create a schem file :
  1. Type in your world name (with WorldEdit activated).
  2. Grant yourself all privileges: /grantme all
  3. Press F5 to show the coordinates.
  4. Select the area to export by commands with //pos1 and //pos2 (these positions corresponds to an invisible diagonal of a cuboid selection).
  5. Create your schem file with //mtschemcreate <name of your schem file>. The file will be created into your “worlds/<my_world>/schems” folder.
  • To import a schem file :
  1. Enter in your world (with WorldEdit activated).
  2. Grant yourself all privileges: /grantme all
  3. Put a schem file into your “worlds/<name of your new world>/schems" folder.
  4. Press F5 to show the coordinatess.
  5. Place a position where you want with command: //pos1
  6. Import your schem file with //mtschemplace <name of your schem file>

See also