Jump to content

[WIP] Targetting System


paladicprince

Recommended Posts

But I haven't gotten a 'reliable' way to distinguish the two. I wish I knew the exact formula oblivion used to decide if an actor should attack the player...

Doing a check of actor's aggression, compared against disposition to the player, and if the actor has more than 40 responsibility should be able to provide some decent filter. Actors who have a disposition higher to the player than their aggression should not normally be hostile. Actors who have a higher aggression than disposition, but a responsibility above 40 shouldn't normally attack the player unless the player is criminal. Naturally, any getcombattarget check against the player should override any of this... The tradeoff is that the player can't cast spells at people who aren't hostile, so all this might be best leaving out.

 

As for detecting visible actors; getLOS can occasionally return invalid checks even when things are within sight, so using the get headingangle method is probably more reliable.

Link to comment
Share on other sites

Ok so if I go with getheadingangle what should the distance be? I don't want to target someone 500000 units away just because he's within the angle range (and technically I'm not scanning that far away so I wouldn't have that big of a number, but I am scanning with a cell depth of 1 so it will pick up actors that aren't visible). What's the default, or perhaps maximum actor fade distance? I don't want to select targets that are faded out. Or is there a script command to check the actor fade setting by any chance?

 

 

And from testing I've determined that this page is correct with one noteable exception: Guards will never attack anyone unless they are a criminal, even with 0 disposition, 100 aggression, and 0 responsibility. But I think concerning guards I can come up with something...

Link to comment
Share on other sites

Ok. Current state I've managed to detect friend vs foe accurately as near as I can tell. If you notice it targetting them incorrectly let me know.

 

Currently I'm using the GetHeadingAngle option to determine if a target is selectable, but would still cosider using GetLOS if it would work better.

 

Any other input or suggestions post them here and let me know.

Link to comment
Share on other sites

man, you'r doing good work here. I guess with GetGameSetting command you can get the 'actor/object fade distance' as set in the Video settings, this way the check should be appropiate for everyone, allowing to target every visible actor and preventing from targeting an actor we don't see because of the fade effect. btw I haven't tested this command myself so I can't tell you, I was going to check if it can get this specific value but just got scared of the big list, so maybe you'd want to check it yourself.
Link to comment
Share on other sites

So I'm currently implemented seperate spell targetting for beneficial and hostile spells.

 

Hostile spells will do as they do in the current version and arch towards your target (though the math has been tweaked to miss less).

Friendly target spells will not shoot a projectile at all, but rather play the self animation and instantly heal your current friendly target.

 

Here are some questions:

 

Occasionally you may decide to attack a character who is not hostile to you (perhaps just for fun, or when you feel like messing with the guards), right now that isn't possible, but I'd like to set some option to do so. For instance normally when you cast a fireball it will go to your currently targetted enemy if any, but if you hold a key while you cast it will instead attack your current friendly target. The same key would cause a friendly spell to instead target your enemy.

 

Does that sound like a good plan, and if so any suggestions on which key it should be?

 

 

There are two ways to handle companions which would you prefer:

 

The current method which cycles through companions just like you cycle through enemies (except with a different set of buttons). The upside to this is you can have as many companions as you want, however the downside is that it might take awhile to get to the companion you are trying to target.

 

And alternate method would be to assign shortcut keys for each of your followers. The upside to this being that you'll be able to target the exact companion you want with one button press. It would also make it easier for me to implement HUD elements to show your companions health, mana, and fatigue (and possibly active spells if you want to dispel them). The major downside to this is that is takes up more buttons, and it would limit the number of companions you could have at a time. (Technically it wouldn't limit the number, it would simply only add hotkeys for the first five companions, the others would have to be accessed with the button to cycle through friendlies.)

 

I lean towards the second option myself, but I'm more of a lone ranger and I don't know if it's common for people to have lots of companions. This list would also include companions however and I don't know how popular mods are that allow multiple companions. I would plan on a max of five hotkeys for companions, but if the second method is better I could do more.

 

Let me know.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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