Page 2 of 4

Posted: Thu Dec 13, 2007 12:56 am
by wsherrick
Here is the key to the whole thing. The variable in the condition remains true unless the random variable under it hits during the time alloted for it below. If the number hits. It then triggers the effect below

Posted: Thu Dec 13, 2007 12:56 am
by wsherrick
Image

Posted: Thu Dec 13, 2007 12:57 am
by wsherrick
If the number doesn't hit then the variable in the condition remains true and a different event is triggered.

Posted: Thu Dec 13, 2007 12:58 am
by wsherrick
Image

Posted: Thu Dec 13, 2007 1:02 am
by wsherrick
Hope this didn't take up too much space.
Think of the whole thing like a logical argument to prove a point. If A is true then effect one is true. If A is not true then effect 2 is true and so on.

Posted: Thu Dec 13, 2007 1:22 am
by Hawk
Don't worry about space. I still have about 36 GB of space left on the server, only having used about 4 GB so far. :D

Let's see if I get this.
By setting the random at 1-100<=11, then setting the time frame to between June of 96 and May of 97, if that random hits any number between 1 & 11 somewhere in that 12 months it will over-ride the Company Variable above that? And there's no way of telling if that random will hit between 1 & 11, so it's a dice throw, right?
And the odds are greater that it will hit between 1 & 11 than if that random were set to <=50
I think I need to study this a bit more. :lol:

Now, what about that Company Variable 1+1 (not in your explanation but from the post before yours).

Posted: Thu Dec 13, 2007 2:26 am
by Gwizz
Variables set up such as 'Game Variable 1+1'

What do they do?

This would add 1 to whatever the value of game variable1 is.

say GV1 =10 and you added 1 to it, it would then = 11

If the trigger for the next or another event said GV1>=11 then the trigger would fire true and the result/s of that event would activate.

Posted: Thu Dec 13, 2007 2:36 am
by Hawk
Gwizz wrote:This would add 1 to whatever the value of game variable1 is.
OK! What would be the purpose of that?

Posted: Thu Dec 13, 2007 2:43 am
by Gwizz
see on the post above yours. I added to that answer.

Posted: Thu Dec 13, 2007 3:00 am
by Gwizz
I believe Events should be as simple as possible. complicated events are sometimes needed but they can sometimes cause more problems then they are worth.

If event building is fun, then it can be a good challenge to do the hard ones.

Posted: Thu Dec 13, 2007 7:00 am
by Wolverine@MSU
Hawk wrote:OK! here's a specific question.

Variables set up such as 'Game Variable 1+1'

What do they do?
This is an "Effect" that will add 1 to Game Variable 1 when the trigger condition is met.

Random Variables assign a TRUE/FALSE condition based on comparison of a computer-generated number to some criteria. You decide whether you want the Event to trigger when the value of the random number is greater than, less than, equal to, > or =, < or =, etc. some value that set as the threshold. There are two ranges for random numbers: 0-100 and 0-1000. The 1-1000 range just gives you one more significant figure of precision. So instead of having a 10% chance of being true (Random 1-100 < 10), you can have 10.5% chance (Random 1-1000 < 105).

Posted: Thu Dec 13, 2007 1:10 pm
by Hawk
Thanks Gwizz and Wolvy. I think I'm starting to understand this now. :roll: :lol:

Posted: Thu Dec 13, 2007 5:49 pm
by wsherrick
One thing that confused me for awhile about random variables is the way they are set up. In the example above where the random variable is, you see the text in the box (Supreme Court repeals tax, etc.) The text there will not show up in the game unless the variable number is found true and the event fires. If it doesn't you don't see the text above. Random variables can be programed to be tested on a weekly, monthly or yearly basis. Obviously the more often you spin the roulette wheel the greater chance the random number will hit.
On the other subject. Variables that increase themselves (GV 1+1) I used these to test for the instant gold in Green Diamond. If you take over 3 or more AI companies you get instant gold. I gave each AI company a unique territory that could only be accessed by that company. When an AI company is taken over and the human player gets access to the unique territory + 1 is added to the controlling variable, it could be a company variable, game variable or territory variable, they all work the same way. If you take over three companies Variable +1+1+1 = Variable >=3 If that variable is equal or greater than 3 the instant gold is triggered. I hope my long winded explanations help somewhat.

