Cyberpunk 2077
0 of 0

File information

Last updated

Original upload

Created by

DJ_Kovrik

Uploaded by

djkovrik

Virus scan

Safe to use

About this mod

Tweaks crafting ammo quantity popup to prevent you from crafting ammo over the inventory capacity limit.

Requirements
Permissions and credits
Changelogs
Donations
Info

By default the game has capacity limits for different ammo types in your inventory (700 for rifles, 500 for handguns, 100 for shotguns and 100 for sniper rifles) but quantity picker in crafting menu does not take that into account and allows you to craft as many ammo as you could with all your crafting materials.

This mod adds a few tweaks to fix that:
  • Tweaks crafting ammo quantity popup to make it check how many ammo bundles you can craft before reaching the limit
  • Highlights ammo recipe with red when the limit is reached
  • Blocks furher ammo crafting when the limit is reached

Those tweaks are applied after each crafting request and each time when you open the menu so when you spend some ammo you will be able to craft it again.

You do not need this if you use flib's UI Improvements mod because it implements the same functionality.


How to install

  • Download the latest redscript release and unpack it into the game folder
  • Unpack the mod archive into the game folder

How to uninstall

  • Delete the Cyberpunk 2077\r6\scripts\noExtraAmmoCrafting.reds file

Credits


My mods


For redscript mod developers

// Added methods
@addMethod(CraftingSystem)
private func GetAmmoLimit_LHUD(id: TweakDBID) -> Int32

@addMethod(CraftingSystem)
private func GetBulletAmmount_LHUD(id: TweakDBID) -> Int32 

@addMethod(CraftingSystem)
private func GetAmmoCount_LHUD(id: TweakDBID) -> Int32

@addMethod(CraftingSystem)
private func CanAmmoBeCrafted_LHUD(id: TweakDBID) -> Bool

// Replaced methods
@replaceMethod(CraftingSystem)
public final const func GetMaxCraftingAmount(itemData: wref<gameItemData>) -> Int32 

@replaceMethod(CraftingSystem)
public final const func CanItemBeCrafted(itemRecord: wref<Item_Record>) -> Bool

@replaceMethod(CraftingSystem)
public final const func CanItemBeCrafted(itemData: wref<gameItemData>) -> Bool