This feature can be found here: http://bugs.openmw.org/issues/1154
I will need to research if there are exceptions to the rule. e.g. in vanilla Morrowind will a Hlaalu member come to the rescue for a Camonna Tong?
I understand this part might require a bit of work. Therefor I suggest we implement with extendability in mind so that we avoid major refactoring down the road. We need to also discuss the best way to handle alerts to promote optimization.
Here is a simplistic run down of the implementation I am proposing:
aicombat.cpp :
Code: Select all
void notifyNeighbors(const MWWorld::Ptr& actor)
{
// TODO: Check where player is.
// If in interior <- not sure if we need to check
// iterate over actors in interior cell (or in range/LOS/awareness)
// If friend of targeted actor
Set friend hostile and set their target to player, start pursue
// else if in exterior
// iterate over actors in exterior cell (or in range/LOS/awareness)
// If friend of targeted actor
Set friend hostile and set their target to player, start pursue
// update mFirstAlert
}
Code: Select all
if(mFirstAlert)
{
notifyNeighbors(actor);
}
Also note, notifications will be given to many actors during each execute call because of player movement and should only be sent to those in range of some scaled distance away from the player; we do not want to notify a guy two miles down the road.
A lot of research needs to be done if it has not yet been already.
Your input will speed up my implementation as I will have time this weekend away from my job.
On a personal note:
Thank you guys for your dedication, support, and welcoming to your team!
Jeffrey
EDIT: If the actor is a guard than they need to pursue the crime not enter battle. But this needs to be based on the bounty. A high enough bounty will make guards try to kill you in morrowind.
EDIT: How do I get an iterable list of NPCs from a cell?