sots2qkeys... (hotkeys for sots2)

Moderator: Makail

sots2qkeys... (hotkeys for sots2)

Postby Profound_Darkness » Thu Apr 12, 2012 3:12 pm

(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.

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.
Last edited by Profound_Darkness on Tue Dec 17, 2013 9:07 pm, edited 109 times in total.
Mecron wrote:... "Hey aliens!! Candygram from the planet of crazy talking monkeys!!" ...

my fav tactical w/fav races :)
User avatar
Posts: 3700
Joined: Wed Nov 29, 2006 12:46 am

Re: sots2qkeys... (hotkeys for sots2)

Postby rimbimbambo » Fri Apr 13, 2012 6:45 pm

Oh wow, I totally forgot about hotkeys - I might be able to add something in for these in the next few patches.
User avatar
Posts: 440
Joined: Sat Oct 08, 2011 8:42 pm

Re: sots2qkeys... (hotkeys for sots2)

Postby Profound_Darkness » Sat Apr 14, 2012 2:09 pm

Cool! you add them in, I will take them out... Except maybe for F6, I love that key.

One keypress on the main menu and I get a fresh new save with my current turn number on it :)
('reading' the screen to get the turn number was... an interesting experience, and it's way faster than I expected :) )
Mecron wrote:... "Hey aliens!! Candygram from the planet of crazy talking monkeys!!" ...

my fav tactical w/fav races :)
User avatar
Posts: 3700
Joined: Wed Nov 29, 2006 12:46 am

Re: sots2qkeys... (hotkeys for sots2)

Postby Profound_Darkness » Wed May 30, 2012 12:14 pm

[re-edited this entire page]
OK, new demo up showing the new feature that is actually available for use :)
click here to see (about 40 seconds, shows off 2 aspects).

The input method I settled on is:
Area sensitivity - clicking in the BR list adds more (and generally tries to use whatever is at your cursor), clicking in the carrier's hold empties. (even though I say add, if you click in the right spot it's remove below).
shift-left click adds BRs to all wings (if you need to skip a problem rider, just select the next one, it will pick up from there) for the entire fleet
ctrl-shift-left click adds BRs to all wings for a specific design group.
shift-right click adds BRs to all storage (skips carriers that don't have storage). This is non-specific so whatever riders are available it will try to fill.
ctrl-shift-right click adds BRs to all storage, this is type specific so it will try to fill each storage slot with just Patrol riders (for example)

When adding wings... (or storage with ctrl-shift-right click)
If there were riders already present it will try to add more of that type (regardless of what you clicked on in the list).
-It fails if it couldn't fill that wing.
If there were no riders already present and it couldn't fill the rider it will empty it and try something different.

There are some issues. The behavior isn't quite right but it's close.

regarding keys - I pass they keys right through to sots2 (for these) so there should be no blocking (once I take some notes I will likely re-enable blocking).

Regarding Tarka and Liir Cruiser/DN sized riders, no support. If there are any other race specific BRs those are likely unsupported as well.
I don't play Tarka or Liir much so if you want me to even consider them (not that this doesn't mean I add them) I will need a save with at least one related carrier and enough of each rider type to fill it. The main concept was/became to (re)fill defensive platforms and I don't think there are any platforms that could use those larger rider types.
Mecron wrote:... "Hey aliens!! Candygram from the planet of crazy talking monkeys!!" ...

my fav tactical w/fav races :)
User avatar
Posts: 3700
Joined: Wed Nov 29, 2006 12:46 am

Re: sots2qkeys... (hotkeys for sots2)

Postby chronobomb » Fri Jun 15, 2012 5:32 pm

I am trying to get this to work on Win 7 x64 and it won't unpack anything. It just creates the .ini file and doesn't work in game although there is a process running in the toolbar.
Posts: 176
Joined: Tue Oct 25, 2011 12:32 am

Re: sots2qkeys... (hotkeys for sots2)

Postby Profound_Darkness » Sun Jun 17, 2012 6:05 pm

Strange, it's supposed to create 2 folders, a gfx folder and an ImageSearchClip folder...
Looking at the exe I can see the ImageSearchClip items packed but not the images...
<grumble> I don't remember FileInstall autohotkey command giving me this trouble...

For now I have archived the ImageSearchClip and gfx folders. Using 7zip extract each one into their own directory that the exe is in (so ImageSearchClip.7z -> ImageSearchClip and gfx.7z -> gfx). Also make sure that it works in windowed mode of sots2, the full screen mode is a very hackish kludgy solution...

