(version 35b - 2013-03-11) Trying a new structure. The next 4 lines are started with the relevant link, description follows the link.
(version 37b - 2013-12-17) This is a mid development alpha. (search for "(beta)" without quotes for that info.)
--The WIP Readme file
has all the juicy details, or most of them anyway, relative to this thread.
--Release 35b here
. It's still a bit beta-e but it is coming along nicely. Particularly if running sots2 in the recommended windowed full screen mode. If there is a new feature using new configuration data you will need to rename the old file out of the way, or delete it if you never made changes to it. The 3 configuration files are sots2qkeys.ini, and sots2qkeys.keys, rarely sots2qkeys-tkeys.ini. sots2qkeys.keys sees frequent changes (any new features). Unfortunately English language only as I couldn't find graphics only visual elements in all cases. It is quite possible for me to make it work with other languages though.
-Update - Nearly done with the gui (at least the big stuff), it can still fail in interesting ways though but shouldn't produce bad output without warning. Also just about got a set of defaults done too.
--Release 32g here
. This is the last heavily tested release version, outside of some rare situations this should fully work.
--For automated crash log collecting nab this
. This isn't a terribly user friendly component however, see the readme for how to get it working. This is a modified version of my log collecting tool (which can be found within this excellent thread
). Currently it only catches the most common crash type of the 3 types I am aware of.Outstanding Issues:
-Discovered that this mod does not work with sweetfx but it does seem fine for sots2 with and without FXAA (I also play with maxed textures if that matters).
-No proper defaults right now... so many new hotkeys added... (You can use the GUI configuration utility to add hotkeys.)
-Some of the hotkeys in release 34 default to hotkeys that interfere with sots2.
-There are still a few hidden sots2 hotkeys that might cause conflicts but I think I've tracked most of them down.
(The following *might* be fixed... not easy for me to test but over time I've fixed a variety of bugs that might have been causing this.)
-Non-US Qwerty keyboards not working out of the box, in particular keyboards which put out symbols other than 1-0 on the numeric row when not holding shift.
Probable workaround - change sots2's hotkeys which use the numeric row to be a different set of keys using sots2 itself to make the changes.
-The view toggle feature remains non-functional even after modifying the tkeys.ini file to fit the output from the numeric row. Other features linked to those keys do start working.
--Older releases and related files can be found here
Most of the older releases don't work as sots2 has changed a lot besides the bugs they had.
Why use this? Well if you want to enhance some of the existing sots2 hotkeys as well as add a few more that I've implemented... Here is a quick list of what this script does.
-Proper support of windowed full screen mode. STRONGLY
recommended instead of normal full screen mode (It's the mode I run in now, mostly).
-Esc and Enter key react to many dialogs with esc canceling, dismissing, or going back and enter confirming.
-F6/F7 to quick save your game. The save name includes the turn number. Also lots more to this including automated archival, see the readme.
-Filter keys (1, 2, 3, 4, 5, 6, 7) for Station Manager and 1-4 for Planet Manager to quickly change filters.
-Also those same keys for view toggling, so if you are in a view, and you hit trade view key once, and then again, you are back in the view you were in before.
-State keys (B, D, R, E, Z, F, C, M, L) if hit a second time, close that state. Also the Fleet key will open the Fleet Manager from the fleet mini config.
-Reserve Transfer Hotkey (R) to toggle in and out of reserve transfer mode while in mission setup->Relocate
-Reserve quick movement hotkey (Shift+Left Click) to quickly move ships from reserves to caravan fleet.
-Ship Transfer (new fleet dialog) quick movement hotkey (Shift+Left Click) to quickly move ships to new fleets or from new fleets into reserves.
-Rebase Hotkey (R) to quickly move through the rebase process of a mission setup screen.
-Build item removal hotkey (Shift+Left Click) for the build screen, removes items from the new invoice, invoice details, and build queue lists.
-Build item adding hotkey (Shift+Left Click for some, Shift+Ctrl+Left click for you say how many (windowed only), Ctrl+Left for 1 turn worth) adds groups of items to new invoice.
-System Specific station manager hotkey (Ctrl+Alt+S) to open the Station manager at an individual system.
-Station Manager Auto upgrade hotkey (A) sets all the needed parts to upgrade the station.
-System open/close toggle hotkey (Shift+C) to toggle a system's state.
-Focus on event hotkey (Tab), whatever the current event is, focuses on it.
-Event cycle and focus hotkeys (Shift+Left/Right Arrows, Page Up/Page Down, right mouse click on the arrows in game) to change the event and focus on it in one motion.
-Show help screen in sots2 hotkey (F1)
-Show detected hotkeys, sots2 and sots2qkeys, hotkey (F2). Something of a debug tool.
-BR Auto Loader is BACK (For those that remember it). Ctrl+Shift+Left/Right click on a rider in the list or loaded on a carrier, will fill/clear entire fleets of BR carriers (BRs only)
-Combat Hotkeys (NEW). No defaults as of yet but there are hotkeys for facing, roll/spin/all-stop, orientation, mode, speed, and combat plane/elevation.
-Some automation to get around some tiny and larger bugs when using hotkeys.
A short about: I started this script quite a while back after sots2's first release (pre- all-clear). The intent was to add in hotkeys to bring parity with how sots prime felt to move through while playing while expanding since sots2 is definitely not prime. As Kerberos added hotkeys and functionality to sots2 I would remove functionality from the script. The script still attaches to a lot of keys but doesn't do nearly as much work as it used to. YAY!
Most hotkeys are (now) user configurable and you can even overload keys as long as their context isn't the same that one key will do many things.
The binding system allows for duplicate keys (keys that are in sots2qkeys.keys) to have more than one key use the same function.
Hotkeys that tie in with sots2 follow your sots2 key bindings, You can even have some functions bind to existing sots2 hotkeys.
Thanks to the new user configuration, any key not directly bound from sots2 can be blanked (between the <key> and </key> tags) to disable the feature.
I've tried to keep the hotkeys very fast by calculating where the script expects to find various defining graphics, this also means it's very sensitive to changes to the game UI. This script does not hook into sots2. Though it does watch your keyboard input globally (generally disabled outside of sots2), it should never want to go online so if it does, then it's somehow been infected. There should be no reason to run this as an administrator, except if you run sots2 as an administrator (which isn't a good idea), as non-admin programs can't monitor input of admin programs. Again, please don't run this as administrator.
Plans (Time permitting):
-Try to get a test environment setup so that I can try to replicate how some functions aren't working on non-US Qwerty keyboards from the get go while sots2 responds properly...
-Run through the individual keys and try to make them work if they are blocked (as in allow the key to pass through on failure) or in the case of a few, make them work if not blocked.
-Got a problem? Let me know. I pretty much stick to Hivers with occasional runs with some of the other races. This script should just work out of the gate so if it doesn't let me know. Either via this or I've often been idling in sots2's global chat even when not playing (though if you are using a full IRC client I'd prefer you enter private chat for sots2qkeys).
-Got an idea? Post it. Keep in mind that the script can only work with what you can work with (see and click on).
Coming up next - ... see the (beta) section below.
(beta)DO NOT report bugs to tech support if using this version. The way sots2qkeys is interacting with sots2 is highly unstable in some modes... Verify the crashes without the script running.
Could use an older version as well but it's always best to verify a crash without any outside interference...
--Release 36i beta here
. This branch has ended. I'm keeping it up and linked for those that don't want to try the alpha. When the alpha matches about what this version did I'll pull this one down. This was pretty stable if you stuck to the default communications options.
--Release 37d alpha here
. This is a mid development alpha. I'm going in a new direction that requires a lot of rather fundamental changes to the code, further generalization in ways I hadn't planned for though requiring surprisingly few large scale structural changes. For the broad strokes see below, as features become solidified they will be noted in Further plans.
Further plans (rough priority):
*Do the code walk through to: 1-Get the functions so that they all behave like they should and fit into the code in a modular fashion rather than some of the older kludgy ones. 2-Inspect at least the major functions so that they properly estimate where on the screen something is (better non-1080p compatibility, both lower and higher).
(those are effectively in progress atm)
+Finish the new mode 1 (mostly involves playing the game a bunch and fixing bugs as I stumble on them for some time).
+Add in the new mode 2 (full screen failover mode) - relies on mode 1 code base.
+Define the screen/state once rather than multiple times (as it is now).
-Further structural changes to all hotkeys
Below is a short list of the last few updates... (key: -- A note, usually related to the item above it. - A bug fix. + A new feature (or old feature brought back), ? known bug/issue.)
(Removed the old updates list... details of what changed version to version are included in readme files.)
Release 37 (alpha)
-Tweaked the old BR code to look for a different graphical element. Should fix a couple of cases where the manager got confused (like damaged carriers).
+'New' capture mode - Legacy (mode 0). This uses older but reliable code, compatible with windowed and full screen windowed mode. It's a tad slower than what was the capture mode before in 36i.
--I don't intend to maintain this mode very much but if something doesn't work in this mode it's worth hearing about still.
+New capture mode GDIP (mode 1). This capture mode limits the frequency of screen captures while potentially gathering multiple data points. This is a MUCH faster mode. Worst case events in Legacy mode are barely a blink now.
--This is also for windowed/full screen windowed mode (most compatible with windowed full screen). Intended to replace Legacy.
--True Full screen mode (not windowed full screen mode) is currently fully disabled until this mode is completed. I expect true full screen mode to only be a little slower with the new code.
--There are still things that don't quite work right but it's a matter of 1 off errors in math which will get fixed as I play the game with this mode enabled. No need to report errors on this mode (for now).
-Major structural change to the guts of image handing.
-Major structural change to most of the initialization process for easier code editing/reading (and better memory usage).
-A couple of passes over code relevant to Legacy mode (0) to allow the old code to access the new image data storage.
--Standard Windowed mode should be functional again.
-Passes over code in general to better take advantage of new image data storage method. Initializiation should be much faster.
-Fixed accuracy of some elements...
--Noticed some elements in the UI have moved (or were incorrectly measured originally) so some elements may not be working. Oddly legacy code seems to be searching a larger area than it should be (ie it works even if the numbers are wrong).
--Would explain why the new mode code is faster, comparing equal operations.
-Structural changes to confirm/cancel
-Cancel/dismiss is now using a different graphic for Back button.
-Automation to get around a sots2 bug related to reserve transfer is now defaulted off (the bug seems to have been thoroughly squashed
-Fixed a couple of surprisingly old (but quite minor) bugs in the invoice removal code (less glitchy when using hotkeys to remove an invoice on build screen).
-Fixed some more searches.
-Fixed an old bug in the turn reading code.
-Temporarily(?) abandoned micro screen updates since right now only one mode can benefit from that code (mode 1), won't help with mode 0 nor mode 2.
-Fixed priority so ESC properly cancels the Loa Cubes dialog rather than exiting the build screen.
-Found a flaw in the empiresticky image and fixed it.
-Modified OKText graphic, should do a refresh of files.
-Fixed a problem involving the shared resource (screen data) getting deleted incorrectly.
?Strange problem in mode 1 if using hotkeys too quickly.
-Wrapped up some code that should allow windowed mode (legacy/mode1) to function properly (only a small number of screens like build and specific cases affected).
-Yet another method of dealing with the shared resource. Should fix the odd problem of hotkeys too quickly.
--Screen capture data is no longer deleted when the hotkey that generated it is done. Instead the old data is discarded after capturing new data. (The invalid state is no data.)
+Implemented a limiter on capturing screen data too frequently. Mostly helpful for mode 2 (true full screen mode).
+Moved user configurable hotkeys to a new data structure (mostly)
+Added a gate keeper to the dispatcher setup, reducing the number of unnessisary/repeat searches. All user configurable events have been touched with this change.
--Also created a proper dispatcher rather than the former solution as well as proper bindings to the dispatcher without breaking the chaining mechanism.
--State information (burried in configuration files) is now important. Also means that state is becoming configurable.
-Fixed a couple of bugs that was causing sots2 hotkeys used by sots2qkeys to not be recognized and thus some information not comming in properly from sots2 configuration files.
+Moved a few non configurable events into the key database. They are still non-configurable but now can be overloaded.
--This reduces the number of hotkeys that cannot be overloaded to ESC, Enter, Numpad Enter, Shift+Enter, Shift+Numpad Enter, and Pause.
+Some work on the keybinding GUI to make it a tad friendlier.
+Extended the key database structure to handle multibindings.
-Unified the setup process of key database (this database is compact, mostly meant to track a few details for dispatcher and setup bindings/overloads)
+Extended the low level aspects of the code to handle multi-binding, multiple hotkeys for the same event (ie Enter and Numpad Enter bound to confirm). GUI Keybinding system invalidated.
+New key configuration option - Multi-bind allows creating multiple bindings for a single event. (ie enter/numpad enter -> confirm)
+Split out (most of) the formerly hard bound ESC key (for cancel/dismiss) entries into user configurable options. ESC is no longer hardbound.
-Found code entry related to the very old mission setup screen and removed it (A left over from the days of single digit version of this app). This also eliminated an image.
+Added the ability to properly handle blocking keys. That is if a hotkey failed (ex ESC for back) the blocked key will be passed to sots2. (in this ex, the main menu will appear if on the starmap).
?Blocking and non-blocking of the same hotkey is an invalid state. Use caution on blocking hotkeys for now, there is nothing to prevent this bad state atm.
-Fixed a goofy bug in the config writing routine that caused multibinds to not be saved in a manner that could be read later (other non-multibind changes were saved).
-Fixed an old bug that, in the hotkey binding stage, cause certain hotkeys to be recognized as already bound when they weren't, sometimes causing no binding at all for affected events.
+Split out the remaining hardbound keys related to confirm/cancel. There is a new default hotkeys file which replicates how the old esc/enter code worked but in configurable form.
--Not all the esc/cancel stuff is working yet. I accidentally removed some things that didn't need to go. I will be re-cataloging buttons that I'd like ESC/Enter to trigger, something not done since early days of sots2.
-Fixed a bug in the code to send bocked keys to sots2 (it was entering a very unusual never ending loop that would eventually crash(!?)).
-Altered the order of some searches to fix issues with Loa on build screen (this one pertains to OK, not cancel).
-Finished removing attempts to run the old structure for confirm/cancel, some automation items might be broken (but when they work they are MUCH faster).
-Purged the roughly 700 lines of code related to the old confirm/cancel mechanicism. (for reference that was about 4% of the code and optimizations. <sigh>)
-Cleaned out the images list a bit. Also purged a few functions that aren't being used anymore. Probably a good idea to delete your gfx folder, remember to backup any files inside that folder you've modified.
-Fixed in eroneous attempt to load some images that didn't exist.
-Fixed some bugs, old and new, related to OK/Cancel/Dismiss.
+Altered structure for buttons with the characters "OK"/"Cancel" There was a lot of detritus in the old code. Those buttons might be buggy but will fix as I find those issues. Also new hotkey defaults to encompas those event changes.
--Includes new graphics to find those buttons. Also new search areas. Also more accurate calculations (ie no more fudge on the various managers).
-Rewrote the image installation code segment (only matters on first run and restore original files) due to the large number of changes in graphics, easier to maintain now as well.
+Proper conflict detection information with the new Confirm/Cancel/Dismiss events. NOTE that the GUI doesn't understand the new multibinds so you will see those conflicts pop up still. If a conflict happens without "+++", take notice.
-Done with Confirm/Cancel/Dismiss for now (at least the big stuff). New default hotkeys included in the package. I will add new dialogs and windows as I find them.