[Mod] Weather (Snow, Rain) [weather]

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

[Mod] Weather (Snow, Rain) [weather]

by Jeija » Sun Mar 24, 2013 16:14

Introducing: The weather mod (WIP)

Image
Image

At the moment it contains rain and snow. Snow will pile up if you uncomment a section in snow.lua where it says only for faster PCs.

It randomly starts and stops raining / snowing.
You can also manually control the precipitation using
Code: Select all
/setweather rain
/setweather snow
/setweather none

(requires weather privilege)

Download
as .zip | as .tar.gz

GitHub
Project page
Clone link

Make sure you are running the latest Git of Minetest and enable particles!

Dependencies: none
License:
  • Code: LGPL
  • Textures:
  • Snow cover: WTFPL
  • Rain / Snow: CC-BY-SA 3.0, credit goes to TeddyDesTodes, from his weather branch
Redstone for minetest: Mesecons (mesecons.net)
 

Nore
Developer
 
Posts: 469
Joined: Wed Nov 28, 2012 11:35
GitHub: Ekdohibs

by Nore » Sun Mar 24, 2013 17:22

A little suggestion for snow:

Code: Select all
-- Snow cover
for i=1,8 do
    local snow_box =
    {
        type  = "fixed",
        fixed = {-0.5, -0.5, -0.5, 0.5, -0.5 + i/8., 0.5}
    }
    minetest.register_node("weather:snow_cover"..tostring(i), {
        tiles = {"weather_snow_cover.png"},
        drawtype = "nodebox",
        paramtype = "light",
        node_box = snow_box,
        selection_box = snow_box,
        groups = {not_in_creative_inventory = 1, crumbly = 3, attached_node = 1},
        drop = {}
    })
end

minetest.register_alias("weather:snow_cover","weather:snow_cover1")
--[[ Enable this section if you have a very fast PC]]
minetest.register_abm({
    nodenames = {"group:crumbly", "group:snappy", "group:cracky", "group:choppy"},
    neighbors = {"default:air"},
    interval = 10.0,
    chance = 80,
    action = function (pos, node, active_object_count, active_object_count_wider)
        if weather == "snow" then
            if minetest.registered_nodes[node.name].drawtype == "normal"
            or minetest.registered_nodes[node.name].drawtype == "allfaces_optional" then
                local np = addvectors(pos, {x=0, y=1, z=0})
                if minetest.env:get_node_light(np, 0.5) == 15 and minetest.env:get_node(np).name=="air" then
                    minetest.env:add_node(np, {name="weather:snow_cover1"})
                end
            end
            local np = addvectors(pos, {x=0, y=1, z=0})
            if minetest.env:get_node_light(np, 0.5) == 15 then
                if node.name:find("weather:snow_cover")~=nil and node.name:sub(-1)~="8" then
                    minetest.env:set_node(pos,{name="weather:snow_cover"..tostring(1+tonumber(node.name:sub(-1)))})
                else
                    if minetest.env:get_node(np).name=="air" then
                        minetest.env:add_node(np, {name="weather:snow_cover1"})
                    end
                end
            end
        end
    end
})



The snow stacks, with 8 layers per node.
Last edited by Nore on Sun Mar 24, 2013 17:50, edited 1 time in total.
 

User avatar
snakevenom
Member
 
Posts: 119
Joined: Sat Sep 22, 2012 12:56
Location: worthing

by snakevenom » Sun Mar 24, 2013 18:07

my computer just had a heart attack

cool though
Last edited by snakevenom on Sun Mar 24, 2013 18:07, edited 1 time in total.
 

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

by Splizard » Mon Mar 25, 2013 04:51

Can I modify this for snow mod (GPL3/later)?
Games: The Hungry Games.
Mods: Lifters (Simple Lifts), Snow Biomes and Gates.
Also checkout my texture pack Gridtoon!
View all of them plus more at http://minetest.splizard.com! (may not always be online).
 

Nore
Developer
 
Posts: 469
Joined: Wed Nov 28, 2012 11:35
GitHub: Ekdohibs

by Nore » Mon Mar 25, 2013 05:24

My code is WTFPL.
Last edited by Nore on Mon Mar 25, 2013 05:29, edited 1 time in total.
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

by Jeija » Mon Mar 25, 2013 06:47

My code is LGPL, so yes, that's possible. But make sure you give credit to me and TeddyDesTodes.
Redstone for minetest: Mesecons (mesecons.net)
 

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

by Splizard » Mon Mar 25, 2013 07:17

Jeija wrote:My code is LGPL, so yes, that's possible. But make sure you give credit to me and TeddyDesTodes.

