Jump to content

Question about reliability of condition checks


LazySkyrimPlayer

Recommended Posts

Hey there! I am currently in the process of tuning some of Ordinators more underpowere/unwieldy perks and while playing around with it's newly introduced magic effects, I stumbled upon one that has a condition called IsLastHostileActor. It checks wether this is true (1). The magic effect in question is tied to a cloak spell that you gain upon selecting a specific perk.

I found that concept interesting, so I changed the magic effects of the cloak spell around a bit. But, in my testing this check seems to fail most of the time, even when there is only one hostile actor in combat with the player. Is this an engine limitation/bug? Or could there be some other problem. From what I was able to observe, it tends to fail when there is a second actor in range that is technically hostile but not in combat/searching for the player. Am I misunderstanding the way the function works? Does it maybe check in a bubble around the player/subject for hostile actors, disregarding wether they are in combat or not? It doesn't seem to make a difference whether there are other potentially hostile actors (enemies) left in the same cell somewhere or not (meaning, there is no real consistency to this behaviour).

 

The spell and effects in question use no custom scripts, it's all basic game functions. And I can confirm that when it does pass the check, it correctly applies the magic effect in question.

Edited by LazySkyrimPlayer
Link to comment
Share on other sites

I think EnaiSiaion would be the best person ask about this,  He knows how his mods work better than we do.  You can contact him either at Bethesda's Discord or over at Nexus. 

Link to comment
Share on other sites

He has disabled private messages on Nexus and I am not sure he will respond on discord, though I tried.

If anyone else here reads this and has insight into this issue I would greatly appreciate any help :)

Just to reiterate, this question is about basic game functionality, not specifically about Ordinator. I only stumbled upon this because Ordinator makes use of said function.

Edited by LazySkyrimPlayer
Link to comment
Share on other sites

Unfortunately the CK Wiki only has this to say about the function:

"Determines if this actor is the latest hostile actor in combat with the player."

https://ck.uesp.net/wiki/IsLastHostileActor

It honestly doesn't sound like something I'd rely on for anything since you could easily have this change multiple times in battle with multiple NPCs.

Only Enai could answer what his intent was with using that condition test. It may not be working like he wanted.

Link to comment
Share on other sites

Yeah, that was all I have found so far as well.

I know asking this question is somewhat dumb knowing that we don't really have access to the engine source code and a (good) debugger, but I was hoping that someone might have some insight just by observation, considering we have been modding the game now for over a decade.
The really annoying thing about this is that it works some of the time. But about 3 or 4 times out of ten it just randomly stops working and I just haven't been able to understand why. Either way it does work to some extent, so there is that at least. But definitely not something you would have anything critical rely on that is for sure.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...