|
flagator_
|
 |
« on: 06/14/01 at 12:22 AM » |
|
I'm going nuts here! How in the world are you supposed to affect, or even test for, Swiss bank money? I can't find any mention of it in the Edcondit.txt or Edeffect.txt lists. The only place I see it mentioned is in the main Editor.txt, under the MultiplyBy effect. It says Swiss money can be affected by the MultiplyBy effect -- which means that it IS a variable and CAN be affected -- but nowhere does it give the variable name! I've tried SwissBank, SwissMoney, GSSwissBank, GSSwissMoney, etc. etc. but I keep getting vague parsing errors like "Unable to resolve expression to a single value" or "Operator is invalid for first or last position". What am I supposed to do?!  This whole map I'm working on is based around stashing money in your Swiss bank. If I can't use a script to put money in the player's Swiss account, this entire scenario is shot to heck! ARRRRGGGH! 
|
|
|
|
wheels
Tourist
Offline
Gender: 
Posts: 12
|
 |
« Reply #1 on: 06/14/01 at 12:55 AM » |
|
Try GSSwissBankSize. It's in the list.
And I need help on something too. How do you determine the base or starting rates for things such as CloudRate, FarmingRate etc? The script samples throw in a range of AddTo numbers (including +800 for FarmingPollution). But how can you know how much to add or subtract without knowing the starting rate? I just don't want to overdo it on rainfall and cause a flood!
Appreciate any advice.
|
|
|
|
|
|
Mercator
|
 |
« Reply #2 on: 06/14/01 at 05:39 AM » |
|
Try GSSwissBankSize. It's in the list.
And I need help on something too. How do you determine the base or starting rates for things such as CloudRate, FarmingRate etc? The script samples throw in a range of AddTo numbers (including +800 for FarmingPollution). But how can you know how much to add or subtract without knowing the starting rate? I just don't want to overdo it on rainfall and cause a flood!
Appreciate any advice.
Well, all of those are percentages. I've always assumed it begins at 100%. So if you do GeneralEffect AddTo Cloudrate 50, you just increased the cloudrate to 150%. I could very easily be wrong though (wouldn't be the first time!). Maybe its possible to test by making testevents. ------------------------------- FrequencyCheckWeekEnd AlwaysTrue GeneralEffect AddTo GroupVariable1 CloudRate MessageTypeDossier MessageText "The Cloud Rate right now is [TRIGGER_GROUP_VARIABLE_1]." --------------------------------------- *MoreClouds.evt* FrequencyWeekBegin AlwaysTrue GeneralEffect AddTo CloudRate 50 GeneralEffect AddTo GroupVariable1 CloudRate MessageTypeDossier MessageText "The Cloud Rate right now is [TRIGGER_GROUP_VARIABLE_1]." --------------------------------- I'd test it out myself, but I have to go to work in 20 minutes. I'll try it when I get back (unless someone else tried it before or knows it won't work).
|
 The fetus, following the advice of his A typical day in the life of Mercator attorney, has offered no comment on the shooting.
|
|
|
wheels
Tourist
Offline
Gender: 
Posts: 12
|
 |
« Reply #3 on: 06/14/01 at 07:48 AM » |
|
 I tested CloudRate, FactoryRate, ReforestationRate and FarmingPollution. They all came back with the error "Unable to resolve to a single value." I guess rates must employ some kind of formula rather than a fixed value.  HOWEVER. Your %age theory rang a bell so I checked the fertilizer deal in Mum of Cigars. The message reads: "We have been offered a chemical fertilizer that will improve tobacco yields by 50%\n\nHowever, it will also triple the maintenance costs of tobacco farms..." The coresponding effects are: GeneralEffect AddTo FarmingRate 50 GeneralEffect AddTo FarmingMaintenance 200 Thanks for the tip. Have fun at work -- I'm going to bed 'cos I live on the other side of the world.
|
|
|
|
|
|
flagator_
|
 |
« Reply #4 on: 06/14/01 at 08:22 AM » |
|
Try GSSwissBankSize. It's in the list.
Okay, that's how I test for it. But what's the variable name? What variable do I use to add money to the Swiss bank? I can't find that anywhere.
|
|
|
|
|
Mercator
|
 |
« Reply #5 on: 06/14/01 at 08:27 AM » |
|
Yeah, it's called SwissBank.
Try GeneralEffect AddTo SwissBank 2000
I have no idea why your getting errors, but it's not due to the word SwissBank. I use it in my scenario just fine.
|
 The fetus, following the advice of his A typical day in the life of Mercator attorney, has offered no comment on the shooting.
|
|
|
|
flagator_
|
 |
« Reply #6 on: 06/14/01 at 08:37 AM » |
|
Well, all of those are percentages. I've always assumed it begins at 100%. So if you do GeneralEffect AddTo Cloudrate 50, you just increased the cloudrate to 150%.
And remember, since the modifier is a percentage change too, anything you AddTo affects the total; if you AddTo 50 then AddTo -50 you won't be at 100 percent again, you'll be at 75! I have an event in the map I'm working on now which simulates an island with a rainy season and a dry season. At different times of the year I AddTo CloudRate -33 (taking it to 67%) then later in the year AddTo CloudRate 50 (which brings it back to 100%). Also be aware that more rain does not necessarily equal better. I was playing Mike Cresswell's map 'The Ancient One' which includes an offer that boosts cloudrate by 100%... instantly the whole island was a swamp! The ground was so wet I had to feed my people pineapple because I couldn't grow corn anywhere! (On the good side, you should have seen my farms pump out sugar after that... too bad it wasn't a rum scenario.) So be careful when messing with CloudRate, small Effects can have big effects!
|
|
|
|
|
flagator_
|
 |
