Are you sure there's not a way? Doesn't R.E.D. WWII do something like that? You might just have to make a special gamespeed or something.
g_Calendar = {}
local monthList = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }
local dayList = { "1", "5", "10", "15", "20", "25" }
local turn = 0
for year = 1939, 1946 do -- see large
for month = 1, #monthList do
for day = 1, #dayList do
local bStart = (month >= 7 and year == 1939) -- Start date = july, 1st 1939
if bStart or (year > 1939) then
local numMonth, numDay
if month < 10 then numMonth = "0"..month; else numMonth = month; end
if tonumber(dayList[day]) < 10 then numDay = "0"..dayList[day]; else numDay = dayList[day]; end
g_Calendar[turn] = { Text = monthList[month] .. " " .. dayList[day] .. ", " .. year, Number = tonumber(year..numMonth..numDay)}
turn = turn + 1
end
end
end
end
local realDate = g_Calendar[Game.GetGameTurn()].Text or "You should really end this war now !"
Controls.CurrentDate:SetText(realDate)
I've coded my own in RED and use an override in TopPanel.lua to display mine instead of civ5 calendar.
-- Lua Script1
-- Author: nokmirt
-- DateCreated: 5/5/2015 2:58:40 PM
--------------------------------------------------------------
-- Update date
g_Calendar = {}
local monthList = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }
local dayList = { "1", "7", "14", "21", "28", }
local turn = 0
for year = 1939, 1946 do -- see large
for month = 1, #monthList do
for day = 1, #dayList do
local bStart = (month >= 7 and day ==7 and year == 1942) -- Start date = august, 7th 1942
if bStart or (year > 1939) then
local numMonth, numDay
if month < 10 then numMonth = "0"..month; else numMonth = month; end
if tonumber(dayList[day]) < 10 then numDay = "0"..dayList[day]; else numDay = dayList[day]; end
g_Calendar[turn] = { Text = monthList[month] .. " " .. dayList[day] .. ", " .. year, Number = tonumber(year..numMonth..numDay)}
turn = turn + 1
end
end
end
end
local date = Game.GetTurnString();
Controls.CurrentDate:SetText(date);
local realDate = g_Calendar[Game.GetGameTurn()].Text or "You should really end this war now !"
Controls.CurrentDate:SetText(realDate)
end
end
function OnTopPanelDirty()
UpdateData();
end
local date = Game.GetTurnString();
Controls.CurrentDate:SetText(date);
That's the method Gedemon is describing, yes. Get a copy of TopPanel.lua from your game installation [for BNW, in Assets\DLC\Expansion2\UI\InGame], make the edits, then add it to your mod, VFS=true. It must be named TopPanel.lua. You don't need to set an entry point since you're just doing a wholesale replacement of the game file.Do I have to use the whole TopPanel.lua file?
That's the method Gedemon is describing, yes. Get a copy of TopPanel.lua from your game installation [for BNW, in Assets\DLC\Expansion2\UI\InGame], make the edits, then add it to your mod, VFS=true. It must be named TopPanel.lua. You don't need to set an entry point since you're just doing a wholesale replacement of the game file.
-- Update date
g_Calendar = {}
local monthList = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }
local dayList = { "1", "7", "14", "21", "28" }
local turn = 0
for year = 1939, 1946 do -- see large
for month = 1, #monthList do
for day = 1, #dayList do
local bStart = (month >= 8 and year == 1942) -- Start date = august, 1st 1942
if bStart or (year > 1946) then
local numMonth, numDay
if month < 10 then numMonth = month; else numMonth = month; end
if tonumber(dayList[day]) < 10 then numDay = dayList[day]; else numDay = dayList[day]; end
g_Calendar[turn] = { Text = monthList[month] .. " " .. dayList[day] .. ", " .. year, Number = tonumber(year..numMonth..numDay)}
turn = turn + 1
end
end
end
end
local date = Game.GetTurnString();
Controls.CurrentDate:SetText(date);
local realDate = g_Calendar[Game.GetGameTurn()].Text or "You should really end this war now !"
Controls.CurrentDate:SetText(realDate)
end
end
function OnTopPanelDirty()
UpdateData();
end