[Mod] Snow Biomes [4.0] [snow]

User avatar
Hybrid Dog
Member
 
Posts: 2733
Joined: Thu Nov 01, 2012 12:46

Re: [Mod] Snow Biomes [3.2] [snow]

by Hybrid Dog » Sun Feb 08, 2015 16:11

snowing in the desert…
Image
Attachments
desert_snow.png
(372.08 KiB) Not downloaded yet

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪
 

User avatar
Splizard
Member
 
Posts: 224
Joined: Wed Jan 25, 2012 07:20
Location: New Zealand
GitHub: Splizard
IRC: Splizard
In-game: Splizard

Re: [Mod] Snow Biomes [3.2] [snow]

by Splizard » Sun Feb 08, 2015 20:41

Does it make a difference where you are in the desert?
Snow should only fall in a biome specified area.. which can still be in a desert but it shouldn't be the whole desert..
Games: The Hungry Games Mods: Lifters (Simple Lifts), Snow Biomes and Gates. Also checkout my texture pack Gridtoon!
 

User avatar
Hybrid Dog
Member
 
Posts: 2733
Joined: Thu Nov 01, 2012 12:46

Re: [Mod] Snow Biomes [3.2] [snow]

by Hybrid Dog » Tue Feb 10, 2015 18:11

Splizard wrote:Does it make a difference where you are in the desert?
Snow should only fall in a biome specified area.. which can still be in a desert but it shouldn't be the whole desert..

Yes, it's just a part of the desert. But l think that snow falling in a desert next to a cactus and a palm tree is a bit strange.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪
 

User avatar
Echoes91
Member
 
Posts: 71
Joined: Thu Feb 19, 2015 13:21
Location: Lombardy, Italy
In-game: Echoes

Re: [Mod] Snow Biomes [3.2] [snow]

by Echoes91 » Mon Feb 23, 2015 13:56

Since pines are now in default, I think you could replace all
Code: Select all
snow:pinetree, snow:needles, snow:sapling_pine

with
Code: Select all
default:pinetree, default:pine_needles, default:pine_sapling
"It wasn't easy to break so many functions by editing a single line"
 

User avatar
Diamond knight
Member
 
Posts: 473
Joined: Sun Apr 19, 2015 19:50
Location: Chilling in Constantinople
GitHub: Diamondknight
In-game: Ferrumprinceps

Re: [Mod] Snow Biomes [3.2] [snow]

by Diamond knight » Mon Apr 27, 2015 22:04

do you know any seeds that will generate a snow biome at your spawn
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
Location: On earth
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun

Re: [Mod] Snow Biomes [3.2] [snow]

by Minetestforfun » Mon Apr 27, 2015 22:22

@Diamond knight
You can also simply set a spawn in snow biome :)

@Splizard
I've also snow falling in desert in my server (mapgenv6, very similar to Carbone default)
 

User avatar
Don
Member
 
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod] Snow Biomes [3.2] [snow]

by Don » Tue Apr 28, 2015 02:24

It wasn't too long ago that Afghanistan had a major snow storm. Snow falls in the desert sometimes
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

User avatar
Hybrid Dog
Member
 
Posts: 2733
Joined: Thu Nov 01, 2012 12:46

Re: [Mod] Snow Biomes [3.2] [snow]

by Hybrid Dog » Tue Apr 28, 2015 15:47

Shall l disable snowflakes in desert or make it rare?

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪
 

User avatar
mahmutelmas06
Member
 
Posts: 367
Joined: Mon Mar 02, 2015 13:10
GitHub: mahmutelmas06
IRC: mahmutelmas06
In-game: masum

Re: [Mod] Snow Biomes [3.2] [snow]

by mahmutelmas06 » Thu Apr 30, 2015 23:19

Hybrid Dog wrote:Shall l disable snowflakes in desert or make it rare?


In my opinion its better to disable in desert.
My Mods:

Beverage
 

User avatar
Hybrid Dog
Member
 
Posts: 2733
Joined: Thu Nov 01, 2012 12:46

Re: [Mod] Snow Biomes [3.2] [snow]

by Hybrid Dog » Fri May 01, 2015 17:39


‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪
 

Ivà
Member
 
Posts: 115
Joined: Sun Feb 22, 2015 07:11
Location: Catalonia
GitHub: melzua
IRC: melzua
In-game: melzua

Re: [Mod] Snow Biomes [3.2] [snow]

by Ivà » Sun May 03, 2015 21:31

I've got crashes like:
Code: Select all
terminate called after throwing an instance of 'ServerError'
  what():  .../.minetest/games/hogwarts/mods/snow/src/falling_snow.lua:99: attempt to perform arithmetic on local 'x' (a nil value)
