Jump to content

Photo

Trouble Getting a Value with 'GetAV InventoryWeight'


  • Please log in to reply
13 replies to this topic

#11
user826

user826

    NIF-Basher

  • Members
  • PipPipPipPip
  • 1,184 posts

If anyone is curious, I found a vanilla-compatible workaround solution. Experimenting using one of my custom followers, I discovered that when a follower is overburdened, in addition to playing their FollowersOverburdened dialog topic, a message pops up in the corner of the screen that says, "<Follower Name> can't carry any more." and the game prevents you from placing any items into the follower's inventory that would put them over their carry weight limit. The message seems to be hard-coded into the game because I never wrote any message that says that, nor can I find one in the GECK.

 

So, long story short, by using "BackPackREF.ForceAV CarryWeight 50", for example, you can cap the maximum capacity of the bag at 50 pounds, and if you try to put more than 50 pounds worth of stuff into the bag (technically the dummy NPC's inventory in this case) the game will automatically prevent it and show the message that "Backpack can't carry any more." The downside here is that I can't display how much of the carry capacity is currently being used, but it basically does what I wanted without any extra dependencies. Hooray!



#12
dubiousintent

dubiousintent

    Resident poster

  • Premium Member
  • 7,866 posts

Congrats!  So, companion "overburdened" is a builtin engine process automatically triggered when their inventory exceeds their "CarryWeight" value, to include the bark?  That's useful to add to the wiki.

 

Did you ever determine if the "GetAV" was working correctly or not with companions?

 

-Dubious-



#13
user826

user826

    NIF-Basher

  • Members
  • PipPipPipPip
  • 1,184 posts

I only tried it on my custom companion and not any vanilla followers, but as far as I can tell no, "GetAV CarryWeight InventoryWeight" still returns 0 even if the actor's SetPlayerTeammate state is 1.


Edited by user826, 10 June 2020 - 05:49 PM.


#14
dubiousintent

dubiousintent

    Resident poster

  • Premium Member
  • 7,866 posts

Thanks.  Added as 'TIP Companion Inventory Weight' to the "Scripting" section of the wiki "Getting started creating mods using GECK" article.

 

-Dubious-






Page loaded in: 0.902 seconds