PDA

View Full Version : Calendar and turns-per-year idea



ThePianist
09-12-2008, 19:55
Hi all, I just came up with an idea that the devs could use in doing the turns per year in ETW.
As we all know, time in RTW was 6 months per turn, it was either summer or winter. Some people later wanted to mod it with 3 months per turn, so a year could have spring, summer, autumn and winter. But in order to do that, a player had to click on the advisor each turn to activate the 4-year-per-turn script.

An easy way of implementing this, for great flexibility in modding, would be this:

set TurnsPerYear = how many turns there is in a year
set ThisYear = the current year
set ThisTurn = how many turns there has been in the current year (minimum value = 1)


The code/logic would be:
upon end of turn:
ThisTurn + 1 = ThisTurn ('s updated value)
if ThisTurn > TurnsPerYear, set ThisTurn = 1, ThisYear + 1 = ThisYear, load next turn
if ThisTurn = or smaller than TurnsPerYear, , load next turn


Only TurnsPerYear would be a moddable number in a txt file.
ThisYear and ThisTurn are data that would be in gamefiles, such as saved games, but would make no sense to mod.



*****************************************************************
Some examples so people, not just devs, understand, and can comment on this feature
*****************************************************************

Assuming the game starts at 1700 AD.
ThisTurn by default start with minimum value of 1

So let's say the unmodded vanilla game has 2 turns per year like RTW.
So in the notepad file, TurnsPerYear = 2
When the game loads in the beginning of campaign, ThisYear = 1700, ThisTurn = 1
During first turn, ThisYear = 1700, ThisTurn = 1
During second turn, ThisYear = 1700, ThisTurn = 2
When ending the second turn, since ThisTurn ends up greater than TurnsPeryear, ThisTurn get reset to 1, ThisYear + 1 = 1701
next turn, ThisYear = 1701, ThisTurn = 1

A 4 turn per year mod:
In the notepad file, change the value of TurnsPerYear = 4
When the game loads in the beginning of campaign, ThisYear = 1700, ThisTurn = 1
During first turn, ThisYear = 1700, ThisTurn = 1
During second turn, ThisYear = 1700, ThisTurn = 2
During third turn, ThisYear = 1700, ThisTurn = 3
During fourth turn, ThisYear = 1700, ThisTurn = 4
When ending the fourth turn, ThisTurn get reset to 1, ThisYear + 1 = 1701
So next turn, This Year = 1701, ThisTurn = 1

Same if someone wanted to make 12 turns per year, so each turn was a month:
In the notepad file, change the value of TurnsPerYear = 12
When the game loads in the beginning of campaign, ThisYear = 1700, ThisTurn = 1
During first turn, ThisYear = 1700, ThisTurn = 1
During second turn, ThisYear = 1700, ThisTurn = 2
During third turn, ThisYear = 1700, ThisTurn = 3
During fourth turn, ThisYear = 1700, ThisTurn = 4
....
During tenth turn, ThisYear = 1700, ThisTurn = 10
During eleventh turn, ThisYear = 1700, ThisTurn = 11
During twelveth turn, ThisYear = 1700, ThisTurn = 12
When ending the twelveth turn, ThisTurn get reset to 1, ThisYear + 1 = 1701

This implementation would make calendar modding very easy in ETW, and is also easy to code in the game.

--------------------
A completely unrelated comment would be, I read in a book yesterday that when land trade with the interior is cut off from a port/coastal city, then it affects the maritime trade as well, since much of the maritime trade are items that are transported from the interior of the land.

Let's use the example of Patavium, Mediolanum and Lugdunum. Patavium being the coastal city, Mediolanum somewhat inland, and Lugdunum very inland.

In real life, there would be products of Lugdunum passing through Mediolanum and getting to Patavium. Were cities like interconnected netting, in RTW, only the first grid or layer is calculated in trade. So if the player possessed Patavium, capturing or losing Mediolanum would affect trade in Patavium, but capturing or losing Lugdunum would not affect trade in Patavium.

It would be great if an area of land is portrayed as goods going from anywhere in the inland areas to the coastal areas, and not just between a province and immediately adjacent provinces. So even capturing very inland provinces, separated by several cities on the road, would increase the trade of coastal cities.

Same with sea trade. Even more in the ETW's time era, but in the RTW time era as well, it'd be great if sea commerce could go between one side of the Mediterranean and the other side, though it's across many provinces and not adjacent at all.