Posted: Thu Dec 13, 2007 5:55 pm
by Hawk
Ah yes! That makes sense.
Finally something that does. :lol:

Posted: Thu Dec 13, 2007 6:03 pm
by WPandP
One thing I haven't figured out yet, is it possible to assign a random value to a variable? Like, instead of Game Variable 1 = 1, let GV1=[random]. I know how to use the random number generator to test against, but there doesn't seem to be a way to store a random value for later use.

Why would I want to do this? As an example, I am thinking of using events to script a "phantom" AI against whom you are to compete. Each year, this fake company posts profit/loss statements, such that you read about your off-screen competition via the newspaper. To seem authentic, the specific profit amount should be slightly random; you might key it in to overall economic status and how effective the real player's company is at stealing the competitor's business, so that the order-of-magnitude is controlled by game conditions. But then, you add on a small modifier that is a random number, such that instead of always seeing profits declared of $100k, $1000k, etc. you'd see $123k one year, $985k another, etc.

The reason the random value would need to get stored, though, is because maybe the game's winning condition is to post greater total profit, so every time this event fires then the gold medal target would have to increment by the exact same amount. Without storing the random value somewhere, I don't see how you could do this.

Have I missed something, or is there really no way to "write" random numbers to memory?

Posted: Thu Dec 13, 2007 6:31 pm
by Gwizz
I.m not sure if you could do this in RT3, My memory says it is possible in RT2. I'll have to look at the editor.

Posted: Sat Dec 15, 2007 2:25 am
by wsherrick
WP&P you might be able to write a series of random events and tie them together with more than one variable to sort of get what you want. In AOS IV-Blue Streak, during the roaring 20's the player gets a choice to invest in the commodities market or municipal bonds. If the commodities market is picked it sets up a series of random variables that appear at the end of each year telling the player how well his investment is progressing. There are six different outcomes. He also gets the choice each year to stay in the market or sell out. If the player stays in the event is reset like a clock to tick away until the next time the random variable hits until he sells his stock or the market crashes and he loses everything. Perhaps you can look at Blue Streak and see how this was done and apply that to what you want to do.

Posted: Sat Dec 15, 2007 10:49 am
by Hawk
That idea is kind of along the line of what I'm thinking about. I'll have a look at Blue Streak and see if I can figure out your use of variables.
!$th_u$!

Posted: Sun Dec 16, 2007 5:21 am
by Hawk
William - I'm looking through Blue Streak and I have a couple of questions (probably the first of many :lol: ).

I see for the medal requirements you used Game Variable 1+1. I'm assuming that each time you achieve a requirement that it would add 1 to the variable, totaling 4, right?

In the final Gold you have the condition of Game Variable 1>=4. Could you not have simply used Game Variable 1=4?

I only ask in case there's something there I don't understand for using the greater than symbol.

******************************

Edit 1: In the derailments event you used a random 1 to 100<=12. Would that have a better chance of firing than if you used <= say 50?

******************************

Edit 2: In City Choice 1/effects/choice 4 you used Set Company Variable 2 to 8. I thought you could only go up to 4.
PS - Well - looking at Chicago Awarded conditions I see I was wrong. Never mind. :roll:
Hmmm? That gives me some ideas. :salute:

******************************
Edit 3: How in the name of all that is sanity did you keep track of your variable usage? *!*!*! !hairpull!

Posted: Sun Dec 16, 2007 7:37 am
by Wolverine@MSU
Hawk wrote:Edit 1: In the derailments event you used a random 1 to 100<=12. Would that have a better chance of firing than if you used <= say 50?
At the risk of stepping on William's toes, I'll answer that one: No. In the first case, there is a 12% chance (12/100) of the event firing, whereas in the second case there's a 50% (50/100) chance of it firing.
Edit 3: How in the name of all that is sanity did you keep track of your variable usage? *!*!*! !hairpull!
Write them down on a piece of paper!