Haravikk Posted December 11, 2020 Share Posted December 11, 2020 I have a script which needs to distinguish actors based on a size rating. Currently I'm doing this with form lists and putting races such as trolls, werewolfs etc. into one (large) and giants, dragons etc. into another (giant) but this feels like a really clunky and inflexible way to do this as the actors I'm processing could potentially be anything at all, so could include new creatures added by mods that I would have to add support for in patches and such. What I'd rather do is have some threshold by which something is considered large, giant etc. based upon its actual physical size, even if it requires a bit of fudging. My first thought was to just compare against Actor.GetHeight(), but this only works when the actor is standing normally, since it's based on the bounding box size (which can change). Height alone also isn't super useful, as werewolves and trolls aren't actually that tall compared to regular humanoids, but they are bulky. My next idea was to instead multiply Actor.GetHeight(), Actor.GetWidth() and Actor.GetLength() into a volume and do it that way, which would better reflect the full size of an actor. This feels better, though I'm wary about it involving three function calls to another script, as any of these three values could change during the calculation; probably a negligible risk but feels risky all the same. I've noticed that races do have a size property, which could be used to identify giant (extra large) creatures, but as far as I can tell this isn't accessible anywhere via script? Has anyone used any other tricks to detect a rough "size" for creatures or is calculating volume probably my best bet? Link to comment Share on other sites More sharing options...
Evangela Posted December 11, 2020 Share Posted December 11, 2020 I've noticed that races do have a size property, which could be used to identify giant (extra large) creatures, but as far as I can tell this isn't accessible anywhere via script? It's not and even if it were, I don't think it would be useful to you. I went through the entire race list (vanilla skyrim only) Race | Size Dragon XL Giant XLMammothRace XLUndeadDragonRace XL AtronachFrostRace LAtronachStormRace LBearBlackRace LBearSnowRace LDwarvenCenturionRace LFrostbiteSpiderRaceGiant L ElderRaceVampire SMudcrabRace SSkeeverRace SSkeeverWhiteRace SSprigganSwarmRace SSwarmRace SWitchlightRace S All that aren't listed are Medium size. Link to comment Share on other sites More sharing options...
dylbill Posted December 11, 2020 Share Posted December 11, 2020 There's two functions that might be useful.GetScale: https://www.creationkit.com/index.php?title=GetScale_-_ObjectReference and GetMass: https://www.creationkit.com/index.php?title=GetMass_-_ObjectReference Link to comment Share on other sites More sharing options...
Haravikk Posted December 11, 2020 Author Share Posted December 11, 2020 (edited) I'm not sure I can use those unless I've missed a trick to handling the values they return? Scale seems to just be a percentage of the size of the model or some value set by the skeleton (a giant's scale for example is 1.0, same as an average sized humanoid), and mass appears to be arbitrary or also scaled to model size? Edited December 11, 2020 by Haravikk Link to comment Share on other sites More sharing options...
Recommended Posts