Page 1 of 1
game.surfaces[1].always_day from bool to real number
Posted: Tue Jul 25, 2017 7:42 pm
by darkfrei
Hi!
Is it possible to change existing
Code: Select all
/c game.surfaces[1].always_day=true
to something like
where the value is from 0 (not overwritten) to 1 (complete overwritten, the same like always_day=true).
Re: game.surfaces[1].always_day from bool to real number
Posted: Tue Jul 25, 2017 7:44 pm
by darkfrei
Now we have only two positions: .always_day=true and .always_day=false, but nothing between.
Re: game.surfaces[1].always_day from bool to real number
Posted: Tue Jul 25, 2017 8:09 pm
by Klonan
Re: game.surfaces[1].always_day from bool to real number
Posted: Tue Jul 25, 2017 8:15 pm
by darkfrei
Nice work! But not exactly. See this idea:
viewtopic.php?f=33&t=51196
With .daytime you can set day time, but all nights are same dark. And there is no way to set nights a little bit brighter.
Re: game.surfaces[1].always_day from bool to real number
Posted: Wed Jul 26, 2017 2:16 am
by Mooncat
So you are talking about brightness, which should be a new property rather than changing the ones that are related to daytime.
Moweather introduces cloudy day that makes the surface to be darker. It is done by changing daytime. For now, you can use the same trick too as this is the only thing that affects brightness.
But IMO, for long term, a new variable should be implemented. Changing daytime for brightness is simply wrong.
Re: game.surfaces[1].always_day from bool to real number
Posted: Wed Jul 26, 2017 5:03 am
by steinio
Mooncat wrote:So you are talking about brightness, which should be a new property rather than changing the ones that are related to daytime.
Moweather introduces cloudy day that makes the surface to be darker. It is done by changing daytime. For now, you can use the same trick too as this is the only thing that affects brightness.
But IMO, for long term, a new variable should be implemented. Changing daytime for brightness is simply wrong.
There is already surface.darkness but it's read only.
Re: game.surfaces[1].always_day from bool to real number
Posted: Wed Jul 26, 2017 6:19 am
by Mooncat
steinio wrote:Mooncat wrote:So you are talking about brightness, which should be a new property rather than changing the ones that are related to daytime.
Moweather introduces cloudy day that makes the surface to be darker. It is done by changing daytime. For now, you can use the same trick too as this is the only thing that affects brightness.
But IMO, for long term, a new variable should be implemented. Changing daytime for brightness is simply wrong.
There is already surface.darkness but it's read only.
Good to know!
hm... but according to its description, it sounds like it is just a function converting daytime to darkness, something like
Code: Select all
return surface.daytime * DaytimeToDarknessConstant;
Re: game.surfaces[1].always_day from bool to real number
Posted: Wed Jul 26, 2017 3:24 pm
by steinio
Mooncat wrote:steinio wrote:Mooncat wrote:So you are talking about brightness, which should be a new property rather than changing the ones that are related to daytime.
Moweather introduces cloudy day that makes the surface to be darker. It is done by changing daytime. For now, you can use the same trick too as this is the only thing that affects brightness.
But IMO, for long term, a new variable should be implemented. Changing daytime for brightness is simply wrong.
There is already surface.darkness but it's read only.
Good to know!
hm... but according to its description, it sounds like it is just a function converting daytime to darkness, something like
Code: Select all
return surface.daytime * DaytimeToDarknessConstant;
Yes could be. Daytime and darkness are strongly bound together.
Re: game.surfaces[1].always_day from bool to real number
Posted: Wed Jul 26, 2017 8:30 pm
by darkfrei
Mooncat wrote:
hm... but according to its description, it sounds like it is just a function converting daytime to darkness, something like
Code: Select all
return surface.daytime * DaytimeToDarknessConstant;
And complete code is just
Code: Select all
if not (surface.alwaysday) then return surface.daytime * DaytimeToDarknessConstant else return 1 end
Re: game.surfaces[1].always_day from bool to real number
Posted: Thu Jul 27, 2017 9:42 am
by Mooncat
darkfrei wrote:Mooncat wrote:
hm... but according to its description, it sounds like it is just a function converting daytime to darkness, something like
Code: Select all
return surface.daytime * DaytimeToDarknessConstant;
And complete code is just
Code: Select all
if not (surface.alwaysday) then return surface.daytime * DaytimeToDarknessConstant else return 1 end
In fact, setting surface.always_day = true is the same as
Code: Select all
surface.freeze_daytime = true
surface.daytime = 0
And surface.always_day = false is
That's why I removed the option for changing always_day in Creative Mode. I wouldn't be surprised if the devs decide to remove it entirely in 0.16.