[Mod] weather_pack 0.3

betterthanyou710
New member
Posts: 1
Joined: Wed Aug 26, 2015 00:05
GitHub: betterthanyou14
IRC: betterthanyou14
In-game: betterthanyou14

Re: [Mod] weather-pack

by betterthanyou710 » Post

Its really great that he even made a mod. The lightening is awesome and a lot of people might not want that many components. Awesome job.

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

Re: [Mod] weather_pack

by mahmutelmas06 » Post

It rains on snowy biome at mapgenv7. (ıt shouldt rain while snow remains)
My Mods:

Beverage

User avatar
xeranas
Member
Posts: 162
Joined: Fri Feb 05, 2016 11:06

Re: [Mod] weather_pack

by xeranas » Post

mahmutelmas06 wrote:It rains on snowy biome at mapgenv7. (ıt shouldt rain while snow remains)
Yes, there currently no (efficient) way to tell in which biome player stands. AFAIK there currently work in progress and future Lua API should provide such information #3685.

User avatar
xeranas
Member
Posts: 162
Joined: Fri Feb 05, 2016 11:06

Re: [Mod] weather_pack

by xeranas » Post

Created dev branch for weather_pack to test new Minetest API features which currently not yet released.
- added collision_removal for rain/snow particles (dev branch).

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: [Mod] weather_pack

by burli » Post

That is really a problem. All you can do is parse the nodes with find_nodes_in_area to get an idea where you are. This works more or less, but fails if you add new nodes or change something else.

I'm working on an ambience mod. For sounds in a forest I use ABMs searching for tree nodes with leaves as neighbours. So far, so good. But I have the same sound in every forest no matter if hot or cold.

And for meadows I can only check for the absence of trees because on meadows is nothing unique I could search for

With a "get_biome(pos)" function this would be easy peasy.

User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

Re: [Mod] weather_pack

by Fixer » Post

Lua error, possibly related to weather_pack. Was in etherial biome at the time.
http://pastebin.com/raw/9PS5k8Km

BTW, about snow/raining, if I understand it correctly, you can make things much simpler... follow my though:
as in MC make rain and snow event basically the same thing... it is single precipitation event, and type of precipitation depends on what node you are standing, if snow (node or block, or dirt with snow) below your feet - it snows, if you step away from it... it rains.

User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

Re: [Mod] weather_pack

by Fixer » Post

BTW, with rain I get about 18% fps drop :}

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

Re: [Mod] weather_pack

by Dopium » Post

Xeranus's i really enjoy this mod along with sofar's lightening mod however i seem to be getting a bug when lightening strikes. I have reported the bug on sofar's lightening mod however it may have to do with rain. The bug arised after updating to the latest dev build, stable worked fine.

When its raining there is no issues however as soon as lightening strikes it will crash minetest to the desktop. I cannot find any errors in the debug besides this warning.

Code: Select all

2016-07-08 12:19:45: WARNING[Server]: Undeclared global variable "dtime" accessed at ...160707\bin\..\games\minetest_2.0\mods\weather\rain\init.lua:143
Not sure if it has anything to do with the way particles behave on the new build.


On a separate matter there is a small bug i noticed for awhile that was the same on stable. After playing for a few hours the set_weather <whatever> command becomes unresponsive, as in it accepts the command but no change in weather conditions. This is no major concern to me as i just exit the world then join again then everythings fine.

User avatar
xeranas
Member
Posts: 162
Joined: Fri Feb 05, 2016 11:06

Re: [Mod] weather_pack

by xeranas » Post

Master was merged into dev branch (general recommendation would be to stick with master branch as dev is more like for experimenting). Warning messages related to dtime should be gone now. Please update lightning mod also since similar issue was fixed. If issue still reproduces after updating both mods then fill bug on weather_pack github and I will take a look.

Second issue is not clear to me, seems that some Lua table data was lost in middle of game. I will check.

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

Re: [Mod] weather_pack

by Dopium » Post

Resolved, thanks for looking into that, dtime warning gone and lightening strikes without crashing.

User avatar
BrunoMine
Member
Posts: 1082
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine
Location: SP-Brasil
Contact:

Re: [Mod] weather_pack

by BrunoMine » Post

This mod can be used on a server?

User avatar
xeranas
Member
Posts: 162
Joined: Fri Feb 05, 2016 11:06

Re: [Mod] weather_pack

by xeranas » Post

