examples.lua 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. --[[
  2. Default image structure (reference for texture pack makers):
  3. tools: tool_base.png + tool_(pick/shovel/axe/sword/hoe)_base.png + (tool_(pick/shovel/axe/sword/hoe).png^[colorize:(color))
  4. block: (default_steel_block.png/crystal_block.png)^[colorize:(color)
  5. ingot: default_steel_ingot.png^[colorize:(color)
  6. metal ore: default_stone.png + mineral_0_base.png + (mineral_0.png^[colorize:(color))
  7. crystal ore: default_stone.png + mineral_1_base.png + (mineral_1.png^[colorize:(color))
  8. crystal/crystal_shard/metal_lump: (crystal/crystal_shard/metal_lump)_base.png + ((crystal/crystal_shard/metal_lump).png^[colorize:(color))
  9. NOTE: For images that are colorized, I HIGHLY recommend sharpening the brightness/contrast,
  10. as the colorization can flatten it out quite a bit. Krita is an excelent tool for this.
  11. ]]
  12. --[[
  13. Properties shared by metal and crystal:
  14. name: material name base in 'mod:material' format
  15. (e.g 'aliens:plutonium', 'minerals_plus:tungsten', 'fairytest:enchanted_steel')
  16. description: The readable name of the material (will be concatenated with strings such as " Ingot", " Ore", " Shovel", etc.)
  17. depth: how far down before the ore generates (positive = downward)
  18. large_depth (optional): how far down before large clusters of the ore generate
  19. If nil, 2*depth will be used.
  20. rarity: How rare the ore is. For reference,
  21. 8 = coal (approx)
  22. 12 = copper (approx)
  23. 14 = mese (approx)
  24. Actual scarcity of clusters is this value cubed, but this affects the size of clusters as well.
  25. artificial: This is an alloy or other specially made material, and does not have an ore (or a lump, if metal).
  26. Depth and rarity can be omitted if this is true.
  27. THIS WILL NOT REGISTER A RECIPE FOR YOU.
  28. infinite_uses: Tools don't break.
  29. durability:
  30. How many uses the tools have.
  31. Does nothing if infinite_uses is true.
  32. Will default to 40*power
  33. Can be over 65536, a custom after_use function handles this
  34. armor_durability:
  35. Durability (number of uses) of armor (if 3d_armor is present)
  36. Does nothing if infinite_uses is true.
  37. Will default to durability
  38. hardness (optional): Optional reversed nodegroup cracky of the ore and block, (1 = (cracky=3), 2 = (cracky=2), 3+ = (cracky=1)).
  39. Will default to one less than power.
  40. power: How strong the tools are. For reference, a value of '2' gives strengths roughly similar to stone tools.
  41. Affects max levels of tools, dig times, and ore hardness if hardness is not defined.
  42. speed (optional): Optional swing speed for tools. For reference, a value of '2' gives speeds roughly similar to stone tools.
  43. If nil, power will be used.
  44. color: Must be in format "#RRGGBB:AAA" Used to colorize images for materials/ores (if no custom sprite is given), and tools.
  45. no_tools: Don't register a toolset for this material.
  46. no_armor: If 3d_armor is present, don't register armor for this material.
  47. tool_ingredient (optional): Optional name of an item to be used in place of ingots/crystals in the tool recipe.
  48. shield_damage_sound: The sound played when the shield takes/blocks damage.
  49. armor_protection:
  50. Fleshy armor group, defaults to 24 - 20/level
  51. WARNING: If this is set to anything over 24, then a full set of armor will make the player invincible.
  52. (if 3d_armor is present)
  53. armor_hurtback:
  54. If true, armor will damage the attacker when attacked.
  55. armor_weight:
  56. The heaviness of the armor (the same as steel, by default) will be multiplied by this.
  57. ore_image (optional): Optional custom sprite for the ore. Will not be automatically colorized if specified.
  58. block_image (optional): Optional custom sprite for the block. Will not be automatically colorized if specified.
  59. ]]
  60. instant_ores.register_metal({
  61. name = "gnu_slash_ores:mintium",
  62. description = "Mintium",
  63. rarity = 8,
  64. depth = 24,
  65. color = "#00C018:128",
  66. no_armor = true;
  67. durability = 140,
  68. power = 2,
  69. cooktime = 10,
  70. })
  71. --[[
  72. Properties unique to metal:
  73. cooktime (optional): Optional recipe cooktime for converting lumps into ingots.
  74. lump_image (optional): Optional custom sprite for the lump. Will not be automatically colorized if specified.
  75. ingot_image (optional): Optional custom sprite for the ingot. Will not be automatically colorized if specified.
  76. ]]
  77. instant_ores.register_crystal({
  78. name = "gnu_slash_ores:ubnium",
  79. description = "Ubnium",
  80. rarity = 13,
  81. depth = 32,
  82. color = "#FF8030:160",
  83. durability = 140,
  84. power = 3,
  85. speed = 2,
  86. armor_weight = 0.5,
  87. })
  88. --[[
  89. Properties unique to crystal:
  90. shard_image (optional): Optional custom sprite for the shard. Will not be automatically colorized if specified.
  91. crystal image (optional): Optional custom sprite for the crystal. Will not be automatically colorized if specified.
  92. ]]
  93. instant_ores.register_metal({
  94. name = "gnu_slash_ores:debinite",
  95. description = "Debinite",
  96. artificial = true,
  97. block_image = "default_coal_block.png^[colorize:#D01060:70",
  98. color = "#D01060:160",
  99. durability = 800,
  100. power = 5,
  101. speed = 4,
  102. hardness = 1,
  103. })
  104. minetest.register_craft({
  105. type = "shapeless",
  106. output = "gnu_slash_ores:debinite_ingot 9",
  107. recipe = {
  108. "gnu_slash_ores:ubnium_shard",
  109. "gnu_slash_ores:ubnium_shard",
  110. "gnu_slash_ores:ubnium_shard",
  111. "gnu_slash_ores:ubnium_shard",
  112. "gnu_slash_ores:ubnium_shard",
  113. "gnu_slash_ores:ubnium_shard",
  114. "gnu_slash_ores:ubnium_shard",
  115. "gnu_slash_ores:ubnium_shard",
  116. "gnu_slash_ores:mintium_ingot"
  117. }
  118. })