永久提高生命值、护甲、DPS 等(适用于 PC 与 PS4 存档)
使用存档编辑器修改武器和服装属性;修改前务必备份存档。PS4 存档可用,但操作前需要使用 Save Wizard for PS4 MAX。DPS 示例是为武器添加 DPS Constant 属性并设置数值。
供其他模组调用的 RED4ext 插件,本身不会独立提供面向玩家的功能。提供视野锁定、游戏内部视野与设置界面视野换算,以及控制补丁写入的开关。仅在其他模组明确要求时安装。
这是一个前置模组,扩展游戏功能,但本身不会独立执行任何操作。仅在其他模组要求安装时才下载。
FOV Control 是原生 RED4ext 插件,提供以下功能:
适用于最新 RED4ext。所有原生函数均向 REDscript 暴露,因此 CET 也可调用。
以下原生函数可允许或阻止此插件执行的内存补丁操作:
public native class FovControl extends IScriptable {
public static native func IsPatchingAllowed() -> Bool
public static native func PreventPatching() -> Bool
public static native func ReleasePatching() -> Bool
IsPatchingAllowed:true 表示允许写入;false 表示忽略所有写入请求。PreventPatching:阻止写入;可重复调用。ReleasePatching:恢复允许写入;可重复调用。可锁定或解除运行时 FOV 变化:
public static native func IsLocked() -> Bool
public static native func Lock() -> Bool
public static native func Unlock() -> Bool
public static native func ToggleLock() -> Bool
这些调用具有幂等性:例如已经锁定时再次调用 Lock() 会返回 true,但不执行额外操作。如果补丁写入已被阻止,Lock、Unlock 和 ToggleLock 会返回 false,且不会写入。插件首次使用时会验证目标地址,并记录失败信息。
使用基于测量值制作的单调分段线性曲线换算 FOV;锚点之间的数值通过线性插值计算。
public static native func ConvertFormat(fov: Float, isSettingsFormat: Bool) -> Float
isSettingsFormat = false:输入内部 FOV,返回图形设置显示的 FOV。isSettingsFormat = true:输入图形设置显示的 FOV,返回内部 FOV。let displayValue: Float = FovControl.ConvertFormat(68.2379837, false)
let engineValue: Float = FovControl.ConvertFormat(100.0, true)
@addMethod(CameraComponent)
public func GetDisplayFOV() -> Float
@addMethod(CameraComponent)
public func SetDisplayFOV(displayFov: Float) -> Void
GetDisplayFOV() 返回当前摄像机对应的图形设置风格 FOV。SetDisplayFOV() 接受显示 FOV,并换算为内部 FOV 写入,同时在内部值上使用安全保护范围。
如果安装了 Codeware,可通过 PlayerPuppet 和 VehicleComponent 使用以下方法访问第三人称摄像机:
@addMethod(PlayerPuppet)
public func GetTPPCameraComponent() -> wref<vehicleTPPCameraComponent>
@addMethod(VehicleComponent)
public func GetCameraComponent() -> wref<vehicleTPPCameraComponent>
无论是否安装 Codeware,这些辅助方法都存在;未安装时会返回 null/nil。
local player = Game.GetPlayer()
if player then
local camera = player:GetTPPCameraComponent()
camera:SetDisplayFOV(100)
end
if player then
local vehicle = Game.GetMountedVehicle(player)
if vehicle then
vehicle:GetCameraComponent():SetFOV(68.2379837)
end
end
这两种写法效果相同:将第三人称摄像机的内部 FOV 设为 68.2379837,对应图形设置中的 100。此外,GetTPPCameraComponent() 现在采用与 GetFPPCameraComponent() 相同的使用方式。
必需:
可选:
<Cyberpunk 2077>\red4ext\plugins\FovControl\FovControl.dll
<Cyberpunk 2077>\r6\scripts\FovControl\FovControl.reds
<Cyberpunk 2077>\red4ext\logs\FovControl.log
print("WasLocked:", FovControl.IsLocked(), "ToggleLock:", FovControl.ToggleLock(), "IsLocked:", FovControl.IsLocked())
插件使用 RED4ext 日志记录器,日志文件位于:
<CP2077>\red4ext\logs\FovControl.log
常见日志信息:
EnsureTarget: patch target resolved:已找到模式并准备好补丁位置。Write3: failed to change page protection for patching:操作系统拒绝更改页面保护。Write3: wrote [.. .. ..] at 0x...:写入成功(跟踪信息)。ApplyPatch: write failed:写入被阻止或执行失败。排查提示:
IsLocked() 始终为 false:查看日志中是否找到模式;日志为空表示已找到。VirtualProtect failed;某些覆盖层或杀毒软件理论上可能造成干扰。PreventPatching() 会阻止所有锁定、解锁及切换写入,直到调用 ReleasePatching()。前往 N 网打开所选文件。安装与下载要求以原作者及平台说明为准。
<!-- aoe-mods-source:nexusmods:cyberpunk2077:25677 -->