LockCalc - efficient fleet management

  • Hey guys :)

    I've decided to hang my spacesuit soon and this little piece of software has been bothering me for a few months as I knew if I left it lying around without playing OGame, it would never see the light of day.

    I focused on finishing it for the last couple of days and while it's far from perfect, the script is functional and I think has potential to save a lot of time.



    How to use it:

    First time you open the LockCalc software, you're going to have to set everything up.

    Just like LanxCalc, this program requires to be installed somewhere where it has write permissions because it creates a file in the installation folder which it later uses to fetch your planet list, drives and uni settings.


    When opened, if there's no such file you will be guided through a "setup" process where you will provide your uni settings along with all your planets and drive levels.



    OK, now we're up to screenshot number one basically and there's one very important thing to keep in mind. LockCalc works with your SYSTEM CLOCK.

    This means it works great in combination with Antigame, however, if your local clock doesn't match server clock and you don't use AG's convert times to local times option, you're in for a little trouble!

    I might eventually add a way to bypass this, but I wanted to keep the user interface as simple as possible so for now it's not included.

    The usage is simple:

    Let's say you pop someone's moon and find their landing time from DF harvest.

    You enter the time in the first row, enter target coordinates in the second row and everything else is pretty much set up during the setup process.

    You are ready to press the "Track" button now. The script basically takes all of your entered coordinates and for every ship it calculates flight time to the target.

    Then, it lists 15 fastest flights to be sent and organizes them giving you required info on how much time there is until you need to send the fleet and everything else.

    If you check "sound notification" option, the script will make a "ding" sound 30 seconds before "lock time" (time when you need to send the fleet) so it reminds you to send the fleet in time.

    There are two dropdown lists with their respective checkbox that let you filter out results for only one planet and only one ship type.

    Comes in handy if you want to slow recs down with another ship or just want to check different lock times for different ships. Also you will notice a lot of clutter if you have a lot of planets and don't filter anything out.

    I think that's pretty much it regarding usage.


    -I will repeat, just in case, LockCalc needs write permissions, at least for the first time setup to work correctly. If it's not able to save a settings file, it will keep acting as if you opened it for the first time, every time.

    -Due to some internal problems with threads, in order to prevent the app from freezing if being closed during the "tracking" process, the script takes two seconds to close every time, regardless of the situation.

    These two seconds are required for the thread to close properly, and if it doesn't for Python to kill it properly, otherwise you'd get not responding problem, which no one really likes.

    -I haven't personally encountered it yet, but sometimes the filtering algorithm goes a little bit mad and adds a result that doesn't really seem like it belongs there (out of 15). So far it has been added to the end of the list and it was more of a visual than logical issue, if I find the root cause I will fix it but for now it's like this

    -Setup process can be a little bit annoying and lengthy, especially if you have 10+ planets. If you want to edit your drive levels from UI, you will need to use the whole setup process again which can be accessed by clicking "Edit" button in the UI, but you can also manually edit settings.ini file if you want to save time.

    - Filtering is important. A lot of times, especially having a lot of planets, it's possible that you will get same exact lock times for different planets which will result in having pretty much 15 rows of useless data.

    Filtering from a single planet can help a lot here!

    - Number rounding can result in "lock in" column being off by 1 second (you can see it in screenshot for a LF going from 3 333 3)


    Now that I went through the bad sides, LockCalc is supposed to help you organize well and avoid the whole process of having to set up alarms, manually going from planet to planet and checking your flight times for different ships.

    If you know how same second recycler lock works, you know how important it is to be the first one to send the recs same second.

    This is where LockCalc helps a lot because it presents options for different planets and lets you organize up ahead, also after Hyperspace Drive 15 the recs become faster than some ships so you can use those ships to slow the recs down.

    This is the exact reason specific ship filtering has been added, even though it could be used for other stuff too.

    Thanks to my Fenrir guys for inspiration and help :thumbsup:

    When and if the tool is tolerated, I will provide download links and source code.

    I might add a few more functionalities by then, but no guarantees as I'm buried in other Python related work lately.

    Cheers :)