Holodeck interface - select by unit id?

Discussion in 'Mod Discussions' started by elmauru, March 10, 2014.

  1. elmauru

    elmauru Member

    Messages:
    46
    Likes Received:
    27
    Hi there. I have recently started to mess around with the PA mod system.

    Am i missing something or is there currently no interface for selecting units by their unit ids?

    model.selection().spec_ids returns an array of unit type [unit id]

    but the holodeck interface seems to only support adding/removing of matching unit types (ids passed to selectMatchingUnits(option, array of ids)) by generic type or by selection area, not specifically by id.

    I want to mod in the functionality to split the selection in half (i.e. select a bunch of units, press a key, half of the units remain selected).

    Would be awesome if something like a holodeck.selectMatchingId() would find its way into the ui interface... or is the functionality there and i have overlooked something?
  2. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Can't remember seeing one so far, but I've not directly searched for it either.
  3. elmauru

    elmauru Member

    Messages:
    46
    Likes Received:
    27
    how very odd to leave something like that out. Assuming that holodeck.js is the only interface allowing any modification of unit-selection it isn't there. There HAS to be something like engine.selectById or sth... :-/
  4. ORFJackal

    ORFJackal Active Member

    Messages:
    287
    Likes Received:
    248
    Having selectById would make it possible to create an AI that controls your units. Uber has not yet decided whether they want to make that possible.
    cptconundrum and cwarner7264 like this.
  5. elmauru

    elmauru Member

    Messages:
    46
    Likes Received:
    27
    well, they could always limit the selectById calls to the active unit selection (i.e. allow only "remove" or "invert" calls and/or limiting them to a selection instance) - that would make this method feasable without implementing any backdoors to macroing.
    That feature alone would open the possibility to so many useful mods... (select only damaged units, select a certain ratio of unit types, etc.).
    Even if the full functionality were to be enabled, without position callbacks i can't think of any way of misuse for this functionality.
    Last edited: March 11, 2014
  6. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    You can already get access to the current selection, if that's what you mean.
  7. elmauru

    elmauru Member

    Messages:
    46
    Likes Received:
    27
    Yeah, that's how i am getting the unit ids.
    However once you have a selection you can currently only work with it on a "per flag" basis (i.e. build-capable or not, idle, unit type), not with individual units. I'd want that to change so you can apply f.e. numerical filters.

Share This Page