treedef

From Minetest Developer Wiki
Jump to navigation Jump to search
Mbox warning.png This page contains unofficial Lua API documentation and is likely to be outdated or wrong.
For the official and up-to-date documentation, refer to lua_api.txt found in your Minetest installation directory under doc.
Mbox warning.png This page has been proposed for deletion for the following reason: "Contains unofficial and potentially outdated, redundant and inconsistent Lua API information"
If you don't think that this page should be deleted, please explain why on the talk page.

Table <source enclose="none">{axiom = …, rules_a = …, rules_b = …, rules_c = …, rules_d = …, trunk = …, leaves = …, leaves2 = …, leaves2_chance = …, angle = …, iterations = …, random_level = …, trunk_type = …, thin_branches = …, fruit = …, fruit_chance = …, seed = …}</source>

  • axiom — (string) initial tree axiom
  • rules_a — (string) rules set A
  • rules_b — (string) rules set B
  • rules_c — (string) rules set C
  • rules_d — (string) rules set D
  • trunk — (string) trunk node name
  • leaves — (string) leaves node name
  • leaves2 — (string) secondary leaves node name
  • leaves2_chance — (num) chance (0-100) to replace leaves with leaves2
  • angle — (num) angle in deg
  • iterations — (num) max # of iterations, usually 2 -5
  • random_level — (num) factor to lower nr of iterations, usually 0 - 3
  • trunk_type — (string) one of the following:
  • <source enclose="none">"single"</source> — 1 node
  • <source enclose="none">"double"</source> — 2x2 nodes
  • <source enclose="none">"crossed"</source> — 3x3 nodes in cross shape
  • thin_branches — (boolean) true -> use thin (1 node) branches
  • fruit — (string) fruit node name
  • fruit_chance — (num) chance (0-100) to replace leaves with fruit node
  • seed — (num) random seed

Notes