jeneah Posted March 19, 2015 Share Posted March 19, 2015 I really like to know not just what season it is, but where in the season it is. There's a difference between, say, day 4 and day 16, let alone between day 22 and day 33! This is pretty simple in the early years, but when worlds get old it's a bit of a pain to figure out. After looking around for someone who had created a season calculator and not finding one, I decided to whip one together in Excel. Given that the last day of summer is day 20, and the last day of winter is 36, the formula is: Season day = (world day) modulo 36 (On day 36 proper the formula results in 0, but we just understand that to mean day 36.) This gives the correct result per the wiki article on seasons, at least for the first 5 years. However, when I look at dedicated servers and plug their days into the formula I don't get the same results as the description in the server. For example, plugging world day 541 into the formula results in season day 1 (first day of summer), whereas the server is describing this day as "late summer." Similarly, plugging 1017 into the formula results in season day 9 (mid-summer), whereas the server describes it as "early summer." So where did I go wrong? Link to comment https://forums.kleientertainment.com/forums/topic/52186-where-did-my-math-go-wrong/ Share on other sites More sharing options...
RalphKastro Posted March 20, 2015 Share Posted March 20, 2015 So where did I go wrong? when you decided that nature was predictable and could be calculated. Link to comment https://forums.kleientertainment.com/forums/topic/52186-where-did-my-math-go-wrong/#findComment-623215 Share on other sites More sharing options...
rezecib Posted March 20, 2015 Share Posted March 20, 2015 @jeneah, "Easy" season lengths are 20 days, and "Hard" season lengths are 15 days. So it was (day - 1)%35 + 1 before (% being modulo, and the -1 is because we start on day 1 instead of zero, and + 1 to fix that in the output). However, there is known to sometimes be an extra day in a season. I don't believe this is intended, from having looked at the code, but it happens, and makes it difficult to predict the season progress on a dedicated server. However, you can access the remaining days in the season from the console:print(TheWorld.state.remainingdaysinseason)Edit: So using the correct formula, you get these results:day 541: (541 - 1)%35 + 1 = 16 --> 4 days left of summer (not including that day)day 1017: (1017 - 1)%35 + 1 = 2 --> 2nd day of summer Link to comment https://forums.kleientertainment.com/forums/topic/52186-where-did-my-math-go-wrong/#findComment-623217 Share on other sites More sharing options...
jeneah Posted March 20, 2015 Author Share Posted March 20, 2015 @rezecib: Very helpful! But... for day 36 we get (36-1)%35 + 1 = 1, which is the first day of summer instead of the last day of winter... So should it really be (world day-1)%35? Link to comment https://forums.kleientertainment.com/forums/topic/52186-where-did-my-math-go-wrong/#findComment-623256 Share on other sites More sharing options...
rezecib Posted March 20, 2015 Share Posted March 20, 2015 @jeneah, Day 36 generally is the first day of the second summer. If it is not, then there has been a 1-day error as I described. Link to comment https://forums.kleientertainment.com/forums/topic/52186-where-did-my-math-go-wrong/#findComment-623257 Share on other sites More sharing options...
jeneah Posted March 20, 2015 Author Share Posted March 20, 2015 Thanks rezecib! I knew I had some unholy combination of off by one errors plus confusion over whether day 36 was the last day of winter or the first of summer. Link to comment https://forums.kleientertainment.com/forums/topic/52186-where-did-my-math-go-wrong/#findComment-623265 Share on other sites More sharing options...
rezecib Posted March 20, 2015 Share Posted March 20, 2015 @jeneah, No problem. I also see that Season Clock type functionality is now possible as a client-only mod in the RoG beta branch, so I'm looking into getting that ported, which will help you with this in the future Link to comment https://forums.kleientertainment.com/forums/topic/52186-where-did-my-math-go-wrong/#findComment-623267 Share on other sites More sharing options...
jeneah Posted March 20, 2015 Author Share Posted March 20, 2015 Awwwwww yeeaaaah! that is definitely beyond my skills so I'm psyched! Link to comment https://forums.kleientertainment.com/forums/topic/52186-where-did-my-math-go-wrong/#findComment-623272 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.