I can't think of a good reason for the failure... (I tried running the exe as admin and it still didn't extract the files, though that's not supposed to be required.)
Mecron wrote:... "Hey aliens!! Candygram from the planet of crazy talking monkeys!!" ...

my fav tactical w/fav races :)
User avatar
Posts: 3700
Joined: Wed Nov 29, 2006 12:46 am

Re: sots2qkeys... (hotkeys for sots2)

Postby chronobomb » Mon Jun 18, 2012 5:37 am

Works beautifully now. Thank you!
Posts: 176
Joined: Tue Oct 25, 2011 12:32 am

Re: sots2qkeys... (hotkeys for sots2)

Postby chronobomb » Wed Jun 20, 2012 11:05 pm

New Problem I am running into is the Carrier/BR screen. Shift L-click and Ctrl-Shift-L-click do not seem to be functioning.

The Ctrl-Shift-R-Click does work to fill BR Platforms

Also is their anyway your Hotkey program can auto purchase modules on the station screen?
Posts: 176
Joined: Tue Oct 25, 2011 12:32 am

Re: sots2qkeys... (hotkeys for sots2)

Postby Profound_Darkness » Thu Jun 21, 2012 4:52 am

<scratches head>
Isn't right click for filling cargo space while left click is for filling wings?
<checks notes>
Yep... Cargo is the box icon and platforms don't have storage, they've only wings.

Also release 14:
?Sometimes the BR loading (when type specific, ie wings or ctrl-shift-right click) fails to 'see' a valid rider durring filling. Haven't quite figured that one out yet but it's somewhat rare (though when it happens it's not that rare). May have something to do with engine glow... (NOTE: I *MIGHT* have fixed this at the last second before posting this...)

So if I didn't fix it right before posting then I still haven't figured it out.

As far as stations go, if you are talking about adding what is needed to do an upgrade, yeah I keep thinking about trying that. In general everything is just a symbol to the script so making sense of things can be difficult. To do it right (a way that I would use) would be among the most complex things the script would do...

I have been waiting and hoping for something to pop up there from Kerberos... (It was a bit unclear what suggestions grabbed their attention/were already on their list and sometimes it feels a bit like a game of chicken adding new script features as sots2 gets closer to an all-clear+.)

... but I am still considering it. I have some interesting new side projects lined up so it depends on what wins out, I am likely to finish up my work on the new ImageSearch function 1st since that will likely be useful in the Autohotkey community (where I lurk). What I am doing right now is loading up the modules I want and hitting enter (enter (numpad and alphanumeric) is tied to Confirm Build Order on station manager), if that helps.
Mecron wrote:... "Hey aliens!! Candygram from the planet of crazy talking monkeys!!" ...

my fav tactical w/fav races :)
User avatar
Posts: 3700
Joined: Wed Nov 29, 2006 12:46 am

Re: sots2qkeys... (hotkeys for sots2)

Postby nimrod123 » Fri Jun 22, 2012 6:08 am

thank you, thank you, thank you, this is really helpful
Posts: 9
Joined: Fri Nov 04, 2011 1:35 am

Re: sots2qkeys... (hotkeys for sots2)

Postby Filippe999 » Fri Jun 29, 2012 2:48 pm

you think you can make a hotkey to launch a game? my screen is smaller than the minimum required so can't start a game either confirm a race change window.
my first thought was to change the gui to move these items higher up so i can click'em .
BTW i opened a lot of threads about this, but none of the 10 were approved yet, (i triedto post these yesterday..)
“To consider the Earth as the only populated world in infinite space is as absurd as to assert that in an entire field of millet, only one grain will grow.” - Metrodorus of Chios (400BC)

“If two ships are enough to do the job; bring ten.” - Steel
User avatar
Posts: 42
Joined: Thu Jun 28, 2012 2:44 pm
Location: São Paulo, Brazil

Re: sots2qkeys... (hotkeys for sots2)

Postby Profound_Darkness » Tue Jul 17, 2012 5:33 pm

Sorry about the extended delay, I've been rather ill until about a week ago...

The script can't do anything you can't do since it's just 'reading' the screen and simulating input. One thing you could try is to enable a higher resolution than your native display. This will give you a larger resolution but you will only be able to see part of it at any one time. When you move the mouse against an edge the whole screen will shift (at least thats how it works in XP).

To do this in 7 I think you need to right click on the desktop, choose Screen Resolution, click Advanced Settings, Monitor tab, uncheck 'Hide modes that this monitor cannot display' and hit OK. You should then be able to select a resolution above your native... I don't know how this will effect sots2 but I suspect you will need to run sots2 in a window.