« Reply #7 on: 06/14/01 at 09:05 AM » |
|
I think I figured out why I was getting the errors even though I had tried the right variable names... I was trying to do math in the effects. I was doing things like: GeneralEffect SetTo GroupVariable2 (GSNumberResidents * 1.12)
...which you can't do. I had to assign intermediate values to EventVariables and use MultiplyBy. A pain in the butt, and it requires about 3 times as much coding, but it should work.
I thought sure I'd done events before where math worked, but I think that was in the Conditions instead. Well, at least my events should compile now... (I say "should" 'cause I haven't finished changing them all yet... the Score event should be a royal pain. But here's hoping.)
|
|
|
|
wheels
Tourist
Offline
Gender: 
Posts: 12
|
 |
« Reply #8 on: 06/14/01 at 05:22 PM » |
|
And remember, since the modifier is a percentage change too, anything you AddTo affects the total; if you AddTo 50 then AddTo -50 you won't be at 100 percent again, you'll be at 75!
I'm not sure if that's the case. In the fetilizer event, it uses AddTo of 200 to "triple" FarmMaintenance. Now, if the AddTo function applies a percentage to a base of 100, then 200% x 100 = 200. This only doubles it. It seems to be adding 200 to 100, equals 300 which is triple. I'm going to test a few changes on the actual farm maintenance costs so will hopefully figure it out. (Not right now, have to go to the dentist). Yeah, so far a big increase in cloud rate really plays havoc with the crop conditions. This is going to be part of the scenario I'm working on but I plan to change it only every 5-10 years.
|
|
|
|
|
|
flagator_
|
 |
« Reply #9 on: 06/14/01 at 06:10 PM » |
|
I don't think so. I think when you do an AddTo on a percentage quantity like CloudRate, you're adding that percentage of the current value, not adding the numeric values. So it's just the same as if you typed into a calculator, 100 + 200 % = which would give you 300. Same way when it's a starting quantity other than 100. Try SetTo CloudRate 50, AddTo CloudRate 100, then print the CloudRate. It'll be 100 again, not 150. Which also means, no matter how much you AddTo CloudRate, adding -100 should lower it to zero.
One thing that supports this theory is that you can't use MultiplyBy for most of the values in the game (only for money amounts and variables). When you AddTo a percentage amount, you ARE effectively multiplying.
|
|
|
|
wheels
Tourist
Offline
Gender: 
Posts: 12
|
 |
« Reply #10 on: 06/14/01 at 06:43 PM » |
|
Problem is, if you AddTo -100 and lower it to zero, how do you get it back up? Any percentage of zero is zero.
|
|
|
|
|
|
Mercator
|
 |
« Reply #11 on: 06/14/01 at 07:29 PM » |
|
Jeepers. He's got ya there Gator....  I personally don't know either which way it is. And I think as a whole, we best find out which it is.
|
 The fetus, following the advice of his A typical day in the life of Mercator attorney, has offered no comment on the shooting.
|
|
|
wheels
Tourist
Offline
Gender: 
Posts: 12
|
 |
