[Mod] Unified Dyes [20170620][unifieddyes]

User avatar
VanessaE
Moderator
 
Posts: 4315
Joined: Sun Apr 01, 2012 12:38
Location: Waynesville, NC
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE

Re: [Mod] Unified Dyes [20170620][unifieddyes]

by VanessaE » Sat Sep 08, 2018 16:19

Updates: dropped support for the old 89 color palette as it's long since been made obsolete by the 256-color one. In the process, the getpaletteidx() and register_color_craft() calls now require the string "split" to call for that palette, instead of boolean true.

Also, the airbrush now checks the palette that's used on the node you right-clicked on, and alters the color selector to highlight only the colors you can use on that node (with a button to show all colors, if desired). Naturally, it prevents you from selecting a color the node can't accept, unless you "Show All" and select + accept while in that screen.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
 

User avatar
Chiantos
Member
 
Posts: 304
Joined: Sun Jan 15, 2017 09:04
Location: Earth
GitHub: BlockColor
IRC: mrchiantos
In-game: mrchiantos

Re: [Mod] Unified Dyes [20170620][unifieddyes]

by Chiantos » Tue Sep 18, 2018 10:20

Hello, Vanessa

I think use your mod with airbrush, i have Actually a problem :

_ Can i use "facedir" and "color" with paramtype2 ? With "on_place = minetest.rotate_node" ?

Edit :
Code: Select all
minetest.register_node("slope:edge_white", {
 description = "Edge",
   tiles = { "color_white.png" },
 wield_image = "none.png",
 inventory_image = "edge.png",
   drawtype = 'mesh',
 mesh = "slope_test_quarter_round_onetexture.obj",
   paramtype = "light",
   paramtype2 = "colorfacedir",
   palette = "unifieddyes_palette_extended.png",
   walkable = true,
   sunlight_propagates = false,
   groups = {snappy=1,choppy=2, ud_param2_colorable = 1},
   sounds = default.node_sound_stone_defaults(),

   after_place_node = function(pos, placer, itemstack, pointed_thing)
   print("after_place_node on "..minetest.get_node(pos).name)
   minetest.rotate_node(itemstack, placer, pointed_thing)
   unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
   
 end,
            
   after_dig_node = unifieddyes.after_dig_node,

})


Ok Rotate work and Color with airbrush so, Two problems now :

- Can i use Api for disabled modify Colors when rotate ? Only modify color with airbrush ?

- When i use airbrush for Paint a rotate'node, node reset to default position ...

Can i modify Colors rotate'node with airbrush and disabled move to default position ?

Good Day.
Game : BlockColor - Avatar Mod with Cms : SkinKey
 

User avatar
VanessaE
Moderator
 
Posts: 4315
Joined: Sun Apr 01, 2012 12:38
Location: Waynesville, NC
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE

Re: [Mod] Unified Dyes [20170620][unifieddyes]

by VanessaE » Tue Sep 18, 2018 15:11

Chiantos wrote:Hello, Vanessa
_ Can i use "facedir" and "color" with paramtype2 ? With "on_place = minetest.rotate_node" ?

No, you cannot directly. The closest you can get is either the split palette mode with paramtype2 = "colorfacedir" (197 colors, see the cut stairs/slopes/et. al in Colored Woods), or the wallmounted palette with paramtype2 = "colorwallmounted" (32 colors, see Ilights or Home Decor). This is a limitation in how the Minetest engine stores color info, sorry.

If you want, you can limit a mod to just certain colors, as long as they're in a compatible palette, as in cheapie's Unified Mesecons mod. In there, she uses split/colorfacedir mode, but trimmed to about 30 colors (well, after I expanded it ;-) ).


- Can i use Api for disabled modify Colors when rotate ? Only modify color with airbrush ?

- When i use airbrush for Paint a rotate'node, node reset to default position ...

Can i modify Colors rotate'node with airbrush and disabled move to default position ?

I don't understand these questions entirely, but: the airbrush is strictly for changing the color of a node. If the node is rotateable because it has paramtype2="colorfacedir" (or "colorwallmounted"), the airbrush will not change the node's orientation. If the orientation changes, that means you're misusing Unified Dyes' API somehow.

Also in your sample code, you've still got some old API calls: unifieddyes.recolor_on_place() and the corresponding after_dig. Those do nothing today - they're empty stub functions to prevent old mods crashing.
Please review the current API doc.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
 

User avatar
Chiantos
Member
 
Posts: 304
Joined: Sun Jan 15, 2017 09:04
Location: Earth
GitHub: BlockColor
IRC: mrchiantos
In-game: mrchiantos

