[TOT] Is it possible to change time units for various acts of a scenario

Konig15

Warlord
Joined
Nov 4, 2007
Messages
241
Now for reference, I am NOT planning this scenario as it's WAY too ambitious even for my ambitions, but if I did a Worldwar scenario (Harry Turtledove), I'd want to go through the whole saga, which I despised increasingly with every book at the last novel of the original five partners that ended the World War 2 phase.

For reference, Worldwar is about little Lizardmen who are so conservative and reactionary they make Qing-era bureaucrats look like Issac Newton, every last one of them no matter how neurotic or stupid, show up to invade Earth in 1942 excepting to fight knights because their probe's intel on the planet is only 800 years old.

The series goes to 45, leaps into the 60s and finishes I think in the 70s or early 80s as the Humans discover FTL travel, which the lizards never have and yet allow the little "nuggets" to occupy over half our planet despite being able to nuclear blackmail their Emperor into leaving our world free at last.

Point is, building a scenario like this has three phases, the short World War II phase (in dozens of months at most) of keeping them from conquering the great powers, a couple of decades of Cold War of trying to catch up, and then, THEN the satisfying denouement of kicking the little green "nuggets" off our chilly little mudball once and for all. Which again is gonna take months, maybe a series of months but possibly be shorter than the first act.

For this to work in the Civ 2 engine, you're either gonna need something like Lua to change the turn counter like in the scenario editor based on the month the world powers make peace with the Lizards. Like If you played month by month from May 1942 to say March of 1946, then switch the counter to just the year, so the counter goes from Mach 1946 to 1946 and the next turn would be 1947, and then do one-year increments until the FInal showdown in the third act where, say for plot convenience (the Lizards DO NOT like Cold) you start the war in say 1964 (which the Nazis do because Nazis have to be too stupid to live, something commented on in the book) that turn would become January 1964.

I wonder is Lua can do that.

Not I do suspect that there might be a technically simpler and better way to do this though. In one of the Charelane scenarios ported to TOT, the year cycle is a five or six month cycle instead of 12, consisting of WInter, early Spring, late Spring, Early Summer, Late Summer, Fall, with maybe just spring I don't remember.

This issue though is that even if you're allowing the player to engage in Le Belle Epoch (it's a fun scenario even if you never go to war, especially if you never go to war as Germany) non-warfare play, you're gonna have 30 years of that or 180 turns. It probably would go fast depending on how many trade units the player was willing to micromanage through the pipeline but still....

For someone like me, who's essentially a Protoss player to my bones (even though I've never played Star Craft), that kind of gameplay is fine because the combo of the glorious crushing mechanically AND the narrative satisfaction of driving the invaders back into space (and seeing all their vaunted nukes getting eaten up by SDI installations) is enough to make me salavate.

But mine isn't the only type of play, in fact, I've clashed a lot over Tootal's scenarios which I can describe as the most comfortable and stylish straightjacket ever, great in every way until the moment you need to either scratch your nose or butt. Disclaimer: I know his stuff isn't designed for my tastes that's my point, the reason I'm asking about this not just to see if Lua can do this pony trick, but also if the pony trick is a cover for a flawed design concept or something that would alienate scenario playing fanbase unnecessarily.

Cause B&S, as much as I love it, is WAY too much of what I love. The build times make sense but it's an unbearably slow scneario and buildup is so throttled it's unbearable, and the hotseat double movement rules which I would never have considered do a lot to mitigate some of those problems, in ways I would never have considered. FInguring out the potential flaws ahead of time, in concept is an ounce of sweat saving a gallon of blood.

TLDR, the balance of turns in a long game, and whether Lua is a potentially useful tool in addressing excessive turn drag.
 
For this to work in the Civ 2 engine, you're either gonna need something like Lua to change the turn counter like in the scenario editor based on the month the world powers make peace with the Lizards. Like If you played month by month from May 1942 to say March of 1946, then switch the counter to just the year, so the counter goes from Mach 1946 to 1946 and the next turn would be 1947, and then do one-year increments until the FInal showdown in the third act where, say for plot convenience (the Lizards DO NOT like Cold) you start the war in say 1964 (which the Nazis do because Nazis have to be too stupid to live, something commented on in the book) that turn would become January 1964.

I wonder is Lua can do that.

At the moment, Lua can change the time per turn using
Code:
civ.scen.params.yearIncrement
However,
Code:
civ.scen.params.startingYear
doesn't allow you to change it's value, only to get it. That means we're stuck. (The game computes the year from the turn and these 2 parameters, rather than incrementing a separate "date" counter.)

Option 1:
Display "Turn X" in the status window, and make a key press event to show the actual date to the player whenever they need it.

Option 2:
At the appropriate time, have an event ask the player to open the cheat menu and change the scenario parameters to appropriate new values.

If you only want to make a couple changes over the course of the scenario,
 
At the moment, Lua can change the time per turn using
Code:
civ.scen.params.yearIncrement
However,
Code:
civ.scen.params.startingYear
doesn't allow you to change it's value, only to get it. That means we're stuck. (The game computes the year from the turn and these 2 parameters, rather than incrementing a separate "date" counter.)
Hmm, it's odd that civ.scen.params.startingYear isn't writeable.

Could you hack this by changing both civ.scen.params.yearIncrement and civ.game.turnsElapsed, which surprisingly is writeable?

Example:
startingYear = 1900, yearIncrement = 1, turnsElapsed = 50
Game year is 1950.
Now you want to change it so that going forward, each turn covers 2 years instead of 1. startingYear still = 1900, because that can't be changed. yearIncrement now = 2.
If you set turnsElapsed from 50 back to 25, would that correctly keep the game year as 1950?

