Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

Luanti mapping notes

I have some partially-complete notes about how I built a series of static images of the maps of my world in Luanti Mineclonia.

Building maps of my world

  1. Install minetestmapper

    sudo apt-get install minetestmapper
    
  2. Download https://github.com/luanti-org/minetestmapper/blob/master/util/generate_colorstxt.py

  3. Install mod dumpnodes.

    cd ~/.minetest/mods
    git clone https://github.com/Montandalar/dumpnodes
    
  4. Ran the game, loaded my world, and ran /dumpnodes which saves to ~/.minetest/worlds/world1/nodes.txt

  5. Generate colors.txt.

    cd ~/.minetest/worlds/world1
    python3 ~/Downloads/generate_colorstxt.py --game ~/.minetest/games/mineclonia
    
  6. Run the map printout.

    1. Manual step

      minetestmapper -i ~/.minetest/worlds/world1 -o ~/foo1.png
      
    2. Shell script to generate each individual layer.

      #!/bin/bash
      # Startdate: 2025-02-24-2 21:41
      # purpose: make set of maps for each layer of Mineclonia world
      WORLD="${WORLD:-${1}}"
      #OUTPUT="${OUTPUT:-${2}}"
      MAX="${MAX:-128}"
      MIN="${MIN:--128}"
      for word in $( seq ${MIN} ${MAX} ) ;
      do
         outname="$( printf '%04d' "${word}" )"
         next="$( printf '%s\n' "${word}-1" | bc )"
         minetestmapper -i "${HOME}/.minetest/worlds/${WORLD}" -o "${HOME}/Downloads/maps/map${outname}.png" --max-y "${word}" --min-y "${word}"
      done

Map of my world

Someday I want to replicate some small mapping program that I used for OG minecraft back in 2012, which let you use a slider to scroll through the layers of a world. I used it to look for diamond and interesting structures. It was awesome, and I can't find it in my old files or notes or the Internet.

Comments