Jump to content

Limited encumbrance 2024-01-15

   (0 reviews)

1 Screenshot

About This File

 

Configurable carry capacity alternative.

 

As of 2022-10-09, this mod requires Mod Settings for a menu.

One thing I always found irritating with games like Cyberpunk 2077 or The Witcher 3, is the awfully large amount of stuff you carry with you at all times.

I couldn't find a mod that force me to decide how much to carry around, so this was a good occasion to learn Cyberpunk modding.

Limited Encumbrance

This mod overrides the way the game calculate encumbrance in a drastic way.

You get a base carry capacity, a carry capacity provided by your backpack, and some bonus on top of that based on the player level and other factors (like the PackMule Perk and the clothes you wear).

- Under the base carry capacity, you can run, jump and do whatever you want.
- Between the base carry capacity and the bonus, you get repeated warnings that you are carrying too much
- Above the base carry capacity plus bonus, you will experience the 'over burden' effect from the default game and will not be able to run or jump
 
The mod also changes the display of weight/capacity in your Hub with a different value:

Weight left before warnings (Carry capacity)

This will show how much you CAN carry, instead of how much you are already carrying.

A value of '10 (30)' means your carry capacity is 30 and you have 10 pounds to go before the warnings start.
A value of '-5 (35)' means your carry capacity is 35 and you should get rid of 5 pounds if you want to stop the warnings.

It shouldn't matter how strong you are or how advanced your Gorilla Arms are, you shouldn't be able to run around and enter combat if your backpack contains a dozen rifles, multiple handguns and a huge wardrobe.

It is unrealistic enough that food, supplies, ammo and random junk are weightless by default.

What do the parameters mean?

Base carry capacity - what you can carry outside of clothes and backpack. Think weight of weapons you can handle and still be able to run and jump.
Backpack carry capacity - weight you can carry in your backpack and still be able to run and jump.
Player level modifier - control how your carry capacity increases as you progress (by default, it should take you from 30 weight to 60 weight between level 1 and level 50)
Perk modifier - controls how Carry Capacity perks and cyberware extend your backpack carry capacity
Encumbrance equipment bonus - controls how your clothing influences your carry capacity. A value of 100 cancels out your clothing weight. A value below 100 gives your clothes some encumbrance and limits your carry capacity. A value above 100 simulates pockets and gives you more carry capacity.
Carry Capacity Cap - maximum value of carry weight allowed regardless of any bonus. 

The overall formula goes like this:

 

Carry Capacity limit =
Base Capacity
+ Backpack Capacity
+ ( Backpack capacity * number of perks * Perk slider in % ) <-- multiplied by 2 if Carry Capacity Booster is active
+ ( player level * Player level slider in % )
+ ( player Athletics level * Player Athletic level slider in % )
+ ( player Equipped Clothes and Weapons Weight * Equipment encumbrance bonus in % )
+ ( small bonus for pockets if wearing chest, legs or outfit clothing )





How are Perks applied?

The mod detects Carry Capacity Boosters (drugs from pharmacies), Titanium Bones (Cyberware) and the Pack Mule, Traveler and Bloodrush perks.

The Perk Modifier slider sets a percentage of the Backpack Carry capacity. 

The mod counts how many perks you have enabled and use that number to multiply your Backpack Carry Capacity.

For example, if you set your Backpack Carry Capacity to 10 units in the menu, and the Perks Modifier to 25%, you will get an extra [ <number of perks> x 2.5 ] added to your carry capacity limit. If you have a Carry Capacity booster active, that number is doubled while the effect of the booster is active.

How to change the base encumbrance?

You can always edit the default values in the Mod Settings menu.

This mod also detects bags from Spawn0's True Backpacks and scales the added carry capacity for each bag using the Athletics perk modifier in Mod Settings.

  • At this time, I can only detect one equipped item (I don't know yet how to detect multiple items in the same slot)
  • I have not tested this detection with the game's transmogrify / outfit system and I am not expecting it to work if you customized your outfit.


Requirements and Limitations

This mod requires redscript 0.5.1 or above and Mod Settings.

This is my first mod, and I have tested it for a few hours on my current mix of mods, so things may or may not work for you.

The warnings are hard coded in the script as English text. I would like to set up a separate localization file for other languages once I figure out how to do localization with Redscript. In the meantime, you will have to edit the script if you want a translation in your own language.

Acknowledgements

Thanks to DJ_Kovrik's help on the CP 2077 Discord forum!

For redscript mod developers

 

:: Replaced methods
@replaceMethod(PlayerPuppet) public final func EvaluateEncumbrance() -> Void 
@replaceMethod(MenuHubGameController) protected cb func OnPlayerMaxWeightUpdated(value: Int32) -> Bool 
@replaceMethod(MenuHubGameController) public final func HandlePlayerWeightUpdated(opt dropQueueWeight: Float) -> Void 
@replaceMethod(SubMenuPanelLogicController) public final func HandlePlayerWeightUpdated(value: Float, maxWeight: Int32) -> Void 
@replaceMethod(SubMenuPanelLogicController) public final func HandlePlayerMaxWeightUpdated(value: Int32, curInventoryWeight: Float) -> Void 
@replaceMethod(VendorHubMenuGameController) protected cb func OnPlayerWeightUpdated(value: Float) -> Bool 

:: Added fields
@addField(GameObject) public let m_limitedEncumbranceTracking: ref<LimitedEncumbranceTracking>;
@addField(PlayerPuppet) public let m_limitedEncumbranceTracking: ref<LimitedEncumbranceTracking>;
@addField(SubMenuPanelLogicController) public let m_player: wref<PlayerPuppet>;

:: New classes
public class LimitedEncumbranceTracking

 

Cyberpunk 2077 2022-02-27 17-21-47_02_result.png

Cyberpunk 2077 2022-02-27 17-21-47_03_result.png

Cyberpunk 2077 2022-02-27 17-21-47_04_result.png

Cyberpunk 2077 2022-02-27 17-21-47_result.png

Edited by DeepBlueFrog


What's New in Version 2024-01-15   See changelog

Released

- Small bug fixes



User Feedback

There are no reviews to display.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use