Jump to content

Agro management


Maegfaer

Recommended Posts

Is there any mod out there, or can any mod be created, that changes something about the agro (thread) management in Oblivion? I play a lot with companions lately, and it bothers me that agro is uncontrolable. I was thinking about a custom script that runs on every (hostile) NPC/Monser, which contains values of "thread" per present (NPC's) Enemy. The NPC's enemy with the highest thread value will always be his/her target, this can be done with the StartCombat function (Forces the actor to start combat with the specified ActorID. The actor will always keep the target actor at the top of its target list.)

 

The thing I'd love to see is that the player has the ability to influence his thread value of hostile NPC's/Monsters. Magic Abilities could be used for this, with potential appropriate buffs or debuffs. (For example, if you want to have a low thread value your Strenght will be decreased)

 

After this is done add ons for famous Companion mods (like CM Partner and Toaster Says Share) can be easily made which will add Dialogue options to your Companions, with which you are able to tell them whether they should try to get agro or not.

 

 

 

I have some scripting experience myself, and I think I could make this mod myself, except for that I have no idea how the first part can be constructed (script for every mob which tracks thread values). If anyone can help me with that part, I will most likely be able to finish the mod.

 

Any help and/or suggestions are appreciated!

 

 

EDIT: After an extensive research of more than 5 minutes, I think it this is pretty easy to make. It can be done by letting an activator shoot a custom spell with a (large) AOE effect at the player from time to time, that registrates all NPC's and Monsters that are hit by this Spell. The biggest trick is to make sure that this doesn't eat too many resources, thus creating a tiny period of lag every time this AOE spell is cast around the player.

 

Help is still greatly appreciated, I'd like some professional feedback before I start scripting!

Link to comment
Share on other sites

EDIT: After an extensive research of more than 5 minutes, I think it this is pretty easy to make. It can be done by letting an activator shoot a custom spell with a (large) AOE effect at the player from time to time, that registrates all NPC's and Monsters that are hit by this Spell. The biggest trick is to make sure that this doesn't eat too many resources, thus creating a tiny period of lag every time this AOE spell is cast around the player.

 

As far as I know, the "potency" of the non-playable actors doesn't change unless an armor is wielded or unwielded, so I presume that the best thing would be to this spell to activate only as entering an area, or such actor appearing in the area (or if the armor is changed), so that the spell wouldn't be related on time, but as event of change concerning the matter. However I'm not a modder, so I may not be the most reliable source.

 

But as you are getting to this, I am wondering if it's possible to prevent friendly actors attacking the same target as the player, thus preventing the player accidentally killing the allies (yes, I often have to save the game because I kill with a one slash the eager NPC's that I am supposed to "protect").

Link to comment
Share on other sites

EDIT: After an extensive research of more than 5 minutes, I think it this is pretty easy to make. It can be done by letting an activator shoot a custom spell with a (large) AOE effect at the player from time to time, that registrates all NPC's and Monsters that are hit by this Spell. The biggest trick is to make sure that this doesn't eat too many resources, thus creating a tiny period of lag every time this AOE spell is cast around the player.

 

As far as I know, the "potency" of the non-playable actors doesn't change unless an armor is wielded or unwielded, so I presume that the best thing would be to this spell to activate only as entering an area, or such actor appearing in the area (or if the armor is changed), so that the spell wouldn't be related on time, but as event of change concerning the matter. However I'm not a modder, so I may not be the most reliable source.

 

But as you are getting to this, I am wondering if it's possible to prevent friendly actors attacking the same target as the player, thus preventing the player accidentally killing the allies (yes, I often have to save the game because I kill with a one slash the eager NPC's that I am supposed to "protect").

 

I don't get what you say, you mean that NPC's choose their target by looking at the enemies' armor amount?

 

Anyway, a Trigger Zone would indeed be better than a looping AOE spell, but I have no idea how to make something like that.

 

 

As for the last part, that shouldn't be too hard to make... I am not sure if I will add that in this mod, depends on how hard it proves to be. Perhaps it's possible to let run a script when you succesfully "Yield" a friendly NPC who is attacking you, that fires an AOE spell script from an activator that forces everyone who has the friendly NPC as combat target to stop attacking him.

 

EDIT: Ooh I didn't get that last part right, as you probably see. You mean you really kill them with just one slash because they get in the way? But what if there is only one enemy present? Do you want it to stop fighting at all?

 

EDIT2: Just found out how to create a trigger zone... Thanks for the advice mate, it's paying off :) This should improve the integrity of the system and uses far less resoures :)

Link to comment
Share on other sites

I don't get what you say, you mean that NPC's choose their target by looking at the enemies' armor amount?

 

I mean that certain values that effect "how tough" the enemy is, may change when an (humanoid) enemy equips or unequips a weapon or armor, so an enemy that wears only a robe is less of a threat than an enemy that has conjured a daedric mace and armor (common amongst i.e. the Mythic dawn). Somehow got in to my head that the thread arranging would be affected by threat they posses. :)

 

EDIT: Ooh I didn't get that last part right, as you probably see. You mean you really kill them with just one slash because they get in the way? But what if there is only one enemy present? Do you want it to stop fighting at all?

 

Yes actually (it's my luck that they don't have reflect damage in their armors) :'( ... And yes, it would be easier if they'd stop fighting if there is only one enemy left, since if I can't handle it, then they can't either. However this "avoiding enemies" feature might pay off better if it was separate; some may not want passive NPC's.

 

EDIT2: Just found out how to create a trigger zone... Thanks for the advice mate, it's paying off :) This should improve the integrity of the system and uses far less resoures :)

 

Non problemos :)

Link to comment
Share on other sites

Hmm I have a problem now. It's with the Trigger Zone. I now have a very huge square invisible box around the player, that registers anyone who walks into it in a few arrays. But the problem is that those who are already in the box do not get registered, because I use the GetActionRef command and it can only register one actor per frame, which is the player's character.

 

I tried scaling the square triggerzone from very small to very large, like it pulses, but every time the zone is scaled it loses it's memory of who was already in the square, so then again it only registers the player.

 

Anyone knows how to fix this?

Link to comment
Share on other sites

Hmm I have a problem now. It's with the Trigger Zone. I now have a very huge square invisible box around the player, that registers anyone who walks into it in a few arrays. But the problem is that those who are already in the box do not get registered, because I use the GetActionRef command and it can only register one actor per frame, which is the player's character.

 

I tried scaling the square triggerzone from very small to very large, like it pulses, but every time the zone is scaled it loses it's memory of who was already in the square, so then again it only registers the player.

 

Anyone knows how to fix this?

 

Hmm... as I've understood, you want to give the NPC:s a value to classify them. Would it be possible if you could check for the existence of this value amongst the NPC:s that are in the box (check the box for every "entity x" that whom "value y" is 0, or compare the amount of "value y" to the amount of "entity x" inside the box), and if some NPC is lacking this value, then create the value, and check again, until no-one in the box lacks the value. This would not attempt to read the value, but to check if there is no such value for the NPC in the area. Although, I wonder if this was the original idea you had, that would take too much of the resources, with the difference that this wouldn't be based on time but on the area.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...