[wip][mod] Rotting nodes: "Your house will rot!" [rot]

ryvnf
New member
 
Posts: 2
Joined: Sun Mar 22, 2015 17:03
GitHub: ryvnf
IRC: ryvnf
In-game: ryvnf

[wip][mod] Rotting nodes: "Your house will rot!" [rot]

by ryvnf » Fri Apr 10, 2015 18:06

WARNING: If you want to try this mod on your world you should definitely make a backup first. This mod will mess with your world and might destroy it. Use at your own risk!

Hello this is my first mod. I am not yet very proficient and comfortable with the modding API so this mod is far from perfect. This is the result of me playing around with active block modifiers.

This mod makes nodes rot into rotten nodes. Nodes can become rotten if they are in contact with air.

When a node rots it will transform into one of three different rotten nodes:

50 % chance (type #1)
    This node acts just like normal nodes.
25 % chance (type #2)
    This node acts like sand and will fall when nearby nodes get updated.
25 % chance (type #3)
    This node acts like a normal node but will "listen" for nearby entities. When it finds an entity it will turn into a falling node (type #2) and fall. This makes it risky to walk on rotten nodes as you never know when one might fall below your feet.

All three variations have the same texture and take the same amount of time to destroy. The player will recieve a node of type #1 when he/she destroys a rotten node.

Rot will also quickly spread to nearby nodes if the player does not remove the infected nodes.

By default rot will come to the world each 2nd hour with a chance of 1/16 for each node. It will then spread to nearby nodes each 30 minutes with a chance of 1/4. You can tweak these settings by changing the variables at the top of the "init.lua" file.

By default this mod will only make planks, pine planks and jungle planks rot. It is possible to make logs rot too but that is disabled since it will mess with the facing of the logs. If you want trees to rot but do not care about the facing you can add these lines at the end of the "init.lua" file.

Code: Select all
register_rotten_node("tree", "default:tree")
register_rotten_node("pinetree", "default:pinetree")
register_rotten_node("jungletree", "default:jungletree")


It would be cool if stairs could rot aswell but I have not figured out how to do that (suggestions are welcome).

I have released the code under WTFPL so feel free to do whatever you want with it.

Download: https://github.com/ryvnf/minetest-rot-mod

BUGS:

There is one major bug... It seems like every single node possible will become rotten instantly when the player is far away from the nodes when they rot. I have no idea of why this happens but I hope someone who is better with "Active Block Modifiers" can explain. :)
 

User avatar
davidthecreator
Member
 
Posts: 272
Joined: Mon Aug 18, 2014 19:48
Location: Lithuania
GitHub: daviddoesminetest
In-game: DavidDoesMinetest

Re: [wip][mod] Rotting nodes: "Your house will rot!" [rot]

by davidthecreator » Sun May 10, 2015 18:18

The node that falls on steping on it sounds realy great might be good for a parkour if someone would get lucky enough to make all wooden nodes that are suppost to fall rot the way it s suppost
And i think bricks will get popular to users of this mod
 

H-H-H
New member
 
Posts: 2
Joined: Fri Jul 17, 2015 22:13
IRC: H-H-H

Re: [wip][mod] Rotting nodes: "Your house will rot!" [rot]

by H-H-H » Fri Jul 17, 2015 22:19

Hi nice mod lookss like another I have seen. Can you confirm if the trees do actually rot if those lines are added? The one I found works fine except it doesnt rot the trees even with those lines added

Many Thanks
H-H-H
 


Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 2 guests