Jump to content

Modifying the encumbrance formula


pulli23

Recommended Posts

Hey I'm wondering if it is possible (and how) to actually change the encumbrance formula through a mod.

 

What I especially want is to make it so that max encumbrance is no longer defined by (only) your strength. So that stealth characters/mages don't have to level strength. IE the encumbrance would be something like:

 

maxencumbrance = strength * 5 + willpower * 3 + agility * 4

 

 

The magnitudes might be changed - but I think this brings the idea; make encumbrance not only dependent of strength.

Link to comment
Share on other sites

If somebody can give me advice on s/getNthEffectItemMagnitude I might be able to do this.

From what I can tell encumbrance is not accessible through scripting.
You would achieve the same result with a dynamic Fortify Strength enchantment if that's possible.

Something like...
create an enchantment with Fortify Attribute:Strength, create a ring/whatever and put the enchantment on it.
Put the following code behind the ring...
set lMagnitude to (player.getBaseAV Willpower * 3 + player.getBaseAV Agility * 4) * 0.2
set refSelf to getSelf
setNthEffectItemMagnitude lMagnitude refSelf 0
...but after playing around for quite a while I have not been able to get setNthEffectItemMagnitude to work.

It compiles on the above as well as replacing refSelf with the name of the enchantment but the documentation does say Reference.
When testing on getNthEffectItemMagnitude I got all zeros - I tried putting a number of effects on the enchantment and changing the last argument.
I of course read that the get does not work until after it is equipped but a good delay still returned zeros.
I'm wondering if the NthEffectItem functions fail on Fortify Attribute as they would have to reference it's child table.

The next thing is processing overhead.
It only needs to work onEquip and LevelUp whereas gameMode will fire as often as it can on apparel scripts.
The documentation tells me that onEquip is too soon but that's easily fixed.
You can test for LevelUp from menuMode but it will always be at least one menu opening too late.
There is a compromise.

I hope this can be done because it makes a lot of sense.
The next step would be to replace the static multipliers (other than one fifth) with variables that a player can modify through an input box.

Link to comment
Share on other sites

Uh I wish it to also change when you are drained/dealt damage or whatever.. Currently I'm making it (for the player correctly work) - using

 

SetNumericGameSetting fActorStrengthEncumbranceMult factor

 

where factor is calculated using the equation: encumbrance = strength * fActorStrengthEncumbranceMult = F(...) ==> fActorStrengthEncumbranceMult = F(...) / strength.

 

 

The large problem with this is that all npc now also have this new multiplier - so if you (say) have very low strength but high other stats the multiplier gets very very high, and if then the opponent has already high strength but low other stats (so the multiplier should be small) this results into encumbrance around 10k.... Making burden etc kind of useless.

 

 

 

However your method would only change teh player, that's nice but changing strength would give a lot of side effects (more damage?) - a dynamic feather would be somewhat viable? Can't help you wiht you problem though - that's also what stoppped me.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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