Deth's Journal
"There Is Nothing To Understand."
The function "iif" is used in place of if. it's structure is:
iif(Param1: Boolean, Param 2: Any, Param 3: Any)
What this means is simply this:
If Parameter 1 is *True*, then Parameter 2 is used. If parameter 1 is *False* then Parameter 3 is used.
So for example, the following:
iif([%Range%] > Min (100, (([%Level%] - 1) * 5 + 40), 10000, 0)
Would return 10000 if Range is *greater* then 100, OR if range is greater then Level - 1 * 5 + 40.
So for level 50, we have: (50 - 1) * 5 + 40, or 49 * 5 + 40, or 245 + 40, or 285. If Range > 285, then the output equals 10000. Otherwise, it equals 0.
In the full formula, this is used as thus:
(75 + (([%Level%] - 1) * 7.5) * .02) - (([%Range%] / 10) * 2.00) - iif([%Range%] > Min (100, (([%Level%] - 1) * 5 + 40), 10000, 0)
Using, again, level 50, range 110 we get:
75 + ((50 - 1) * 7.5) * .02 - ((50 / 10) * 2.00) - iif(110 > Min (100, ((50 - 1) * 5 + 40), 10000, 0)
75 + (49 * 7.5) * .02 - (5* 2.00) - iif(110 > Min (100, (49 * 5 + 40), 10000, 0)
75 + (367.5) * .02 - 10.00 - iif(110 > Min(100, (245+40), 10000, 0)
75 + (7.35 - 10) - iif(110 > Min(110 > Min(100, 285), 10000, 0)
75 + -2.65 - 10000
72.35 - 10000
-9927.65
Which seems a little off, frankly. UNLESS this is being used to set the damage *to zero*. Think about it, kids: you can't have negative damage, so it's setting the number to zero by making it negative. Brilliant little hack, that! In short, this means the weapon can only have a *maximum* range of 100.
BUT, the basic gist is that you compare the first item, then if true, return the second parameter, else, return the third.
Min takes 2 numbers, returns the lower number. Max does the opposite - takes 2 numbers, returns the *higher* number.
For fun, a efw more formulas:
Weapon Reload Rate (milliseconds): 3.0 * (1000 - ((([%Level%] - 1) * 10) * .02)). For level 50, this returns:
3.0 * (1000 - (490 * .02))
3.0 * (1000 - 9.8)
3.0 * 990.2
2.9 Milliseconds per shot.
Easy-peasy, right?
The To-Hit Modifier: 0 - ((([%Range%] - 40) ^2) ^ 0.4), at range 60:
0 - (((60 - 40) ^ 2) ^ 0.4)
0 - ((20 ^2) ^ 0.4)
0 - (400 ^ 0.4)
0 - 10
-10 at 60 range.
As one can see, once you know what the %Range% and %Level% on an item is you can make all sorts of fun decisions about it; it essentially blossoms.
The main need in my program is to deal with those damnable iif blocks. Luckily, VB has something similar, i'm sure; to wit: IIf, which does *exactly* the same thing as the IIf in Space Empire's Scripting Language.
So far, my plan is to parse the file, identify "formula" blocks, and work from there, either hand-editing them into some semblance of executable code, or else handling them via a switch statement or something.
to quote:
"More and more hospitals around the country are
adopting the policy of removing organs from people with fatal brain
injuries after their heart stops, but before they are brain dead. Ohio
hospitals are the latest to consider this controversial policy, though
with some initial holdouts."
To me, this is one of those technical issues. If you're dead, you're dead. If you're unconscious, you don't feel pain. Once your heart stops and their not restarting it, then it's just a matter of you *cooling off* before you have rigor mortis set in. If this can save lives, then they should take it as the new standard; there's living people - who can talk, walk, and have their heart beat - who direly need those organs, after all.
To quote:
"All the average Jane knows is that someone wrote something
inflammatory and insulting to Catholics and put it online, and that
person is now working for the Edwards Campaign. I didn't get the sense
from the left that they were able to put themselves in other people's
shoes when analyzing this controversy.So let's not lose perspective here. Blogging is still a niche, and
the rules of engagement that you and I understand are lost on the
average American."
I have worked on political campaigns. I've worked the public angle (fairs, rallies, etc), and the private, organizational angle. I've done phone polling, all kinds of stuff. And you know what? My past activities NEVER came up. In fact, no one even ever asked me if i'd done this or that, because they didn't care - i was helping out, and that's what counted.
Did Marcotte and McEwan say some harsh words? you bet. Did they say some things against the catholics? Damn straight. Does it matter a jot? Not really. If you dig into anyone's past, you find countless skeletons buried in the closet. How far back can you go? To college papers, to high school newspaper articles, to debates, to journals, all searching for some trace of controversy, some hint of wrong-doing.
Let's be honest, here: the catholic church isn't really a respectable organization. Between the pedophile scandals, and it's long history of corruption (go ask your local priest about Indulgences), violence, and general abuse of power, it's not even really something I trust. Their stance on birth control has killed a great many people, and cosigned a great many more to lives of misery, as has their stance on divorce. They should - at *every possible juncture* be called out, analyzed, and dismissed as the lumbering, selfish dinosaur they are.
So far as harsh language goes, that is the sort of thing the religious care about, because larger issues - poverty, crime, etc - are just to hard to deal with, while a couple swear words are easy to fit lots of criticism on. Again, the religious right demonstrates that when faced with real problems, you can always fall back on being a pedantic, moralistic prude to distract people from the burning building around them.
Edwards, for his part, came off like a jackass. Instead of either coming out and saying "hey, i don't give a shit what they've said, their my crew now", he pulls out that he "talked to them" about it, and they've apologized. Way to bend over, edwards. Way to bend over. A man who will not defend his campaign staff, is a man who cannot be trusted. What else will he bend on? And not just to our local powers, but to foreign ones; would he have the balls to stand up and tell Iran or North Korea to go back to their hole, or would he wishy washy about it?
My Hope is that Wes Clark will again run in a serious way, but i fear edwards might get a lot of support, muddying the field.