color.txt

This forum helds all relevant server information, rules and status updates
Post Reply
eythen
Administrator
Posts: 265
Joined: Fri 19. Oct 2012, 13:04

color.txt

Post by eythen » Tue 10. Nov 2015, 08:51

Hi guys,

is someone so kind, to complete the missing colors for the map genration?

Code: Select all

Unknown nodes:
3d_torch:torch_ceiling
3d_torch:torch_floor
3d_torch:torch_wall
3dforniture:L_binding_bars
3dforniture:armchair
3dforniture:bars
3dforniture:chains
3dforniture:chair
3dforniture:table
3dforniture:table_lamp_hi
3dforniture:torch_wall
4seasons:cactus_winter
4seasons:desertsand_winter
4seasons:grass_autumn
4seasons:grass_spring
4seasons:grass_winter
4seasons:ice_source
4seasons:leaves_autumn
4seasons:leaves_spring
4seasons:sand_winter
arrow_signs:wall
beds:bed_bottom
beds:bed_top
beer_test:barrel
beer_test:barrel_beer_brewed
beer_test:crop
beer_test:growing_rope
beer_test:growing_rope_1
beer_test:growing_rope_down
beer_test:hops_1
beer_test:hops_9a
beer_test:malt_tray_malt
beer_test:oats_8
beer_test:sprouting_tray
beer_test:tankard
beer_test:wild_oats
bobblocks:btm
bobblocks:redblock
bobblocks:trap_grass
bobblocks:trap_spike
bobblocks:trap_spike_major
bobblocks:trap_spike_major_set
bobblocks:trap_spike_set
bobblocks:whitepole
bobblocks:yellowblock
building_blocks:stair_hardwood
building_blocks:stair_tar
bushes:strawberry_bush
candles:candle_lit
candles:candle_wall_copper_lit
candles:candle_wall_gold_lit
candles:candle_wall_silver_lit
candles:hive
candles:hive_wild
cannons:ball_steel_stack_5
cannons:ball_stone_stack_2
cannons:ball_stone_stack_3
cannons:ball_stone_stack_4
cannons:ball_stone_stack_5
cannons:cannon_steel
cannons:ship_stand_with_cannon_bronze
cannons:wood_stand_with_cannon_bronze
cannons:wood_stand_with_cannon_steel
christmas_craft:Christmas_present
christmas_craft:Christmas_present_blue
christmas_craft:Christmas_present_orange
christmas_craft:Christmas_present_red
christmas_craft:christmas_leaves
christmas_craft:christmas_lights
christmas_craft:green_baubles
christmas_craft:red_baubles
circularsaw:circularsaw
cottages:barrel
cottages:barrel_lying
cottages:barrel_lying_open
cottages:bed_foot
cottages:bed_head
cottages:bench
cottages:fence_corner
cottages:fence_end
cottages:fence_small
cottages:roof_black
cottages:roof_brown
cottages:roof_connector_black
cottages:roof_connector_red
cottages:roof_connector_wood
cottages:roof_flat_black
cottages:roof_flat_brown
cottages:roof_flat_red
cottages:roof_flat_wood
cottages:roof_red
cottages:roof_wood
cottages:shelf
cottages:stovepipe
cottages:table
cottages:tub
cottages:wagon_wheel
cottages:window_shutter_closed
cottages:window_shutter_open
darkage:adobe
darkage:basalt
darkage:basalt_cobble
darkage:box
darkage:chain
darkage:chalk
darkage:cobble_with_plaster
darkage:darkdirt
darkage:desert_stone_with_iron
darkage:dry_leaves
darkage:glass
darkage:glow_glass
darkage:gneiss
darkage:gneiss_cobble
darkage:iron_bars
darkage:iron_grille
darkage:lamp
darkage:marble
darkage:micro_marble
darkage:micro_stone_brick
darkage:micro_straw
darkage:mud
darkage:ors_cobble
darkage:panel_basalt_cobble
darkage:panel_desert_stone_cobble_vertical
darkage:panel_marble
darkage:panel_slate
darkage:panel_slate_cobble
darkage:panel_slate_tile
darkage:panel_stone_brick
darkage:panel_stone_brick_1
darkage:panel_stone_brick_2
darkage:panel_straw
darkage:reinforced_chalk
darkage:reinforced_wood
darkage:schist
darkage:serpentine
darkage:shale
darkage:silt
darkage:slab_basalt_1
darkage:slab_basalt_cobble
darkage:slab_basalt_cobble_quarter
darkage:slab_desert_stone_cobble_inverted
darkage:slab_desert_stone_cobble_wall
darkage:slab_gneiss_1
darkage:slab_gneiss_cobble
darkage:slab_gneiss_cobble_2
darkage:slab_gneiss_cobble_quarter
darkage:slab_gneiss_cobble_three_quarter
darkage:slab_gneiss_cobble_wall
darkage:slab_marble
darkage:slab_ors_cobble
darkage:slab_ors_cobble_inverted
darkage:slab_slate_cobble
darkage:slab_slate_tile
darkage:slab_stone_brick
darkage:slab_straw
darkage:slab_straw_inverted
darkage:slab_straw_quarter
darkage:slate
darkage:slate_cobble
darkage:slate_tile
darkage:slope_stone_brick
darkage:stair_basalt_cobble
darkage:stair_basalt_cobble_half
darkage:stair_basalt_cobble_right_half
darkage:stair_desert_stone_cobble
darkage:stair_gneiss
darkage:stair_gneiss_cobble
darkage:stair_gneiss_cobble_inner
darkage:stair_gneiss_cobble_outer
darkage:stair_marble
darkage:stair_marble_alt
darkage:stair_marble_half
darkage:stair_marble_inner
darkage:stair_marble_outer
darkage:stair_marble_right_half
darkage:stair_ors_cobble
darkage:stair_sandstone_cobble
darkage:stair_slate_cobble
darkage:stair_slate_tile
darkage:stair_slate_tile_alt
darkage:stair_slate_tile_inner
darkage:stair_slate_tile_outer
darkage:stair_stone_brick
darkage:stair_straw
darkage:stair_straw_alt
darkage:stair_straw_half
darkage:stair_straw_inner
darkage:stair_straw_outer
darkage:stair_straw_right_half
darkage:stone_brick
darkage:straw
darkage:straw_bale
darkage:wood_bars
darkage:wood_frame
darkage:wood_grille
darkage:wood_shelves
default:desert_cobble
default:pine_needles
default:pine_sapling
default:pinetree
default:pinewood
default:stick
doors:trapdoor
doors:trapdoor_open
fake_fire:fake_fire
farming:desert_sand_soil_wet
farming:pumpkin
farming:pumpkin_1
farming:pumpkin_face_light
farming:scarecrow
farming:scarecrow_bottom
farming:scarecrow_light
farming:seed_wheat
farming:weed
farming_plus:banana
farming_plus:banana_leaves
farming_plus:banana_sapling
farming_plus:carrot
farming_plus:carrot_1
farming_plus:cocoa
farming_plus:cocoa_leaves
farming_plus:cocoa_sapling
farming_plus:orange
farming_plus:orange_1
farming_plus:potato
farming_plus:potato_1
farming_plus:rhubarb
farming_plus:rhubarb_1
farming_plus:rubber_leaves
farming_plus:rubber_tree_full
farming_plus:strawberry
farming_plus:strawberry_1
farming_plus:tomato
farming_plus:tomato_1
flowers:flower_cotton
flowers:flower_dandelion_white
flowers:flower_dandelion_white_pot
flowers:flower_dandelion_yellow
flowers:flower_geranium
flowers:flower_geranium_pot
flowers:flower_rose
flowers:flower_seaweed
flowers:flower_tulip
flowers:flower_viola
flowers:flower_waterlily
growing_trees:big_trunk
growing_trees:branch_sprout
growing_trees:branch_xmzm
growing_trees:branch_xmzp
growing_trees:branch_xpzm
growing_trees:branch_xpzp
growing_trees:branch_xx
growing_trees:branch_zz
growing_trees:leaves
growing_trees:medium_trunk
growing_trees:trunk
growing_trees:trunk_sprout
growing_trees:trunk_top
king_arthurs_land:door_bottom_1
king_arthurs_land:door_bottom_2
king_arthurs_land:door_top_1
king_arthurs_land:door_top_2
king_arthurs_land:hardwood
king_arthurs_land:palmleaves
king_arthurs_land:slimtree_wood
lights:glowblue
lights:glowyellow
lights:light
lights:spotlight
lights:spotlight_off
locks:door_bottom_1
locks:door_top_1
locks:shared_locked_chest
locks:shared_locked_sign_wall
maptools:cobble
maptools:fake_walkable_pointable
maptools:fullgrass
maptools:glass
maptools:grass
maptools:gravel
maptools:ladder
maptools:leaves
maptools:lightbulb
maptools:mossycobble
maptools:nobuild
maptools:playerclip
maptools:sandstone
maptools:sandstone_brick
maptools:smoke
maptools:soil_wet
maptools:stone
maptools:stonebrick
maptools:tree
maptools:wood
medieval_craft:glow_stone
medieval_craft:glow_stone_lamp
medieval_craft:medieval_glass_blue
medieval_craft:medieval_glass_darkgrey
medieval_craft:medieval_glass_green
medieval_craft:medieval_glass_magenta
medieval_craft:medieval_glass_orange
medieval_craft:medieval_glass_purple
medieval_craft:medieval_glass_red
medieval_craft:medieval_glass_yellow
medieval_craft:plaster_arrow
medieval_craft:plaster_bar
medieval_craft:plaster_bars
medieval_craft:rope
medieval_craft:wood_bars
mesecons_commandblock:commandblock_off
mesecons_extrawires:crossingAD
mesecons_random:ghoststone_active
moreblocks:horizontal_tree
moreblocks:micro_pinewood_1
moreblocks:micro_pinewood_4
moreblocks:panel_pinetree
moreblocks:panel_pinewood_1
moreblocks:panel_pinewood_4
moreblocks:slab_cobble_inverted
moreblocks:slab_desert_cobble
moreblocks:slab_pinewood
moreblocks:slab_pinewood_1
moreblocks:slope_brick
moreblocks:slope_cobble
moreblocks:slope_desert_cobble
moreblocks:slope_desert_cobble_half
moreblocks:slope_pinewood
moreblocks:slope_sandstone
moreblocks:slope_sandstone_half
moreblocks:slope_sandstone_half_raised
moreblocks:slope_stonebrick
moreblocks:slope_wood
moreblocks:stair_desert_cobble
moreblocks:stair_pinetree
moreblocks:stair_pinewood
moreblocks:stair_pinewood_alt
moreblocks:stair_pinewood_right_half
moreblocks:stonebrick
moreores:mineral_copper
moreores:mineral_silver
moreores:mineral_tin
moreores:mithril_block
moretrees:rubber_tree_leaves
moretrees:rubber_tree_trunk
nature:blossom
papyrus_bed:bed_bottom
papyrus_bed:bed_top
pipeworks:fountainhead
pipeworks:pipe_2_empty
pipeworks:pipe_3_empty
pipeworks:pipe_3_loaded
pipeworks:pipe_4_empty
pipeworks:pipe_4_loaded
pipeworks:pipe_9_loaded
pipeworks:spigot
pipeworks:spigot_pouring
pipeworks:tube_3
pipeworks:tube_4
pipeworks:tube_6
scaffolding:iron_scaffolding
scaffolding:scaffolding
stairs:slab_desert_cobble
stairs:stair_desert_cobble
steel:grate_hard
steel:grate_soft
steel:plate_hard
steel:roofing
steel:strut
technic:coal_alloy_furnace
technic:lv_cable10
technic:lv_cable12
technic:lv_cable14
technic:lv_cable24
technic:lv_cable3
technic:lv_cable36
technic:lv_cable4
technic:lv_cable48
technic:lv_cable6
technic:lv_cable9
technic:marble
technic:mineral_lead
technic:mineral_uranium
technic:mineral_zinc
technic:panel_marble
technic:slab_marble
technic:slab_marble_quarter
technic:stair_marble
technic:stair_marble_alt
technic:water_mill
teleporter:receiver_active
teleporter:teleporter_active
teleporter:teleporter_pad
titanium:block
unknown
vines:vine
xbar:pane_10
xbar:pane_12
xbar:pane_3
xbar:pane_5
xbar:pane_6
xbar:pane_9
xpanes:bar_1
xpanes:bar_10
xpanes:bar_11
xpanes:bar_12
xpanes:bar_13
xpanes:bar_14
xpanes:bar_15
xpanes:bar_2
xpanes:bar_3
xpanes:bar_4
xpanes:bar_5
xpanes:bar_6
xpanes:bar_7
xpanes:bar_8
xpanes:bar_9
colors need to be in RGB notation:

Code: Select all

air 220 220 255 0
Thanks.

User avatar
addi
Administrator
Posts: 208
Joined: Sat 20. Oct 2012, 23:08

Re: color.txt

Post by addi » Sat 21. Nov 2015, 10:50

There exists some type of Luascript + Python wich should generate a colors.txt from all known blocks in Minetest:
https://github.com/Rogier-5/minetest-ma ... colors.txt

==FILE== mods/dumpnodes/init.lua
  1. local function nd_get_tiles(nd)
  2.  
  3.     if nd.tiles then
  4.  
  5.         return nd.tiles
  6.  
  7.     elseif nd.tile_images then
  8.  
  9.         return nd.tile_images
  10.  
  11.     end
  12.  
  13.     return nil
  14.  
  15. end
  16.  
  17.  
  18.  
  19. minetest.register_chatcommand("dumpnodes", {
  20.  
  21.     params = "",
  22.  
  23.     description = "",
  24.  
  25.     func = function(plname, param)
  26.  
  27.         local n = 0
  28.  
  29.         local ntbl = {}
  30.  
  31.         for nn, nd in pairs(minetest.registered_nodes) do
  32.  
  33.             local prefix, name = nn:match('(.*):(.*)')
  34.  
  35.             if prefix == nil or name == nil or prefix == '' or name == '' then
  36.  
  37.                 -- nothing
  38.  
  39.             else
  40.  
  41.                 if ntbl[prefix] == nil then
  42.  
  43.                     ntbl[prefix] = {}
  44.  
  45.                 end
  46.  
  47.                 ntbl[prefix][name] = nd
  48.  
  49.             end
  50.  
  51.         end
  52.  
  53.         local out, err = io.open('nodes.txt', 'wb')
  54.  
  55.         if not out then
  56.  
  57.             return minetest.chat_send_player(plname, 'io.open: ' .. err)
  58.  
  59.         end
  60.  
  61.         for prefix, i in pairs(ntbl) do
  62.  
  63.             out:write('# ' .. prefix .. '\n')
  64.  
  65.             for name, nd in pairs(i) do
  66.  
  67.                 if nd.drawtype ~= 'airlike' and nd_get_tiles(nd) ~= nil then
  68.  
  69.                     local tl = nd_get_tiles(nd)[1]
  70.  
  71.                     if type(tl) == 'table' then
  72.  
  73.                         tl = tl.name
  74.  
  75.                     end
  76.  
  77.                     tl = (tl .. '^'):match('(.-)^')
  78.  
  79.                     out:write(prefix .. ':' .. name .. ' ' .. tl .. '\n')
  80.  
  81.                     n = n + 1
  82.  
  83.                 end
  84.  
  85.             end
  86.  
  87.             out:write('\n')
  88.  
  89.         end
  90.  
  91.         out:close()
  92.  
  93.         minetest.chat_send_player(plname, n .. " nodes dumped.")
  94.  
  95.     end,
  96.  
  97. })