Re: [Mod] Unified Dyes [20170620][unifieddyes]

by Chiantos » Tue Sep 18, 2018 15:38

Hello,

I will look at that, thank you for answering me.

Edit : Complicate ... i have test with only no rotate nodes for concept for fun.

viewtopic.php?f=50&t=20827

This not perfect, i have made this only for test your mod with Idea game ;)

Good Day ;)
Game : BlockColor - Avatar Mod with Cms : SkinKey
 

Jat
Member
 
Posts: 228
Joined: Fri Nov 11, 2011 16:15
 

User avatar
VanessaE
Moderator
 
Posts: 4315
Joined: Sun Apr 01, 2012 12:38
Location: Waynesville, NC
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE

Re: [Mod] Unified Dyes [20170620][unifieddyes]

by VanessaE » Fri Oct 05, 2018 01:41

You're using the wrong repo - Unified Dyes is on Gitlab. Merged your commit there. Thanks :-)
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
 

Jat
Member
 
Posts: 228
Joined: Fri Nov 11, 2011 16:15

Re: [Mod] Unified Dyes [20170620][unifieddyes]

by Jat » Fri Oct 12, 2018 16:53

Image
Problem colour with "unifieddyes_palette_extended.png" if in "default:sand".or "default:dersert_sand"...
Last edited by Jat on Fri Oct 12, 2018 17:19, edited 1 time in total.
 

User avatar
VanessaE
Moderator
 
Posts: 4315
Joined: Sun Apr 01, 2012 12:38
Location: Waynesville, NC
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE

Re: [Mod] Unified Dyes [20170620][unifieddyes]

by VanessaE » Fri Oct 12, 2018 17:00

Update your Minetest engine. That bug has long since been fixed.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
 

Jat
Member
 
Posts: 228
Joined: Fri Nov 11, 2011 16:15

Re: [Mod] Unified Dyes [20170620][unifieddyes]

by Jat » Fri Oct 12, 2018 17:30

Code: Select all
minetest.override_item(default:sand, {
   on_construct = unifieddyes.on_construct,
   palette = "unifieddyes_palette_extended.png",
   paramtype2 = "color",
   airbrush_replacement_node = "colored_block:sand",
   groups = {ud_param2_colorable = 1,...},
})

I use 0.4.17.1
No problem with "colorfacedir" or "colorwallmounted".
 

User avatar
VanessaE
Moderator
 
Posts: 4315
Joined: Sun Apr 01, 2012 12:38
Location: Waynesville, NC
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE

Re: [Mod] Unified Dyes [20170620][unifieddyes]

by VanessaE » Fri Oct 12, 2018 18:14

Oh I know what it is.

You can't just directly add those settings to an old node definition, because a node that's never had prior orientation or color info defaults to 0 for its param2 value, which corresponds to a shade of pink in the extended palette (while the other two have 0 set to white). Most existing nodes in most will be like that.

I suggest you create your own colorized sand nodes with the proper node def settings, and use them as the outputs for color/dye recipes, with the default sand nodes as inputs. Use those same custom nodes as "replacement" nodes for the airbrush.

Now, if you actually want to colorize an entire landscape:

Override the sand nodes' textures in favor of high-contrast B&W versions, and set up a run-only-once LBM to properly set param2 so that they have the correct color. As a rough guess, you probably need "full" amber at 50% saturation for desert sand (which is a param2 value of 123 I think), and perhaps "faint" amber for regular sand (a param2value of 3). I suggest setting some metadata in each node that you can check inside the LBM to prevent altering them again (i.e. in case the LBM runs again on nodes that have already been fixed).
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
 

Jat
Member
 
Posts: 228
Joined: Fri Nov 11, 2011 16:15

Re: [Mod] Unified Dyes [20170620][unifieddyes]

by Jat » Sat Oct 13, 2018 09:37

I use :

Code: Select all
minetest.register_lbm({
   name = ":colored_block:"..mod[index].."_"..TypeDeBlock[index].."_".."extended",
   label = "Convert",
   run_at_every_load = false,
   nodenames = mod[index]..":"..TypeDeBlock[index],
   action = function(pos, node)
      minetest.swap_node(pos, {name = node.name, param2 = 240})
      minetest.get_meta(pos):set_int("palette_index", 240)
   end
})
 

User avatar
VanessaE
Moderator
 
Posts: 4315
Joined: Sun Apr 01, 2012 12:38
Location: Waynesville, NC
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
 

Previous

Return to Mod Releases



Who is online

Users browsing this forum: runs and 2 guests