« Reply #12 on: 06/14/01 at 10:50 PM » |
|
Did some tests and came up with the following:
1. Yes, AddTo applies a percentage 2. It is ALWAYS a percentage of the base number, not the current number
Tested as follows: -ascertained base farm maintenance is $40/year -increased it by 'AddTo 200' giving $120 -then increased by a further 100, giving $160
in other words, the first change added 200% (2x40), the second added 100% OF THE BASE NUMBER = 40
- reduced by 50, giving $20 - then increased by 200, giving $100 (20 + 2x40)
This also solved the zero question: -reduced by 100, giving $0 -then increased by 200, giving $80
This suggests that your 67/33 for clouds should be minus 33, then plus 33. Plus 50 would bring it up to one-plus-one-third the original rate.
For info, the following are the annual maintenance rates for the buildings able to be changed:
Farm 40 Ranch 30 Mine 120 Logging camp 60 Fishing Dock 60
Rum Distillery 880 Cigar Factory 400 Jewelery Factory 520 Cannery 600 Lumber Mill 200
I guess in Tropicoland, if you're a Lumberjack you're OK.
|
|
|
|
|
|
flagator_
|
 |
« Reply #13 on: 06/14/01 at 10:53 PM » |
|
Problem is, if you AddTo -100 and lower it to zero, how do you get it back up? Any percentage of zero is zero.
Use SetTo instead of AddTo.
|
|
|
|
|
flagator_
|
 |
« Reply #14 on: 06/14/01 at 10:55 PM » |
|
Did some tests and came up with the following:
1. Yes, AddTo applies a percentage 2. It is ALWAYS a percentage of the base number, not the current number
Hmmm. So I was half right. Guess that's better than being all wrong. That way certainly makes the math easier. I guess in Tropicoland, if you're a Lumberjack you're OK.
And in the mighty forests of British Columbia.
|
|
|
|
wheels
Tourist
Offline
Gender: 
Posts: 12
|
 |
« Reply #15 on: 06/15/01 at 12:04 AM » |
|
And in the mighty forests of British Columbia.
With my best girl by my side. The Editor info from Poptop says SetTo and MultiplyBy only work with Money, Swiss bank and game score. I should have read it all the way through first.
|
|
|
|
|
|
flagator_
|
 |
« Reply #16 on: 06/15/01 at 12:29 AM » |
|
With my best girl by my side.
The Editor info from Poptop says SetTo and MultiplyBy only work with Money, Swiss bank and game score. I should have read it all the way through first.
They also work on GroupVariables and EventVariables. On Wednesdays I go shoppin' and have buttered scones for tea.
|
|
|
|
|
Mercator
|
 |
« Reply #17 on: 06/15/01 at 08:06 AM » |
|
So its possible to have:
GeneralEffect SetTo GroupVariable1 CloudRate GeneralEffect AddTo CloudRate 50 GeneralEffect SetTo GrouVariable2 Cloudrate MessageTypeDossier MessageText "The Cloudrate was {TRIGGER_GROUP_VARIABLE_1) and now is [TRIGGER_GROUP_VARIABLE_2)."
And it would work? I can't test it, since I'm going camping in an hour.
"I cut down trees. I skip and jump. I like to press wild flowers."
|
 The fetus, following the advice of his A typical day in the life of Mercator attorney, has offered no comment on the shooting.
|
|
|
|
flagator_
|
 |
« Reply #18 on: 06/15/01 at 10:14 AM » |
|
Well, assuming you got the brackets right instead of using those {s and )s... CloudRate is the effect; it's the variable you change. I don't know what the condition is, the one you read. (It's the difference between SwissBank and GSSwissBankSize.) If I had to guess I'd try GSCloudRate, since I can't find it in the list. (And what's the difference between Money and GSTreasurySize? Money works for both, AFAIK.)
Also, you weather meddlers out there should be aware that changing CloudRate does not have an *immediate* effect. It changes how thick the clouds are, but the clouds still have to generate at the edge of the map, move over your island and do that rainy thing. So a change in cloudrate will take a few months before you see any effect -- and a few months more before any change in your crops' growth will become noticeable.
Eddy puts on women's clothing and hangs around in bars.
|
|
|
|
wheels
Tourist
Offline
Gender: 
Posts: 12
|
 |
« Reply #19 on: 06/15/01 at 07:07 PM » |
|
Tried GSCloudRate - no luck. Doesn't matter. Just think in percentages.
I wish I was a girlie, just like my dear Mama.
|
|
|
|
|
Railnut
Senior Ranking Member of the Board, Second Only to CafeDave
Global Moderator
Deity
   
Offline
Gender: 
Posts: 3872
|
 |