stack traceback:
   .../.minetest/games/hogwarts/mods/snow/src/falling_snow.lua:99: in function 'get_snow'
   .../.minetest/games/hogwarts/mods/snow/src/falling_snow.lua:191: in function <.../.minetest/games/hogwarts/mods/snow/src/falling_snow.lua:183>
   /usr/share/minetest/builtin/game/register.lua:341: in function </usr/share/minetest/builtin/game/register.lua:329>


Changing the get_snow function code as below solves the crash:

Code: Select all
--Get snow at position.
local get_snow = function(pos)
        --Legacy support.
        if weather_legacy == "snow" then
                local perlin1 = minetest.get_perlin(112,3, 0.5, 150)
                local x = pos.x
                local y = pos.z
                if perlin1:get2d({x, y}) <= 0.53 then
                        return false
                end

                -- disable falling snow in desert
                local desert_perlin = minetest.get_perlin(SEEDDIFF3, OCTAVES3, PERSISTENCE3, SCALE3)
                local noise3 = desert_perlin:get2d({x=x+150,y=y+50}) -- Offsets must match minetest mapgen desert perlin.
                if noise3 > 0.35 then -- Smooth transition 0.35 to 0.45.
                        return false
                end
                return true
        end
        return false
end
 

User avatar
Hybrid Dog
Member
 
Posts: 2733
Joined: Thu Nov 01, 2012 12:46

Re: [Mod] Snow Biomes [3.2] [snow]

by Hybrid Dog » Mon May 04, 2015 15:32

Ivà wrote:I've got crashes like:
Code: Select all
terminate called after throwing an instance of 'ServerError'
  what():  .../.minetest/games/hogwarts/mods/snow/src/falling_snow.lua:99: attempt to perform arithmetic on local 'x' (a nil value)
stack traceback:
   .../.minetest/games/hogwarts/mods/snow/src/falling_snow.lua:99: in function 'get_snow'
   .../.minetest/games/hogwarts/mods/snow/src/falling_snow.lua:191: in function <.../.minetest/games/hogwarts/mods/snow/src/falling_snow.lua:183>
   /usr/share/minetest/builtin/game/register.lua:341: in function </usr/share/minetest/builtin/game/register.lua:329>


Changing the get_snow function code as below solves the crash:

Code: Select all
--Get snow at position.
local get_snow = function(pos)
        --Legacy support.
        if weather_legacy == "snow" then
                local perlin1 = minetest.get_perlin(112,3, 0.5, 150)
                local x = pos.x
                local y = pos.z
                if perlin1:get2d({x, y}) <= 0.53 then
                        return false
                end

                -- disable falling snow in desert
                local desert_perlin = minetest.get_perlin(SEEDDIFF3, OCTAVES3, PERSISTENCE3, SCALE3)
                local noise3 = desert_perlin:get2d({x=x+150,y=y+50}) -- Offsets must match minetest mapgen desert perlin.
                if noise3 > 0.35 then -- Smooth transition 0.35 to 0.45.
                        return false
                end
                return true
        end
        return false
end

thanks, now its not longer untested and should work
https://github.com/Splizard/minetest-mo ... 65c046f500

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪
 

Ivà
Member
 
Posts: 115
Joined: Sun Feb 22, 2015 07:11
Location: Catalonia
GitHub: melzua
IRC: melzua
In-game: melzua

Re: [Mod] Snow Biomes [3.2] [snow]

by Ivà » Mon May 04, 2015 20:53

Ehmm... but... I didn't dig into the code so I'm not sure that x and y got the intended values here, for example in noise3 assignment there was a 'z' laying around... :-)
 

User avatar
Hybrid Dog
Member
 
Posts: 2733
Joined: Thu Nov 01, 2012 12:46

Re: [Mod] Snow Biomes [3.2] [snow]

by Hybrid Dog » Tue May 05, 2015 14:34

Ivà wrote:Ehmm... but... I didn't dig into the code so I'm not sure that x and y got the intended values here, for example in noise3 assignment there was a 'z' laying around... :-)

l forgot to change "x, z", what l copied from the meru mod.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪
 

User avatar
paramat
Developer
 
Posts: 3580
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

Re: [Mod] Snow Biomes [3.2] [snow]

by paramat » Tue May 05, 2015 17:14

There's a new bug that was posted as an engine issue on Github https://github.com/minetest/minetest/issues/2672
The latest commit by melzua is wrong, 'get2D()' doesn't have the form '{x = ..., y = ...}':
Code: Select all
if perlin1:get2d({x, y}) <= 0.53 then

2D noise always uses abstract variables x and y, these then represent world position x and z.

You left x and z undefined when calculating noise3:
Code: Select all
local noise3 = desert_perlin:get2d({x=x+150,y=z+50}) -- Offsets must match minetest mapgen desert perlin.

