Game Variables
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.
Now, what about that Company Variable 1+1 (not in your explanation but from the post before yours).
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.
Now, what about that Company Variable 1+1 (not in your explanation but from the post before yours).
Hawk
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.
Last edited by Gwizz on Thu Dec 13, 2007 5:19 pm, edited 2 times in total.
- Wolverine@MSU
- CEO
- Posts: 1166
- Joined: Fri Nov 10, 2006 2:14 pm
- Location: East Lansing, MI
This is an "Effect" that will add 1 to Game Variable 1 when the trigger condition is met.Hawk wrote:OK! here's a specific question.
Variables set up such as 'Game Variable 1+1'
What do they do?
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).
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.
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.
Last edited by wsherrick on Thu Dec 13, 2007 6:00 pm, edited 1 time in total.
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?
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?
=Winchester, Paston & Portsmouth=
====== We Provide Pride! ======
====== We Provide Pride! ======
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.
William - I'm looking through Blue Streak and I have a couple of questions (probably the first of many ).
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.
Hmmm? That gives me some ideas.
******************************
Edit 3: How in the name of all that is sanity did you keep track of your variable usage?
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.
Hmmm? That gives me some ideas.
******************************
Edit 3: How in the name of all that is sanity did you keep track of your variable usage?
Hawk
- Wolverine@MSU
- CEO
- Posts: 1166
- Joined: Fri Nov 10, 2006 2:14 pm
- Location: East Lansing, MI
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.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?
Write them down on a piece of paper!Edit 3: How in the name of all that is sanity did you keep track of your variable usage?