I'm not at all familiar with modding cyberpunk 2077 (redscript)... but on long playtime saves, wouldn't it be possible to simply reset the internal gametime value to some more sane number (like 24 hours)? Or maybe do it through a savegame editor? Or hexedit the savegame file?
Or maybe use a Double (I checked, and it exists) instead of Float? https://pastebin.com/FbudFJvm I don't have a long 550 hour save to test the above changes.
Or maybe somehow do ALL the math using Uint64's.
I would've thought that your modification related to: let tickDiff: Uint64 = EngineTime.ToTicks(GameInstance.GetSimTime(gameInstance)) - stateContext.lastShotTimeTicks; ... would solve the problem completely because you're now keeping the values small for the timeDelta calculation.
Yeah, we can probably reset the game time (not from scripts alone but psiberx could add that to Codeware), but I'd be worried about side effects since it's used in a lot of places, including the playtime you see on your save file, probably.
The time is stored as a Uint64 in engine/native code, but it gets exposed to the scripts as a float, which is the part of the problem this mod fixes. So right now the mod is doing the addition with Uint64 values before converting to floats, and there's no more error in the script part. If they had used doubles in the first place there would be no problem there as it would have enough precision for these values.
The remaining issue is that the redscript code that checks if enough time has passed (the code where this mod's fix is) gets called less frequently as game time goes up. That's getting called by native code, so the fix would require reverse engineering that. Someone is welcome to do that, but it's not a priority for me since it's a) hard (for me because that's not my thing), and b) not going to matter much for most people since the majority of the error is fixed already.
> The remaining issue is that the redscript code that checks if enough time has passed (the code where this mod's fix is) gets called less frequently as game time goes up.
Well, that's just weird and sucks. It's like a builtin nerf to smgs, lmgs, and assault rifles -- all of which are already not very strong.
Is there a way to detect the timing discrepency ingame? If so, I could _imagine_ a mod that calculates that discrepency and uses it to apply a compensating multiplier (either to damage per shot or to rate of fire, whichever works better) to all full auto / burst weapons.
Hi, i would like to ask if this mod is compatible with guns redone mod or maybe this isnt needed because CET will auto load the new gun stats when starting the game. Ty in advance
If I dont use a mod loader/menu, this works just be directly extracting it and all its dependencies into the game's directory right? Or do I need to add the -modded command to the games launch properties/tick the setting in the cdpr launcher? I dont currently have a high enough hour save to test (only 30 hours save at most right now)
Yes that's right, only "redmod" mods require the launcher or -modded command. Most good mods and the core dependencies like redscript, etc. will have the correct file structure to just be extracted into the game directory.
Thanks so much for this mod! Would you recommend installing this mod on a new playthrough, or wait to install until we start to observe the slowdown issue (i.e., when our save hits the ~100 hour mark)?
I'm on game version 2.13 and with the latest codeware 1.14.0 and also 1.13.0. I get script errors on startup with or without the mod. Would you be able to make an alternate file for players on 2.13 that is compatible with the latest codeware before game version 2.2 released - 1.12.9?
Just for clarification, do you mean moving files around from the folders and simply overwrite certain files, or going into the files themselves using an unpacking exe?
This mod depends on features added in the latest codeware, which will only work with the latest game version. So this mod won't work with older game versions.
oh no :( who would have thought. finally a good reason to update my 2.1 game... but i guess for now ill just start a new game xD
downloading and endorsing for support! thanks for your work @rmk1234 - i might make a clip of my ~500hrs save with high fire rate guns/mods and link it here - its ridiculously off.
Is this still relivant in 2.21? Does the bug only effect full auto weapons or other weapons and mele? I had no idea this was a bug, how did you even find out?
No changes in patch 2.21. I found out about it from a Nexus user commenting on another mod. There was a reddit post going back a while where people were aware of it. It is hard to make CDPR aware of bugs like this. They will ask for saves and then reject you if the saves are modded, so basically only console players can effectively make bug reports.
83 comments
Or maybe use a Double (I checked, and it exists) instead of Float? https://pastebin.com/FbudFJvm
I don't have a long 550 hour save to test the above changes.
Or maybe somehow do ALL the math using Uint64's.
I would've thought that your modification related to:
let tickDiff: Uint64 = EngineTime.ToTicks(GameInstance.GetSimTime(gameInstance)) - stateContext.lastShotTimeTicks;
... would solve the problem completely because you're now keeping the values small for the timeDelta calculation.
The time is stored as a Uint64 in engine/native code, but it gets exposed to the scripts as a float, which is the part of the problem this mod fixes. So right now the mod is doing the addition with Uint64 values before converting to floats, and there's no more error in the script part. If they had used doubles in the first place there would be no problem there as it would have enough precision for these values.
The remaining issue is that the redscript code that checks if enough time has passed (the code where this mod's fix is) gets called less frequently as game time goes up. That's getting called by native code, so the fix would require reverse engineering that. Someone is welcome to do that, but it's not a priority for me since it's a) hard (for me because that's not my thing), and b) not going to matter much for most people since the majority of the error is fixed already.
Well, that's just weird and sucks. It's like a builtin nerf to smgs, lmgs, and assault rifles -- all of which are already not very strong.
Is there a way to detect the timing discrepency ingame? If so, I could _imagine_ a mod that calculates that discrepency and uses it to apply a compensating multiplier (either to damage per shot or to rate of fire, whichever works better) to all full auto / burst weapons.
And thanks for the mod!
I had the same issue, Codeware got updated on 7. Jan, download it again and replace the files when unpacking - works now for me.
Thx a tons for this Fix @rmk1234 :) Livesaver right here
downloading and endorsing for support!
thanks for your work @rmk1234 - i might make a clip of my ~500hrs save with high fire rate guns/mods and link it here - its ridiculously off.
Does the bug only effect full auto weapons or other weapons and mele?
I had no idea this was a bug, how did you even find out?