The correct code is:
Code: Select all
--Get snow at position.
local get_snow = function(pos)
   --Legacy support.
   if weather_legacy == "snow" then
      local perlin1 = minetest.get_perlin(112,3, 0.5, 150)
      if perlin1:get2d({x=pos.x, y=pos.z}) <= 0.53 then
         return false
      end

      -- disable falling snow in desert
      local desert_perlin = minetest.get_perlin(SEEDDIFF3, OCTAVES3, PERSISTENCE3, SCALE3)
      local noise3 = desert_perlin:get2d({x=pos.x+150,y=pos.z+50}) -- Offsets must match minetest mapgen desert perlin.
      if noise3 > 0.35 then -- Smooth transition 0.35 to 0.45.
         return false
      end
      return true
   end
   return false
end
 

User avatar
Hybrid Dog
Member
 
Posts: 2733
Joined: Thu Nov 01, 2012 12:46

Re: [Mod] Snow Biomes [3.2] [snow]

by Hybrid Dog » Tue May 05, 2015 18:06

paramat wrote:There's a new bug that was posted as an engine issue on Github https://github.com/minetest/minetest/issues/2672
The latest commit by melzua is wrong, 'get2D()' doesn't have the form '{x = ..., y = ...}':
Code: Select all
if perlin1:get2d({x, y}) <= 0.53 then

2D noise always uses abstract variables x and y, these then represent world position x and z.

it should be fixed now
Ivà wrote "Changing the get_snow function code as below solves the crash", so l didn't look for such a mistake.

paramat wrote:You left x and z undefined when calculating noise3

l changed z to y when l did this commit https://github.com/Splizard/minetest-mo ... 65c046f500
and x and y are defined

Edit:l just tested falling snow and it worked for me.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪
 

User avatar
paramat
Developer
 
Posts: 3580
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

Re: [Mod] Snow Biomes [3.2] [snow]

by paramat » Tue May 05, 2015 18:38

That will work, but is messy and has unnecessary code, faster to use pos.x and pos.z directly as in my post.

Splizard, please can you remove my push access to this repo? I don't have time to be involved as a mod dev anymore.

Optional snow biomes are now added to 0.4.12dev mgv6 C++ mapgen, add "mgv6_spflags = snowbiomes" to your minetest.conf file.
 

Ivà
Member
 
Posts: 115
Joined: Sun Feb 22, 2015 07:11
Location: Catalonia
GitHub: melzua
IRC: melzua
In-game: melzua

Re: [Mod] Snow Biomes [3.2] [snow]

by Ivà » Tue May 05, 2015 20:16

Apologise for the mistake, was late at night for me and did a quick fix to solve the crash but I didn't dig more into the code.

So sorry.
 

User avatar
paramat
Developer
 
Posts: 3580
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

Re: [Mod] Snow Biomes [3.2] [snow]

by paramat » Tue May 05, 2015 23:22

Hey no problem =)

The abstract internal variables x, y used by 2D perlin noise are often confused with world co-ordinates so it's best they only ever appear inside get2d() as [x = ..., y = ...}.
 

User avatar
Hybrid Dog
Member
 
Posts: 2733
Joined: Thu Nov 01, 2012 12:46

Re: [Mod] Snow Biomes [3.2] [snow]

by Hybrid Dog » Wed May 06, 2015 15:40

paramat wrote:That will work, but is messy and has unnecessary code, faster to use pos.x and pos.z directly as in my post.

ok, l edited it.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪
 

User avatar
Splizard
Member
 
Posts: 224
Joined: Wed Jan 25, 2012 07:20
Location: New Zealand
GitHub: Splizard
IRC: Splizard
In-game: Splizard

Re: [Mod] Snow Biomes [3.2] [snow]

by Splizard » Wed May 13, 2015 03:52

@Paramat I have removed your push access as you requested.
@Hybrid Dog nice to see you have been working on snow mod :)
let me know if you want me to release a new version!
Games: The Hungry Games Mods: Lifters (Simple Lifts), Snow Biomes and Gates. Also checkout my texture pack Gridtoon!
 

User avatar
Hybrid Dog
Member
 
Posts: 2733
Joined: Thu Nov 01, 2012 12:46

Re: [Mod] Snow Biomes [3.2] [snow]

by Hybrid Dog » Wed May 13, 2015 13:08

ok

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
Location: On earth
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun

Re: [Mod] Snow Biomes [3.2] [snow]

by Minetestforfun » Tue Jun 02, 2015 15:27

The Sled doesn't work for me, can you check it please ? :)
(i would create a event with it :p)
 

User avatar
Splizard
Member
 
Posts: 224
Joined: Wed Jan 25, 2012 07:20
Location: New Zealand
GitHub: Splizard
IRC: Splizard
In-game: Splizard

Re: [Mod] Snow Biomes [3.2] [snow]

by Splizard » Wed Jun 03, 2015 22:45

@Minetestforfun
Sleds should be fixed in the latest development version :)
Games: The Hungry Games Mods: Lifters (Simple Lifts), Snow Biomes and Gates. Also checkout my texture pack Gridtoon!
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
Location: On earth
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun
 

PreviousNext

Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 7 guests