Alright thanks.
Games: The Hungry Games.
Mods: Lifters (Simple Lifts), Snow Biomes and Gates.
Also checkout my texture pack Gridtoon!
View all of them plus more at http://minetest.splizard.com! (may not always be online).
 

User avatar
Dopium
Member
 
Posts: 233
Joined: Sat Jun 09, 2012 15:43
Location: Australia

by Dopium » Mon Mar 25, 2013 09:36

Awesome this is what i been waiting for, too cool man.
+1

Edit: What to rename the folder to? I cant get it to work is same deal with animals aswell, none the other mods i use have this problem

debug: 20:14:52: ERROR[main]: Server: Failed to load and run C:\Documents and Settings\Dopium\Desktop\Latest Minetest 0.4.4 Complete With Mods Working\Minetest 0.4.5\minetest-0.4.5\bin\..\mods\minetest\weather\init.lua
20:14:52: ERROR[main]: ModError: Failed to load and run C:\Documents and Settings\Dopium\Desktop\Latest Minetest 0.4.4 Complete With Mods Working\Minetest 0.4.5\minetest-0.4.5\bin\..\mods\minetest\weather\init.lua
Last edited by Dopium on Mon Mar 25, 2013 09:57, edited 1 time in total.
Running @1.19 MHz, 128 bytes of RAM and interchangeable 4kb ROM carts!
 

rarkenin
Member
 
Posts: 668
Joined: Tue Nov 20, 2012 20:48

by rarkenin » Mon Mar 25, 2013 10:35

Dopium wrote:Awesome this is what i been waiting for, too cool man.
+1

Edit: What to rename the folder to? I cant get it to work is same deal with animals aswell, none the other mods i use have this problem

debug: 20:14:52: ERROR[main]: Server: Failed to load and run C:\Documents and Settings\Dopium\Desktop\Latest Minetest 0.4.4 Complete With Mods Working\Minetest 0.4.5\minetest-0.4.5\bin\..\mods\minetest\weather\init.lua
20:14:52: ERROR[main]: ModError: Failed to load and run C:\Documents and Settings\Dopium\Desktop\Latest Minetest 0.4.4 Complete With Mods Working\Minetest 0.4.5\minetest-0.4.5\bin\..\mods\minetest\weather\init.lua


Please post the error on the terminal window, below a line that says something like "Error from Lua:"
Admin pro tempore on 0gb.us:30000. Ask me if you have a problem, or just want help.
This is a signature virus. Add me to your signature so that I can multiply.
Now working on my own clone, Mosstest.
I guess I'm back for some time.
 

User avatar
Dopium
Member
 
Posts: 233
Joined: Sat Jun 09, 2012 15:43
Location: Australia

by Dopium » Mon Mar 25, 2013 10:50

Says the same thing as the debug: ========== ERROR FROM LUA ===========
21:13:18: ERROR[main]: Failed to load and run script from
21:13:18: ERROR[main]: C:\Documents and Settings\Dopium\Desktop\Latest Minetest 0.4.4 Complete With Mods Working\Minetest 0.4.5\minetest-0.4.5\bin\..\mods\minetest\weather\init.lua:
21:13:18: ERROR[main]: ...minetest-0.4.5\bin\..\mods\minetest\weather\init.lua:6: I told you to run the latest GitHub!
21:13:18: ERROR[main]: stack traceback:
21:13:18: ERROR[main]: [C]: in function 'assert'
21:13:18: ERROR[main]: ...minetest-0.4.5\bin\..\mods\minetest\weather\init.lua:6: in main chunk
21:13:18: ERROR[main]: =======END OF ERROR FROM LUA ========
21:13:18: ERROR[main]: Server: Failed to load and run C:\Documents and Settings\Dopium\Desktop\Latest Minetest 0.4.4 Complete With Mods Working\Minetest 0.4.5\minetest-0.4.5\bin\..\mods\minetest\weather\init.lua
21:13:18: ERROR[main]: ModError: Failed to load and run C:\Documents and Settings\Dopium\Desktop\Latest Minetest 0.4.4 Complete With Mods Working\Minetest 0.4.5\minetest-0.4.5\bin\..\mods\minetest\weather\init.lua

Starting to pull my hair out over this i have changed the folder name many many times i have installed the sub directory still nothing. I really dont understand as i have installed 100's of mods before and the only 2 i have problems with is this and animals. Cant even see the difference these mods have to any others, doesnt matter if i use Adams builds either i get the same error. I know im over looking something simple but this is so frustrating
Running @1.19 MHz, 128 bytes of RAM and interchangeable 4kb ROM carts!
 

