Monday, April 16, 2012

[SC2] UI Modding Impossibilities?

Idea 1
Admiral Zeech said it was not possible to mod this. It's his idea, and I think it's a guddun. Can we overcome the impossible here?
Quote:|||1: Definitely impossible
2: Already in all moho engine games, ctrl-rightclick any queued order with shift held
3: Possible, although it would require a lua.scd override and some simcallbacks, so it would be slower than a normal keypress (by one or two sync beats). I already went into how to do this to some extent in the thread you made about sub surfacing.|||You could get the same effect of [1] by selecting the factory and putting it in a group. By default, all units produced from that factory are also added to the group. The change between this and the default system is that when you select the group, the factory automagically unselects itself from the group (which is possible as a UI mod).|||BulletMagnet|||No, to magically unselect themselves. I assume that putting a factory in a control group makes all the units produced by the factory into the same group - it did this in Sup1/FA.|||Mithy|||BulletMagnet|||You could probably do manual factory group selection ala the W-Groups FA mod (or the opposite of it, more accurately), but it'd be a lot of work. And again, not doable outside of a lua.scd override.
Isn't ctrl-clicking to select all already in the game? I don't use it, but I thought it was still there. Regardless, this could probably be done with a worldview.lua hook.|||Mithy|||Bastilean|||Mithy|||Did you try ctrl+click?
If that doesn't work, it should be possible to do this in either /ui/gamemain.lua:OnSelectionChanged or /ui/controls/worldview.lua:WorldView.HandleEvent, both of which should be normally hookable with the support mod. The selected/clicked unit's unitid can be parsed as a category and passed to UISelectionByCategory to select all of that type of unit on the screen.|||Rather than ctrl-click, I'd prefer to have another hotkey that does it.
This means you can have multiple units selected, press the hotkey, and all units onscreen of those types will be selected. (ie. you can select more than one type of unit then.)|||AdmiralZeech|||Doable, but not hookable, since you'd have to modify keymap to do that. The ctrl-click method can be done entirely in a worldview hook.

No comments:

Post a Comment