Subtleties of Conditions and Effects?

Tips and Tricks on Events, Economy, etc.
low_grade
Dispatcher
Posts: 438
Joined: Sun May 17, 2009 3:02 pm
Location: Cleveland, OH

Subtleties of Conditions and Effects? Unread post

So I'd like to get a handle on the various boxes you can check and everything else about conditions and effects.

I'll use an example from a scenario I'm working on now to get started. I may be back to this topic ofter, I suspect, until I feel a lot more comfortable than I do now.

So, I want to halt all train traffic along a specific route (which I've made into its own sub-territory called "High Mountains") for four months each year. I also want to warn the player that I'm going to do this. This is what I've set up, let me know if it'll work please and if I'm missing anything.

Event 1: warning
Conditions: force test against territory true, company track miles>0, test against on screen player only, "High Mountains" territory, single player, one time only event
Effects: none, just the message

Event 2: Slow traffic to zero
Conditions: force test against territory true, game month = 5, "High Mountains" territory, single player
Effects: all engine speeds -100% for four months, apply effects to the territory for which the condition is TRUE

Thanks!
User avatar
EPH
Dispatcher
Posts: 451
Joined: Sun Nov 12, 2006 3:23 pm
Location: York PA

Re: Subtleties of Conditions and Effects? Unread post

You could also try a 'destroy trains' event in that territory, or - I think - just remove the player's access rights to the territory. That should stop any trains from being able to go there even if the player has track and stations.

For something similar, look at my 'Transcontinental'. There is an event that warns the player that winter is coming and sets track-building costs to absurd levels, and another that returns the costs to normal and lets the player know it is OK to build.
The optimist proclaims we live in the best of all possible worlds; and the pessimist fears this is true." - James Branch Cabell
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Re: Subtleties of Conditions and Effects? Unread post

Go have a look at how I did the two seasons events viewtopic.php?f=66&t=1621

This one is set for track building, but the logic can be applied to what you want to do. It offers variations based on early/late winters and springs based on random numbers.
User avatar
JayEff
Conductor
Posts: 240
Joined: Sat Nov 11, 2006 8:51 pm
Location: Edmonton AB

Re: Subtleties of Conditions and Effects? Unread post

You can also try writing an event that closes the mountainous areas in winder so you cannot build and cannot run trains.
low_grade
Dispatcher
Posts: 438
Joined: Sun May 17, 2009 3:02 pm
Location: Cleveland, OH

Re: Subtleties of Conditions and Effects? Unread post

Thanks for the prompt responses, fellas. Yes, I've inspected what you both did previously, and was partly inspired by that to do this. Also by the real life fact that no trains ran in the winter on this particular route. But looking at what somebody has done and being comfortable doing it yourself are two different things, so I thought I'd check. It sounds like you're both saying that it looks like this should work, though I could make it a bit more sophisticated. For now I'm happy to leave it as is.

On to the next example.

I want to give the player a requirement of hauling crystals (nitrates) out of a sub-territory (no visible border) in order to keep rights to haul from that territory. When the time is up, if there hasn't been any action, they're out. So here's what I'm thinking, and I'm not too confident about this.

Conditions: LTD crystals hauled from territory by company=0, current game year=1890, test against on screen player's company only, select "Antofagasta Nitrates" from drop down box, single player, one time event
Effects: Set territory Allow All to FALSE, apply effects to territory/company for which condition is true

Of course I'm worried this will deny the player access rights to all territories. But I can't figure any other way to set this up... any thoughts?

Thanks again!
Grandma Ruth
CEO
Posts: 1237
Joined: Mon Nov 13, 2006 7:17 am
Location: West Yorkshire, England
Contact:

Re: Subtleties of Conditions and Effects? Unread post

I'm at work so I can't check this out but I think you'll need another condition "Force test against territories". But I think you're right, even with that condition, as it stands it might deny all the territories where there has been zero haulage, which might be any number and is totally outside the scenario writer's control. I'll have a look when I get home and I've got the game in front of me!
Generally speaking, it can be useful to have two events to create an effect sometimes. The first event - i.e. zero crystals hauled to territory X - has the effect of creating a territory variable (or company/player/game variable, whatever works best). The second event tests for the variable itself, not the condition that created it. You have a lot more control then, you know exactly what variables each territory/player/company has and you know your effect is going to work only on the territory/player/company that has that variable. Does that make sense?
low_grade
Dispatcher
Posts: 438
Joined: Sun May 17, 2009 3:02 pm
Location: Cleveland, OH

Re: Subtleties of Conditions and Effects? Unread post

Ah, good idea with the two events method here, I'll try that approach. The extra force test against territories condition wouldn't work, though, since I'm already testing against a territory...
Grandma Ruth
CEO
Posts: 1237
Joined: Mon Nov 13, 2006 7:17 am
Location: West Yorkshire, England
Contact:

Re: Subtleties of Conditions and Effects? Unread post

I'm at home now and I checked. We had a problem with the TrainMaster test map and Wolverine fixed it using a territory variable. It's exactly the opposite of your event - allowing access to a territory, not denying it.

First event effect is "Set territory variable 1 to 1"
Second event condition is "Territory variable 1 = 1"
and second event effect is "Set "allow all" to True" - applied to the territory/(company) for which the condition is true
low_grade
Dispatcher
Posts: 438
Joined: Sun May 17, 2009 3:02 pm
Location: Cleveland, OH

Re: Subtleties of Conditions and Effects? Unread post

Yup, that's what I did. Just recently figured out that the game keeps track of territory variables separately for each territory, so that if you have 5 territories you have 5x4=20 territory variables, and same for company and player variables.

One thing that didn't work in the winter snow event is testing against track miles. I found another variable to use, though, track sections in territory, which I'm hopeful about.

Here's another question. When you apply % increases and decreases to cargo prices or production, does it use the current or the original unadjusted value to figure the amount to increase/decrease? It seems like on a map I'm working on that when I first applied a 100% decrease in crystal production to the whole game and then a 300% increase to one territory that the production was still zero in that territory, so I'm pretty sure how to answer this question, but I wanted to ask anyway.

And one last question. I haven't played my map through to find out if the denial of territory access will work if you fail the hauling mission, but I suspect it won't, because I made the territory in question a sub-territory which doesn't have its own access cost/permissions to begin with. So I think I have to go back and make the sub-territory a regular territory if I want this to work. Anybody else have thoughts on this?

Edit: just played through long enough to find out that my territory denial scheme didn't work. Dug around into other people's scenarios and now I think I have it. In order to deny access to a territory, it cannot be a sub-territory (ie, must check visible border box), and it cannot have limited access, otherwise the player can just buy access back again, then when you want to deny access you need your event to check for territories, select the one you want, and the effect is Allow All = FALSE for the territory/company for which conditions are true. Haven't played through again yet, but I think this will work.
User avatar
EPH
Dispatcher
Posts: 451
Joined: Sun Nov 12, 2006 3:23 pm
Location: York PA

Re: Subtleties of Conditions and Effects? Unread post

Percentages are cumulative in RRT3: if you reduce something by 20%, and then reduce it again by 20%, you have reduced it by 40%, not 20% + (20% of 80%) for 36%.

One simple way is to keep the purchaseable access but inflate and reduce it. You can argue it costs $5,000 (for example) to open the road in the spring, but $40,000,000 to do the same in the winter. Resetting the 'access allowed' and adjusting the access fee could be a nice bit of flavor. Call out the snowplows! :-D Perhaps sustained investment (AKA the Central Pacific's snowsheds) could eventually reduce or eliminate this fee, leaving it to the player to decide if the investment is worth it.

One problem with using 100% reduction in production or price is that it can take the economic model time to recover demand. Best to reduce production or price by 75%, or maybe 90%, and avoid the 100%. I tried using 100% reductions in Japanese Miracle and finally decided it just wasn't working - demand comes back up very slowly. I believe that game now reduces production/price by less than 100%.
The optimist proclaims we live in the best of all possible worlds; and the pessimist fears this is true." - James Branch Cabell
User avatar
JayEff
Conductor
Posts: 240
Joined: Sat Nov 11, 2006 8:51 pm
Location: Edmonton AB

Re: Subtleties of Conditions and Effects? Unread post

Low-grade, I think you solved the puzzle. That is probaboy why my invisible ice territories in Of Men and Seals did not close.
Post Reply