Xanatos Posted February 21, 2023 Posted February 21, 2023 (edited) Hey there, Recently, I unintentionally ended my career in IL-2 by not restarting the mission before going to bed. When I returned the next evening to continue my non-ironman campaign, I discovered that my pilot had been listed as "dead," and there was no button to restore their status. The only solution I found was to reset the entire campaign, which I was not willing to do. After conducting some research on Google, I discovered various articles on how to manipulate the game database to revive a pilot. Given that I knew this issue could happen again, I decided to take the time to write a command-line interface (CLI) application as a proof of concept to bring my pilot back to life. I further iterated over the code and uploaded it to GitHub, so everyone can use it. https://github.com/XanatosX/IL2-Career-Reviver Please be aware that if you ever find yourself in a similar situation, you are welcome to use the tool, but please keep in mind that the tool changes the database containing all of your game data. As a result, it can lead to a completely broken and unrecoverable state of the game. While I have an understanding of the database by examining the tables, I am not a developer of the game, so there is a possibility that I may have done something wrong. Although the game might work after you use the tool, it may eventually break down. So, please always back up your database before using this tool. You can find the documentation of what the tool is capable of on the GitHub page. If you have any questions or encounter any bugs, please let me know via this forum or by creating an issue or participating in one of the opened discussions directly on GitHub. To prevent you the headache to search the download link, there you gohttps://github.com/XanatosX/IL2-Career-Reviver/releases/latest The installation process and how to use it is described on Github. Edited February 27, 2023 by Xanatos Add Download link
Xanatos Posted February 27, 2023 Author Posted February 27, 2023 I did make a small update of the tool to verison 1.1.1. This version does not change or add any functionality but it does add a description for every command if you run it with the "--help" argument. Hopefully this makes the navigation of the commands inside of the cli easier.
FlyingH Posted February 27, 2023 Posted February 27, 2023 (edited) Will it be possible to copy the database to another folder, then use the tool to revive a pilot there and then copy the relevent part of the db back into the original db? Or is the whole db changed? Edited February 27, 2023 by FlyingH
Xanatos Posted February 28, 2023 Author Posted February 28, 2023 (edited) The revival process does affect 4 tables in the database. 1. It need's to change the career status back to alive 2. It need's to change the pilot status back to alive 3. It does delete the mission the pilot did die on and everything which is following 4. It does delete all sortie data for the deleted missions to clean up After that the game does create some new missions as soon as you load into the game. So I think it would be hard to merge the databases togheter after the changes are done, but it's still possible. For testing purpose I did indeed copy the database to another folder and let the tool work on this instance of the database. To do so start the tool and perform the commands to find the game database either with the command IL2CareerToolset.exe settings auto Or with IL2CareerToolset.exe settings manuel "D:\SteamLibrary\steamapps\common\IL-2 Sturmovik Battle of Stalingrad" The auto one will try to automatically detect the Steam installation and find the game folder, this will scan through your entire pc to do this. If you don't want the tool to scan your pc just set the root folder manuelly with the second command. A root folder does look like this "D:\SteamLibrary\steamapps\\common\IL-2 Sturmovik Battle of Stalingrad". After doing that the tool will save the configuration in the "%appdata%\IL2CareerToolset\settings.json" file which does look like this. {"DatabasePath":"D:\\SteamLibrary\\steamapps\\common\\IL-2 Sturmovik Battle of Stalingrad\\data\\Career\\cp.db","LogLevel":1} As you can see there is the database path the tool is operating on, just change it to the path where you did copy the database to. Keep in mind that this is a json file so every "\" need to be escaped as shown in the file above, so always use "\\" instead of "\" otherwise the path will not be read correctly. Hopefully this will help you If you want to take a look into the game database it's using a "SqlLite" database, there are different free tools to read and operate on that type of database. But be warned if you mess around with the original one because of obvious reasons. If you want to comprehend what the tool is doing and you are able to read and understand .Net c# you can take a look at the Github repository. The command for the revival can be found here: https://github.com/XanatosX/IL2-Career-Reviver/blob/master/src/IL2CareerToolset/Commands/Cli/Entity/RevivePilotCommand.cs Edited February 28, 2023 by Xanatos Adding code references
Letka_13/Arrow_ Posted May 12, 2023 Posted May 12, 2023 I was able to set the pat, however if I enter the command .\IL2CareerToolset.exe save game pilot it shows me an error> 'no such table: pilot'
Xanatos Posted May 15, 2023 Author Posted May 15, 2023 (edited) On 5/12/2023 at 9:22 PM, Rudolph said: I was able to set the pat, however if I enter the command .\IL2CareerToolset.exe save game pilot it shows me an error> 'no such table: pilot' Is there more infomation to the error message you could post as a screenshot or as plain text? It reads to me like the tool cannot find the database table named "pilot" which is strage. It's still working for me at least so either you database got an issue or something changed which I'm not aware of. I do not thing that the did rename a table that wouldn't make sense to me. Please send the full error stack if possible otherwise I think it will be hard to diagnose the issue. As you searched for the game database was the entry listed like that or something similar ending with the `Career\cp.db` part? Edited May 15, 2023 by Xanatos
Cerdon Posted July 15, 2024 Posted July 15, 2024 As soon as I launch the program it sees itself out, get a quick flash of the powershell then poof. Latest windows 11 1
Xanatos Posted September 4, 2024 Author Posted September 4, 2024 First of all, sorry for my late response. Did you start the tool via a double click on the ".exe" file or execute it from within a powershell window you did open all by yourself? Because the tool should not be able to kill a powershell session all by it's own.
Scacco Posted October 18, 2024 Posted October 18, 2024 On 2/28/2023 at 4:08 AM, Xanatos said: The revival process does affect 4 tables in the database. 1. It need's to change the career status back to alive 2. It need's to change the pilot status back to alive 3. It does delete the mission the pilot did die on and everything which is following 4. It does delete all sortie data for the deleted missions to clean up thanks to these tips I was able to revive my pilot manually by open cp.db file with "DB Browser for SQLite" https://sqlitebrowser.org/ - update STATE=0 in PILOT table (for my dead pilot) - update STATE=0 in CAREER table (for my career I want to revive) Cheked which was the missionid where my pilot die (you can order by MISSION table by startTime columna and it shoudl be the latest one) in my case it was id 172, so: - delete from event where missionId = 172 - delete from missions where id = 172 - delete from sortie where missionId = 172 Save and open the game it shoudl be fixed 1 1
Xanatos Posted November 18, 2024 Author Posted November 18, 2024 (edited) On 10/18/2024 at 5:01 AM, Scacco said: Hi Xanatos, same errore here Hmm that is really strange we got this error already and I could not find the root cause it's hard to debug the issue since it does not crash for me. Could you provide me with your DB so that I could use it for testing purpose? I reopend the issue on the project side: https://github.com/XanatosX/IL2-Career-Reviver/issues/49 Edited November 18, 2024 by Xanatos
Xanatos Posted August 29 Author Posted August 29 Alright, someone did provide me with a database and I did diagnose the issue. Seems like the database wasn't the cause and it was related to an error preventing the tool from writing the selected database path to the setting file, or load the data from that save file. I also implemented a error message for the get pilot and revive pilot command if the path cannot be loaded or the database did vanish (Game moved or uninstalled as example) for some reason. I did write a fix for that which is currently in a testing phase, you can download it here: https://github.com/XanatosX/IL2-Career-Reviver/releases/tag/Develop-805. If you could confirm that it does indeed work I would create a new release out of it.
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