I don't know what side effects there would be. Obviously it means that "turn 30" would happen twice, once in 1930 and then again in 1960. So you couldn't key any events to the turn number, but I think you could use civ.game.gameYear or civ.getGameYear() instead. Are there other major issues that I'm overlooking?
 
Could you hack this by changing both civ.scen.params.yearIncrement and civ.game.turnsElapsed, which surprisingly is writeable?

This seems to work, though I have to reload the game (or change these parameters in the cheat menu) to see the changes in either parameter that I make through the console. Even changing these parameters using the onTurn event doesn't change the date displayed (though changing civ.game.turnsElapsed does change the result from civ.getTurn()). A negative turn even works. All this means is that you'd have to have an event telling the player to re-load the game at that point. Not a huge issue.

I don't know what side effects there would be. Obviously it means that "turn 30" would happen twice, once in 1930 and then again in 1960. So you couldn't key any events to the turn number, but I think you could use civ.game.gameYear or civ.getGameYear() instead. Are there other major issues that I'm overlooking?

Altering the turns in this way would mess with the pre turn 200/Invention/Navigation caravan bonus. There might be some other turn specific game mechanic that slips my mind. Not really all that serious. Maybe it would mess with when cease fires expire, but I don't know much about that. Probably nothing too serious.

FYI, I wrote a "calendar" module that turns a date into a turn, which should also work to specify dates in this context.
 
At the moment, Lua can change the time per turn using

Let me ask you, if YOU wanted to make a WW2 into the Cold War scenario, like say last days of World War 2, playing through the year 2000, where the first couple of turns need to be all Strum und Drang as the Japanese Empire collapses and the rest of the scenario is a Cold War that could go hot through events where spying, covert actions and building were the prime play (think the Nappy III scenario of fits and starts with peace with the coalitions and convert support to Irish rebels and blockade zones) , how would you handle the issue?

Option 1 as you put it

Option 2 as you put it

or Option 3 as I put it where you have a compromise turn system like in Age of Charlemagne where the years are only six turns or less but is consistent for the scenario duration?
 
Let me ask you, if YOU wanted to make a WW2 into the Cold War scenario, like say last days of World War 2, playing through the year 2000, where the first couple of turns need to be all Strum und Drang as the Japanese Empire collapses and the rest of the scenario is a Cold War that could go hot through events where spying, covert actions and building were the prime play (think the Nappy III scenario of fits and starts with peace with the coalitions and convert support to Irish rebels and blockade zones) , how would you handle the issue?

As described, this scenario is a Cold War scenario, and the point of WW2 is to allow for a bit of variation in the initial conditions of the Cold War. My first instinct would be to design mechanisms around what would make a good Cold War scenario, and then try to use events to make an interesting first few turns.

If I couldn't design a decent event sequence for the end of WWII, I would probably just use option 1. It's easy and flexible and the date isn't something that factors prominently in making decisions.

I would also consider having 2 scenarios, since they really focus on different things. The first is a World War II scenario, and the second is a cold war scenario. At the conclusion of World War II, have an event that tells the player the post war "outcome" of WWII. E.g. "Soviet France", "Split France", "Soviet Germany", "Split Germany", "Soviet Poland", "Split Poland", "West Aligned Poland". Then you could either have several scenario files to choose from, or run an event on the first turn to set up the occupation zones of each defeated country. That would also let you change the relevant tribes between the two scenarios.
 
As described, this scenario is a Cold War scenario, and the point of WW2 is to allow for a bit of variation in the initial conditions of the Cold War. My first instinct would be to design mechanisms around what would make a good Cold War scenario, and then try to use events to make an interesting first few turns.

If I couldn't design a decent event sequence for the end of WWII, I would probably just use option 1. It's easy and flexible and the date isn't something that factors prominently in making decisions.

I would also consider having 2 scenarios, since they really focus on different things. The first is a World War II scenario, and the second is a cold war scenario. At the conclusion of World War II, have an event that tells the player the post war "outcome" of WWII. E.g. "Soviet France", "Split France", "Soviet Germany", "Split Germany", "Soviet Poland", "Split Poland", "West Aligned Poland". Then you could either have several scenario files to choose from, or run an event on the first turn to set up the occupation zones of each defeated country. That would also let you change the relevant tribes between the two scenarios.

That's interesting!

Are there scenarios with similar set up mechnaics? Cuse if so that's something I really want to explore.

Also....do you have links or suplments on what a "split Poland" be how it would look and how it might come to be? I've never heard of such a thing but it sounds awesome.
 
That's interesting!

Are there scenarios with similar set up mechnaics? Cuse if so that's something I really want to explore.

Not that I know of. Lua would make the process of doing something like this much less painful and more interesting. Lua also makes scenarios that don't involve conquering the world more feasible, so having two types of scenario is now more worthwhile than before.

Also....do you have links or suplments on what a "split Poland" be how it would look and how it might come to be? I've never heard of such a thing but it sounds awesome.

No, I don't have any such information. All I meant by it would be that, in principle, the Western Allies could have made progress faster than the Soviets, and ended up splitting Europe in Poland instead of Germany. I have no idea if a 1942 or '43 invasion of France and reduced Lend Lease to the Soviets could realistically have had the Western Allies in Poland before the Soviets, but it seems a reasonable eventuality to plan for in a scenario of this kind.
 
Top Bottom