[Mod] Simple Snow [snow]

Post Reply
Frai
Member
Posts: 14
Joined: Tue Apr 22, 2014 05:51

[Mod] Simple Snow [snow]

by Frai » Post

Hello
This mod is thought as a simple alternative to Splizard's snow mod. Since it doesn't make sense to use both [snow] mods, I think I can call this one [snow] too.

It adds snow on the highest hills of mapgenv6 and makes it possible to produce ice, snowbricks and more snow.

Dependecies: default, makes use of buckets too

License: WTFPL, Texture is CC BY-SA (I just edited the default:snowblock texture a bit)

Download: https://www.dropbox.com/s/tky0dmyt9ix9eb2/snow.zip

And here's the story which explains the mod:
One morning i found a bit of snow on a hill.
Image
I collected it and thought about what to do with it. I looked up and i had an idea. Up in the sky it's much colder than down here. So I built a tower higher than the clouds(!). I climbed up, taking the snow (which I compressed to handy 1 squaremeter cubes and 2 buckets of water with me. Filling a pool with water and putting the snowblocks in it was a great idea, the water froze to ice.
Image
Back down I began thinking again, took some water, a stone pick and some ice and tried around, till I found out how to turn the ice into snow again. And I also was able to craft some snow bricks, that one was pretty easy.
Image
Now I'm living happily in my iglu on the beach. Minetest is full of magic...
Image
Last edited by Frai on Wed May 14, 2014 08:36, edited 10 times in total.

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Simple Snow Mod [snow]

by Krock » Post

Spoiler
Frai wrote:

Code: Select all

if minetest.get_node({x,y,z}).name ~= "air" then

Code: Select all

local nodeabove = y+1
minetest.set_node({x, nodeabove, z}, {name="default:snow"})

Code: Select all

if minetest.get_node({x=x,y=y,z=z}).name ~= "air" then

Code: Select all

minetest.set_node({x=x, y=y+1, z=z}, {name="default:snow"})
I'm sure there's a faster way to do this without minetest.get_node, also this will put snow on top of every node. Flowers, flowing water...

Code: Select all

minetest.register_on_generated(function(minp, maxp, seed)
   local LSH = 10  -- light snow height
   local HSH = 32  -- heavy snow height, thought for snowblocks, not it use yet
+  if maxp.y < LSH then return end
^-- instead of "if ... then [much codes] end"
Last edited by Krock on Mon May 12, 2014 17:25, edited 1 time in total.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

Frai
Member
Posts: 14
Joined: Tue Apr 22, 2014 05:51

Re: Simple Snow Mod [snow]

by Frai » Post

many thanks, vielenvielendank, x=x did it, i should have copied the code correctly, me stupid
i'll set LSH to 30, or even higher, 10 was only for testing purposes, i just want to have a bit of snow on the top of the highest hills mgv6 generates. havent found any flowers with a snowlayer on top of them, seems like they get "deleted" by the snow, thats how i want it.
and there is no water at all up there, so this isnt a problem too.
only thing is that theres no snow underneath trees, i mean, under the leaves. at the moment it looks like it has snowed just a little bit, my big badass mod is already done, kind of :D

edit: you were right, checking so many nodes is noticable, when flying around generating land. not much, but a bit.
am trying to get smart by reading code of the real [snow] mod by splizard, and in dev.minetest.net/Voxel_Manipulator, wish me luck

Frai
Member
Posts: 14
Joined: Tue Apr 22, 2014 05:51

Re: [Mod] Simple Snow Mod [snow]

by Frai » Post

Updated, pushing topic up again, sorry if thats annoying :)

Frai
Member
Posts: 14
Joined: Tue Apr 22, 2014 05:51

Re: [Mod] Simple Snow [snow]

by Frai » Post

Updated, now the snow doesn't appear that suddenly anymore. On this image I'm using the indev-mapgen
Image

User avatar
Calinou
Moderator
Posts: 3169
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

Re: [Mod] Simple Snow [snow]

by Calinou » Post

This mod slows down map generation quite a bit.

User avatar
BlockMen
Developer
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen
Location: Germany

Re: [Mod] Simple Snow [snow]

by BlockMen » Post

Calinou wrote:This mod slows down map generation quite a bit.
Knowing this problem from the snow caps in MT+ and Wasteland. With voxelmanip it works better ;)

Frai
Member
Posts: 14
Joined: Tue Apr 22, 2014 05:51

Re: [Mod] Simple Snow [snow]

by Frai » Post

Mod has been updated, generates terrain faster now.

Haven't noticed that MT+ has snow on the hills too. And thanks to your simple use of voxelmanip there i finally figured out how to use it. But I have a feeling now my mod isn't really useful :(

User avatar
Calinou
Moderator
Posts: 3169
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

Re: [Mod] Simple Snow [snow]

by Calinou » Post

Frai wrote:Mod has been updated, generates terrain faster now.

Haven't noticed that MT+ has snow on the hills too. And thanks to your simple use of voxelmanip there i finally figured out how to use it. But I have a feeling now my mod isn't really useful :(
Carbone also has snow (added your mod, heavily tweaked) which even uses C++ ore generation. It's very fast.

Frai
Member
Posts: 14
Joined: Tue Apr 22, 2014 05:51

Re: [Mod] Simple Snow [snow]

by Frai » Post

Carbone also has snow (added your mod, heavily tweaked) which even uses C++ ore generation. It's very fast.
It's an interesting approach, using the ore generation for it. Although my personal taste prefers to pick up the snow from the ground, not having to dig the earth with it. And when I tried Carbone, it generated kind of a belt of snow around the hills, most of the time.
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests