Jump to content

[Papyrus] Getting total player inventory weight


icestormng

Recommended Posts

Hey,

 

I'm currently facing a little problem with a script.

 

I can reliably read the max. carry weight of the player. But there is no way to read the current inventory weight.

 

My first idea was to read the whole inventory and sum up all the weights, but this will be a very bad idea. Especially for people with lot's of items in their inventory it takes a few seconds for the script engine to compute this.

 

 

So is there any way for a papyrus script to get the current inventory weight of the player character (maybe with F4SE)?

 

 

Thanks

IceStormNG

Link to comment
Share on other sites

The first link is for Fallout 4.

 

The second link is for a function similar to it, they are just named differently. If skyrim's version is called on the player in Skyrim, it queries the total weight of all items on the player. I did that because often modders like myself have to refer to information on Skyrims' page for similar functions that have documentation that is otherwise missing from similar(or similarly named) functions on Fallout 4.

 

Indeed the framework for F4SE and SKSE is not the same, but the idea/process/return values/etc for any functions that share the same functionality, are the same.

 

Never thought I'd have to explain that(and doing so was a bit difficult).

Edited by Rasikko
Link to comment
Share on other sites

  • Recently Browsing   0 members

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