Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
When the outcome is 0 then it's the first day of spring, 7 wiil be summer, 14 = autumn and 21 is the start of winter.
currentDay = math.ceil(World.TimeIndex/1440)
NextSpringStartsOnDay = (currentDay + (28 - math.mod(currentDay,28)))
daysUntilNextSpring = NextSpringStartsOnDay - currentDay
https://steamcommunity.com/sharedfiles/filedetails/?id=1465161615
Looking sweet :)
I've included a demo on how that works into the TimeWarpFactor mod, link below.
When you make a script which needs to follow very strict time rules, then follow these tips:
if Get(this,"TimeWarp") > 0 then
if this.TimeWarp == 0.75 then -- medium map
-- timePerUpdate = 6.666666 -- 5 minutes in game needs 5/0.75 = 6.6
-- timePerUpdate = 10 -- 7.5 minutes needs 7.5/0.75 = 10
-- timePerUpdate = 13.333333 -- 10 minutes in game needs 10/0.75 = 13.3
timePerUpdate = 20 -- 15 minutes needs 15/0.75 = 20
-- timePerUpdate = 40 -- 30 minutes needs 30/0.75 = 40
elseif this.TimeWarp == 0.5 then -- large map
-- timePerUpdate = 10 -- 5 minutes needs 5/0.5 = 10
-- timePerUpdate = 15 -- 7.5 minutes needs 7.5/0.5 = 15
-- timePerUpdate = 20 -- 10 minutes needs 10/0.5 = 20
timePerUpdate = 30 -- 15 minutes needs 15/0.5 = 30
-- timePerUpdate = 60 -- 30 minutes needs 30/0.5 = 60
end
else -- small map
-- timePerUpdate = 5 -- game time runs at same speed
-- timePerUpdate = 7.5
-- timePerUpdate = 10
timePerUpdate = 15
-- timePerUpdate = 30
end