[Mod] Dye Craft [20121002] [dye_craft]

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

[Mod] Dye Craft [20121002] [dye_craft]

by cornernote » Tue Oct 02, 2012 00:27

Dye Craft for Minetest

Copyright (C) 2012 cornernote, Brett O'Donnell <cornernote@gmail.com>
License: GPLv3

Homepage (no download link availible, please share one if you have it)


Description

Provides crafts for dyes.
Last edited by cornernote on Mon Nov 05, 2012 10:11, edited 1 time in total.
 

User avatar
alexcraft
Member
 
Posts: 66
Joined: Thu Sep 06, 2012 13:12

by alexcraft » Thu Oct 04, 2012 13:24

what can we do with dyes
 

User avatar
RealBadAngel
Member
 
Posts: 556
Joined: Wed Jul 18, 2012 16:30

by RealBadAngel » Thu Oct 04, 2012 14:39

alexcraft wrote:what can we do with dyes


make coloured wool for example

edit: just seen the code
register_dye_craft('dye:blue 16', {'dye:white', 'default:coal_lump'})

blue out of coal????

In technic theres already the way to get dyes. IMHO more logical.

minetest.register_craft({
type = "cooking",
output = "dye:black 2",
recipe = "default:coal_lump",
})
minetest.register_craft({
type = "cooking",
output = "dye:green 2",
recipe = "default:cactus",
})
minetest.register_craft({
type = "cooking",
output = "dye:red 2",
recipe = "flowers:flower_rose",
})
minetest.register_craft({
type = "cooking",
output = "dye:blue 2",
recipe = "flowers:flower_viola",
})
minetest.register_craft({
type = "cooking",
output = "dye:white 2",
recipe = "flowers:flower_dandelion_white",
})
minetest.register_craft({
type = "cooking",
output = "dye:yellow 2",
recipe = "flowers:flower_dandelion_yellow",
})
minetest.register_craft({
type = "cooking",
output = "dye:orange 2",
recipe = "flowers:flower_tulip",
})
minetest.register_craft({
type = "cooking",
output = "dye:brown 2",
recipe = "default:dry_shrub",
})


those are basic. any other can be done mixin the basic ones.
Last edited by RealBadAngel on Thu Oct 04, 2012 14:43, edited 1 time in total.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Thu Oct 04, 2012 17:07

Those Technic recipes are mostly also the same ones used by Unified Dyes, which can supply colors to any mod that uses the game's groups-based dye system.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Thu Oct 04, 2012 22:23

I didn't want to depend on other mods. Imo dyes are part of core game, and should be craft able without external mods.

I coded it in such a way that it's easy to read and change.

If you have aproposal to make blue from something else thats part of the default game, I am open to suggestions. However I don't think you should have to install flowers to be able to access something in the core game.

edit:

Orange and Brown are basic colors?

You only need black white red green blue (and possibly yellow, but you can also make yellow from red+green depending if you are thinking in CMYK or RGB)
Last edited by cornernote on Thu Oct 04, 2012 23:34, edited 1 time in total.
 

User avatar
RealBadAngel
Member
 
Posts: 556
Joined: Wed Jul 18, 2012 16:30

by RealBadAngel » Fri Oct 05, 2012 06:06

cornernote wrote:I didn't want to depend on other mods. Imo dyes are part of core game, and should be craft able without external mods.

I coded it in such a way that it's easy to read and change.

If you have aproposal to make blue from something else thats part of the default game, I am open to suggestions. However I don't think you should have to install flowers to be able to access something in the core game.

edit:

Orange and Brown are basic colors?

You only need black white red green blue (and possibly yellow, but you can also make yellow from red+green depending if you are thinking in CMYK or RGB)


theres no way to get brown one
bout orange youre right, you can have it by mixing red and yellow
i think flowers shall be a part of the game
Last edited by RealBadAngel on Fri Oct 05, 2012 06:08, edited 1 time in total.
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Fri Oct 05, 2012 09:02

cornernote wrote:You only need black white red green blue (and possibly yellow, but you can also make yellow from red+green depending if you are thinking in CMYK or RGB)


RealBadAngel wrote:theres no way to get brown one
bout orange youre right, you can have it by mixing red and yellow
i think flowers shall be a part of the game


If I missed the point of this discussion just ignore it:

I never knew better that there exist 3 primary colors (Red + Blue + Yellow). With those colors you should be able to make all colors. And that making black and white a 'primary' color makes life a bit easier :-)

So I didn't understand CMYK or RGB. Then I googled a bit and saw that they are based on light. I never knew a thing about that (I skipped science early). So I found out that there's a difference between between 'light' colors and 'paint' colors.

