Template talk:Day-night cycle
From Guild Wars 2 Wiki
Jump to navigationJump to search
day and night table[edit]
- → moved from User talk:Chieftain Alex#day and night table
Trying to clean it up, User:Relyk/sandbox/daynight. I can't the math work hue.--Relyk ~ talk < 02:56, 12 May 2015 (UTC)
- Think I've spotted all your errors.
- Adding 25 to
((#vardefine:cycle))
just makes it think the time is 25 minutes later than it actually is. So if the time is 00:25, it'll calculate a value of 50 and decide it's the middle of the day instead of the start of dawn. Raljeor changed it to -25 for you though, I think that fixes it. ((#var:cycle)) > x and ((#var:cycle)) < y
needs to be>= x
or it'll stop working for 1 minute at the start of every new phase.- I'm not sure what your goal is with all the "stage" stuff, but I'll point out that if you're trying to get the current cycle and not the number of 100% completed cycles, you need ceiling instead of floor.
- I've put together User:Chieftain Alex/sandbox3, forgive me for ignoring everybody else's code until mine was complete. Looking at your sandbox code, #time:U might be more bulletproof than #time:i, but there won't be much in the way of difference. The only advantage to #time:U (imo) is that you don't have to think about the 25 minutes past midnight reset time. -Chieftain Alex 19:19, 12 May 2015 (UTC)
- Aw dang, that's cool. Great job. :) Noob question: how come you hard-coded the date of 11 May 2015? --Idris (talk) 19:30, 12 May 2015 (UTC)
- That's not a noob question at all, it is a random date which is guaranteed to be before any future usage of the template that happens to be at the reset time. -Chieftain Alex 19:32, 12 May 2015 (UTC)
- Ah, I think I get it. I was wondering why you bothered with a date at all and not just the time, but then I realized what #time:U is. :p --Idris (talk) 19:44, 12 May 2015 (UTC)
- In case anyone wonders why I've only gone for day + night below the table, afaik those are the only two significant states + the other two are just cosmetic.. -Chieftain Alex 19:58, 12 May 2015 (UTC)
- Ah, I think I get it. I was wondering why you bothered with a date at all and not just the time, but then I realized what #time:U is. :p --Idris (talk) 19:44, 12 May 2015 (UTC)
- That's not a noob question at all, it is a random date which is guaranteed to be before any future usage of the template that happens to be at the reset time. -Chieftain Alex 19:32, 12 May 2015 (UTC)
- Aw dang, that's cool. Great job. :) Noob question: how come you hard-coded the date of 11 May 2015? --Idris (talk) 19:30, 12 May 2015 (UTC)
- I've put together User:Chieftain Alex/sandbox3, forgive me for ignoring everybody else's code until mine was complete. Looking at your sandbox code, #time:U might be more bulletproof than #time:i, but there won't be much in the way of difference. The only advantage to #time:U (imo) is that you don't have to think about the 25 minutes past midnight reset time. -Chieftain Alex 19:19, 12 May 2015 (UTC)
First useful page[edit]
I was pleased to be able to add this template to Lion's Arch Exterminator, I really didn't expect it to be useful so soon. -Chieftain Alex 08:42, 25 June 2015 (UTC)
Changing the order[edit]
I make it clear I hate tables, and I'm not touching this one. Had a conversation in map chat trying to explain how this table worked, and I realized that having the Length column before the "Begins at" is just confusing. Could we get those two columns swapped? Thanks! G R E E N E R 09:45, 15 February 2017 (UTC)
- Done. —Nefastu 10:47, 15 February 2017 (UTC)
- Thank you - You are now a god to me. It's also very late and I may be slightly delusional. G R E E N E R 10:49, 15 February 2017 (UTC)