I'm not sure how minetest works. That server-client architecture quite confusing for me. I guess particle creation should be client responsibility however there are a lot of positions calculations and while they are purely for cosmetic/visual purpose I think they will be done on server side for each player (I do not have control over it or do I?). That being said this mod is not recommended for server.
Last edited by xeranas on Thu Oct 27, 2016 08:51, edited 1 time in total.

User avatar
ManElevation
Member
Posts: 896
Joined: Tue Aug 02, 2016 22:04
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation
Location: Madrid,Spain

Re: [Mod] weather_pack

by ManElevation » Post

wo this is awesome
My Public Mods! Discord: Rottweiler Games#3368

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod] weather_pack

by sofar » Post

Now that the engine has changed, this mod should incorporate several of the following improvements:

- rain particles remove on collision (collision_remove = true) with the gruond
- weather particle spawners can be attached to the player entity now, which should make them far more efficient

FYI particles are "added" by the server, but the server does nothing with them except tell clients. Clients do all the graphical work for particles.

User avatar
ErrorNull
Member
Posts: 271
Joined: Thu Mar 03, 2016 00:43
GitHub: ErrorNull0

Re: [Mod] weather_pack

by ErrorNull » Post

yes, i am greatly anticipating an update to this mod to take advantage of these recent minetest engine improvements!

User avatar
xeranas
Member
Posts: 162
Joined: Fri Feb 05, 2016 11:06

Re: [Mod] weather_pack

by xeranas » Post

sofar wrote:Now that the engine has changed, this mod should incorporate several of the following improvements:

- rain particles remove on collision (collision_remove = true) with the gruond
- weather particle spawners can be attached to the player entity now, which should make them far more efficient
Collision check was added some time ago, thought effect is visible for users only 14-dev+ versions.

Simple profiling suggest me that most expensive operation is particle creation by minetest itself, which is unavoidable. For this reason I try to calculate location based on player look dir to "win" few particles. Relative position won't help in this case, build-in particle spawner isn't fit for it either as it uses simple range around logic which does not let verify particle position (e.g. is it in-door).

Code: Select all

minetest.add_particle time: 0.02ms
weather.get_random_pos_by_player_look_dir time: 0.00ms
weather.get_random_pos_by_player_look_dir time: 0.00ms
weather.get_random_pos_by_player_look_dir time: 0.00ms
minetest.add_particle time: 0.02ms
weather.get_random_pos_by_player_look_dir time: 0.00ms
minetest.add_particle time: 0.01ms
weather.get_random_pos_by_player_look_dir time: 0.01ms
minetest.add_particle time: 0.01ms
weather.get_random_pos_by_player_look_dir time: 0.01ms
weather.get_random_pos_by_player_look_dir time: 0.01ms
minetest.add_particle time: 0.02ms
weather.get_random_pos_by_player_look_dir time: 0.01ms
weather.get_random_pos_by_player_look_dir time: 0.00ms
weather.get_random_pos_by_player_look_dir time: 0.01ms
minetest.add_particle time: 0.04ms
weather.get_random_pos_by_player_look_dir time: 0.01ms
weather.get_random_pos_by_player_look_dir time: 0.01ms
weather.get_random_pos_by_player_look_dir time: 0.01ms
weather.get_random_pos_by_player_look_dir time: 0.01ms
weather.get_random_pos_by_player_look_dir time: 0.02ms
weather.get_random_pos_by_player_look_dir time: 0.01ms
weather.get_random_pos_by_player_look_dir time: 0.01ms
minetest.add_particle time: 0.04ms
weather.get_random_pos_by_player_look_dir time: 0.01ms
weather.get_random_pos_by_player_look_dir time: 0.01ms
minetest.add_particle time: 0.02ms

User avatar
Wuzzy
Member
Posts: 4786
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: [Mod] weather_pack

by Wuzzy » Post

It's a good mod which adds nicely to atmosphere. I think I will include it into MineClone 2.

Some comments:

