有限负重(兔先生背包版)

有限负重(兔先生背包版)

这个模组迫使你在携带物品的数量上做出战术决策,同时尽量不影响游戏体验。

[color=#ff0000][b] [/b][/color]
我一直觉得《赛博朋克 2077》或《巫师 3》这类游戏令人恼火的一点是,你身上无时无刻不带着一大堆东西。

我找不到一个能迫使我决定该带多少东西的模组,所以这正好是学习《赛博朋克》模组制作的好机会。

[color=#e69138][size=4][b]Limited Encumbrance(负重限制)[/b][/size][/color]

这个模组以激进的方式覆盖了游戏计算负重的方式。

你会获得一个基础携带容量、一个由背包提供的携带容量,以及基于玩家等级和其他因素(如 PackMule 特长和你穿的衣服)的一些额外加成。

- 在基础携带容量以下,你可以奔跑、跳跃,做任何你想做的事。
- 在基础携带容量和加成之间,你会反复收到携带过多的警告
- 超过基础携带容量加加成的部分,你将体验到默认游戏中的“超负荷”效果,并且无法奔跑或跳跃

该模组还会在你的 Hub 中更改负重/容量的显示,使用不同的数值:

[code]Weight left before warnings (Carry capacity)
[/code]
这将显示你还能携带多少,而不是你已经携带了多少。

数值“10 (30)”意味着你的携带容量是 30,并且你在警告开始前还有 10 磅的余量。
数值“-5 (35)”意味着你的携带容量是 35,如果你想停止警告,就应该减掉 5 磅。[b]
[/b]
你有多强壮、你的大猩猩手臂有多先进都不应该有关系;如果你的背包里装着十几把步枪、多把手枪和一大堆衣服,你就不应该还能四处奔跑并进入战斗。

食物、补给、弹药和随机杂物默认无重量,这已经足够不真实了。

[color=#e69138][size=3][b]实际效果如何?
[/b][/size][/color]
显示设置的方式是,你看到的是:当前携带容量(最大携带容量)
- 最大携带容量根据多个因素动态计算(特长、装备、药物加成)。如果动态数值超过你的携带容量上限,它会停在该数值。
- 当前携带容量显示你在已有负重之外还能携带多少重量。负数意味着你已超过限制。

考虑到这一点:
- “376 (500)”:意味着你的动态容量大于你的上限(500),并且你还能携带 376 的重量
- “-114 (10)”:意味着你超过当前 10 的限制 114。

在静态携带容量下,计算你的携带容量时只考虑包(它只是“静态最大值 + 包”)。

试着把你的携带容量上限设得非常大,你应该就能看到其他滑块如何影响你当前的最大携带容量。

如果那个显示令人困惑,你随时可以在菜单中将其关闭,并回到原版的携带容量视图。

[size=4][b][color=#e69138]这些参数是什么意思?[/color]
[/b][/size]
[b]Base carry capacity(基础携带容量)[/b] - 你在衣服和背包之外能携带的东西。可以理解为你能够处理、并且仍能奔跑和跳跃的武器重量。
[b]Original carry capacity(原始携带容量)[/b] - 这允许你注入一部分原始携带容量,并使模组响应来自服装和义体的所有携带容量增益
[b]Virtual Backpack carry capacity(虚拟背包携带容量)[/b] - 你可以在“背包”中携带、并且仍能奔跑和跳跃的重量(不与实际装备的背包关联……这是关于你的虚拟背包,如果你想要一个背包但不想装备任何东西的话)
[b]Player level modifier(玩家等级修正)[/b] - 控制你的携带容量随进度如何增加(默认情况下,它应该会让你在 1 级到 50 级之间从 30 重量增加到 60 重量)
[b]Perk modifier(特长修正)[/b] - 控制携带容量特长和义体如何扩展你的背包携带容量
[b]Encumbrance equipment bonus(装备负重加成)[/b] - 控制你的服装如何影响你的携带容量。数值 100 会抵消你的服装重量。低于 100 的数值会让你的衣服带来一些负重并限制你的携带容量。高于 100 的数值会模拟口袋,并给你更多携带容量。
[b]Carry Capacity Cap(携带容量上限)[/b] - 无论任何加成,允许的携带重量最大值。

总体公式如下:

[code]Carry Capacity limit =
Base Capacity
+ Backpack Capacity
+ ( Original carry capacity * Carry capacity contribution slider )
+ ( 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 )

[/code]


[size=4][b][color=#e69138]特长如何应用?[/color]
[/b][/size]
该模组会检测 Carry Capacity Boosters(药店的药物)、Titanium Bones(义体)以及 Pack Mule、Traveler 和 Bloodrush 特长。

Perk Modifier 滑块设置 Backpack Carry capacity 的百分比。

该模组会统计你启用了多少特长,并使用该数值乘以你的 Backpack Carry Capacity。

例如,如果你在菜单中将 Backpack Carry Capacity 设为 10 单位,并将 Perks Modifier 设为 25%,你将获得额外的 [ <number of perks> x 2.5 ] 加到你的携带容量限制中。如果你有 Carry Capacity booster 处于激活状态,该数值会在 booster 效果激活期间翻倍。

[size=4][b][color=#e69138]如何更改基础负重?[/color]
[/b][/size]
[color=#efefef]你随时可以在 Mod Settings 菜单中编辑默认值。

该模组还会检测其他模组中的包,并在你穿戴它们时给予携带容量加成(加成会随 Mod Settings 中的 Athletics 特长修正而变化。)

目前支持的背包:
- [url=https://www.nexusmods.com/cyberpunk2077/mods/6616?tab=description]Spawn0's True Backpacks[/url]

- [url=https://www.nexusmods.com/cyberpunk2077/mods/11658?tab=description]TweakXL Kabuki Bags and Backpacks[/url] (依赖于 Spawn0's true backpacks)。
- 来自 [url=https://www.nexusmods.com/cyberpunk2077/mods/12452]Lara Croft Unified Outfit[/url] 的背包
-[url=https://www.nexusmods.com/cyberpunk2077/mods/12031?tab=description] OneSlowZZ Tactical Backpack
[/url]- [url=https://www.nexusmods.com/cyberpunk2077/mods/18152]Zenitex Modular Combat Backpack
[/url]- [url=https://www.nexusmods.com/cyberpunk2077/mods/11386?tab=description]Orion Tactical Holsters[/url]
- 707Tactical [url=https://www.nexusmods.com/cyberpunk2077/mods/16497?tab=posts&amp;BH=0]tactical harness and pouches
[/url]- [url=https://www.nexusmods.com/cyberpunk2077/mods/16348/?tab=description]Modular Harness - ArchiveXL (fem V)
[/url]- [url=https://www.nexusmods.com/cyberpunk2077/mods/15817?tab=description]Pants Side Pockets - ArchiveXL (fem V)
[/url]- 来自 [url=https://www.nexusmods.com/cyberpunk2077/mods/8985?tab=files]NPC Accessories
[/url] 的包
- [url=https://www.nexusmods.com/cyberpunk2077/mods/15812]Claire's Shoulder Bag - ArchiveXL (fem V)
[/url]- 来自 [url=https://www.nexusmods.com/cyberpunk2077/mods/16288]Nola Dreamer x Aquelyras - Travel outfit - Archive XL[/url] 的腰包
- [url=https://www.patreon.com/posts/backpack-vault-105260505]Backpack Vault 33 - Fallout[/url]
- [url=https://www.nexusmods.com/cyberpunk2077/mods/19399?tab=description]TECHTOPIA - Bag - Waist Belt
[/url]- [url=https://www.nexusmods.com/cyberpunk2077/mods/20548?tab=description]AVS PLATE CARRIER - VALERIEOSD-707 TACTICAL
[/url]- [url=https://www.nexusmods.com/cyberpunk2077/mods/20475?tab=description]Plate Carrier Vest and Tactical Belt
[/url]- [url=https://www.nexusmods.com/cyberpunk2077/mods/15548?tab=description]Tactical Belt Archive XL[/url]
- [url=https://www.nexusmods.com/cyberpunk2077/mods/23097?tab=description]Travelers Backpack
[/url]- [url=https://www.nexusmods.com/cyberpunk2077/mods/21607?tab=description]Fanny Pack and Crossbody[/url]
- [url=https://www.nexusmods.com/cyberpunk2077/mods/24766]Snake Sneaking Suit FV Archive XL
[/url]- [url=https://www.nexusmods.com/cyberpunk2077/mods/24327]Accessory and Jewelry Collection
[/url]- [url=https://www.nexusmods.com/cyberpunk2077/mods/25423]Techwear Pants
[/url]- [url=https://www.nexusmods.com/cyberpunk2077/mods/26507]V's Accessory Drawer[/url]

[/color]
[color=#ff7700][size=4][b]需求与限制[/b][/size]
[/color]
此模组需要 redscript 和 Mod Settings。

这是我的第一个模组,我在自己当前的模组组合上测试了几个小时,所以情况对你来说可能有效,也可能无效。

警告文本以英文硬编码在脚本中。等我弄清楚如何用 Redscript 进行本地化后,我想为其他语言设置单独的本地化文件。与此同时,如果你想翻译成自己的语言,就必须编辑脚本。

目前,我只能检测一件已装备物品(我还不知道如何检测同一槽位中的多件物品)
使用背包时无法识别 EquipmentEx。唯一被识别的槽位是 Outfit、Face、Outer Torso 和 Inner Torso。
我还没有用游戏的 transmogrify / 服装系统测试过此检测,如果你自定义了服装,我不认为它会生效。

[b][color=#ff7700][size=4]兼容性[/size][/color][/b]

[b][url=https://www.nexusmods.com/cyberpunk2077/mods/16300?tab=files]Dark Future - Urban Survival Gameplay[/url]:[/b] Dark Future 中有一个控制 Carry Capacity 的选项。如果启用了 Limited Encumbrance,该选项会被完全忽略。


[color=#ff7700][size=4][b]致谢[/b][/size][/color]

感谢 DJ_Kovrik 在 CP 2077 Discord 论坛上的帮助!
感谢 707Tactical 允许将 Bunny Backpack 与本模组捆绑!

[b]给 redscript 模组开发者[/b]

[code]:: 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
[/code]

🎮 我建立了一个 [url=https://discord.gg/jzHRjBcr7z]Discord [/url]服务器,专门用于我的模组
☕ [url=https://ko-fi.com/deepbluefrog]Ko-fi[/url] 链接,如果你想请我喝杯咖啡