There is also the List All Modes button on the Adapter tab (Advanced Settings)...
Mecron wrote:... "Hey aliens!! Candygram from the planet of crazy talking monkeys!!" ...

my fav tactical w/fav races :)
User avatar
Posts: 3700
Joined: Wed Nov 29, 2006 12:46 am

Re: sots2qkeys... (hotkeys for sots2)

Postby Profound_Darkness » Sat Nov 17, 2012 5:32 pm

HEY! Long time no updates...
I've done a couple of quick passes over the code to bring it up to work with sots2 post all clear while trying to maintain feature set. The BR management stuff is disabled though just about everything else is trying to work with sots2's hotkeys now while maintaining feature set.

I have a lot more cleaning to do as huge swaths of code are no longer needed (though a lot of their backbone/helpers are still handy). So far I've managed to eliminate the state switching code (before sots2 hotkeys the state switcher allowed you to move from one screen, ie built, to another, ie research, with a key press). I've also eliminated most of the view switching code (a keypress to move from normal view to terrain view for ex.) and about 10 images.

But I've also added a little something, those that used sotsqkeys in prime will probably recognize the right click - event change/focus. I've also managed to get several things that were busted (and I didn't think I could get working) back again.

Now, post cleaning, I've a question for those few of you that use this... what should I focus on (again, this is post cleanup)?
I don't have a lot of ideas just now but one thing I am bouncing around is user configurable hotkeys for the different things this script does (a thankfully shrinking set of things).
I haven't gotten to BRs yet but maybe the BR manager needs an overhaul? (pre-all clear the BR manager code allowed you to fill up as many platforms/carriers as you had with whatever BRs you had with a click (A lame demo)).

Something I didn't list? Keep in mind, there has to be UI elements on screen for me to interact with or hotkeys in sots2 to use, sots2qkeys does not hook into sots2.

If no one replies, I probably will go with user configurable hotkeys, though as part of the cleanup the script will likely match my own sots2 hotkey configuration as I do play the game with this script. It already has a bit. - `/1/2/3/4/5/6/T instead of 1/2/3/4/5/6/7 of sots2 default.
Mecron wrote:... "Hey aliens!! Candygram from the planet of crazy talking monkeys!!" ...

my fav tactical w/fav races :)
User avatar
Posts: 3700
Joined: Wed Nov 29, 2006 12:46 am

Re: sots2qkeys... (hotkeys for sots2)

Postby Profound_Darkness » Wed Dec 26, 2012 2:38 pm

Playing with concepts to alter the BR auto loader behavior, looking for input.

Context: cursor over a BR on the right hand side of the screen
Hotkey1 - Load whatever BR type ends up under the cursor into the storage slots. Stop when there are no more riders/no more space.
Hotkey2 - Load whatever BR type ends up under the cursor into the wing slots. If a wing is partially full try to find a matching type and load that on, if not then stop auto-loading.
Hotkey3 - Load the type of BR under the cursor into the wing slots. If a wing is partially full then empty the wing and then load the type specified. If there are no more of a specific type visible, stop auto-loading.

Context: Cursor over the contents of a BR, near the middle of the screen
Hotkey1 - Will empty all storage slots
Hotkey2/3 - Will empty all wing slots

These will take place over the fleet, from the 1st ship selected in that fleet (much like current behavior). - BTW Finally fixed it so that if a carrier was partially loaded and the script succeeded in reloading the carrier it will keep processing the fleet rather than stopping. :)
I can have it take place over a group instead (the code base was designed to allow for individual wing, individual ship, individual group, and individual fleet).

Input? NOTE: The hotkeys will be user configurable so that's why I don't specify what button it will be. The current BR loading code is rather buggy, having been written before the all-clear and quickly modified to let it somewhat work again.

Also I am *thinking* of expanding it to work with larger than BR class riders (Tarka/Liir) if there is much desire for such.
Mecron wrote:... "Hey aliens!! Candygram from the planet of crazy talking monkeys!!" ...

my fav tactical w/fav races :)
User avatar
Posts: 3700
Joined: Wed Nov 29, 2006 12:46 am

Re: sots2qkeys... (hotkeys for sots2)

Postby nickersonm » Sat Jul 06, 2013 2:09 am

I want to thank you for this - I started trying it a few days ago (v36h), for battlerider loading once I started using more than a single fleet with BRs (which works quite well), and have found it quite useful for the other functions as well. Everything works perfectly, except the build-multiple functions.
User avatar
Posts: 1566
Joined: Thu Nov 02, 2006 11:02 pm
Location: Boulder, CO, USA


Return to Modding

Who is online

Users browsing this forum: No registered users and 1 guest