Leaf decay mod by MarkTraceur

Post Reply
MarkTraceur
Member
Posts: 103
Joined: Sat Dec 03, 2011 05:41
Location: San Francisco, CA
Contact:

Leaf decay mod by MarkTraceur

by MarkTraceur » Post

Leaf decay, originally implemented in C++ for 0.31, re-implemented in Lua for 0.4.

https://gitorious.org/marktraceur-minet ... leaf_decay

Changelog/download links:

= Version 0.2 2011-12-04 =
https://gitorious.org/marktraceur-minet ... arball/0.2
* Keep player-placed blocks from decaying

= Version 0.1 - 2011-12-04 =
https://gitorious.org/marktraceur-minet ... arball/0.1
Initial release.
+ leaf decay
+ apple decay
Last edited by MarkTraceur on Mon Dec 05, 2011 05:25, edited 1 time in total.
Mods: https://gitorious.org/marktraceur-minetest-mods
IRC: marktraceur on freenode

bwog
Member
Posts: 283
Joined: Wed Nov 30, 2011 14:09
Location: United States
Contact:

by bwog » Post

How fast are they supposed to decay? I waited a minute and nothing went away. A few minutes later though I got an error that I can't remember what it was for. I used the latest dev release.

MarkTraceur
Member
Posts: 103
Joined: Sat Dec 03, 2011 05:41
Location: San Francisco, CA
Contact:

by MarkTraceur » Post

It should be pretty much instantaneous--definitely under 30 seconds. Strange that you got an error, though. It might work better with the absolute, bleeding edge, up-to-the-minute dev code on GitHub, would you mind testing? I'd much rather support that than transient dev releases.
Mods: https://gitorious.org/marktraceur-minetest-mods
IRC: marktraceur on freenode

bwog
Member
Posts: 283
Joined: Wed Nov 30, 2011 14:09
Location: United States
Contact:

by bwog » Post

MarkTraceur wrote:It should be pretty much instantaneous--definitely under 30 seconds. Strange that you got an error, though. It might work better with the absolute, bleeding edge, up-to-the-minute dev code on GitHub, would you mind testing? I'd much rather support that than transient dev releases.
I've looked around on GitHub but can't find how to get the latest release. I can only find individual files.

randomproof
Member
Posts: 214
Joined: Thu Nov 17, 2011 06:31
Location: California, USA

by randomproof » Post

Looking at the code I think this will only work on newly generated blocks, not old ones or saplings turned into trees, since they wouldn't have had param2 set.

bwog
Member
Posts: 283
Joined: Wed Nov 30, 2011 14:09
Location: United States
Contact:

by bwog » Post

I did generate a new world after adding the mod.

bwog
Member
Posts: 283
Joined: Wed Nov 30, 2011 14:09
Location: United States
Contact:

by bwog » Post

MarkTraceur wrote:It should be pretty much instantaneous--definitely under 30 seconds. Strange that you got an error, though. It might work better with the absolute, bleeding edge, up-to-the-minute dev code on GitHub, would you mind testing? I'd much rather support that than transient dev releases.
Again, where do I find the place to download the whole game with the latest files?

bcmpinc
Member
Posts: 30
Joined: Fri Jun 17, 2011 09:10

by bcmpinc » Post

You can download the latest version of minetest here: https://github.com/celeron55/minetest/zipball/master
However, this is only the source code. So you still need to compile it.
Last edited by bcmpinc on Thu Dec 08, 2011 14:37, edited 1 time in total.

bwog
Member
Posts: 283
Joined: Wed Nov 30, 2011 14:09
Location: United States
Contact:

by bwog » Post

bcmpinc wrote:You can download the latest version of minetest here: https://github.com/celeron55/minetest/zipball/master
However, this is only the source code. So you still need to compile it.
I'll pass on that. It takes like 5 programs on Windows.

User avatar
dannydark
Member
Posts: 428
Joined: Fri Aug 12, 2011 21:28
Location: Manchester, UK

by dannydark » Post

@bwog: you can find the latest compiled dev versions for windows here: https://github.com/celeron55/minetest/downloads

These are one's that Celeron55 compiles and releases, they might not always contain the very latest changes but they are usually kept pretty well up to date (also stable releases will also be found there)

bwog
Member
Posts: 283
Joined: Wed Nov 30, 2011 14:09
Location: United States
Contact:

by bwog » Post

Still doesn't do anything in the latest dev build. Where is the mods folder supposed to be? Maybe I have it in the wrong place.

EDIT: Never mind, found out where. I had it in the wrong place, that's probably why it didn't work...
Last edited by bwog on Fri Dec 09, 2011 17:02, edited 1 time in total.

