Actors Who Assist
Explanation[edit | edit source]
A common question which is asked is related to getting one actor to come to the aid of another actor, and what determines this behavior. There are 3 main things which are important in figuring out who will help who, and when.
- Disposition
- Responsibility
- Confidence
Disposition
Disposition is the first part. Actors will decide who they want to help, and who they will attack based on disposition checks between actors in combat. In most cases, an actor will need to have a disposition higher than 40 before they will consider helping. In cases where both combatants are higher than 40, they will usually default to the actor with the higher disposition. The easiest way to make actors assist each other is to just add them to the same faction, and give that faction a bonus toward themselves of 20 or more. If the actors cannot be part of the same faction due to ownership issues, making two factions which have bonuses toward each other achieves the same effect.
Responsibility
If disposition alone was the only factor, it would be rather easy to just sweet talk a few guards in your favor, and instantly have backup for any criminal activity you might want to do. What prevents this is a responsibility check. Actors who have a high responsibility will only help actors who are not currently criminals (having crimegold, or who are not part of an evil flagged faction). Actors with a low responsibility (less than 40) will assist anyone they like well enough without regard to their criminal status. Actors who are evil, or are criminals, but have a high responsibility will only assist other evil or criminal actors.
Confidence
As with other aspects of combat, confidence plays a part. If the actor who might assist is of low confidence they may still technically start combat, but will then run away, which, in some cases may lead to many problems. Usually this isn't a factor since most cases of one NPC assisting another is when the player is committing a crime, and therefore any who might be running are running from a criminal. But, if an actor assists a criminal, and runs away to another cell, the actors in that cell might decide to kill that actor because they assisted.
Notes[edit | edit source]
Creatures do not always assist other actors whom they have a high disposition with, but is not in the same faction, or is not aggressive enough on their own toward any would-be attacker. In these cases it is almost always best to just use scripting to make the creature assist. An example script might look something like this.
scn DefendParentScript ;;Generic script to be attached to pets and such to make them assist their owner Ref Ptarget ref mytarget Ref Pref ref self short cooldown Begin onload set self to getself Set pref to self.getparentref pref.moddisposition self 100 end Begin gamemode if cooldown >= 1 set cooldown to cooldown - 1 elseif cooldown <= 0 && pref.getdead != 1 If self.isincombat != 1 && pref.isincombat == 1 set mytarget to pref.getcombattarget self.startcombat mytarget elseif self.isincombat == 1 && pref.isincombat == 0 && self.getattacked == 0 self.stopcombat self.scaonactor self.yield set cooldown to 10 endif endif end
This script works with parenting, and makes the child creature assist the parent, yield with the parent, but fight back if attacked. Additional scripting might be needed to make the parent assist the child creature in a similar manner. Again, this normally only needs to be done when you are trying to make a creature assist an NPC. To get the reverse situation, a NPC protecting a creature, you can usually accomplish this with factions or setting ownership on the creature.