New Part Swapping Enhancement: "Autopairing" (Patreon)
Content
Over the past week in our #patron Discord channel, once again discussion rolled around to the topic of "part sets," the idea of having a few standard kits/groups of parts that you switch between depending on what tactical mode you're in. For example among some players it's common to replace sensors with armor before going into combat, and switching back when ready to explore again. Or maybe even as a pure combat bot simply switching between two sets of weapons depending on whether or not you're up against Programmers.
Well even from the earliest years of Cogmind development I'd repeatedly considered the idea of designating sets of parts to simplify the switching process, but the ways I was thinking of it before (especially in terms of how other games with non-destructible equipment handle it...) never really made sense in the unique context of Cogmind. You potentially have a lot of parts, you might fairly often lose some, not to mention find better ones, and all the while your build is shifting into something slightly different as you progress.
The discussion triggered these thoughts for the umpteenth time, but this time was a little different! Now that we have a swap menu, and have been using it for a while, I realized we can kind of piggyback on that for functionality similar to "sets." After all, when you're swapping back and forth, it's usually between the same few parts that were temporarily stored in your inventory. So why not have each part remember what it was swapped with, to make it quicker to swap them all back to what they were before? This would be especially helpful if you've got a lot of stuff in your swap menu, e.g. backup utilities or weapons.
I did a few mockups of what this might look like, for example duplicating the "autopaired" part at the top of the swap list as '0', for quick selection:
'0' is not great though, seeing as it can be hard to distinguish from 'O' in some fonts, and it's also a bit further away on the keyboard. So I decided to try another approach:
This iteration has a number of advantages over the other:
- Uses a letter rather than a number
- Keeps special actions together in their own section
- Adds a divider to more clearly delineate that difference
This seemed like a pretty fun thing to work on, so to take a break from the scoresheet work which has been keeping me busy lately, I implemented this feature yesterday! Here it is in game:
The Adv. Sensor Array was originally Imp. Powered Armor, so it appears at the 'Y' position for easy swapping. Notice I also changed the "(remove)" to "Remove," now that it has its own section and is more clearly not an item itself.
But you know me, why stop there? :)
When a part is attached via the swap menu, replacing another part, a line marker also appears to its left and will remain there for as long as the part it replaced is still available in inventory. This makes it easier to identify which parts have an autopair. Holding Shift-Alt-a (or hovering the mouse cursor over one of those markers) causes the names of all autopaired parts to appear next to their counterparts. You can see these features in action here:
Another feature with probably much more limited applicability is multiswapping, which allows you to swap all autopaired parts via a single command (Shift-Alt-w). The resource costs are the same, all this does is queue the actions for you.
Here's a simple example of using multiswapping:
That said, I think multiswapping's usefulness could be fairly limited if only because you might have been using swapping a number of other parts that you meant to be essentially permanent changes (but are still keeping the alternate in inventory, just in case). In that situation you wouldn't really want to swap all the previously swapped parts. Perhaps having a separate command to clear the swap memory at some point could be useful?
Note that of course autopair markers do update in real time, so a marker is removed if the alternate part is no longer in inventory, or if a part is newly autopaired with another part, etc.
I think in addition to the new swap menu's 'Y' option, having the markers will also speed up identification of what you might want to swap out before or after a given situation.