User avatar
kaeza
Member
 
Posts: 2157
Joined: Thu Oct 18, 2012 05:00
Location: Montevideo, Uruguay
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

by kaeza » Mon Mar 25, 2013 10:52

Dopium wrote:21:13:18: ERROR[main]: ...minetest-0.4.5\bin\..\mods\minetest\weather\init.lua:6: I told you to run the latest GitHub!

'nuff said
Your minetest is too old and does not have particle spawners.
EDIT: Ask PilzAdam to create a new build.
Last edited by kaeza on Mon Mar 25, 2013 10:54, edited 1 time in total.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

User avatar
Dopium
Member
 
Posts: 233
Joined: Sat Jun 09, 2012 15:43
Location: Australia

by Dopium » Mon Mar 25, 2013 11:04

kaeza wrote:
Dopium wrote:21:13:18: ERROR[main]: ...minetest-0.4.5\bin\..\mods\minetest\weather\init.lua:6: I told you to run the latest GitHub!

'nuff said
Your minetest is too old and does not have particle spawners.
EDIT: Ask PilzAdam to create a new build.



Ok thanks for the help i did notice but thought Adams build was up to date, anyway i will ask, if not wait for 0.4.6. Thanks again.
Running @1.19 MHz, 128 bytes of RAM and interchangeable 4kb ROM carts!
 

User avatar
kaeza
Member
 
Posts: 2157
Joined: Thu Oct 18, 2012 05:00
Location: Montevideo, Uruguay
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

by kaeza » Mon Mar 25, 2013 11:08

Just tested this mod. It's pure Awesomeness™!
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

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

User avatar
Dopium
Member
 
Posts: 233
Joined: Sat Jun 09, 2012 15:43
Location: Australia

by Dopium » Mon Mar 25, 2013 11:29

PilzAdam wrote:The build 57cbb8b-oregen contains the required functions.


Yes sorry about that, however i am getting dummy image errors with pressure plates and some the mescon items. I have enable_texture_atlas = false but still have errors. Bare with me im am still a bit of a newbie with coding anyway here is the debug:
21:56:38: ERROR[main]: generate_image(): Could not load image "jeija_pressure_plate_stone_off.png" while building texture
21:56:38: ERROR[main]: generate_image(): Creating a dummy image for "jeija_pressure_plate_stone_off.png"
21:56:38: ERROR[main]: generate_image(): Could not load image "mesecons_piston_pusher_front_sticky.png" while building texture
21:56:38: ERROR[main]: generate_image(): Creating a dummy image for "mesecons_piston_pusher_front_sticky.png"
21:56:39: ERROR[main]: generate_image(): Could not load image "jeija_insulated_wire_sides_off.png" while building texture
21:56:39: ERROR[main]: generate_image(): Creating a dummy image for "jeija_insulated_wire_sides_off.png"
21:56:39: ERROR[main]: generate_image(): Could not load image "jeija_insulated_wire_tjunction_tb_on.png" while building texture
21:56:39: ERROR[main]: generate_image(): Creating a dummy image for "jeija_insulated_wire_tjunction_tb_on.png"
21:56:39: ERROR[main]: generate_image(): Could not load image "jeija_insulated_wire_tjunction_tb_off.png" while building texture
21:56:39: ERROR[main]: generate_image(): Creating a dummy image for "jeija_insulated_wire_tjunction_tb_off.png"
21:56:39: ERROR[main]: generate_image(): Could not load image "jeija_insulated_wire_curved_tb_on.png" while building texture
21:56:39: ERROR[main]: generate_image(): Creating a dummy image for "jeija_insulated_wire_curved_tb_on.png"
21:56:39: ERROR[main]: generate_image(): Could not load image "jeija_insulated_wire_curved_tb_off.png" while building texture
21:56:39: ERROR[main]: generate_image(): Creating a dummy image for "jeija_insulated_wire_curved_tb_off.png"
Font size: 8 17

My mesecons mod too old?
Running @1.19 MHz, 128 bytes of RAM and interchangeable 4kb ROM carts!
 

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

by PilzAdam » Mon Mar 25, 2013 11:36

Dopium wrote:
PilzAdam wrote:The build 57cbb8b-oregen contains the required functions.


