Jump to content

Script: GetBaseValue of carry weight returning incorrect value


NoCashNoExp

Recommended Posts

I made a simple script that outputs the base carry weight value of the player but it's returning incorrect values. Is this because carry weight is a derived actor value so there's no base value for it or did I do something wrong here?

ActorValue Property pCarryWeight Auto Const Mandatory
Actor Property pPlayerRef Auto Const Mandatory

function printWeight()


float baseCarryWeight = pPlayerRef.GetBaseValue(pCarryWeight)


Debug.Notification("Base: " + baseCarryWeight)
endFunction
Edited by NoCashNoExp
Link to comment
Share on other sites

There's actorvalue "inventoryweight" and there's "carryweight". I believe carryweight only has one value that changes with skill increases but doesn't reflect penalties. I'd have to test it out.

 

GetActorValue is the syntax you should use.

 

See example:

https://www.creationkit.com/index.php?title=IsOverEncumbered_-_Actor

 

Unless I am missing something important here, I actually tried this function when I started and the compiler said that it doesn't exist so I assumed there are differences between Skyrim and Fallout 4 syntax.

Edited by NoCashNoExp
Link to comment
Share on other sites

Pffttt. I knew that. I was just seeing if you were paying attention. lol

 

Sorry about that. I hit F5 and realize I was on the wrong game. I honestly can't tell you. If "carryweight" is a formula that is a combination of certain AVs you could simply write a formula for that same value.

Fake code sample:

pCarryWeight = Bob.GetBaseValue(EnduranceAV) * 100

 

If that doesn't trigger any workarounds for you then sorry. Someone else might be able to give you something more specific.

Edited by Shadohz
Link to comment
Share on other sites

I found the formula for you: https://fallout.fandom.com/wiki/Carry_Weight

 

Scroll down for it. You'll need to add a special condition for Survival Mode according to the Notes. You don't have to tell me. You love me. I know. :tongue: Good luck with your mod.

 

Oh my god, thank you so much. I was testing my script in survival difficulty and it seems that survival uses scripts to edit a lot of stuff including carry weight. The base carry weight in survival is 75 but the default base is 200 so that's why it was returning incorrect values.

Edited by NoCashNoExp
Link to comment
Share on other sites

  • Recently Browsing   0 members

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