- /help set_weather should say ALL allowed parameters, not just “none”. E.g. “/set_weather none | snow | rain | thunder”
- There's no error message when the user gives no or an invalid parameter to /set_weather.
- The sky is flashing like in a thunder storm even if I just activate the normal rain with /set_weather rain. :-(
- The thunder storm seems to be identical to rain, there only difference is that there are only lightning strikes and additional sounds. I would suggest: More rain drops, louder rain or different rain/storm sound, darker sky.
- It would be great if the weather had some effects, such as snow piling up when it snows or fires being extinguished
- Alternatively, an API function to query the current weather would be extremely useful, so that other mods can add custom events

Chibi ghost
Member
Posts: 845
Joined: Fri Jan 08, 2016 21:17
In-game: Ghost

Re: [Mod] weather_pack

by Chibi ghost » Post

I would love this mod but I'm afraid with my already over modded game it would melt my computer

User avatar
Wuzzy
Member
Posts: 4786
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: [Mod] weather_pack

by Wuzzy » Post

OK, I just figured out the weather_pack already puts out fire when it rains. Good!

But I found something different: skycolor.lua. This appears to be a real API or something. Do you have any explanation on how to use it properly? What is it about with all those layers?

What do I do when I want to change the sky color based on depth (e.g. if the player is at Y<100, the sky turns black regardless of weather)?

User avatar
xeranas
Member
Posts: 162
Joined: Fri Feb 05, 2016 11:06

Re: [Mod] weather_pack

by xeranas » Post

Wuzzy wrote: - /help set_weather should say ALL allowed parameters, not just “none”. E.g. “/set_weather none | snow | rain | thunder”
- There's no error message when the user gives no or an invalid parameter to /set_weather.
- The sky is flashing like in a thunder storm even if I just activate the normal rain with /set_weather rain. :-(
- The thunder storm seems to be identical to rain, there only difference is that there are only lightning strikes and additional sounds. I would suggest: More rain drops, louder rain or different rain/storm sound, darker sky.
- It would be great if the weather had some effects, such as snow piling up when it snows or fires being extinguished
- Alternatively, an API function to query the current weather would be extremely useful, so that other mods can add custom events
Thanks, I will review comments. Probably exposing api and letting everyone define weather in more flexible way would solve some issues.
Wuzzy wrote: But I found something different: skycolor.lua. This appears to be a real API or something.
Weather mod have embedded skycolor api. Here link to mod post: viewtopic.php?t=15733

Skycolor basically do 2 things:
1) allows register your color layer which is basically color gradient definition in RGB format like: Night Color -> Middle Day -> Night Color (could have more than 3 gradient points).
2) sometimes you do not want to lose previous sky color, that's why here is layers. Active sky is based on last layer. If you done with sky effect just remove_layer(your_layer).

User avatar
xeranas
Member
Posts: 162
Joined: Fri Feb 05, 2016 11:06

Re: [Mod] weather_pack 0.2

by xeranas » Post

0.2 released.
* Now uses happy_weather_api (we will see if it's for worse or for better)
* Bug fixes
* Rain now has three variations (light, normal and heavy)
* Snow weather now stays in iddle (can only be triggered via command)

Hope you like rain, cuz there ain't other weather in this pack at least until engine NF #3685 will be implemented.

Image

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] weather_pack 0.2

by azekill_DIABLO » Post

XD
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
ErrorNull
Member
Posts: 271
Joined: Thu Mar 03, 2016 00:43
GitHub: ErrorNull0

Re: [Mod] weather_pack 0.2

by ErrorNull » Post

he xeranas, i'm really enjoying your mod. i have a question - is there a way for one of my mods to know if it is currently raining, snowing, etc. ?

User avatar
xeranas
Member
Posts: 162
Joined: Fri Feb 05, 2016 11:06

Re: [Mod] weather_pack 0.2

by xeranas » Post

ErrorNull wrote:he xeranas, i'm really enjoying your mod. i have a question - is there a way for one of my mods to know if it is currently raining, snowing, etc. ?
There are 2 API methods:
1) for checking when weather is active

Code: Select all

happy_weather.is_weather_active(<weather_code>)
2) if player is in weather area

Code: Select all

happy_weather.is_player_in_weather_area(<player_name>, <weather_code>)
Weather codes can be found on readme (e.g. light_rain, rain, heavy_rain) or in code. Keep in mind that different rain variations have different code.
Last edited by xeranas on Sun May 28, 2017 08:19, edited 1 time in total.

User avatar
xeranas
Member
Posts: 162
Joined: Fri Feb 05, 2016 11:06

Re: [Mod] weather_pack 0.3

by xeranas » Post

0.3 released
* Minor happy_weather_api updates
* Minor weather chances tuning
* Basic biome check (does not works for mapgen6)

Thanks to paramat for explaining how biome check currently implemented on his snowdrift mod.
Definitely guy who deserves extra beer or pica from minetest community :)

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests