[Mod] Skylayer [0.5]
[Mod] Skylayer [0.5]
Minetest utility mod to help manage player sky.
Mod dependencies: <none>
Download and details on: https://gitlab.com/rautars/skylayer
Licensing:
- Code: MIT
Tested on: Minetest 0.5.2
Features:
* Smooth transition between base colors for sky and clouds.
* Remembers multiple sky/clouds settings per player and automatically loads last active
Check out readme and demo for usage samples (some demos will work only for 5.2+ versions). Demos by default disabled remove comment on init file to enable them.
Mod dependencies: <none>
Download and details on: https://gitlab.com/rautars/skylayer
Licensing:
- Code: MIT
Tested on: Minetest 0.5.2
Features:
* Smooth transition between base colors for sky and clouds.
* Remembers multiple sky/clouds settings per player and automatically loads last active
Check out readme and demo for usage samples (some demos will work only for 5.2+ versions). Demos by default disabled remove comment on init file to enable them.
Last edited by xeranas on Wed Apr 22, 2020 15:37, edited 9 times in total.
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: [Mod] Skycolor
yes yes yes yes yes yes and yes
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
- TheReaperKing
- Member
- Posts: 531
- Joined: Sun Nov 22, 2015 21:36
- Contact:
Re: [Mod] Skycolor
This seems like it'd be neat for storms and maybe even eventually stormclouds!
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: [Mod] Skycolor
will this be added to weather pack???
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
Re: [Mod] Skycolor [0.2]
Skycolor was update to support multiple sky color definitions. E.g. if your worlds sky is green then some temporal event sets sky red and after its over sky come back to green. Thats actual main point of mod to help manage such changes.
Please note that api was changed. I update description.
Yes, its already updated. However due strange minetest behavior (unpredictable rgb colors) when getting 'regular' type sky colors weather pack cannot take advantage of smooth transition on weather initialization. However once weather initialized it sky color should change according day time.azekill_DIABLO wrote:will this be added to weather pack???
Please note that api was changed. I update description.
Re: [Mod] Skylayer [0.4]
Skylayer version 0.4 released:
* Added minetest clouds api support (color transitions can be applied for clouds too).
New skylayer version is not backwards compatible!, minor changes needs to done for skylayer definitions (see demo and readme files for reference).
* Added minetest clouds api support (color transitions can be applied for clouds too).
New skylayer version is not backwards compatible!, minor changes needs to done for skylayer definitions (see demo and readme files for reference).
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] Skylayer [0.4]
Can we expect support for sky gradients in the future? :)
Re: [Mod] Skylayer [0.4]
Hi, thanks for interest :)texmex wrote:Can we expect support for sky gradients in the future? :)
I was unaware of new set sky API changes which expands capabilities. Yes, I will test new capabilities and update mod accordingly :)
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] Skylayer [0.4]
Thank you!!xeranas wrote:Hi, thanks for interest :)texmex wrote:Can we expect support for sky gradients in the future? :)
I was unaware of new set sky API changes which expands capabilities. Yes, I will test new capabilities and update mod accordingly :)
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] Skylayer [0.4]
I’ve been interested for a while, actually. I’m integrating the mod in the LATE effects system.
Re: [Mod] Skylayer [0.5]
Mod was updated to support new Minetest sky API capabilities (sky_color, moon, sun and etc.).
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
- TestificateMods
- Member
- Posts: 88
- Joined: Sat Apr 11, 2020 02:09
- GitHub: t-affeldt
- In-game: Testificate
Re: [Mod] Skylayer [0.5]
Thank you! This is a great idea to prevent mods from conflicting with each other.
I have included it as an optional dependency in my Moon Phases mod and hope that other mod makers will follow. Keep doing that good work!
I have included it as an optional dependency in my Moon Phases mod and hope that other mod makers will follow. Keep doing that good work!
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] Skylayer [0.5]
I'm not sure I get the correct visuals from the demo skies. I was wondering if I can get screenshots of them for comparison?
- TestificateMods
- Member
- Posts: 88
- Joined: Sat Apr 11, 2020 02:09
- GitHub: t-affeldt
- In-game: Testificate
Re: [Mod] Skylayer [0.5]
I've had the same problem until I updated my game. If you're running anything below 5.2.0 then some of the demos will not work.texmex wrote:I'm not sure I get the correct visuals from the demo skies. I was wondering if I can get screenshots of them for comparison?
- Nathan.S
- Member
- Posts: 1147
- Joined: Wed Sep 24, 2014 17:47
- GitHub: NathanSalapat
- IRC: NathanS21
- In-game: NathanS21
- Location: Bigsby Texas
- Contact:
Re: [Mod] Skylayer [0.5]
I'm probably just missing something obvious, but is it possible to turn off the sunrise and sunset gradients. I have some space layers in my game and don't want to have those showing. I can't seem to find an option for it in the readme or demos. Thanks
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course
Check out my website, and brand new Minetest Modding Course
Re: [Mod] Skylayer [0.5]
Yes, the sunrise without sun was a strange effect, I updated the demo. :)I'm probably just missing something obvious, but is it possible to turn off the sunrise and sunset gradients. I have some space layers in my game and don't want to have those showing. I can't seem to find an option for it in the readme or demos. Thanks
You can set sunrise_visible to false in sun_data block. Blocks sun_data and moon_data are wrappers without skylayer specifics yet, they should accept the same parameters as minetest player set_sun / set_moon methods.
Code: Select all
sun_data = {
visible = false,
sunrise_visible = false
}
- Nathan.S
- Member
- Posts: 1147
- Joined: Wed Sep 24, 2014 17:47
- GitHub: NathanSalapat
- IRC: NathanS21
- In-game: NathanS21
- Location: Bigsby Texas
- Contact:
Re: [Mod] Skylayer [0.5]
Perfect, thank you so much.
It looks like the clouds may be broken. If I turn on the demo without clouds, and then go back to the one with clouds, they never appear.
It looks like the clouds may be broken. If I turn on the demo without clouds, and then go back to the one with clouds, they never appear.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course
Check out my website, and brand new Minetest Modding Course
Re: [Mod] Skylayer [0.5]
Thanks for the report, this bug should be fixed by now.Nathan.S wrote:It looks like the clouds may be broken. If I turn on the demo without clouds, and then go back to the one with clouds, they never appear.
Re: [Mod] Skylayer [0.5]
This is an awesome mod and super worth getting the hang of.
still having some issues with clouds. Moving between a layer with
and one that has clouds = true, it still doesn't turn on the clouds (downloaded latest version of mod yesterday + minetest 5.2.0). What does work is calling in between applying layers but that's obviously undesirable.
Second cloud-related issue, I can't for the life of me get messing with colors and ambient to actually change the colors of the clouds to work, but that seems to be a problem I'm having with player:set_clouds too, maybe I just don't understand the value ranges, I thought it was just HEX RGB + transparancy.
Just leads to the same old grey clouds. What does work for me is playing with
And I can set clouds to any color I like this way, but once applied it will cause the server to eventually crash with:
(this is based on a custom game I'm testing, but all the mods from default are there and unaltered except 'weather' which obviously interferes with the clouds and was removed)
still having some issues with clouds. Moving between a layer with
Code: Select all
sl.sky_data = {
clouds = false
Code: Select all
player:set_sky( nil, "plain", nil, true)
Second cloud-related issue, I can't for the life of me get messing with colors and ambient to actually change the colors of the clouds to work, but that seems to be a problem I'm having with player:set_clouds too, maybe I just don't understand the value ranges, I thought it was just HEX RGB + transparancy.
Code: Select all
sl.clouds_data = {
color = "#50005040",
ambient = "#000000",
Code: Select all
gradient_colors = GradientSpec
gradient_ambient_colors = GradientSpec
Code: Select all
2020-05-03 11:55:55: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'skylayer' in callback environment_Step(): ...2.0-win64\bin\..\games\cloudlands\mods\skylayer/core.lua:164: attempt to index local 'c2' (a nil value)
2020-05-03 11:55:55: ERROR[Main]: stack traceback:
2020-05-03 11:55:55: ERROR[Main]: ...2.0-win64\bin\..\games\cloudlands\mods\skylayer/core.lua:164: in function 'calculate_current_gradient_color'
2020-05-03 11:55:55: ERROR[Main]: ...2.0-win64\bin\..\games\cloudlands\mods\skylayer/core.lua:191: in function 'calculate_color_hex_value'
2020-05-03 11:55:55: ERROR[Main]: ...2.0-win64\bin\..\games\cloudlands\mods\skylayer/core.lua:235: in function 'resolve_sky_color'
2020-05-03 11:55:55: ERROR[Main]: ...2.0-win64\bin\..\games\cloudlands\mods\skylayer/core.lua:296: in function 'update_sky_details'
2020-05-03 11:55:55: ERROR[Main]: ...2.0-win64\bin\..\games\cloudlands\mods\skylayer/core.lua:385: in function 'update_sky'
2020-05-03 11:55:55: ERROR[Main]: ...2.0-win64\bin\..\games\cloudlands\mods\skylayer/core.lua:434: in function <...2.0-win64\bin\..\games\cloudlands\mods\skylayer/core.lua:421>
2020-05-03 11:55:55: ERROR[Main]: ...ds\minetest-5.2.0-win64\bin\..\builtin\game\register.lua:429: in function <...ds\minetest-5.2.0-win64\bin\..\builtin\game\register.lua:413>
2020-05-03 11:55:55: ERROR[Main]: stack traceback:
Re: [Mod] Skylayer [0.5]
Thanks for reporting. I push some fixes to address the mentioned issues (didn't spend much on testing, so let me know if there still something off).
Not sure about the ambient format, but if gradient version works it must be a formatting issue, as in the end, gradient value is converted and used into player:set_clouds. At this point, gradient version colors do not support transparency (added into TODO list) so converted color output, for example, is #733A93. Minetest Lua API docs say that the alpha (transparency) channel is ignored for clouds ambient color (#000000 is probably the default, you should try different colors and see if there is a difference at night).
Also, please note that gradient_ambient_color was changed to gradient_ambient_colors (to match readme).
Not sure about the ambient format, but if gradient version works it must be a formatting issue, as in the end, gradient value is converted and used into player:set_clouds. At this point, gradient version colors do not support transparency (added into TODO list) so converted color output, for example, is #733A93. Minetest Lua API docs say that the alpha (transparency) channel is ignored for clouds ambient color (#000000 is probably the default, you should try different colors and see if there is a difference at night).
Also, please note that gradient_ambient_color was changed to gradient_ambient_colors (to match readme).
Re: [Mod] Skylayer [0.5]
Thanks for the quick fix!
From testing, both the crash and the cloud issues seem to be remedied, will test for another few hours as I'm noodling with the various settings.
Great stuff!
From testing, both the crash and the cloud issues seem to be remedied, will test for another few hours as I'm noodling with the various settings.
Great stuff!
- Wuzzy
- Member
- Posts: 4778
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: [Mod] Skylayer [0.5]
Minetest 5.2.0 has a completely reworked Sky API, and is also able to smoothly transition sky colors between night and day. This greatly reduces the number of set_sky calls you need, which is important because of potential lag.
Would be correct to say that this mod is now obsolete? Or are there still use cases for this mod that aren't solved by Minetest 5.2.0?
Would be correct to say that this mod is now obsolete? Or are there still use cases for this mod that aren't solved by Minetest 5.2.0?
Re: [Mod] Skylayer [0.5]
Initial purpose for this mod is to manage multiple skies for player in cross mod way. One mod sets weather sky and few moments later different mod adds some temporal effect and after some time it removes effect and weather sky re-aplies without weather mod knowing.
I'm not sure what now best practices for multiple mods change skies without permanent overriding other mod sky.
I'm not sure what now best practices for multiple mods change skies without permanent overriding other mod sky.
- TestificateMods
- Member
- Posts: 88
- Joined: Sat Apr 11, 2020 02:09
- GitHub: t-affeldt
- In-game: Testificate
Re: [Mod] Skylayer [0.5]
The question is also: What even is the best way to achieve compatibility between muliple mods that change the sky? Constructing a stack of weather effects and applying what is on the top is one way to do it. It works really well for temporal effects that change the sky dramatically.
If you have multiple mods that change different aspects (let's say one changes the sky's color and the other one the moon texture) then it might be best to use the default behaviour of applying both effects.
I had a similar issue when developing my weather mod. What I settled for was a mix of both. I gave the effects a priority value and tried to merge all of the sky changes. If in conflict, the effect with the higher priority would then determine that specific value. This way, one effect can control cloud movement while another controls cloud size and sky color at the same time.
The priority I used is of course only a work-around to determine which sky effect is more important. Ideally, you would find a way to merge them as well (where appropriate) in a better way. But that would require better understanding of the intention behind that change. Does the mod author want to change the base color as a new default? Does the mod author want to darken the color to simulate a lighting change? Does the mod author want to override the color with the specified tone (e.g. make everything black for a blindness effect)?
Simply using a priority does not seem ideal but it's better than what we have right now. Ideally, we would need additional functions to specifiy the intention of the change. Then a compatibility mod could determine whether to override, ignore, or integrate the change into the current sky.
If you have multiple mods that change different aspects (let's say one changes the sky's color and the other one the moon texture) then it might be best to use the default behaviour of applying both effects.
I had a similar issue when developing my weather mod. What I settled for was a mix of both. I gave the effects a priority value and tried to merge all of the sky changes. If in conflict, the effect with the higher priority would then determine that specific value. This way, one effect can control cloud movement while another controls cloud size and sky color at the same time.
The priority I used is of course only a work-around to determine which sky effect is more important. Ideally, you would find a way to merge them as well (where appropriate) in a better way. But that would require better understanding of the intention behind that change. Does the mod author want to change the base color as a new default? Does the mod author want to darken the color to simulate a lighting change? Does the mod author want to override the color with the specified tone (e.g. make everything black for a blindness effect)?
Simply using a priority does not seem ideal but it's better than what we have right now. Ideally, we would need additional functions to specifiy the intention of the change. Then a compatibility mod could determine whether to override, ignore, or integrate the change into the current sky.
Who is online
Users browsing this forum: No registered users and 4 guests