Checking Alignment

For builders to discuss and ask building questions.
Post Reply
Torm
Sword Apprentice
Sword Apprentice
Posts: 77
Joined: Mon Jul 21, 2003 10:08 pm
Location: Trueheart

Checking Alignment

Post by Torm » Sat Sep 25, 2004 4:01 am

Okay, let me try to articulate what I am seeking. I need to check for specific alignments. The isgood check is too broad for my needs. I need to check for LG, LN, and NG. On the alignment list, LN falls below CG numerically. I don't want CGs included in the accepted alignments. So, is there a way to check for specific alignments? If so, is it available on the web page to be copied? If not, can we create a section for templates so that builders can go and copy bits of code that work instead of redoing it every time the work on an area? (Did that make any sense?) There is a sample area on the page. The templates would be more specific, often used bits of code.
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Post by Dalvyn » Sat Sep 25, 2004 2:30 pm

In align($n), Lawful-Good is 1000, Neutral-Good is 650, and Lawful-Neutral is 200. The simplest solution would be to use a program like this:

Code: Select all

if align($n) == 1000
or align($n) == 650
or align($n) == 200
  ** do things for people who can be accepted
else
  ** do things for people who cannot be accepted
endif
Unfortunately, alignment values are not always set to these exact values. You could want to allow for the values who are between 600 and 1000 as well as those between 100 and 300. That yields the following program.

Code: Select all

if align($n) < 100
** do things for people who cannot be accepted
else
  if align($n) > 600
  or align($n) < 300
    ** do things for people who can be accepted
  else
    ** do things for people who cannot be accepted
  endif
endif
In this case, you have to copy twice the "things for people who cannot be accepted". The idea of the program is as follows:

- If align < 100, the people cannot be accepted.

- Otherwise, the align is between 100 and 1000. There are two possibilities. First possibility is "the character can be accepted". That corresponds to align that is either > 600 or < 300. In this case, "do things for people who can be accepted". Otherwise [that is, if the align is in the 300-600 range], "do things for people who cannot be accepted".
Image
Torm
Sword Apprentice
Sword Apprentice
Posts: 77
Joined: Mon Jul 21, 2003 10:08 pm
Location: Trueheart

Post by Torm » Sat Sep 25, 2004 4:34 pm

If any of those PCs wish to join the Watch, then perhaps we can handle them directly. The alighnment check is just to help automate the whole process.
Post Reply