It is a good-evil meter.
And, actually I have a question relating to that. I am setting up enemy alignment in percentiles / 10(so 10 is 100% good, and -10 is 100% evil), but I am having trouble making an algorithm that makes sense. What I mean is when should certain with say, high good alignment attack you? I would like to add some depth to this algorithm (not simply once you become say, -50, good guys attack you, and once you become 50, bad guys attack you. First of all, that makes no sense. Bad guys should always attack you, because they are bad and they shouldn't really care if you are too. And good guys, how will that work? Say a good enemy is 3 alignment, at what alignment should you be at for him to start attacking you.
My initial idea was to have the good guy attack you if you are below -(whatever his alignment is), so if you were at -30 alignment, then an enemy with 3 alignment will attack you. While that works alright for lower levels, it doesn't make sense that an enemy with 10 alignment (i.e. entirely good) to only attack people who are entirely evil. Anyway, those are the problems I am facing.
Right now, I am currently thinking of using this algorithm:
-(enemy_alignment*2/3))
And the enemy would attack anything lower than that number, so 10 gets 1, 9, gets 2, etc.... That essentially would work out to
1 attacks anything lower than 0
2 attacks anything lower than -1
3 attacks anything lower than -2
4 attacks anything lower than -3
5 attacks anything lower than -3
6 attacks anything lower than -4
7 attacks anything lower than -5
8 attacks anything lower than -5
9 attacks anything lower than -6
10 attacks anything lower than -7
But looking at that, it doesn't really make sense, so I am going to flip the list, so like this:
10 attacks anything lower than 0
9 attacks anything lower than -1
8 attacks anything lower than -2
7 attacks anything lower than -3
6 attacks anything lower than -3
5 attacks anything lower than -4
4 attacks anything lower than -5
3 attacks anything lower than -5
2 attacks anything lower than -6
1 attacks anything lower than -7
But, I don't think this is very good. if you guys have any ideas for a good algorithm, please tell me.