Shadowed Posted November 13, 2024 Posted November 13, 2024 (edited) This is a tiny set of two scripts that lets users adjust the sun brightness to their liking while in-game. I made this for Singleplayer only and I highly recommend not using it online. Made for the current builds of IL-2 GB as of this post (5.X & 6.X). By default the sun brightness ranges from 0.0 to 1.0. When we stare at the sun in-game the value is 1.0. When the sun is partially occluded it is lower, and when fully occluded it is 0.0. Activating the scripts sets the sun to 0.0 and can be adjusted at any time. Setting it to 0.0 will have it be a tiny ball of light. The second script disables the code that constantly checks for brightness. If the scripts are disabled at any point in-game, the original code is safely restored. Default Sun Brightness (1.0): 0.25 Sun Brightness: 0.0 Sun Brightness (Recommended for VR): These are Assembly scripts and because of that it requires CheatEngine. During the install I recommend to opt-out of their Mcafee bloatware during the installer. How to use: Run IL-2 in normal or VR and once on the main menu, alt tab and open CheatEngine. In CheatEngine press CTRL-P (or click magnifying glass icon), select processes, and double click Il-2.exe. In CheatEngine press CTRL-O and open 'dimmerSunIL2GB.CT' wherever you extracted it to. Click the box under the 'Active' section on the line for 'Activate Dimmer Sun for IL2: GB' so it is a red X: By default the value is 0.0 and can be adjusted at any time by double clicking the value to the right (0.25 in screenshot): You can double click the script to edit it and save the preferred value. Below are the scripts to view and can be copy pasted directly to CheatEngine instead of downloading the .zip. Scripts with comments: Spoiler [ENABLE] aobscanmodule(INJECTdimsun,renderers.dll,F3 0F 11 7B 08 E9) // Searching for this array of byte if found alloc(newmem,$1000,INJECTdimsun) // insert into code alloc(dimsun,8) // Allocating variable 'dimsun' registersymbol(dimsun) // Registering variable label(code) label(return) newmem: code: movss xmm7,[dimsun] // User adjustable variable is now being inserted into xmm7 movss [rbx+08],xmm7 //by default xmm7 is constantly being updated and moved into rbx+08 jmp return dimsun: dd (float)0.25 // Adjust the value here, click OK, and then save the .CT. INJECTdimsun: jmp newmem return: registersymbol(INJECTdimsun) [DISABLE] INJECTdimsun: db F3 0F 11 7B 08 unregistersymbol(dimsun) // Cleanup and restore original code unregistersymbol(INJECTdimsun) dealloc(newmem) // Script #2 is below [ENABLE] aobscanmodule(INJECTsd2,renderers.dll,F3 41 0F 11 4E 0C F3 0F 59 CA) // Searching for this array of byte if found alloc(newmem,$1000,INJECTsd2) // Inject to array label(return) INJECTsd2: // The code is turned into zeroes; brightness check is no longer running nop nop nop nop nop nop return: registersymbol(INJECTsd2) [DISABLE] INJECTsd2: //restore db F3 41 0F 11 4E 0C unregistersymbol(INJECTsd2) dealloc(newmem) dimmerSunIL2GB.zip Edited August 12 by Shadowed edited for latest update. Update for this mod is not needed. 1
jollyjack Posted November 13, 2024 Posted November 13, 2024 (edited) Thanks, but what is Cheat Engine? Looks like a dangerous tool. Edited November 13, 2024 by jollyjack
Shadowed Posted November 13, 2024 Author Posted November 13, 2024 (edited) 52 minutes ago, jollyjack said: Thanks, but what is Cheat Engine? Looks like a dangerous tool. It is absolutely not dangerous on its own. I've been using it for about a decade now. There are many alternatives, but CheatEngine has been around for over 20 years and is fantastic for modding games and fixing bugs. I mainly use it to create QoL tweaks. Like any powerful piece of software/tool/platform, it can be used for nearly anything; but the user must have pretty advanced knowledge to create those mods themselves. The script I posted is only altering the game's sun brightness and can restore the original code once deactivated. edit: The wikipedia article for CheatEngine is quite good: https://en.wikipedia.org/wiki/Cheat_Engine The worst thing about CheatEngine is the included bloatware which as of this writing included Mcafee search engine junk. During install you can click 'Skip all' to opt out. Completely understandable if anyone doesn't want to try this mod due to CheatEngine. I made this mod for myself and I know at least a few people who wanted something like this. Edited November 13, 2024 by Shadowed added wikipedia article for cheatengine
Aapje Posted November 13, 2024 Posted November 13, 2024 (edited) This modifies the game in memory and has a good chance to stop working after an update. And in multiplayer, it may be detected as an attempt to cheat. @LukeFF Can you ask the devs if this could be exposed using a config file or such with relatively little effort? This is a common issue with VR. Or perhaps the existing $updateSun setting in d3dx.ini could be used. That would be much more robust than editing the memory. Edited November 13, 2024 by Aapje 2
Shadowed Posted November 13, 2024 Author Posted November 13, 2024 (edited) 15 minutes ago, Aapje said: This modifies the game in memory and has a good chance to stop working after an update. And in multiplayer, it may be detected as an attempt to cheat. Correct! This might need updating after a large update which I do not mind doing. Please do not use in multiplayer. edit: Love your edit Aapje, that would be my wish! Edited November 13, 2024 by Shadowed
1CGS LukeFF Posted November 13, 2024 1CGS Posted November 13, 2024 1 hour ago, Aapje said: Can you ask the devs if this could be exposed using a config file or such with relatively little effort? This is a common issue with VR. Or perhaps the existing $updateSun setting in d3dx.ini could be used. That would be much more robust than editing the memory. I'll ask 3 1
jollyjack Posted November 14, 2024 Posted November 14, 2024 (edited) 16 hours ago, Shadowed said: It is absolutely not dangerous on its own. I've been using it for about a decade now. There are many alternatives, but CheatEngine has been around for over 20 years and is fantastic for modding games and fixing bugs. I mainly use it to create QoL tweaks. Like any powerful piece of software/tool/platform, it can be used for nearly anything; but the user must have pretty advanced knowledge to create those mods themselves. The script I posted is only altering the game's sun brightness and can restore the original code once deactivated. It got me curious as i was trying to find a solution for the Rise of Flight editor ... it's main screen's behavior stutters when mouse dragging and -zooming around, very annoying. PS was not like that before recent windows 10 and NVDIA driver updates. Edited November 14, 2024 by jollyjack
Aapje Posted November 21, 2024 Posted November 21, 2024 On 11/13/2024 at 11:24 PM, LukeFF said: I'll ask Any answer? It would probably allow me to return the gamma to normal, and improve my night fighting ability to awful instead of impossible.
354thFG_Drewm3i-VR Posted November 21, 2024 Posted November 21, 2024 6 hours ago, LukeFF said: No response yet, sorry. This mod does work well Luke. Doesn't change anything with global lighting that I can tell and makes the sun tolerable. It should be an easy plug and play 😄 1 1
Jeroen83 Posted November 30, 2024 Posted November 30, 2024 Thanks for this mod. In line of this: do you think it would be possible to create a similar app for “dynamic gamma” for VR , according to the brightness ingame? Or perhaps even only the time of day? I have to set my gamma to 0.5 at night flights to let the game be really black, but have to set it at 0.9 at daytime to avoid over saturation and anywhere in between at dusk/dawn. Would be great if this could be done automatically.
Koziolek Posted May 8 Posted May 8 On 11/21/2024 at 5:54 PM, LukeFF said: No response yet, sorry. a gentle reminder
Shadowed Posted August 12 Author Posted August 12 No update needed for 6.002! Works on 5.X and 6.X so far. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now