times of day in script are named wrong.

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

times of day in script are named wrong.

Post by bobingabout »

Quoted here are the script names for times of day, with the parts in brackets added because it's the only way I can figure out what each does:

Code: Select all

morning :: double [RW]	The daytime when morning starts.	(End of night, starting to get light)
dawn :: double [RW]	The daytime when dawn starts.	(Start of day, fully light)
dusk :: double [RW]	The daytime when dusk starts.	(End of day, starting to get dark)
evening :: double [RW]	The daytime when evening starts.	(Start of night, fully dark)
This image shows actual times of day:
Image

Every time I read the internal names, it bugs me, because dawn and morning are synonymous (mean (almost) the same thing) likewise dusk and evening are also synonymous.

According to those definitions, you have Day, Night, Morning twilight and Evening twilight... though... see above for synonyms.

Phase naming:
What in game is named Morning should be named Dawn. (though Morning works if you're going with "Morning Twilight")
what in game is named Dawn should be named Day.
what in game is named Dusk... is correct! (Or "Evening" if you want to shorten "evening Twilight")
what in game is named Evening should be named Night.

Point in time naming:
What in game is named Morning should be named Dawn.
what in game is named Dawn should be named Sunrise.
what in game is named Dusk should be named Sunset.
what in game is named Evening should be named Dusk.


So, that's 2 different possible methods, with 2 different possible naming conventions for one of them... as a general rule, Morning/Evening should not be used at the same time as Dawn/Dusk, as they're synonymous with that phase of the day.



I mean, at this point in time, I accept that you can't really do anything to fix it, as it will break any mod that plays with these values, and even worse, they re-use names that do something different than they do now.
I'm mostly typing this to complain and get things off my chest, because every time I look at this page and see those definitions, it makes me angry, or at least confused.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2638
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: times of day in script are named wrong.

Post by steinio »

The movie 'From dusk till dawn' is about 'vampires' which are active through night...
Image

Transport Belt Repair Man

View unread Posts
User avatar
valneq
Smart Inserter
Smart Inserter
Posts: 1267
Joined: Fri Jul 12, 2019 7:43 am
Contact:

Re: times of day in script are named wrong.

Post by valneq »

steinio wrote: Fri Jun 05, 2020 10:04 pm The movie 'From dusk till dawn' is about 'vampires' which are active through night...
That is correct! In bobingabout's circle, time runs mathematically positive, or counter-clockwise. And from dusk till dawn is exactly the night.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: times of day in script are named wrong.

Post by bobingabout »

valneq wrote: Fri Jun 05, 2020 10:32 pm
steinio wrote: Fri Jun 05, 2020 10:04 pm The movie 'From dusk till dawn' is about 'vampires' which are active through night...
That is correct! In bobingabout's circle, time runs mathematically positive, or counter-clockwise. And from dusk till dawn is exactly the night.
True, I didn't realise it was backwards.

However... I'm running into an issue.
if you set, for example dawn (game dawn, start of full brightness AKA Day) to value 0 (Mid-day) the game errors with dawn must be > morning (starting to get light), well, numerically, it isn't correct, however... Anything between 0.55 through 0 to 0.25 (default values) should be correct, in other words, 0.25 to 0.55 should be the disallowed values, so 0 to 0.25 should be allowed, but aren't...
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: times of day in script are named wrong.

Post by bobingabout »

Thinking about it, my logic (previous post, about getting the error message) could have been wrong.... but even if it isn't, I've decided to just restrict the morning events (Dawn and Sunrise, using my names here) to the AM side of the slider and the evening events (Sunset and Dusk) to the PM side, which also solves the issue, if there is one.

Can still have crazy short days though: https://www.dropbox.com/s/nguvayxdovte0 ... 2.png?dl=0
Also, I'm not sure why the bottom number shows 12:14, it's supposed to have 15 minute steps, I'm guessing it's just a rounding error.
Last edited by bobingabout on Sat Jun 06, 2020 2:12 pm, edited 1 time in total.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: times of day in script are named wrong.

Post by darkfrei »

+1

Also it will be nice to set all 4 parameters just as list: day_times = {0.2, 0.3, 0.7, 0.8}, not one-by-one.
Post Reply

Return to “Modding interface requests”