Page 1 of 1

minetestmapper.py support status with 0.4

PostPosted: Fri Jan 06, 2012 02:20
by redcrab
What is the current support status of minetestmapper.py with 0.4..

PostPosted: Fri Jan 06, 2012 04:12
by Menche
It works, kind of. You have to edit the file. Look for "if version == 20:" and change that line to "if version >= 20:". Then the script will make a map.png, but the colors will be all messed up, with stuff like brown grass and green water.

PostPosted: Fri Jan 06, 2012 08:58
by redcrab
Menche wrote:It works, kind of. You have to edit the file. Look for "if version == 20:" and change that line to "if version >= 20:". Then the script will make a map.png, but the colors will be all messed up, with stuff like brown grass and green water.

Thanks, even if it is a freaky map, it is better than nothing :)

PostPosted: Fri Jan 06, 2012 09:18
by dannydark
I don't think it will be updated to work nicely with 0.4 until 0.4 goes stable as a lot could still change in the dev build.

PostPosted: Fri Jan 06, 2012 09:23
by redcrab
dannydark wrote:I don't think it will be updated to work nicely with 0.4 until 0.4 goes stable as a lot could still change in the dev build.


Agreed, avoiding double effort.. Meanwhile it was just a story to have something... even freaky. :)

dev team should commit this tiny patch in github, with a comment like "working with 0.4 but freaky : waiting for next 0.4 stable version"

PostPosted: Fri Jan 06, 2012 09:32
by redcrab
I confirm the tiny patch works ... with freaky colors as expected, but it works ;) Thx

PostPosted: Thu Jan 12, 2012 17:39
by redcrab
I've succeeded to do a not too ugly map in 0.4 :D
I've modified util/colors.txt files as :

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
800 128 128 128   # CONTENT_STONE
1 39 66 106     # CONTENT_WATER
3 255 255 0     # CONTENT_TORCH
816 39 66 106     # CONTENT_WATERSOURCE
4 117 86 41     # CONTENT_SIGN_WALL
818 128 79 0      # CONTENT_CHEST
81a 118 118 118  # CONTENT_FURNACE
811 103 78 42    # CONTENT_FENCE
812 162 119 53   # CONTENT_RAIL
0 154 110 40   # CONTENT_LADDER
2 255 204 0    # CONTENT_LAVA
817 255 204 0    # CONTENT_LAVASOURCE
801 107 134 51  # CONTENT_GRASS
809 86 58 31    # CONTENT_TREE
80c 48 95 8     # CONTENT_LEAVES
802 102 129 38  # CONTENT_GRASS_FOOTSTEPS
814 178 178 0   # CONTENT_MESE
803 101 84 36   # CONTENT_MUD
813 104 78 42   # CONTENT_WOOD
804 210 194 156 # CONTENT_SAND
81b 123 123 123 # CONTENT_COBBLE
81d 199 199 199 # CONTENT_STEEL
810 183 183 222 # CONTENT_GLASS
81c 219 202 178 # CONTENT_MOSSYCOBBLE
805 78 154 6    # CONTENT_GRAVEL
806 204 0 0     # CONTENT_SANDSTONE
80d 0 215 0     # CONTENT_CACTUS
808 170 50 25   # CONTENT_BRICK
807 104 78 42   # CONTENT_CLAY
80e 58 105 18   # CONTENT_PAPYRUS
80f 196 160 0   # CONTENT_BOOKSHELF
80a 205 190 121 # CONTENT_JUNGLETREE
80b 62 101 25   # CONTENT_JUNGLEGRASS
81e 255 153 255 # CONTENT_NC
81f 102 50 255  # CONTENT_NC_RB
821 200 0 0     # CONTENT_APPLE



of course with the tiny patch on minetestmapper.py

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
diff --git a/util/minetestmapper.py b/util/minetestmapper.py
old mode 100644
new mode 100755
index b4cd2c8..50a1ef3
--- a/util/minetestmapper.py
+++ b/util/minetestmapper.py
@@ -266,7 +266,7 @@ def content_is_air(d):
     return d in [126, 127, 254]
 
 def read_content(mapdata, version, datapos):
-    if version == 20:
+    if version >= 20:
         if mapdata[datapos] < 0x80:
             return mapdata[datapos]
         else:


here a sample coming from redcrab's server.
Image

PostPosted: Thu Jan 12, 2012 17:51
by neko259
The mapper should use mod nodes colors as well.

PostPosted: Thu Jan 12, 2012 18:02
by redcrab
neko259 wrote:The mapper should use mod nodes colors as well.


Sure ... that's why I said .. a not so ugly ... because it still ugly ... missing node color definition...
but compared to the original color def(v 0.3) it is a huge difference :)

and as stated before we should have a stable version before to go futher with non-default nodes.

In addition if you have two nodes coming from two mods x:n1 and y:n2 at startup these nodes will have for instance item id 2060 for x:n1 and 2061 for y:n2 ...
but if you remove afterward mod x then y:n2 will have item id 2060 instead of 2061...

So color mapping is not a easy one for now ... we may should have to implement a mechanism that generate the colors.txt file automatically by minetestserver execution ... so color assignment can be done by node name and not by item id ...

PostPosted: Thu Jan 12, 2012 23:28
by jordan4ibanez
what is this..can some one supply a pic from imgur so i can see?

PostPosted: Thu Jan 12, 2012 23:39
by redcrab
jordan4ibanez wrote:what is this? (...)


It's about to generate the map of a minetest world ... here a sample from redcrab's server (minetest.suret.net port 30000)
each pixel represent a block/node ... blue sea, green dirt etc ...
white squared areas for not yet visited location.
do not hesitate to open original size pic and zoom in , good place to see where to search on the server particular node/block...

jordan4ibanez wrote:(...).can some one supply a pic from imgur so i can see?


Here you go... from imgur ;)
Image

PostPosted: Fri Jan 13, 2012 00:58
by jordan4ibanez
ahhhh thats fancy :D