==FILE== avgcolor.py
  1. #!/usr/bin/env python
  2.  
  3. import sys
  4.  
  5. from PIL import Image
  6.  
  7.  
  8.  
  9. def avg2(a, b):
  10.  
  11.     return int((a + b) / 2.0)
  12.  
  13.  
  14.  
  15. def avg2t3i0(a, b):
  16.  
  17.     return tuple(avg2(t[0], t[1]) for t in zip(a[:3], b[:3]))
  18.  
  19.  
  20.  
  21. if len(sys.argv) <= 1:
  22.  
  23.     print("Usage: %s <input>" % sys.argv[0])
  24.  
  25. else:
  26.  
  27.     inp = Image.open(sys.argv[1])
  28.  
  29.     inp = inp.convert('RGBA')
  30.  
  31.     ind = inp.load()
  32.  
  33.     avgc = -1
  34.  
  35.     for x in range(inp.size[0]):
  36.  
  37.         for y in range(inp.size[1]):
  38.  
  39.             pxl = ind[x, y]
  40.  
  41.             if pxl[3] < 128:
  42.  
  43.                 continue
  44.  
  45.             if avgc == -1:
  46.  
  47.                 avgc = pxl[:3]
  48.  
  49.             else:
  50.  
  51.                 avgc = avg2t3i0(avgc, pxl)
  52.  
  53.     if avgc == -1:
  54.  
  55.         sys.stderr.write('Warning: did not find average color\n')
  56.  
  57.         print('0 0 0')
  58.  
  59.     else:
  60.  
  61.         print("%d %d %d" % avgc)
