How to package a map

Post Reply
User avatar
Blockhead
Moderator
Posts: 2985
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

How to package a map

by Blockhead » Post

So, you have a map in singleplayer and you want to publish it. This is a guide on best practice for how to get the map into the hands of other players easily. It is presented mostly as a series of checklist items.

Make sure the map is prepared

The last thing you want is to go through the whole publishing process only to realise you messed up and need to start again.
  • Make sure the player has the right privs. Revoke any privileges that the player is not meant to have, such as creative privileges you used in building a survival or adventure mode map.
  • Turn off fly, fast and noclip unless you have a good reason to leave them on.
  • Make sure that the player has no password, or remember to publish a password(s) for maps with pre-made accounts. Nuke account/clear password for the account, on any account out of the database that has a password that was really used on a multiplayer server. You do not want people to be able to brute force attempt passwords and re-use them in multiplayer!
  • Make sure that the player is in the right place, or for multiplayer that the spawn point is correct. You may want to use a mod that sets a static spawn point.

Prepare mods/worldmods

To make it easier to install the world or even include custom content in it, you probably want to use the worldmods feature of the engine. When there is a directory inside the world directory called worldmods, then mods from there will always be loaded ahead of game mods and ones from the mods directory. This means players won't need to install mods in order to get the world running properly. It does increase the file size though, so if you have no or only a handful of mods, maybe skip this step.
  • Check for updates for your mods (made easy through ContentDB).
  • Copy all of the mods into worldmods.
  • When republishing: Update the worldmods. It's quite likely they are out of date since the last publishing of the world.
  • To test your worldmods properly: Make a backup of world.mt. Delete all of the mod entries. Load the world. There should be no issues with mods missing, unknown nodes etc.
  • Even if not using worldmods, and especially if you are a mod author with unpublished projects, you may want to scrub world.mt to remove entries unrelated to the map. As of #15758 a leak is less likely though.

Make an archive file

Since worlds exist in multiple files, you'll want to squish them into a singular file. This will usually also save size. Use a program like 7-zip to add the files to an archive. .zip is a very common format, and the one you probably want if you know nothing else about archive formats.
  • Add the directory to a new archive file (zip file or other)
  • Check the contents of the archive file with Explorer/Finder/file manager/archiver.

Test your archive file

Before you upload, double check that the world will work after it is extracted. If you are using worldmods, this will test you have all of the worldmods copied in properly. Test the world and when you open it, go back over all the prior checklist items at this point, e.g. check the player position, privs and so on.
  • Close the game.
  • Move the world directory out into another directory.
  • (If using worldmods): Move all of the mods out of your mod directory.
  • Extract from your archive file.
  • Launch the game and launch your world. Is everything as expected? If not, fix the issue and start again through the checklist

Upload your archive

The forum has a 1 MB file size limit, so unless your world is very very small, it's probably not going to fit on here. Find a website you trust and upload your file there. There are a few options with different pros and cons:
  • Own website: Pro: It stays up as long as you can keep it up. Con: Can be the most expensive option.
  • Personal cloud storage e.g. Google Drive, Dropbox, OneDrive. Pro: You can store a backup copy of the world and share it to other people at the same time. Con: If you ever rearrange the files, close your account or the terms and conditions change, the link can get wiped out.
  • Upload sites e.g. MediaFire, MEGA. Pro: Usually pretty reliable. Con: Download speed can be limited and these sites serve a lot of ads.
  • catbox.moe: Pro: Decent free service. Con: Sometimes blocked by ISPs, schools, antivirus etc. Con: original filename not given in download, only the extension.
  • Git forges e.g. GitHub, GitLab, Codeberg. NOTE: For this option, do not make an archive file, but make the repository's root directory the same as the world directory's contents. The websites will make .zip files available automatically, and your players can download these without using git. Pro: Free services, usually not intrusive with ads and decent bandwidth. Pro: (Power-)users would be able to update by running some commands. Con: You need at least a very basic understanding of git, or git-via-website. Git is not made for tracking binary files. Every new version of the map will add a lot of size to the repository and there may be size limits.

Posting

Okay, so you have the file double-checked and uploaded. You're already champing at the bit to post. However, make sure potential players know what they're getting when you upload. This is very similar to if you were trying to get a mod into Mod Releases, with the guidelines for that.
  • Thread title: Map name plus lede/subtitle
  • Description of the map.
  • Target game of the map. The player needs to know the game so they can find the world in their world list after copying it in, since worlds are listed per-game in the main menu.
  • Mods needed for the map or a statement that it uses worldmods.
  • At least one high quality screenshot. If you want more than 3, you will need to use an external image host or to make multiple posts, since the forums have a 3-file limit per post (and 1 MB file size limit; you should probably re-export the screenshots as JPEG).
  • Author(s) of the map.
  • Licence to use the map: You should share the map under a licence like would be used for textures, models or sounds, such as a Creative Commons licence like CC BY-SA 4.0. If there is no licence statement on the map, then copyright law says it must be default all rights reserved, and is only allowed for personal use and cannot be re-uploaded.
  • Any notes about how to install the map, or a link back to How do I install maps?
