Page 1 of 1

Are some NPC ObjTypes intrinsically evil?

Posted: Thu Feb 11, 2016 12:48 am
by Yukiko
I am trying to create a friendly set of orcs. Orcs that are not considered evil by my guards. So I set the alignment of my test orc to good and set its AI script to person. Person is the same script that peasants are using. The guards always attack the "good" test orc as if it is a normal bad guy. I have looked at the guard AI and I can't see anyplace where it is scripted to look for specific NPC ObjTypes to determine their status as good or evil. Changing the orc's graphic to 0x191 (human female) had no effect on the guard's behaviour either.

I have also tested against two types of ostards and find that the forest ostard (ObjType 0xDB) is not attacked by the guards but the frenzied ostard (ObjType 0xDA) is attacked by the guards. I even changed the AI script on the frenzied ostard from dumbKillPCs to animal, the same as the forest ostard, and the guards still killed the frenzied one. Neither of the ostard definitions had any alignment type defined.

So my conclusion is that some NPC ObjTypes are inherently evil. Is that correct? If so is there a setting that can bypass this? I know I could script around it but I'd rather not if I can avoid it.

Thanks.

Re: Are some NPC ObjTypes intrinsically evil?

Posted: Thu Feb 11, 2016 1:05 am
by Yukiko
OK. I think I solved my problem.

There is a member called guardignore set to 1 for the forest ostard. The frenzied ostard has no such member. That appears to be the way I can make my good orcs safe from guards.

My original question still stands though. Are there certain NPCs that are inherently seen as evil by POL?

Re: Are some NPC ObjTypes intrinsically evil?

Posted: Thu Feb 11, 2016 1:37 am
by Turley
If not specified in the npctemplate all NPCs have the alignment "neutral". And the core has no special behaviour based on the graphic.
So I think you should review your AI there seems to be a special behaviour hidden.

Re: Are some NPC ObjTypes intrinsically evil?

Posted: Thu Feb 11, 2016 1:53 am
by Yukiko
Okies Turley.

I don't think I've ever looked very deep into the townGuard AI script. The guardignore member is used by the guard AI as one way to decide whether to ignore an NPC no matter it's alignment. So I'll dig into the guard AI.

Thanks.