i need help with modding

User avatar
durtective6
Member
 
Posts: 167
Joined: Sun Aug 12, 2012 14:19
In-game: derplez

i need help with modding

by durtective6 » Wed Oct 16, 2013 17:40

im trying to make new trees for my mod but dont know where to start could someone help me please? im just looking to make trees like the apple trees but with different fruit and maybe different wood types.
 

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

by Topywo » Wed Oct 16, 2013 18:26

You need to find out if you want to generate new trees or modify existing.

You could take a look at other mods: moretrees, tiny trees, the trees from farming plus and more (at least there must also be somewhere a mod making fruittrees (I can't find the link)).

When using existing trees ABM-ing some leaves into fruit would be sufficient.
 

User avatar
durtective6
Member
 
Posts: 167
Joined: Sun Aug 12, 2012 14:19
In-game: derplez

by durtective6 » Wed Oct 16, 2013 20:52

Thanks for the help, i think i would just like to generate new trees
 

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

by Topywo » Wed Oct 16, 2013 21:31

durtective6 wrote:Thanks for the help, i think i would just like to generate new trees


You could try to use the moretrees code with the L-system. There's info about it in minetest/doc/lua_api.txt
and here https://forum.minetest.net/viewtopic.php?id=4766

or

Use the code from farming plus (under init.lua and cocoa.lua/bananas.lua)

or

An old one I sometimes used, conifers:
https://forum.minetest.net/viewtopic.php?id=1453



Good luck!
 

User avatar
durtective6
Member
 
Posts: 167
Joined: Sun Aug 12, 2012 14:19
In-game: derplez

by durtective6 » Thu Oct 17, 2013 10:04

k thanks for the help
 

leetelate
Member
 
Posts: 205
Joined: Thu Aug 29, 2013 18:07

by leetelate » Sat Oct 19, 2013 20:47

gak! - if you make the example treedef in the lua.doc.txt you get this monster - i just wanted a pear tree like the default apple trees!!!

Image
pear_tree={
axiom="FFFFFAFFBF",
rules_a="[&&&FFFFF&&FFFF][&&&++++FFFFF&&FFFF][&&&----FFFFF&&FFFF]",
rules_b="[&&&++FFFFF&&FFFF][&&&--FFFFF&&FFFF][&&&------FFFFF&&FFFF]",
trunk="mylovelytree:peartrunk",
leaves="mylovelytree:pearleaves",
angle=30,
iterations=2,
random_level=0,
trunk_type="single",
thin_branches=true,
fruit_chance=10,
fruit="mylovelytree:pearfruit"
}
OUCH!!!

anybody have axiom/treedef for the regular default-size tree?
Last edited by leetelate on Sat Oct 19, 2013 20:49, edited 1 time in total.
MT IS MC'S SMARTER BROTHER
minetest 0.4.8 compiled from latest git on linux mint 15 with qjoypad and wired 360 controller
freeminer, pilztest, buildcraft and next are the idea factories
my minetest page is http://1337318.zymichost.com if zymic isn't down - meh, it is free...
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sat Oct 19, 2013 21:12

leetelate wrote:anybody have axiom/treedef for the regular default-size tree?

The default tree is hardcoded, not created by axioms for the l-system. Look at src/treegen.cpp
I suggest you to use schematics, though.
Last edited by PilzAdam on Sat Oct 19, 2013 21:13, edited 1 time in total.
 

leetelate
Member
 
Posts: 205
Joined: Thu Aug 29, 2013 18:07

by leetelate » Sat Oct 19, 2013 21:18

PilzAdam wrote:
leetelate wrote:anybody have axiom/treedef for the regular default-size tree?

The default tree is hardcoded, not created by axioms for the l-system. Look at src/treegen.cpp
I suggest you to use schematics, though.


thanks - i'll take a crack at coding a L-treegen for it just for the sheer pleasure or working it out!
MT IS MC'S SMARTER BROTHER
minetest 0.4.8 compiled from latest git on linux mint 15 with qjoypad and wired 360 controller
freeminer, pilztest, buildcraft and next are the idea factories
my minetest page is http://1337318.zymichost.com if zymic isn't down - meh, it is free...
 

leetelate
Member
 
Posts: 205
Joined: Thu Aug 29, 2013 18:07

by leetelate » Sun Oct 20, 2013 04:17

done and dusted

Image

pear_tree={
axiom="TTTATBfA",
rules_a = "[&&G^G-f-ff-fc-fff-fdf-fcff-ffcf-fffdf]",
rules_b = "[&&G^G-f-fc-ff-fdf-fff-ffdf-fdff-cfdff]",
rules_c = "G",
rules_d = "R",
trunk="mylovelytree:peartrunk",
leaves="mylovelytree:pearleaves",
angle=90,
fruit="mylovelytree:pearfruit"
}

even used the random c & d, but not the trunks and branches and random iterations since there is no room for that in the small tree

the cpp ones are way faster, even generating the random cpp way in lua is faster - L-system makes nice trees but sadly i'll prolly never use them

it was fun to make the treegen though - working out the upside-down turning turtle dragging the tail to draw the nodes
Last edited by leetelate on Sun Oct 20, 2013 04:22, edited 1 time in total.
MT IS MC'S SMARTER BROTHER
minetest 0.4.8 compiled from latest git on linux mint 15 with qjoypad and wired 360 controller
freeminer, pilztest, buildcraft and next are the idea factories
my minetest page is http://1337318.zymichost.com if zymic isn't down - meh, it is free...
 

User avatar
durtective6
Member
 
Posts: 167
Joined: Sun Aug 12, 2012 14:19
In-game: derplez

by durtective6 » Sun Oct 27, 2013 12:09

how would i go about coding fruit and saplings?
Last edited by durtective6 on Sun Oct 27, 2013 12:12, edited 1 time in total.
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 10 guests

cron