(A bit off topic: all the light colors combined should make white, all the paint colors combined should make black)

To the point now:
I would prefer a color system based on Red, Blue, Yellow, Black and White, because intuitively I can mix them without looking at the crafting recipes.

P.s. when I use paint Blue + Yellow makes Green. With Red it makes Brown (instead of Black as told in theory). That's why I prefer to make an addition for Black and White

P.s.1. A big Thank You! for all the modders that took initiatives to make dyes craftable.
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Fri Oct 05, 2012 10:58

Hi Topywo, thanks for the feedback. Edit the code to be the recipes you think make sense and I will most likely merge it. Just remember to only use things you can get from the default game.
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Sat Oct 06, 2012 20:16

I found a small error in line 36:

register_dye_craft('dye:yellow 2', {'dye:blue', 'default:green'}) must be register_dye_craft('dye:yellow 2', {'dye:blue', 'dye:green'})

It seems that some collors can also be made out of other combinations. I guess this must be the dye mod in the minetest_game causing this. However it didn't bother me.

I've thought about this mod and made some changes, not only with the colors (in blue), but also with the crafting. Last but not least I found out I still couldn't craft wool with the wool mod of minetest_game. So I made something up to solve that problem. Luckily the amount of lines is small, so I dared putting them in this post:


local register_dye_cooking = function(output,recipe)
minetest.register_craft({
type = 'cooking',
output = output,
recipe = recipe,
})
end

local register_dye_craft = function(output,recipe)
minetest.register_craft({
type = 'shapeless',
output = output,
recipe = recipe,
})
end


-- black/white from stone/coal
register_dye_cooking('dye:white 6', 'default:stone')
register_dye_cooking('dye:black 6', 'default:coal_lump')

-- dye from nodes
register_dye_cooking('dye:red 6', 'default:apple')
register_dye_cooking('dye:yellow 6', 'default:dry_shrub')
register_dye_cooking('dye:blue 6', 'default:gravel')

-- dye from other dye
register_dye_craft('dye:cyan 2', {'dye:green', 'dye:blue'})
register_dye_craft('dye:grey 2', {'dye:white', 'dye:black'})
register_dye_craft('dye:pink 2', {'dye:white', 'dye:red'})
register_dye_craft('dye:brown 2', {'dye:red', 'dye:green'})
register_dye_craft('dye:green 2', {'dye:blue', 'dye:yellow'})
register_dye_craft('dye:dark_green 2', {'dye:green', 'dye:black'})
register_dye_craft('dye:dark_grey 2', {'dye:grey', 'dye:black'})
register_dye_craft('dye:magenta 2', {'dye:red', 'dye:cyan'})
register_dye_craft('dye:violet 2', {'dye:red', 'dye:blue'})
register_dye_craft('dye:orange 2', {'dye:red', 'dye:yellow'})

-- white wool from 6 leaves, 1 dye:white and 2 sticks (turned into fibers, painted and knitted into white wool :-P )
register_dye_craft('wool:white 16', {'dye:white', 'default:stick', 'default:stick', 'default:leaves', 'default:leaves', 'default:leaves', 'default:leaves', 'default:leaves', 'default:leaves',})


Explanation of some thoughts behind my choices:
--The dyes textures look like powder, so it feels more like something coming out of a furnace
-- I got used or it feels normal to make: from stone white dye (like titanium oxyde in VanessaE's Unified dyes), blue dye out of gravel (like the gravel used to make blue Rabbibob's Bobblocks (I think there is a mod making tar out of cooked gravel, but cooking is more limiting the input than crafting)
-- Dry_shrub, bleached to yellow in the dessert sun, can be usefull like this. (Alternative is mese, that's yellow colored, but I prefer dry_shrub)
-- I think Cyan is blue-green (however this is also (still) craftable with blue and white :-) )
-- Green out of blue and yellow, because I made yellow primary (based on painting)
-- White wool, logical isn't it, just take some leaves, sticks and white dye and give it to grandma. She does miracles.

I hope you can use (some things of) this and that no one objects using these lines. If you can't use it's no problem for me too. At least I learned a bit of LUA today.
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Sun Oct 07, 2012 00:54

changes have been pushed to git
 

User avatar
sfan5-bot
Member
 
Posts: 35
Joined: Thu Mar 28, 2013 11:19

by sfan5-bot » Thu Mar 28, 2013 16:50

[EE] No Dependencies found


Please fix these Mistakes and report this post, a moderator will delete it
If you believe I have made a Mistake contact sfan5
 


Return to Old Mods

Who is online

Users browsing this forum: No registered users and 19 guests

cron