Yes sorry about that, however i am getting dummy image errors with pressure plates and some the mescon items. I have enable_texture_atlas = false but still have errors. Bare with me im am still a bit of a newbie with coding anyway here is the debug:
21:56:38: ERROR[main]: generate_image(): Could not load image "jeija_pressure_plate_stone_off.png" while building texture
21:56:38: ERROR[main]: generate_image(): Creating a dummy image for "jeija_pressure_plate_stone_off.png"
21:56:38: ERROR[main]: generate_image(): Could not load image "mesecons_piston_pusher_front_sticky.png" while building texture
21:56:38: ERROR[main]: generate_image(): Creating a dummy image for "mesecons_piston_pusher_front_sticky.png"
21:56:39: ERROR[main]: generate_image(): Could not load image "jeija_insulated_wire_sides_off.png" while building texture
21:56:39: ERROR[main]: generate_image(): Creating a dummy image for "jeija_insulated_wire_sides_off.png"
21:56:39: ERROR[main]: generate_image(): Could not load image "jeija_insulated_wire_tjunction_tb_on.png" while building texture
21:56:39: ERROR[main]: generate_image(): Creating a dummy image for "jeija_insulated_wire_tjunction_tb_on.png"
21:56:39: ERROR[main]: generate_image(): Could not load image "jeija_insulated_wire_tjunction_tb_off.png" while building texture
21:56:39: ERROR[main]: generate_image(): Creating a dummy image for "jeija_insulated_wire_tjunction_tb_off.png"
21:56:39: ERROR[main]: generate_image(): Could not load image "jeija_insulated_wire_curved_tb_on.png" while building texture
21:56:39: ERROR[main]: generate_image(): Creating a dummy image for "jeija_insulated_wire_curved_tb_on.png"
21:56:39: ERROR[main]: generate_image(): Could not load image "jeija_insulated_wire_curved_tb_off.png" while building texture
21:56:39: ERROR[main]: generate_image(): Creating a dummy image for "jeija_insulated_wire_curved_tb_off.png"
Font size: 8 17

My mesecons mod too old?

This happens if the textures dont exist. Maybe redownload mesecons.
 

User avatar
Dopium
Member
 
Posts: 233
Joined: Sat Jun 09, 2012 15:43
Location: Australia

by Dopium » Mon Mar 25, 2013 11:46

I re-downloaded mesecons but unfortunately still getting the same errors, could this have something to do with my OS? Edit: ok so now i have a really weird bug or something, i have noticed as soon as a install messecons to your build it changes the texture names. For example the mesecon torch on ground when intalled to the build is named JE2BEE~1. The weird part is im copy and pasting the mod and before installing its called jeija_torches_on. If i change the texture names it still doesnt recognize the item. I have no idea why this happens its got me stumped
Last edited by Dopium on Mon Mar 25, 2013 12:17, edited 1 time in total.
Running @1.19 MHz, 128 bytes of RAM and interchangeable 4kb ROM carts!
 

User avatar
Gabriele
Member
 
Posts: 19
Joined: Fri Mar 15, 2013 20:48
 

User avatar
kaeza
Member
 
Posts: 2157
Joined: Thu Oct 18, 2012 05:00
Location: Montevideo, Uruguay
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

by kaeza » Mon Mar 25, 2013 13:21

Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
Location: Rhode Island, USA
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Thu Mar 28, 2013 22:42

I had an awesome idea
[18:40:55] <jordan4ibanez> the rain and snow mod
[18:40:58] <jordan4ibanez> that can be improved!
[18:41:10] <jordan4ibanez> air can be mapgen aliased to weather block
[18:41:30] <jordan4ibanez> weather block can be an abm, if there is a block above it, it becomes air
[18:41:50] <jordan4ibanez> if there is air above a weather block it becomes air
[18:42:04] <jordan4ibanez> it doesn't have to be an abm, but called on_block_update or something
If you can think it, you can make it.
 

User avatar
Ragnarok
Member
 
Posts: 213
Joined: Thu Mar 22, 2012 12:56
Location: Poland
 

Matsetes
Member
 
Posts: 70
Joined: Tue Sep 11, 2012 23:36

by Matsetes » Sat Mar 30, 2013 10:50

Very good, I'll try that beautiful stuff!!!
 

User avatar
Traxie21
Member
 
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.

by Traxie21 » Sat Mar 30, 2013 12:15

Is it possible to make snow pile up from the particles instead of ABM's?
 

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

by PilzAdam » Sat Mar 30, 2013 12:31

Traxie21 wrote:Is it possible to make snow pile up from the particles instead of ABM's?

No, there are no callbacks for particles to Lua to make them fast.
 

User avatar
Traxie21
Member
 
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.

by Traxie21 » Sat Mar 30, 2013 13:13

How about attaching particlespawners to entities?
 

Next

Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 5 guests