« Reply #20 on: 06/15/01 at 07:17 PM » |
|
Regarding Mercator's last post: Is it really possible to change a value in the middle of an event and read the before and after? I would expect it to take at least two events.
And flagator, you do realize that by mentioning his name you've invited him to take this thread to the netherworld of irrelevance don't you?
|
(((()))) \\ // \/ The sky is not the limit......the ground is! Live to jump. Jump to live.
|
|
|
|
flagator_
|
 |
« Reply #21 on: 06/16/01 at 01:02 AM » |
|
[/glow] Anything but that! The horror! The horror!  This is one of the most relevant forums on the board. He wouldn't come here on his own. I think we're safe here, so long as nobody purposely alerts him, and so long as we're sure to include something on-topic in each post. Such as this... As for Merc's sample coding, I think it would work, assuming the game handles code line-by-line, which I think it does. I've done events where I had GeneralEffects modify variables before the MessageText that prints them out, even though in the scripting guide, it lists GeneralEffects after MessageText. So I think it executes each line one at a time as it comes to them. (If it didn't some of my multi-line formulae would get quite messy... multiplying before adding instead of after, for example). Makes me wonder, can you have multiple MessageTexts in one event? Hmmmm?  I'm not a lumberjack, but I'm OK. I work all night and I sleep all day.
|
|
|
|
|
Eddy
|
 |
« Reply #22 on: 06/17/01 at 02:47 AM » |
|
*eddyatwork is sleeping in his palatial bed when something, much like a disturbance in the force; a million posts suddenly becoming silent awakens him*
*eddyatwork looks nervously around for swimming snakes, tarantulas, and karaoke machine repo men*
*satisfied that his regularly scheduled torture singing will continue, he logs onto the cafe.*
*Eddyatwork goes to the arena, the night club, and the basic questions fora.*
*Satisfied that all his POOOOOOOSTs are doing well, he checks his total number of posts, smiles smugly as he notes his position, sends Brian a rude email pointing this out then pauses*
*Still feeling nervous about something, he looks at the somewhat dusty entrances to other fora. After action reports? What in the world is that? Strategy hints and cheat? No. I was in there a few days ago. Technical questions? I think not. Darned users. Scenario editor. Scenario editor.*
*Eddyatwork pauses for a long time and moves his mouse towards the link that will open the rusty and obviously unused gate that opens to this portal.*
*After a very long pause, he clicks the logoff button instead.*
"Nobody would talk about me on a boring place like that."
*Eddyatwork goes back to sleep feeling assured of his imperial status*
|
El Presidente Para La Vida de la Isla Magnifica de Eddy
The only bad post is the one not posted. - El_malo Mess with the best, get paddled like the rest. - Junta Joe May the redness of your bottom be an example to all who dare to challenge Eddy... - Mr. P A day without paddling is like a day without the sun. - AriesQTPie I will BE posting! - BatchMan
The Official Rebel Paddling Ceremony. Now with paddles!
Eddy is the lifestyle revolution of the 21st century!
|
|
|
|
Mercator
|
 |
« Reply #23 on: 06/17/01 at 07:16 PM » |
|
Well, assuming you got the brackets right instead of using those {s and )s... Smart@ss.
|
 The fetus, following the advice of his A typical day in the life of Mercator attorney, has offered no comment on the shooting.
|
|
|
|
Coconut Kid
|
 |
« Reply #24 on: 04/26/12 at 09:13 AM » |
|
An Interesting Thread The answer to the OP's initial question: Try GSSwissBankSize. It's in the list. It's in Cafe Dave's documentation under > Game Statistics / Money/Score < which shows: - GSSwissBankSize
- GSTreasurySize
- GSBuildingsValue
- GSBaseScore
- GSDifficultyAdjustedScore
. One wonders why that was so difficult for Flagator to discover. Okay, that's how I test for it. But what's the variable name? What variable do I use to add money to the Swiss bank? I can't find that anywhere. Oh. << SwissBank >> I think I figured out why I was getting the errors even though I had tried the right variable names. I was trying to do math in the effects. I was doing things like: << GeneralEffect SetTo GroupVariable2 (GSNumberResidents * 1.12) >> which you can't do. I had to assign intermediate values to EventVariables and use MultiplyBy. A pain in the butt, and it requires about 3 times as much coding, but it should work. ... Game Statistics (GS) includes the broad categories: - Revenue / Expenses
- Export Value / Units
- Resident Popuation / Ratings
- Worker Productivity / Pay
- Food / Meals
- Political
- Tourists
- Geographic
- Money / Score
. There are a lot of things there to check\test. Many - maybe most - appear in the Almanac.
|
|
|
|
|