[WIP] Unit/Building Selector for Settings + Questions

Discussion in 'Mod Discussions' started by proeleert, January 28, 2014.

  1. proeleert

    proeleert Post Master General

    Messages:
    1,681
    Likes Received:
    1,656
    Ok I'm working on an improved unit/building selector for hotbuild2, but It could be handy for other mods settings as well. (autofactory/alertsmanager/ ...) Maybe it could end up in Settings Manager ...

    upload_2014-1-28_16-8-58.png

    So far this is already basically working (drag and drop from right to left ) + (drag and drop to re position item in right list)
    Filtering on the right list also works but got some issues.

    Should I make different SubFilters for Buildings / Units ?
    Buildings : Economy / Factories / Recon / Defense
    Units : Land / Air / Sea / Orbital ?


    JSON Questions for DEVS

    For filtering I use the "display_type" field in the json files.
    But I see some strange things there for instance : orbitals don't have a display_type field.
    Factories = 70(basic) 75(adv) but for some reason a Halley is also 70
    Defense = 20 but Flak got 50 (what should be recon)

    Also DisplayName for Anchor and some new Orbital units is not present in the json files.

    This could mean that the Json Files on the Server are different then on the client. Uber ??

    Also is there really no way to check if a unit/building is buildable in game from the json files so that we can load them all from unit_list.json
    Last edited: January 28, 2014
    naginacz and brianpurkiss like this.
  2. brianpurkiss

    brianpurkiss Post Master General

    Messages:
    7,879
    Likes Received:
    7,438
    Looks like a very nice addition that has a lot of potential for other mods, aside from Hotbuild.

    That's one of the awesome things that's coming out of this community. "Here, let me spend many many hours building something awesome and giving it away for free. But wait, there's more! I'm going to write the mod in such a way that other mods can take my code and use it in their mods to make their mods even better."

    Everyone wins. And it is awesome.

    The PA community is going to be an absolutely epic one and quite possibly the best part about PA.
    LavaSnake likes this.
  3. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    I'd love to have this for my (in the works) unit renamer mod! It would be much better than the lazy way I'm doing it now.
  4. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    Uber's decision to use JavaScript for the ui helped for this a lot. Modding has never been more accessible than in PA. I can't wait to see what people will think of once we get the server!
    brianpurkiss likes this.
  5. proeleert

    proeleert Post Master General

    Messages:
    1,681
    Likes Received:
    1,656
    Anybody an idea on the unit json files Issues ?
  6. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    The json files are just wrong, I think. In game, doing a select idle factories also gets Halleys.

    *Edit*

    To clarify a little, select idle factories is an engine call this should mean the files are just as broken on the server.
  7. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Do you mean display_group? That doesn't do what you think it does :)
    See: https://forums.uberent.com/threads/reference-unit-blueprints.47378/

    The build menus use the different categories in unit_types.

    It's "display_name", it's there for the Anchor. ;)

    unit_list.json informs the game of all the units, but to work out what builds what look at the "buildable_types" field in the engineers/factories.

    This is because the hailey has the unit_type "UNITTYPE_Factory".
  8. proeleert

    proeleert Post Master General

    Messages:
    1,681
    Likes Received:
    1,656
    Yeah sounds right :) hadn't tried that ! But there is difference in the client / server files cause Anchor DisplayName is not present in client files but it's there in game.

    Anyways time to search/file a bug reports.
  9. proeleert

    proeleert Post Master General

    Messages:
    1,681
    Likes Received:
    1,656
    Yes I was using display_group.
    Yeah going to check the unit_type and buildable_types then.
  10. proeleert

    proeleert Post Master General

    Messages:
    1,681
    Likes Received:
    1,656
    Yes I should be able to map out the buildable units that way it would seems.

Share This Page