Jump to content

[LE] Help understanding Papyrus height functions


ThaiDai

Recommended Posts

Hello everyone,

 

I've been working on a "growing up" mod for a while now, but am having a heck of a time with understanding how to adjust player size and first/third person camera heights. I've been reading everything I can find about setscale, setnodescale, etc, but having a hard time understanding which functions to use and how to use them. I've started realizing that just "setscale" won't do - if I'm understanding correctly, that doesn't adjust the player's collisions properly.

 

Essentially, what I'm working on is a mod that allows the player to set their height using Expired's RaceMenu to something along the height of a child or teenager, then "age" and grow in height over time. Combined with Gopher's "Pumping Iron", Athyra's "Balance Your Own Game", and Arthmoor's "Alternate Start", players could role-play starting as a teenager and aging as they play the game - growing in height, weight, and skill. I want to include an "age" factor and, ultimately, block all major quests until the player reaches a "suitable" age for such things. (I'm thinking somehow building in an "isChild" flag that lifts once the player reaches age of majority?) In a perfect world, the mod would also include "alternate starts" for the player that involve being a "junior" member of the Thieves Guild/Companions/College of Winterhold, an apprentice blacksmith/hunter/court mage, etc.

 

It's a great idea, in my head, but making it happen is becoming a much bigger thing than I thought it would be. Also, I'm new to scripting in general, so, yeah, I bit off a big project.

 

Like I said, I've been playing with getscale/setscale, getnodescale/setnodescale, queueninodeupdate, getheight/setheight (does "setheight" even exist?) and reading their corresponding CreationKit wiki articles. I've tried using "ActorBase PlayerBase" and "Game.GetPlayer().GetActorBase()" and "Actor Property PlayerRef" (cause apparently that's 1000x faster than "Game.GetPlayer().GetActorBase()" since it's a property) and so many other things that I've started to confuse myself. I've read through multiple scripts (including "Player Size Adjuster" by Imp) and tried to emulate what other authors have done, but I'm only partially understanding what they did and why they did it so I'm probably butchering the scripts. I'm not understanding which of these functions are used in which situations and why.

 

I've managed to write a script that does adjust height when the player sleeps, based on how long the player has slept and a "growth rate" formula. And I've assigned different growth rates based on sex. (Once I get this piece fully working, I'm going to add a racial modifier as well.) And from what I can tell, it works. What's not working at the moment are the following:

 

a) setting a max height for the player and having the script properly read when the player has reached that height

b) properly updating the height in such a way that collisions are also updated - no one wants a 5'2" player getting hit by an arrow 8" over their head.

c) and using the "getrace" function so I can set different max heights and growth rates for different races.

 

Does anyone have any suggestions for how to accomplish what I want to do?

 

I can provide the script I've got so far, if anyone wants to take a look and tell me where I'm going wrong. I truly appreciate any help or pointers.

 

ThaiDai

Link to comment
Share on other sites

Well, I don't know much about those functions, but I do know you should be careful with setting the height for the player when it's entering a furniture like a bed. You may have noticed that a lot of idles force actors to "size up" in order to display the animations properly.

Edited by Lisselli
Link to comment
Share on other sites

Lisselli - yeah, I currently have "go to bed" installed and it does that check for entering furniture and resets the height to what it was before entering bed. However the author works the script (I've studied it, I just don't understand it), you never see the height adjust at all during the animation.

 

Kroekr - I've looked at Player Size Adjuster a lot to try to understand it but I haven't checked out the other - I'll take a look! What I really need though is someone who understands what each function does to explain them to me - I can copy cat endlessly hoping something works, but what I really want is to understand the functions and why they're used.

 

Thanks again for the suggestions!

Link to comment
Share on other sites

 

Kroekr - What I really need though is someone who understands what each function does to explain them to me - I can copy cat endlessly hoping something works, but what I really want is to understand the functions and why they're used.

 

Thanks again for the suggestions!

Good luck with your search. I don't even know enough to copy cat.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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