dlder Posted May 2, 2024 Posted May 2, 2024 (edited) idk if this is the right thread for that, but it seemed "closest", so here it goes... After some error or other I needed to compare my backed up "MissionEditor\logbook.lua" to the current one that seemed to be missing entries. I usually do this via Notepad++ compare but for whatever reason, some of the lines were no longer at the same place as before, and the compare tool didn't manage to "Detect Moves", so I had a lot of "false positives", meaning differences between the files that actually weren't there. So, I had to sort the LUA files. But how? I found nothing, not for Notepad++, nor for Lua. So I wrote - with the help of Google^^ - the attached lua script. (I use the Lua plugin for NP++ to execute it) If you change the filepath to your Saved Games folder it will read it and print the sorted data. You can then copy this text and paste it into a new Notepad++ file. Do this with the copy of the lua file too. You can now compare those two files and you'll find any differences. It's still a bit of a chore, as you then need to go into the actual logbook.lua and edit it manually (copy the missing/changed lines from the backup file), but at least it's now possible to actually see the differences. Maybe someone has a use for this. I'm a LUA n00b and had to search my a$$ off to find and cobble together that nested sort function^^ Cheers!SortedLuaTableOutput.lua Edited May 2, 2024 by dlder 2 OpenXR-Switcher: to easily switch OpenXR runtimes as well as en-/disable API layers Kneeboard-Picture-Viewer: my own take on a Kneeboard for a 2nd monitor, that acts more or less as a better picture viewer. F-15CX mod: my own take on a simple F-15C upgrade English Avionics with Native Betty: you can now have English HUD on non US planes and still hear the native Betty!
Mud Posted June 10, 2024 Posted June 10, 2024 I'm actually really surprised nobody has made a logbook editor yet for DCS. It's quite a hassle to update the logbook manually in case something does not get recorded. Due to for instance MP flights, or a game crash. Currently the hours are not logged for the OH-58D, but the overall hours of those flights are added. So that might mess up the accuracy of many logbooks. So option one is to simplify the task a bit via a spreadsheet file or something to see if the hours add up. A better option would be a small program which could read the lua, show the results and add them up. And then allow you to modify as required and write back into the lua. It's been 20-25 years ago since I did any basic programming myself in Visual Basic. But well, never say never. Perhaps I'll find some spare time somewhere 1 Spoiler W10-x64 | B650E Gigabyte Aorus Master | AMD Ryzen 7 7800X3D | Noctua NH-D15 G.Skill Trident ZS Neo DDR5-6000 64Gb | MSI RTX 3080ti Gaming X Asus Xonar AE | VPforce Rhino + TM Hotas Warthog MFG Crosswind pedals | Valve Index
Otulf Posted June 13, 2024 Posted June 13, 2024 (edited) Hello! I totally agree with Mud! For me, It would have been nice to be able to make a Swedish logbook with ranks an squadron patches. Best regards: Otulf Edited June 13, 2024 by Otulf
Recommended Posts