... 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? ...
... 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 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
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%).
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 ...
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.
I 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 [but adds to or subtracts from 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 'AddTo 100', giving $160
in other words, the first change added 200% (2x40), the second added 100% OF THE BASE NUMBER = 40
[second test]
- reduced by 'AddTo -50', giving $20
- then increased by 'AddTo 200', giving $100 (20 + 2x40)
This also solved the zero question:
-reduced by 'AddTo -100', giving $0
-then increased by 'AddTo 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
Caveat: Wheel's maintenance figures
may be variables which depend upon the setting of the "economic difficulty" slider - as set at the games beginning or by later script.
This speculation is based on the fact that the "CloudRate" (rain level) is a variable figure set in coordination with the "Vegetative Level" set by the slider in the map setup.The Editor info from Poptop says SetTo and MultiplyBy only work with Money, Swiss bank and game score. I suspect the idea of these has entirely to do with the game ending, i.e. the scoring routine. The scripter does a routine similar to the game's standard scoring systems. A script to multiply money values including the Swiss account to derive an adjusted value, and/or set the game score to a derived or fixed figure.