SKSE Function Request: BatchGetAV and BatchHasPerk

Post » Sun Sep 14, 2014 8:42 am

I've been building a Skyrim mod that adds various abilities with unique effects for perks. The technical problem I have found is that
GetAV, HasPerk, and other actor get functions require a script to wait for a "lock" on the calling object, and they immediately give up
the lock after the get function finishes. So if you need to check for the presence of 10 perks, you have to wait for 10 locks at least.

At first I (incorrectly but intuitively) blamed it on latent functions such as MoveTo. See the discussion here:
http://www.gamesas.com/topic/1503152-how-to-prevent-activator-movetocast-delay/

In practice this takes much more time than even a latent function; I have had some scripts take .35 seconds of real time.

I'm requesting a batch-based solution where my script can get one lock, batch pull perks and other data, and then give up the lock.

I was actually surprised at how hostile the default Skyrim script engine is to building this mod. I've had to fight its technical deficiencies in almost every aspect. Because who would expect that getters and setters would take more time
than complex mathematical operations or latent functions? (this is doubly unintuitive for people with a programming,
software engineering, or computer science background)

I envision a BatchGetAv function that takes an array of strings, reads off each value, and returns an array of floats.
For BatchHasPerk, I envision a function that takes an array of Perks (or more accurately, pointers/object references to perks),
and returns an array of booleans.

Currently I have been able to partially get around these problems with an "Ability While Equipped" effect that updates effect values
(so the values can be determined whenever the player switches abilities or gear instead of every time an ability is used) but that
design pattern is unintuitive and hard to maintain.
User avatar
RAww DInsaww
 
Posts: 3439
Joined: Sun Feb 25, 2007 5:47 pm

Return to V - Skyrim