This mod is a library for automatically registering all colored items/nodes of a type, as well as their crafts when combining two of them.
Example :
Xmas Balls Mod
Usage :
Spoiler
Code: Select all
--Mod : Colorful Library v1.1
--© Lars Müller @appguru.eu, licensed under GNU GPLv3
--Library Usage :
--Functions :
--Basic :
--toHex <number> - Converts <number>(0-255) to a hexadecimal string
--round <number> - Rounds <number>
--Advanced :
--Arguments :
--<r/g/b_steps> - How many red/green/blue levels
--<a> - Alpha level of the colorize/color overlay
--<extreme> - If even r/g/b steps(dividable by 2) are added 1
--<generate_crafts> - Can a new color be crafted by combining two colors
--create_colortable <r_steps> <g_steps> <b_steps> <extreme> <nodename> Creates a color table, each <nodename> node is assigned to a color
--save_colortable <r_steps> <g_steps> <b_steps> <extreme> <nodename> <save_as> Same as above, but saves the color table as .anl
--Register-Functions :
--Note : , Color : Red : ..., Green : ..., Blue : ... is appended to the description automatically, #color in the tile/inventory/wield-image string is replaced with the color, if not specified, appended automatically
--register_all_nodes <r_steps> <g_steps> <b_steps> <a> <extreme> <nodename> <node(data)> <generate_crafts> <append> <save_as>
--1. Append specifies whether the color should be applied to the drop, drop should be registered in same colors, except if you want to make the nodes drop themselves. Only works if a drop is specified in <node(data)>
--2. If save_as is set this function offers save_colortable functionality besides its normal
--register_all_items <r_steps> <g_steps> <b_steps> <a> <extreme> <itemname> <item(data)> <generate_crafts>
Spoiler
Colored stone and Schematic Creator used.
Colorful Library Source/Download
License :
CC-BY-SA 3.0
Changelog :
Spoiler
- v1.1 : API modifications as automatical craft registration(color combining) and automatic drop
None
Compatible with my Schematic Creator, as this mod is able to create .anl files also automatically !