ID:154101
 
Okay, I was thinking, instead of people CHOOSING thier alignment, why not having them WORK for it? It would be better for roleplaying reasons. So like, when you log in, you are neutral. So your actions determine you alignment.


So.... bad guys get thier bad fame by hurting people and all....

This kinda makes it hard for the good people to stay good...since they need items and occiasonal blood lust...


So good guys maybe would not lose any good fame...but GAIN it if they knocked out a bad guy? I think that sounds pretty fair...

But bad guys only get evil fame if they knock out good guys, but don't gain evil fame if they knock out bad guys (unless the person they knock out is higher in evil fame).


Now.... how would I monitor this? And how would I monitor the evil vs higher evil people? And the evil vs good people? It seems very hard to determine. So, should it be a number variable....or a text variable...or what?

Help appreciated, comments welcome

-ST
What about a system where actions done by people raise/lower their alignment. Say, for example, 0 - 50 is bad and 51 - 100 is good or something like that.
That's pretty much how Diku's alignment system worked. (a text MUD codebase)

They used the equation:

GET_ALIGNMENT(ch) += (-GET_ALIGNMENT(victim) - GET_ALIGNMENT(ch)) / 16;


Where ch is the character and victim is the, well, victim. So, in BYOND language, this would be:

ch.alignment += (-victim.alignment - ch.alignment) / 16


Okay, so -299-299 is neutral, 300-1000 is good, and -300--1000 is evil.

When the player kills evil things, it's alignment becomes good, and killing good things makes them evil.

Hope that helps.

- Malver
In response to Malver
Hmmm....thanks! Only 1 problem...how would I not make it so that when evil people kill evil people become good? Infact...if evil people kill somebody that is EVILER than they are, they BECOME more evil
In response to Sariat
Sariat wrote:
Hmmm....thanks! Only 1 problem...how would I not make it so that when evil people kill evil people become good? Infact...if evil people kill somebody that is EVILER than they are, they BECOME more evil

We just tweak the formula like so....

var/mod
if(ch.alignment < -299 && victim.alignment < ch.alignment)
mod = -victim.alignment
else
mod = victim.alignment
ch.alignment += (-mod - ch.alignment) / 16


I'm not too good at super-efficient code, but that should do it just fine. :)

- Malver
In response to Sariat
Just set it so instead of changing the alignment by a -set- number after every kill, change it by a factor of the difference between the two alignments ( a factor so that someone perfectly neutral cant go kill some really nasty evil person, and suddenly be the ultimate in good, you coudl do it that way if you want, but I think it should be a little harder to do @.@ )


El
In response to Malver
After thinking up and coding all the checks for alignments (42 different types of alignments), I finally got around to testing it. There is a problem... if I kill a very bad person, I turn badder. Thats good. But if I kill a very good person (while I am good/perfectly nuetral), I get "gooder". I would like to try and solve this but, I need to rest...brain must...work...

brain....
shutting...
off....
going...
bye....
bye...
In response to Sariat
Sariat wrote:
But if I kill a very good person (while I am good/perfectly nuetral), I get "gooder". I would like to try and solve this

You do?

ch.alignment += (-mod - ch.alignment) / 16


If ch.alignment == 0 as you said, and victim.alignment == 1000 let's say...

0 += (-1000 - 0) / 16


This gives us -62.5, which makes us "evil-er". I don't see how you got "gooder".

Geez, my vocabulary is slowly dieing... >:)

- Malver
In response to Malver
Thats exactly how I do it...

Hmm...maybe I am missing something...

//Deathcheckproc
mob/proc/Deathcheck(mob/ch,mob/victim)
if(victim.vitality <= 0)
world << "[victim] has died!"
var/mod
if(ch.alignment < -299 && victim.alignment < ch.alignment)
mod = -victim.alignment
else
mod = victim.alignment
ch.alignment += (mod - ch.alignment) / 16
ch.CheckAlignment()
else
..()

Thats exactly what ya gave me.(almost)
mob/proc/CheckAlignment()
var/S = usr.alignment
//GOOD VIGILANTES
if(S<=50 && S>=1)
usr.align_desc = "Decent Vigilante"
//GOOD HEROES
if(S<=350 && S>=300)
usr.align_desc = "Sludge Hero"
//EVIL VIGILANTES
if(S == 0)
usr.align_desc = "Vigilante"
if(S>=-50 && S<=-1)
usr.align_desc = "Hard-Nosed Vigilante"
//EVIL VILLIANS
if(S>=-350 && S<=-300)
usr.align_desc = "Thug"


Thats pretty much what I hae (I copied/pasted the rest, accordingly.) If you want to see it in action, page me. I'll be waiting for HRH to come on....
In response to Malver
Just letting everybody know the fix:

ch.alignment += (-mod - ch.alignment) / 16
In response to Sariat
Sariat wrote:
Just letting everybody know the fix:

> ch.alignment += (-mod - ch.alignment) / 16
>


Yep. Apparently it was a typo on my part. >.<