FayI
December 7, 2018, 4:09pm
1
I was going to post a question, but I had a good old go at making something up, and it turns out Choice can calculate the difference between two numerical stats, and then use that difference in tests!
I’m rather excited. For reference, it’s:
*if ({stat1} - {stat2}) >= 50
Don’t know if it would be of use to anyone - but I couldn’t find it in semi-recent topics, so maybe it hasn’t come up!
Any other cool maths-related tricks I might not know about?
7 Likes
I think baroque used this for its skillchecks, and aye, it’s a nifty little thing
Hazel
December 7, 2018, 5:02pm
3
Does it really need the curly braces?
Szaal
December 7, 2018, 5:25pm
5
*if (stat1 - stat2) >= 50
Your stats, ${stat1 - stat2}, should be less or equal to fifty.
5 Likes
FayI
December 7, 2018, 7:55pm
6
Nice! Considering I have a tendency towards complications, keeping it simple is good!
Szaal
December 7, 2018, 8:07pm
7
I’m actually surprised that nobody has pointed out the obvious mistake in my example code, considering the number of likes.
Well, I’ll let it roll :"
FayI
December 7, 2018, 8:09pm
8
I just love errors, they’re all part of the process
will
December 7, 2018, 10:11pm
9
Should it be *if ((stat1 - stat2) >= 50)
instead?
Szaal
December 7, 2018, 10:17pm
10
It’s fine, just like how a simple *if stat < 5
works.
Though to be fair, that’s not what I meant with obvious mistake. If that’s what you’re trying to point out
> is the symbol of more than, not less.
will
December 7, 2018, 10:19pm
11
Duhhhr I didn’t even read the flavour text closely
2 Likes
Szaal
December 7, 2018, 10:22pm
12
The most elusive of rats hide in plain sight.
Yes, I made it up myself. Sounds cool, though.
will
December 7, 2018, 10:23pm
13
Counterpoint: They say the spiders you can see are a mere tenth of the spiders you can’t.
That’s very neat. But CS can’t do this
*if ((var1 - var2 - var3) < 50)
Instead it requires this
*if (((var1 - var2) - var3) < 50)
Ugh! An expression is not two variables and an operator!
1 Like