How we do it.

Tips and Tricks on Events, Economy, etc.
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

How we do it. Unread post

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.
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Denying access to a territory. Unread post

Seems like a few people have been having problems with territory access....myself included....Stoker posted an explanation that was a bit confusing, and then posted a sample map that is 1.06, so now that I've managed to get it working for my current project, I'll try to post a clear instruction for people who can't see the test map.

Event at start up - one time only event...

Test against:

On screen players company
[select the territory you want to deny access to]


Conditions are:

Force test against territories AND
Force test against companies

-----

Apply effects to company/territory/player for which the condition is true.

Effects are:

set territory allow all to false.



------

Repeat the event for all the territories you want to deny access to.

To allow access at a later date, the effect will be to allow all to true, but include the triggering condition that you want to use. Personally, I will be using a variable for the trigger.



Edit: For some reason I have discovered a bug in the above, but I'm not sure if it is specific to me. It seems that in the territory where I do have access, I can lay track, build stations, buy industries, but it will not let me set up a train - it says I don't have access rights, despite that I do. Weird. Just plain weird.


Follow up....it seems that my problems above are related to only one territory where I have denied access to Territory 1, not 2, but 3-7. When I remove the event for T1 everything works out fine mostly, but I have events later that open mines in the AI territory based on the player's (bad) choices, and I somehow think this is causing the problems. I'm going to work on this some more.
Last edited by nedfumpkin on Sun Jan 11, 2009 8:27 am, edited 1 time in total.
User avatar
Hawk
The Big Dawg
Posts: 6503
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: How we do it. Unread post

This one rates stickying. :mrgreen:
Hawk
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Long in the tooth Unread post

When creating a scenario, often times the writer will want to include a lot of text information either at the beginning of the scenario, or through out. For players restarting the scenario for the million time, clicking okay as many times can get tedious. To overcome this, there is a simple event condition set up that can make it easy to skip through some or all of the info.

I am currently using game variable 3 for this purpose. The first event at start up that is a choice.

Do you want text?

Choice 1 is none - set GV3 to 1

Choice 2 is leave all - set GV3 to 2

Choice 3 is to skip the intro, leave all the rest - set GV3 to 3


Then when you post a series of text windows at the start of the game, you set the condition to GV3=2.

Any text that you want to make available after start up, the condition is GV3>=2

Any events with effects wouldn't have the GV3 condition unless you wanted to make the first run through a bit easier
low_grade
Dispatcher
Posts: 438
Joined: Sun May 17, 2009 3:02 pm
Location: Cleveland, OH

Hauling integrity Unread post

One thing I've been thinking about but haven't implemented yet is that for a lot of hauling goals I see scenarios using a simple test condition of LTD xxx hauled to territory (or YTD as the case may be.) I find it a little weak that this includes hauling from one city to another in that territory, when the intention is usually to haul from one territory to another. So, I've made a mental note to myself. The next time I have this kind of goal, I'm going to make the test condition be xxx hauled TO territory MINUS xxx hauled FROM territory. That should cancel out any attempts to meet the hauling goal by simply moving the same cargo around repeatedly, which is especially crucial for 1.06 scenarios that let you haul at a loss.

I know this means making the test much more complicated, since now you have to use a territory variable defined in an event which may have to test weekly if you want your status report to be reasonably up to date which says TV1 set to LTD xxx hauled To territory, TV1 minus LTD xxx hauled from territory. But even though it's more complicated, it also gives a win more integrity, which I very much appreciate in a scenario.
User avatar
JayEff
Conductor
Posts: 240
Joined: Sat Nov 11, 2006 8:51 pm
Location: Edmonton AB

Re: How we do it. Unread post

Low-grade, another method that I have used is to limit this abuse is to prebuild a station whose track component occupies a very tiny territory. The station represents a military base, so it does not seem out of place. So there is only room for one station in the territory, so there can be no abuse.

Also, in some scenarios, I have used the value of goods hauled to and/or from a territory, which limits the potential for monkey business.
User avatar
edbangor
Dispatcher
Posts: 311
Joined: Wed Sep 09, 2009 10:24 am
Location: Berks, England
Contact:

Re: Denying access to a territory. Unread post

nedfumpkin wrote:Seems like a few people have been having problems with territory access....myself included....Stoker posted an explanation that was a bit confusing, and then posted a sample map that is 1.06, so now that I've managed to get it working for my current project, I'll try to post a clear instruction for people who can't see the test map.
As was pointed out by Blackhawk in the thread for my TM scenario in progress "Channel Ferries" it you have companies set up in the editor then territory access can be set in the editor without using events.
Just become the player who controls that company - [Ctrl] click on the portrait in the stock market screen - then go to their company's territory access screen, and click on the cross/tick that shows if they have/haven't access to the territory and the game will offer to change it. That will then be set for when the game starts.

This is especially usefull if you have a lot of territories - including 'hidden' ones - and need a mix of different companies to have different access.
I need a little less pressure, and a little more time
"A Little More Homework" by Jason Robert Brown from 13: the Musical
Post Reply