Re: IDEAS: Alignment (and a quick newbie C question)

From: Barid Bel Medar (icarus@berkshire.net)
Date: 05/12/96


On Sun, 12 May 1996, ShadowLord wrote:

> On Sun, 12 May 1996 zero@baker.cnw.com wrote:
> 
> 	Ints/Long ints are 32 bits on most UNIX compilers, to my
> understanding.  

It's the processor, not the OS, but since I haven't run into a UNIX for a 
286, you're still right...

> many machines, I've heard, use 31 as a signed field, so it'd be better to
> use "unsigned".  

Well, some CPU's at least have instructions for signed integers, but I 
think it's mostly a compiler thing.

Since it looks like it might be confusing some people, this is how it 
works.  'int' is an alias for a different variable, the type of which 
depends on your compiler and machine.  (i.e., a 32-bit compiler on a 
64-bit machine probably still produces 32-bit ints.)  On gcc, int seems 
to be the same as 'signed long int'.  On bcc3.1, however, it's 'signed 
short int'.  The type of signed is *always* assumed unless explicitly 
defined otherwise.  So really, the flags used in CircleMUD are only 31 
bits (but we use the last bit anyway).

Actually, to be safer on some (stupid) compilers, you should use an 
unsigned int for flags.  Due to the way that arguments are passed (usu. 
on the stack), bit 31 (last) is sometimes treated as irrelevant and can 
be ditched.  Even worse, if you compare a signed int to an unsigned int 
on this compiler, not only is the result undefined, but so are the values 
of *both* of the ints.  This awful bug seems to be present in bcc3.1 
intermittently.  Thank God I never have to use it any more.

But this isn't why I replied...  sorry.

> Morality and Lawfulness are all good, but their
> Loyality is something else, and Loyality to country and loyality to their

(Loyalty, not loyality.)  Try the eight virtues: Compassion, Valor, 
Justice, Sacrifice, Honor, Humility, Spirituality, and Honesty.  It's 
pretty easy to classify things that way.

> religion is also different.  

Loyalty to your religion is Spirituality.

> It is, BTW, possible to be disloyal to your
> government or country and not break the law (although there is ways of
> being disloyal that is against the law -- treason).  

Loyalty to your country is Honor (or Honesty).  By being a citizen of 
that country, you've given an unspoken oath to obey your country's laws 
and support it rather than another country.  Nobody seems to hold to this 
at all, any more, but I still try to.

> Say there's a holiday
> that's not religious, just a holiday, like Independance day.  Not going,
> while not against the law, would be considered a lack of loyality for your
> country or governing parties.

Very true.  But for Independence day, a better way of looking at it is 
not showing respect for the people who died to make our country free - in 
other words, a lack of Compassion.

> 	Not being Loyal to your God doesn't require any kind of automatic
> events within cities.  

No, it doesn't require one.

> It just says, "Does this person pray?" and
> possibly, if you wanted automatic events, "Does this person attend
> church?".  The loyality to religion rules would be different for each
> religion.  For instance, I'm currently making orcs be cannabals, so I have
                                                        ^^^^^^^^^
Is it me, or does this look like 'cannabis?'  (Cannibals.  Cannonballs!)

> them have sacrificial rituals, etc.  Every game paints orcs as savage and
> unintelligent, perhaps, though, that's because no-one's been an orc from
> an orc's point of view.  Sacraficing someone to the Gods then eating them
> shows loyality to their God.  Not doing so, shows disloyality.

Right.  You could probobaly also give them points for Sacrifice.  (Heh.  
Sacrifice = asceticism, I think.)

Anyway, following their religion gets them Spirituality.  Not doing it 
gets them nothing.  It's a point system - zero means you've done zip for 
that skill, and the higher, the better.

> 	Then that would determine their alignment and you could call them:
> 
> You are disloyal to state and country,
>         loyal to religion,
>         of good morale,
>         and somewhat lawful.
> This makes you Neutral.

The interesting thing about my points system is that the only person 
who's "evil" is the one who doesn't follow his calling.  If you had an 
orc who sacrificed things regularly, but didn't eat to excess, obeyed the 
laws of orcs, and so on, he'd be considered good.  But if you had an 
atheist, overweight elf who snubbed the Elf Elders or whatever, he'd be 
considered a jerk.  (Well, he would be under any system.  But on this 
one, the game would actually call him one.)

If you want, you could set a Composite Virtue Score that would determine 
your "alignment," which, by this time, is pretty much meaningless.  So, 
if this is how you were looking for the Virtues:

Honor:		3
Spirituality:	17
Compassion:	11
Justice:	6

Composite:	9.25

you could rate the Composite as being Neutral, or Apathetic, or 
whichever.  In this example, I have 10 as being the border for Fairly 
Virtuous, and 15 as Pretty Virtuous.  You could go as high as you wanted 
to, of course.

Anyway...  I'm nowhere near the point of adding this to anything.  But it 
might give you some good ideas.

------------------------------------------------------------------
Barid Bel Medar                               icarus@berkshire.net
Knights of the Cosmos            Shayol Ghul Resort and Health Spa
------------------------------------------------------------------
"I  am  returning  this otherwise good typing paper to you because
someone has printed gibberish all over it and  put  your  name  at
the top." - English Professor, Ohio University
------------------------------------------------------------------



This archive was generated by hypermail 2b30 : 12/18/00 PST