How to get a table to handle open-ended or negative values?

"How Do I...?"
Post Reply
User avatar
Kazander
General
Posts: 367
Joined: Sat Feb 23, 2008 7:51 pm

How to get a table to handle open-ended or negative values?

Post by Kazander » Sun Feb 24, 2008 4:39 pm

I'm trying to build an NPC Reaction table for GURPS, and it requires that I be able to lookup values <=0 (Disastrous), and >= 19 (Excellent).

So far I've not been able to figure out a way to get the <=0 part. I can just make a suitably large range above 18 to simulate the second, but that doesn't seem to work for the <0 values, as BRPG doesn't seem to accept negative values in a table.

Any ideas, or is this just not going to work as a table in BRPG?

Thanks in advance.

User avatar
heruca
Developer
Posts: 9382
Joined: Sun Nov 20, 2005 11:58 pm
Location: Buenos Aires, Argentina
Contact:

Post by heruca » Sun Feb 24, 2008 5:46 pm

When you write up your table, I believe if you end the range portion of a line with a "-" or a "<" symbol, it will accept open-ended results on the low end of the table's range, and if you end the range portion of a line with a "+" or a ">" symbol, it will accept open-ended results on the high end of the table's range.

As an example, here is how the sample Weather table could be made open-ended on both ends of the range:
  • 1< Blizzard
    2 Hailstorm
    3-5 Snow
    6-7 Sleet
    8-10 Drizzle
    11-18 Rain
    19-20 Heavy Rain
    21-30 Overcast
    31-40 Overcast, windy
    41-50 Partly cloudy
    51-60 Partly cloudy, windy
    61-65 Humid/muggy
    66 Foggy
    67-70 Clear, cold
    71-85 Clear, pleasant
    86-95 Clear, hot
    96-97 Scorching heat
    98 Tornado alert
    99 Hurricane or typhoon
    100> Monsoon
:arrow: Please help spread the word about BRPG and BGE, and never hesitate to tell me how I can make them better suit your gaming needs.

User avatar
Kazander
General
Posts: 367
Joined: Sat Feb 23, 2008 7:51 pm

Post by Kazander » Sun Feb 24, 2008 6:56 pm

Hmmm. I'm having mixed results with this. It does work at the top end, but not at the bottom end.

Here's the table as I've written it:

0< Disastrous.
1-3 Very Bad.
4-6 Bad.
7-9 Poor.
10-12 Neutral.
13-15 Good.
16-18 Very good.
19> Excellent.

I also tried with "-" instead of "<". I tried it with the symbol before the number. I also tried adjusting the table, so that it read "1<" on the first line, in case it was just a problem with "0".

No luck.

User avatar
heruca
Developer
Posts: 9382
Joined: Sun Nov 20, 2005 11:58 pm
Location: Buenos Aires, Argentina
Contact:

Post by heruca » Tue Feb 26, 2008 1:18 am

Thanks for the info, Kazander. It enabled me to find the bug that was causing the low range to fail to be set properly when it should be open-ended. Turns out I was missing a line of code. Consider this fixed for the next release.
:arrow: Please help spread the word about BRPG and BGE, and never hesitate to tell me how I can make them better suit your gaming needs.

User avatar
Kazander
General
Posts: 367
Joined: Sat Feb 23, 2008 7:51 pm

Post by Kazander » Wed Feb 27, 2008 10:39 am

You're welcome. Glad I could contribute.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests