Since this topic seems to generally get posts from people trying to figure out how to accomplish something in the editor, I thought we could also be proactive in posting different things in case someone wants to know how to do it.
In the scenario I am working on right now for Trainmaster, I decided that I wanted to be a true northeaster and have two seasons - winter and roadwork. For this I have created events that permit track laying only in the summer months, but at the same time I've made it for early, normal, and late winters and late springs. Here's how it works....
I'm using company variable 4 to accomplish this.
3 events are set to take place in the summer....at the end of may, beginning of June, and the end of June.
here's the conditions/effects for them:
1. check monthly at the end of the month.
company variable 4=0
month=5
random number 1-10,000 < 3000
effect is set company variable 4 to 1 - Game message says: Almanac predicts an early winter.
2. check monthly at the begining of the month.
company variable 4=0
month=6
random number 1-10,000 > 7000
effect is set company variable 4 to 2 - Game message says: Almanac predicts a late winter.
3. check monthly at the end of the month.
company variable 4=0
month=6
effect is set company variable 4 to 3 - Game message says: Almanac predicts winter on time.
--------
three events are then set to possibly trigger....with the message about snow falling in the mountains.....
1. check at beginning of month
month=11
company variable 4=1
effect is to set track amount to 0, then game variable 4=0
2. check at beginning of month
month=12
company variable 4=3
effect is to set track amount to 0, then game variable 4=0
3. check at end of month
month=12
company variable 4=2
effect is to set track amount to 0, then game variable 4=0,
----------
Then in February I do it all over again with another set of events, but then spring is early March, or on time, April, or late, May....set company track pieces to 250. return company variable 4 to 0
--------
What this does is gives it a 30% chance that winter will be early, if not then there is a 30% chance it will be late...otherwise it will be on time.
On the one hand, it replicates the inability to lay track on frozen ground, but the primary reason is to stop the player from a massive expansion after the year turns over and bonds are available. Connection conditions are taken into account in this.
After checking it out, I found that it works well and it provides a good mix of early/late/normal winters and springs. Some years I could build from March until the end of December (long), other years it would be from May to the end of October (short). But mostly it was a good mix. The amount of buildable track will change over time with the player able to buy more.
I made it a game message rather than a dialogue so that it doesn't keep pestering you with pop ups, and you just have to keep an eye on the Almanac predictions at the right time.