User avatar
dannydark
Member
Posts: 428
Joined: Fri Aug 12, 2011 21:28
Location: Manchester, UK

by dannydark » Post

In your init.lua file you say:
-- NOTE: It is recommended that you add a line to your mapgen.cpp
-- if you want leaf decay to work with sapling-grown trees.
-- Specifically, under the following line:
-- MapNode applenode(LEGN(ndef, "CONTENT_APPLE"));
-- in mapgen.cpp, the function make_tree, you should add:
-- leavesnode.param2 = 1;
However, when I do this all trees generate with stone leaves lol.
Last edited by dannydark on Tue Dec 20, 2011 02:30, edited 1 time in total.

MarkTraceur
Member
Posts: 103
Joined: Sat Dec 03, 2011 05:41
Location: San Francisco, CA
Contact:

by MarkTraceur » Post

Ah! Yes, I forgot to change that line. It should be

Code: Select all

leavesnode.param2 |= 1;
Mods: https://gitorious.org/marktraceur-minetest-mods
IRC: marktraceur on freenode

User avatar
dannydark
Member
Posts: 428
Joined: Fri Aug 12, 2011 21:28
Location: Manchester, UK

by dannydark » Post

Thanks ^_^ will give that a try.

EDIT: Yeah that worked, cheers mate.
Last edited by dannydark on Tue Dec 20, 2011 02:50, edited 1 time in total.

User avatar
neko259
Member
Posts: 805
Joined: Sun Jun 19, 2011 06:51

by neko259 » Post

I get an error that your mod doesn't follow naming conventions.
s3tuPDfUv2IyvXHzPmE31MQvnWULv1zj

MarkTraceur
Member
Posts: 103
Joined: Sat Dec 03, 2011 05:41
Location: San Francisco, CA
Contact:

by MarkTraceur » Post

neko: Probably because you extracted it into a directory with a really long name. The path should look like so:

Code: Select all

..../data/mods/leaf_decay
If it has "marktraceur" anywhere in it, you did it wrong.
Mods: https://gitorious.org/marktraceur-minetest-mods
IRC: marktraceur on freenode

User avatar
neko259
Member
Posts: 805
Joined: Sun Jun 19, 2011 06:51

by neko259 » Post

Why don't you repack it to have a short name without additional renaming?
s3tuPDfUv2IyvXHzPmE31MQvnWULv1zj

MarkTraceur
Member
Posts: 103
Joined: Sat Dec 03, 2011 05:41
Location: San Francisco, CA
Contact:

by MarkTraceur » Post

If you check out the git repo (which is my first suggestion), you'll get a nicely named directory. I don't think gitorious allows me to change the name of the archive.

Your best bet is to

Code: Select all

tar xvzf <tarball name>
mv <directory name> leaf_decay
Mods: https://gitorious.org/marktraceur-minetest-mods
IRC: marktraceur on freenode

User avatar
neko259
Member
Posts: 805
Joined: Sun Jun 19, 2011 06:51

by neko259 » Post

Mmm, okay then :)
s3tuPDfUv2IyvXHzPmE31MQvnWULv1zj

User avatar
neko259
Member
Posts: 805
Joined: Sun Jun 19, 2011 06:51

by neko259 » Post

Please look at the mod from RTMMP. Your one doesn't work for me, and that one works.

https://github.com/Hackeridze/ru-true_m ... y/init.lua
Last edited by neko259 on Wed Jan 04, 2012 18:47, edited 1 time in total.
s3tuPDfUv2IyvXHzPmE31MQvnWULv1zj

User avatar
dannydark
Member
Posts: 428
Joined: Fri Aug 12, 2011 21:28
Location: Manchester, UK

by dannydark » Post

I updated the Leaf Decay mod to work with the latest 0.4dev as I needed it for my server, I also added a version string to it as I like to see what version of a mod I have on server start.

You can grab my updated version here: http://pastebin.com/XN5qeawR

Just replace the contents of the leaf_decay/init.lua file with that pastebin

I named it 0.3 (so I know that I have changed it from the original) but feel free to take my changes there wasn't many lol ^_^

User avatar
Arwym
Member
Posts: 31
Joined: Sat Mar 10, 2012 15:17
Location: Puerto Rico
Contact:

by Arwym » Post

So, is this working with 0.4?

User avatar
bgsmithjr
Member
Posts: 436
Joined: Thu Mar 08, 2012 23:21
Location: USA,Michigan

by bgsmithjr » Post

on build 03202012 clicking the fallen apples crashes the game, and if you remove the mod the game no longer launches.

Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests