Tefnacht Posted May 22, 2011 Share Posted May 22, 2011 Hello fellow modders. I am looking for a way to make my script detect non-standard sized actors. The huge majority of human actors in the game are of the same height. There are some exceptions though. Some are taller, other smaller. The Gomorrah Floor Manager for example is a “shorty”. He is 1/10th smaller than normal actors. However, the GetScale script command ALWAYS returns 1.0. On any actor. The only exception being an actor who was previously resized with the SetScale command. In this case GetScale returns whatever value I used with SetScale. Taking the Gomorrah Floor Manager as an example again: Using the script command GetScale on him returns 1.0. Using GetScale on him in the console yields this result: “GetScale >> 1.00 (with base 0.90)”.And there it is, right there in parenthesis: 0.90. That is the value I need my script to react to but the GetScale script command doesn't provide this. It always reports 1.0. Help! Is there a trick to make GetScale report the seconds (base) value? Is there a actor value not listed in the GECK wiki I could use with GetBaseActorValue to get this? Maybe NVSE has undocumented commands that could help me out? Anyone? Please? I assume GetScale was not really intended to be used on actors. No idea. Well ... any help or comment is appreciated. Link to comment Share on other sites More sharing options...
stevie70 Posted May 22, 2011 Share Posted May 22, 2011 I assume GetScale was not really intended to be used on actors. No idea. Well ... any help or comment is appreciated.well just a comment, no idea if it's any help:what GetScale gets you, is the size of a _reference_ (= whatever you set in the 3d-data-tab)but when you, say, create a new npc and make it size xy, what you set here is a _base_objects_ size.so if you, on creating it, base-set your npc to 0.9 and put a reference of it in a cell, this references size would be your 0.9 * 1.0 (the references size), so getscale reports this 1.0 (if you'd leave the base npc's size at 1.0 and just set it's reference to 0.9, GetScale would report 0.9 like you want it to, so if you just want it to affect your self-built npc's, you'd just have to consider this and it'd work.otherwise, what you'd need would be something like GetBaseScale, but i have no idea if such a command exists Link to comment Share on other sites More sharing options...
rickerhk Posted May 22, 2011 Share Posted May 22, 2011 To expand on what Stevie70 said, try using GetBaseObject on the reference, then GetScale on that. Don't know if it will work but there aren't any NVSE GetScale functions. Link to comment Share on other sites More sharing options...
stevie70 Posted May 22, 2011 Share Posted May 22, 2011 you might want to check out the geck-funcions pagegeck function pagejust took a short look at it, you can get about _everything_, so i'm quite sure you can somehow get base size as well.maybe GetActorValue, GetBaseActorValue, GetActorValueInfo or any other of the about 3 billion functions for about everything there... ;-) Link to comment Share on other sites More sharing options...
Tefnacht Posted May 26, 2011 Author Share Posted May 26, 2011 Well, that is pretty much the reason I assumed GetScale is not really meant for actors. The script I am working on is supposed to work with vanilla NPCs as well as those added by other mods than my own (and with the player). Therefore creating NPCs with a Height of 1 and scaling the reference is not an option, since I don't create the NPCs myself. Rickerhk's idea of using GetScale on the base object is a very good idea, but it doesn't work. After doing some thorough testing I have to report that using GetScale on a base object (any base object) simply kills the script. The script engine stops processing the script and will never execute it again.I suppose this is because GetScale reports the reference scale, like GetPos reports the reference world position and a base object just does not have any of this data. Of course I went over the GECK wiki forward and backward before posting my question. “Height” is not among the values reported by GetBaseActorValue or GetActorValue or any of the other “3 billion” listed functions. At least I couldn't find it. ;) Hm ... well, I guess my only way around this is to create a bunch of formlists for each actor height other than 1.0 and then check my target actors base object against all those lists to see if their base height is shorter or larger than 1.0.Not the most elegant method, but at least it should work for all vanilla actors, once I got them all listed. Maybe NVSE will some day give access to the second value reported by the GetScale console command. Hope dies last :) Link to comment Share on other sites More sharing options...
davidlallen Posted May 26, 2011 Share Posted May 26, 2011 Can you describe why you want to find nondefault values of scale? Are you trying to setup a tiny doorway, which only small actors can enter? It seems race is just as important as scale in that case; I have a supermutant with scale 0.6, who is still slightly larger than a human. Maybe if you describe your goal, we can suggest another way to accomplish it. Link to comment Share on other sites More sharing options...
Quetzlsacatanango Posted May 26, 2011 Share Posted May 26, 2011 I'm guessing he wants to resize NPCs but doesn't want to do it on ones who already are. Link to comment Share on other sites More sharing options...
Tefnacht Posted May 30, 2011 Author Share Posted May 30, 2011 Hello again, sorry for the delay, I had a busy weekend. I am working on a faction mod (allowing the player to start his/her own faction in the Mojave) using a lot of animated pair poses. Shaking hands, high fife, hugging, kissing ... well, yeah and more naughty stuff. Since all those animations have both actors touching each other in one way or another, the two animations need to be precisely concerted or there will be clipping. Or the animations just look plain stupid. For example, one actor of height 1.1 shaking hands with another actor of height 0.9 looks incredibly ridiculous, because they just wave their hands up and down without actually joining hands ... since the animations were made for two actors of height 1.0. I am looking for a way for my animation controller script to detect the actors height and use a different set of animations in such a case. Since I cannot create animation sets for EVERY height combination, my plan was to create seven animation sets for each pose (1.0/1.0, 0.9/1.0, 1.0/0.9, 1.1/1.0, 1.0/1.1, 0.9/1.1 and 1.1/0.9), choose the closest matching pair for the actors involved and then temporarily adjust their scale for the time the animations are playing. This whole effort is meant for scripted cinematic sequences, so I can hide the involved actors “growing” or “shrinking” off camera. But ... to do the math and adjust their scale I need to know their original height to begin with.Many of those cinematic animations involve predetermined actors. But I have a few (like the “new member introduction sequence” or the “funeral”) that can involve any combination of actors, whoever the player recruited. Those are the ones giving me a headache. Link to comment Share on other sites More sharing options...
Recommended Posts