If you include all the proper info, people are going to be much more inclined to try it out.

Alternatives

Perhaps your adventure befits its own menu entry and the title of "game"? Well, instead of packaging it as just a "map", you can add it as a mod with modgen. You can then ship your game with a premade world, using the games directory instead of the worlds directory.

Sometimes, you may also want to host the world as a multiplayer game instead. Of course, there are already a lot of servers. Sometimes your map may be from an old server and you may not be looking at full-time hosting/reviving it.

Conclusion

That is all I have for now in terms of advice for packaging a map up properly. If you take the time to do it properly the first time, it should go well. Some of this is a bit technical and a simplified or video version with example might be in order. If anyone has any other advice they would add, please chime in.
Last edited by Blockhead on Sat Apr 05, 2025 01:42, edited 1 time in total.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
Desour
Member
Posts: 1581
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: How to package a map

by Desour » Post

Nice guide!

You could also include a step to decrease the size of the map, i.e. using `--recompress` and then `sqlite3 map.db 'vacuum;'`, and a step to make sure the not deprecated and default sqlite db backends are used. But I guess putting this into another guide and linking it here might be better.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

User avatar
Blockhead
Moderator
Posts: 2985
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: How to package a map

by Blockhead » Post

Desour wrote:
Fri Apr 04, 2025 17:47
Nice guide!

You could also include a step to decrease the size of the map, i.e. using `--recompress` and then `sqlite3 map.db 'vacuum;'`, and a step to make sure the not deprecated and default sqlite db backends are used. But I guess putting this into another guide and linking it here might be better.
I don't really know how these steps work, but if you post more details in your post, that will be a decent place for people to find that information.
Last edited by Blockhead on Wed Sep 10, 2025 09:15, edited 1 time in total.
Reason: how how -> know how
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

Astrobe
Member
Posts: 714
Joined: Sun Apr 01, 2018 10:46

Re: How to package a map

by Astrobe » Post

About the alternative, if the mapgen and the mods are deterministic (most should be), using the same seed gives the same world; and the seed can be set in a minetest.conf included with the game (which also should set other important parameters like the map chunk size which as an influence on dungeon generation for mapgen v7).

If one only needs to add local modifications to the mapgen'ed world, like a starting/spawning building, one could consider placing it as a schematic. Modgen and mapsync seem to be overkill for that. There are a bunch of schematic manipulation mods on CDB, I wonder if one of them is more fit for this purpose?

One problem though is that one needs to place that schematic once, when the first player joins. I remember I struggled a little bit to handle that correctly without using mod storage, because both singleplayer and multiplayer must be considered. Is there some sort of "run once" mod available to deal with that?
My game? It's Minefall.

User avatar
Blockhead
Moderator
Posts: 2985
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: How to package a map

by Blockhead » Post

Astrobe wrote:
Sat Apr 05, 2025 11:15
About the alternative, if the mapgen and the mods are deterministic (most should be), using the same seed gives the same world; and the seed can be set in a minetest.conf included with the game (which also should set other important parameters like the map chunk size which as an influence on dungeon generation for mapgen v7).
This is good advice if you used either the engine's mapgen or a deterministic Lua mapgen.
Astrobe wrote:
Sat Apr 05, 2025 11:15
If one only needs to add local modifications to the mapgen'ed world, like a starting/spawning building, one could consider placing it as a schematic. Modgen and mapsync seem to be overkill for that. There are a bunch of schematic manipulation mods on CDB, I wonder if one of them is more fit for this purpose?
Modgen etc. are definitely overkill for some uses, so it's good to hear about the alternatives.
Astrobe wrote:
Sat Apr 05, 2025 11:15
One problem though is that one needs to place that schematic once, when the first player joins. I remember I struggled a little bit to handle that correctly without using mod storage, because both singleplayer and multiplayer must be considered. Is there some sort of "run once" mod available to deal with that?
Tracking the placement in mod storage is how I did it for Secrets of the Moon. I don't see anything wrong with the architecture of relying on mod storage to place schematics when pre-programmed coordinates are first emerged.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

Astrobe
Member
Posts: 714
Joined: Sun Apr 01, 2018 10:46

Re: How to package a map

by Astrobe » Post

Yes, nothing wrong with using mod storage for a "first run" (or similar) flag. It's just me and my micro-optimization issues.
My game? It's Minefall.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests