[Resolved] Need some help with the hodgepodge framework

Discussion in 'Mod Discussions' started by lepotatur, December 5, 2017.

  1. lepotatur

    lepotatur New Member

    Messages:
    5
    Likes Received:
    1
    (original text lost, but it went something like):

    I don't understand Hodgepodge and how it works. I've been trying to use "sort" but it doesn't seem to work. Any help on using "sort" ids?
    Last edited: December 7, 2017
  2. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    I wrote Hodgepodge and I have no idea what you are talking about with sortid. Admittedly I've not been working on PA much, but could you provide some context? Where is this coming from, because I'm pretty sure it has nothing to do with hodgepodge.
    lepotatur likes this.
  3. lepotatur

    lepotatur New Member

    Messages:
    5
    Likes Received:
    1
    I've only just recently realized my mistake. I knew I had to have been doing something wrong. I appreciate your response. A tad embarrassing.
  4. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    Hey now, write down what your mistake was for future forum visitors. Nothing is as infuriating as searching for a solution of a problem, finding an old thread from years ago by someone with the same problem ,and then finding that the last post was by the author saying "nvm fixed it"! ;)

    Even worse than this:
    [​IMG]
    (source)
    lepotatur, lulamae and cola_colin like this.
  5. lepotatur

    lepotatur New Member

    Messages:
    5
    Likes Received:
    1
    Okay, sorry. I've attempted to restore what I had there before. I have poor impulse control so it's hard for me not to remove such things.

    And if anyone else has the same question as I did, I have the answer here (big thanks to Stuart98 for the help):

    "Hodgepodge is unnecessary, it was meant to allow for compatibility between unit adding mods but it never achieved that goal because one unit mod has to overwrite unit_list.json, which means that running multiple unit mods simultaneously is impossible without manual editing of the unit_list.json.

    To add a unit to a build bar, package /ui/main/shared/js/build.js with your mod. Then add the unit to the file. The specific line to add should look like this:

    "/pa/units/land/titan_structure/titan_structure.json": ["utility", 0],

    The first part is the path to the unit.json file. It should be the exact same path you used for it in the unit_list.json. The second part, "utility", refers to a build bar tab. The game will accept anything, but hotkeys will break if you don't use "utility", "factory", "combat", "vehicle", "bot", "air", "sea", "orbital_structure", "orbital", or "ammo". The last number refers to build bar position. They are arranged left to right, top to bottom, so that 0 is used for the top-left most position, 5 for the top-right most position, 6 for the middle-left position, 11 for the middle-right position, 12 for the bottom-left most position, and 17 for the bottom-right most position. Be sure that you don't put the same number for your unit as a pre-existing unit in the tab, otherwise you will have rendered one unit or the other unbuildable. Also note that numbers 5, 11, and 17 are disabled for structures; assigning structures to these build bar numbers will render them unbuildable without further modifications to game files."
    Last edited: December 7, 2017
    DeathByDenim likes this.

Share This Page