==COMMAND==
  1. while read -r p; do
  2.  
  3.     set -- junk $p
  4.  
  5.     shift
  6.  
  7.     if [[ ! $1 == "#" && ! $1 == "" ]]; then
  8.  
  9.         echo $1 `python /path/to/avgcolor.py $(find /path/to/minetest/directory/ -type f -name $2)`
  10.  
  11.     fi
  12.  
  13. done < nodes.txt > colors.txt
  14.  
  15. # Use nicer colors for water and lava
  16.  
  17. sed -re 's/^default:water_([a-z]+) [0-9 ]+$/default:water_\1 39 66 106 128 224/' < colors.txt > tmp$$ && mv tmp$$ colors.txt
  18.  
  19. sed -re 's/^default:lava_([a-z]+) [0-9 ]+$/default:lava_\1 255 100 0/' < colors.txt > tmp$$ && mv tmp$$ colors.txt
  20.  
  21. sed -re 's/^default:([a-z_]*)glass ([0-9 ]+)$/default:\1glass \2 64 16/' < colors.txt > tmp$$ && mv tmp$$ colors.txt
==INSTRUCTIONS==
1) Make sure avgcolors.py outputs the usage instructions
2) Add the dumpnodes mod to Minetest
3) Create a world and load dumpnodes & all mods you want to have a color entry for
4) Execute /dumpnodes ingame
5) Use the command to generate colors.txt (obviously don't forget to replace /path/to/... with the actual path)
Last edited by addi on Tue 31. Jan 2017, 08:31, edited 1 time in total.

User avatar
addi
Administrator
Posts: 208
Joined: Sat 20. Oct 2012, 23:08

Re: color.txt

Post by addi » Tue 31. Jan 2017, 10:28

Brand new colors.txt
This colors.txt file contains all 10298 nodes that are used today (31.01.2017) on King-Arthurs-land.
Attachments
colors.txt
(463.49 KiB) Downloaded 173 times

Post Reply