summaryrefslogtreecommitdiff
path: root/tree_models.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-01-20 00:01:15 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-01-20 00:59:42 -0500
commit2c3345aa046f779c41fa7428e1efa0a0176b4e0f (patch)
treebe6b8b303c4e1676cce10babb8478da186a2d616 /tree_models.lua
parent1bd0afbc842aaacbfd7eb31ac88be4f9c08eba5c (diff)
Enabled several new types of trees, all spawned at mapgen time!
This code will slow the map generator down a little due to bugs therein, and is generally still in the experimental stages, but it works and is actually quite fast!
Diffstat (limited to 'tree_models.lua')
-rw-r--r--tree_models.lua323
1 files changed, 162 insertions, 161 deletions
diff --git a/tree_models.lua b/tree_models.lua
index dd78024..e836858 100644
--- a/tree_models.lua
+++ b/tree_models.lua
@@ -1,185 +1,185 @@
-beech_model={
-axiom="FFFFFBFB",
-rules_a="[&&&GGF[++^Fd][--&Fd]//Fd[+^Fd][--&Fd]]////[&&&GGF[++^Fd][--&Fd]//Fd[+^Fd][--&Fd]]////[&&&GGF[++^Fd][--&Fd]//Fd[+^Fd][--&Fdd]]",
-rules_b="[&&&F[++^Fd][--&d]//d[+^d][--&d]]////[&&&F[++^Fd][--&d]//d[+^d][--&d]]////[&&&F[++^Fd][--&Fd]//d[+^d][--&d]]",
-rules_c="/",
-rules_d="F",
-trunk="moretrees:beech_trunk",
-leaves="moretrees:beech_leaves",
-angle=30,
-iterations=2,
-random_level=0,
-trunk_type="single";
-thin_branches=true;
+moretrees.beech_model={
+ axiom="FFFFFBFB",
+ rules_a="[&&&GGF[++^Fd][--&Fd]//Fd[+^Fd][--&Fd]]////[&&&GGF[++^Fd][--&Fd]//Fd[+^Fd][--&Fd]]////[&&&GGF[++^Fd][--&Fd]//Fd[+^Fd][--&Fdd]]",
+ rules_b="[&&&F[++^Fd][--&d]//d[+^d][--&d]]////[&&&F[++^Fd][--&d]//d[+^d][--&d]]////[&&&F[++^Fd][--&Fd]//d[+^d][--&d]]",
+ rules_c="/",
+ rules_d="F",
+ trunk="moretrees:beech_trunk",
+ leaves="moretrees:beech_leaves",
+ angle=30,
+ iterations=2,
+ random_level=0,
+ trunk_type="single";
+ thin_branches=true;
}
-apple_tree_model={
-axiom="FFFFFAFFBF",
-rules_a="[&&&FFFFF&&FFFF][&&&++++FFFFF&&FFFF][&&&----FFFFF&&FFFF]",
-rules_b="[&&&++FFFFF&&FFFF][&&&--FFFFF&&FFFF][&&&------FFFFF&&FFFF]",
-trunk="moretrees:apple_tree_trunk",
-leaves="moretrees:apple_tree_leaves",
-angle=30,
-iterations=2,
-random_level=0,
-trunk_type="single",
-thin_branches=true;
-fruit="default:apple",
-fruit_chance=15,
+moretrees.apple_tree_model={
+ axiom="FFFFFAFFBF",
+ rules_a="[&&&FFFFF&&FFFF][&&&++++FFFFF&&FFFF][&&&----FFFFF&&FFFF]",
+ rules_b="[&&&++FFFFF&&FFFF][&&&--FFFFF&&FFFF][&&&------FFFFF&&FFFF]",
+ trunk="moretrees:apple_tree_trunk",
+ leaves="moretrees:apple_tree_leaves",
+ angle=30,
+ iterations=2,
+ random_level=0,
+ trunk_type="single",
+ thin_branches=true;
+ fruit="default:apple",
+ fruit_chance=15,
}
-oak_model={
-axiom="FFFFFFA",
-rules_a="[&FFBFA]////[&BFFFA]////[&FBFFA]",
-rules_b="[&FFFA]////[&FFFA]////[&FFFA]",
-trunk="moretrees:oak_trunk",
-leaves="moretrees:oak_leaves",
-angle=30,
-iterations=5,
-random_level=2,
-trunk_type="crossed";
-thin_branches=false;
-fruit="moretrees:acorn",
-fruit_chance=3,
+moretrees.oak_model={
+ axiom="FFFFFFA",
+ rules_a="[&FFBFA]////[&BFFFA]////[&FBFFA]",
+ rules_b="[&FFFA]////[&FFFA]////[&FFFA]",
+ trunk="moretrees:oak_trunk",
+ leaves="moretrees:oak_leaves",
+ angle=30,
+ iterations=5,
+ random_level=2,
+ trunk_type="crossed";
+ thin_branches=false;
+ fruit="moretrees:acorn",
+ fruit_chance=3,
}
-sequoia_model={
-axiom="FFFFFFFFFFddccA///cccFddcFA///ddFcFA/cFFddFcdBddd/A/ccdcddd/ccAddddcFBcccAccFdFcFBcccc/BFdFFcFFdcccc/B",
-rules_a="[&&&GGF[++^FFdd][--&Fddd]//Fdd[+^Fd][--&Fdd]]////[&&&GGF[++^FFdd][--&Fddd]//Fdd[+^Fd][--&Fdd]]////[&&&GGF[++^FFdd][--&Fddd]//Fdd[+^Fd][--&Fdd]]",
-rules_b="[&&&GGF[++^Fdd][--&Fdd]//dd[+^d][--&Fd]]////[&&&GGF[++^Fdd][--&Fdd]//dd[+^d][--&Fd]]////[&&&GGF[++^Fdd][--&Fdd]//dd[+^d][--&Fd]]",
-rules_c="/",
-rules_d="F",
-trunk="moretrees:sequoia_trunk",
-leaves="moretrees:sequoia_leaves",
-angle=30,
-iterations=2,
-random_level=0,
-trunk_type="crossed",
-thin_branches=true
+moretrees.sequoia_model={
+ axiom="FFFFFFFFFFddccA///cccFddcFA///ddFcFA/cFFddFcdBddd/A/ccdcddd/ccAddddcFBcccAccFdFcFBcccc/BFdFFcFFdcccc/B",
+ rules_a="[&&&GGF[++^FFdd][--&Fddd]//Fdd[+^Fd][--&Fdd]]////[&&&GGF[++^FFdd][--&Fddd]//Fdd[+^Fd][--&Fdd]]////[&&&GGF[++^FFdd][--&Fddd]//Fdd[+^Fd][--&Fdd]]",
+ rules_b="[&&&GGF[++^Fdd][--&Fdd]//dd[+^d][--&Fd]]////[&&&GGF[++^Fdd][--&Fdd]//dd[+^d][--&Fd]]////[&&&GGF[++^Fdd][--&Fdd]//dd[+^d][--&Fd]]",
+ rules_c="/",
+ rules_d="F",
+ trunk="moretrees:sequoia_trunk",
+ leaves="moretrees:sequoia_leaves",
+ angle=30,
+ iterations=2,
+ random_level=0,
+ trunk_type="crossed",
+ thin_branches=true
}
-birch_model1={
-axiom="FFFFFdddccA/FFFFFFcA/FFFFFFcB",
-rules_a="[&&&dddd^^ddddddd][&&&---dddd^^ddddddd][&&&+++dddd^^ddddddd][&&&++++++dddd^^ddddddd]",
-rules_b="[&&&ddd^^ddddd][&&&---ddd^^ddddd][&&&+++ddd^^ddddd][&&&++++++ddd^^ddddd]",
-rules_c="/",
-rules_d="F",
-trunk="moretrees:birch_trunk",
-leaves="moretrees:birch_leaves",
-angle=30,
-iterations=2,
-random_level=0,
-trunk_type="single",
-thin_branches=true
+moretrees.birch_model1={
+ axiom="FFFFFdddccA/FFFFFFcA/FFFFFFcB",
+ rules_a="[&&&dddd^^ddddddd][&&&---dddd^^ddddddd][&&&+++dddd^^ddddddd][&&&++++++dddd^^ddddddd]",
+ rules_b="[&&&ddd^^ddddd][&&&---ddd^^ddddd][&&&+++ddd^^ddddd][&&&++++++ddd^^ddddd]",
+ rules_c="/",
+ rules_d="F",
+ trunk="moretrees:birch_trunk",
+ leaves="moretrees:birch_leaves",
+ angle=30,
+ iterations=2,
+ random_level=0,
+ trunk_type="single",
+ thin_branches=true
}
-birch_model2={
-axiom="FFFdddccA/FFFFFccA/FFFFFccB",
-rules_a="[&&&dFFF^^FFFdd][&&&---dFFF^^FFFdd][&&&+++dFFF^^FFFdd][&&&++++++dFFF^^FFFdd]",
-rules_b="[&&&dFF^^FFFd][&&&---dFFF^^FFFd][&&&+++dFF^^FFFd][&&&++++++dFF^^FFFd]",
-rules_c="/",
-rules_d="F",
-trunk="moretrees:birch_trunk",
-leaves="moretrees:birch_leaves",
-angle=30,
-iterations=2,
-random_level=0,
-trunk_type="single",
-thin_branches=true
+moretrees.birch_model2={
+ axiom="FFFdddccA/FFFFFccA/FFFFFccB",
+ rules_a="[&&&dFFF^^FFFdd][&&&---dFFF^^FFFdd][&&&+++dFFF^^FFFdd][&&&++++++dFFF^^FFFdd]",
+ rules_b="[&&&dFF^^FFFd][&&&---dFFF^^FFFd][&&&+++dFF^^FFFd][&&&++++++dFF^^FFFd]",
+ rules_c="/",
+ rules_d="F",
+ trunk="moretrees:birch_trunk",
+ leaves="moretrees:birch_leaves",
+ angle=30,
+ iterations=2,
+ random_level=0,
+ trunk_type="single",
+ thin_branches=true
}
-palm_model={
-axiom="FFccc&FFFFFdddFA//A//A//A//A//A",
-rules_a="[&fb&bbb[++f--&ffff&ff][--f++&ffff&ff]&ffff&bbbb&b]",
-rules_b="f",
-rules_c="/",
-rules_d="F",
-trunk="moretrees:palm_trunk",
-leaves="moretrees:palm_leaves",
-angle=30,
-iterations=2,
-random_level=0,
-trunk_type="single",
-thin_branches=true,
-fruit="moretrees:coconut",
-fruit_chance=0
+moretrees.palm_model={
+ axiom="FFccc&FFFFFdddFA//A//A//A//A//A",
+ rules_a="[&fb&bbb[++f--&ffff&ff][--f++&ffff&ff]&ffff&bbbb&b]",
+ rules_b="f",
+ rules_c="/",
+ rules_d="F",
+ trunk="moretrees:palm_trunk",
+ leaves="moretrees:palm_leaves",
+ angle=30,
+ iterations=2,
+ random_level=0,
+ trunk_type="single",
+ thin_branches=true,
+ fruit="moretrees:coconut",
+ fruit_chance=0
}
-spruce_model1={
-axiom="FFFFFAFFFFFFBFFFFFFCFFFFFFDFFFFFF[&&&F^^FF][&&&++F^^FF][&&&++++F^^FF][&&&++++++F^^FF][&&&--F^^FF][&&&----F^^FF][FFFFf]",
-rules_a="[&&&FFFFFF^^FFF][&&&++FFFFFF^^FFF][&&&++++FFFFFF^^FFF][&&&++++++FFFFFF^^FFF][&&&--FFFFFF^^FFF][&&&----FFFFFF^^FFF]",
-rules_b="[&&&FFFFF^^FFF][&&&++FFFFF^^FFF][&&&++++FFFFF^^FFF][&&&++++++FFFFF^^FFF][&&&--FFFFF^^FFF][&&&----FFFFF^^FFF]",
-rules_c="[&&&FFFF^^FFF][&&&++FFFF^^FFF][&&&++++FFFF^^FFF][&&&++++++FFFF^^FFF][&&&--FFFF^^FFF][&&&----FFFF^^FFF]",
-rules_d="[&&&FFF^^FFF][&&&++FFF^^FFF][&&&++++FFF^^FFF][&&&++++++FFF^^FFF][&&&--FFF^^FFF][&&&----FFF^^FFF]",
-trunk="moretrees:spruce_trunk",
-leaves="moretrees:spruce_leaves",
-angle=30,
-iterations=2,
-random_level=0,
-trunk_type="crossed",
-thin_branches=true,
-fruit="moretrees:cone",
-fruit_chance=8
+moretrees.spruce_model1={
+ axiom="FFFFFAFFFFFFBFFFFFFCFFFFFFDFFFFFF[&&&F^^FF][&&&++F^^FF][&&&++++F^^FF][&&&++++++F^^FF][&&&--F^^FF][&&&----F^^FF][FFFFf]",
+ rules_a="[&&&FFFFFF^^FFF][&&&++FFFFFF^^FFF][&&&++++FFFFFF^^FFF][&&&++++++FFFFFF^^FFF][&&&--FFFFFF^^FFF][&&&----FFFFFF^^FFF]",
+ rules_b="[&&&FFFFF^^FFF][&&&++FFFFF^^FFF][&&&++++FFFFF^^FFF][&&&++++++FFFFF^^FFF][&&&--FFFFF^^FFF][&&&----FFFFF^^FFF]",
+ rules_c="[&&&FFFF^^FFF][&&&++FFFF^^FFF][&&&++++FFFF^^FFF][&&&++++++FFFF^^FFF][&&&--FFFF^^FFF][&&&----FFFF^^FFF]",
+ rules_d="[&&&FFF^^FFF][&&&++FFF^^FFF][&&&++++FFF^^FFF][&&&++++++FFF^^FFF][&&&--FFF^^FFF][&&&----FFF^^FFF]",
+ trunk="moretrees:spruce_trunk",
+ leaves="moretrees:spruce_leaves",
+ angle=30,
+ iterations=2,
+ random_level=0,
+ trunk_type="crossed",
+ thin_branches=true,
+ fruit="moretrees:cone",
+ fruit_chance=8
}
-spruce_model2={
-axiom="FFFFFFBFFFFFFCFFFFFFDFFFFFF[&&&F^^FF][&&&++F^^FF][&&&++++F^^FF][&&&++++++F^^FF][&&&--F^^FF][&&&----F^^FF][FFFFf]",
-rules_b="[&&&FFFFF^^FFF][&&&++FFFFF^^FFF][&&&++++FFFFF^^FFF][&&&++++++FFFFF^^FFF][&&&--FFFFF^^FFF][&&&----FFFFF^^FFF]",
-rules_c="[&&&FFFF^^FFF][&&&++FFFF^^FFF][&&&++++FFFF^^FFF][&&&++++++FFFF^^FFF][&&&--FFFF^^FFF][&&&----FFFF^^FFF]",
-rules_d="[&&&FFF^^FFF][&&&++FFF^^FFF][&&&++++FFF^^FFF][&&&++++++FFF^^FFF][&&&--FFF^^FFF][&&&----FFF^^FFF]",
-trunk="moretrees:spruce_trunk",
-leaves="moretrees:spruce_leaves",
-angle=30,
-iterations=2,
-random_level=0,
-trunk_type="crossed",
-thin_branches=true,
-fruit="moretrees:cone",
-fruit_chance=8
+moretrees.spruce_model2={
+ axiom="FFFFFFBFFFFFFCFFFFFFDFFFFFF[&&&F^^FF][&&&++F^^FF][&&&++++F^^FF][&&&++++++F^^FF][&&&--F^^FF][&&&----F^^FF][FFFFf]",
+ rules_b="[&&&FFFFF^^FFF][&&&++FFFFF^^FFF][&&&++++FFFFF^^FFF][&&&++++++FFFFF^^FFF][&&&--FFFFF^^FFF][&&&----FFFFF^^FFF]",
+ rules_c="[&&&FFFF^^FFF][&&&++FFFF^^FFF][&&&++++FFFF^^FFF][&&&++++++FFFF^^FFF][&&&--FFFF^^FFF][&&&----FFFF^^FFF]",
+ rules_d="[&&&FFF^^FFF][&&&++FFF^^FFF][&&&++++FFF^^FFF][&&&++++++FFF^^FFF][&&&--FFF^^FFF][&&&----FFF^^FFF]",
+ trunk="moretrees:spruce_trunk",
+ leaves="moretrees:spruce_leaves",
+ angle=30,
+ iterations=2,
+ random_level=0,
+ trunk_type="crossed",
+ thin_branches=true,
+ fruit="moretrees:cone",
+ fruit_chance=8
}
-pine_model={
-axiom="FFFFFcccdddB///cFdFB////cFdFB///cFdFB///cFdFA///cFdFA///cFdFB[FF]f",
-rules_a="[&&&TTTT[++^TFdd][--&TFd]//Tdd[+^Fd][--&Fdd]]",
-rules_b="[&&&TTT[++^Fdd][--&Fdd]//dd[+^d][--&Fd]]",
-rules_c="/",
-rules_d="F",
-trunk="moretrees:pine_trunk",
-leaves="moretrees:pine_leaves",
-angle=30,
-iterations=2,
-random_level=0,
-trunk_type="single",
-thin_branches=true,
-fruit="moretrees:pine_cone",
-fruit_chance=8
+moretrees.pine_model={
+ axiom="FFFFFcccdddB///cFdFB////cFdFB///cFdFB///cFdFA///cFdFA///cFdFB[FF]f",
+ rules_a="[&&&TTTT[++^TFdd][--&TFd]//Tdd[+^Fd][--&Fdd]]",
+ rules_b="[&&&TTT[++^Fdd][--&Fdd]//dd[+^d][--&Fd]]",
+ rules_c="/",
+ rules_d="F",
+ trunk="moretrees:pine_trunk",
+ leaves="moretrees:pine_leaves",
+ angle=30,
+ iterations=2,
+ random_level=0,
+ trunk_type="single",
+ thin_branches=true,
+ fruit="moretrees:pine_cone",
+ fruit_chance=8
}
-willow_model={
-axiom="FFFFFFFFccA",
-rules_a="[&FF&FFFF&&F&FFFFFFFdddd][**&FF&FFFF&&F&FFFFFFFdddd][//&FF&FFFF&&F&FFFFFFFdddd][////&FF&FFFF&&F&FFFFFFFdddd][//////&FF&FFFF&&F&FFFFFFFdddd][////////&FF&FFFF&&F&FFFFFFFdddd]",
-rules_c="/",
-rules_d="F",
-trunk="moretrees:willow_trunk",
-leaves="moretrees:willow_leaves",
-angle=30,
-iterations=2,
-random_level=0,
-trunk_type="crossed",
-thin_branches=true
+moretrees.willow_model={
+ axiom="FFFFFFFFccA",
+ rules_a="[&FF&FFFF&&F&FFFFFFFdddd][**&FF&FFFF&&F&FFFFFFFdddd][//&FF&FFFF&&F&FFFFFFFdddd][////&FF&FFFF&&F&FFFFFFFdddd][//////&FF&FFFF&&F&FFFFFFFdddd][////////&FF&FFFF&&F&FFFFFFFdddd]",
+ rules_c="/",
+ rules_d="F",
+ trunk="moretrees:willow_trunk",
+ leaves="moretrees:willow_leaves",
+ angle=30,
+ iterations=2,
+ random_level=0,
+ trunk_type="crossed",
+ thin_branches=true
}
-rubber_tree={
-axiom="FFFFA",
-rules_a="[&FFBFA]////[&BFFFA]////[&FBFFA]",
-rules_b="[&FFA]////[&FFA]////[&FFA]",
-trunk="moretrees:rubber_tree_trunk",
-leaves="moretrees:rubber_tree_leaves",
-angle=35,
-iterations=3,
-random_level=1,
-trunk_type="double",
-thin_branches=true
+moretrees.rubber_tree_model={
+ axiom="FFFFA",
+ rules_a="[&FFBFA]////[&BFFFA]////[&FBFFA]",
+ rules_b="[&FFA]////[&FFA]////[&FFA]",
+ trunk="moretrees:rubber_tree_trunk",
+ leaves="moretrees:rubber_tree_leaves",
+ angle=35,
+ iterations=3,
+ random_level=1,
+ trunk_type="double",
+ thin_branches=true
}
moretrees.jungletree_model={
@@ -208,5 +208,6 @@ moretrees.conifer_model={
angle=45,
iterations=7,
random_level=5,
- thin_trunks=true
+ trunk_type="single",
+ thin_branches=true
}