[REL][Server] HodgePodge 2.3. [112214]

Discussion in 'Released Mods' started by wondible, November 16, 2015.

  1. wondible

    wondible Post Master General

    Messages:
    3,278
    Likes Received:
    2,078
    Support framework for server mods which manages adding units to the build bar and strategic icons. It does not address modifying `unit_list.json`

    - https://github.com/JustinLove/hodgepodge
    - http://wondible.com/pa/hodgepodge_v2.3.0.zip

    Making Piecemeal Units Mods (almost)

    Using custom strategic icons depends the Icon Reloader mod, however HodgePodge manages the integration based on the information you give it.

    Add dependencies and a global scene mod to your modinfo.json
    Code:
        "dependencies": [
          "com.wondible.pa.hodgepodge"
        ],
        "scenes": {
          "global_mod_list": [
            "coui://ui/mods/myawesomemod/global.js"
          ]
        },
    
    Add the mod file named above with something like this.
    Code:
        if (window.HodgePodge) {
          HodgePodge.addUnits([
            {
              spec_id: '/pa/units/land/baboom/baboom.json',
              si_name: 'fred', // optional: only needed if the unit has this property
              preferred_builds: [['bot', 1]],
    
              /* optional (nuke/anti-nuke missiles)
              ammo_build_hover: {
                name: 'Magic Missile',
                description: 'Hurt them really bad',
                cost: 1000,
                sicon_override: 'magic_missile',
                damage: 1000
              },
              */
            },
          ])
    
          //HodgePodge.removeUnits is also supported with similar arguments
          // though preferred_builds is not used
    
          // `si_name: null` to turn off automatic icon reservation
        }
    
    Preferred builds are assigned in a series of passes. Roughly, all first choices are assigned before any second choices, and a unit will get a slot on the tab of it's first choice before any later ones are considered.
    Code:
        for each preferred_builds
          for each pass
            for each addedUnits
    
    Passes:

    1. The listed slot
    2. The same row as a listed slot
    3. The same tab as a listed slot
    4. Dump the rest into ammo tab
    5. Still going? Dump units into extra0..extraN tabs


    Narrow (five column) build tabs will be expanded as required.

    Units unused in the current game mode (Deep Space Radar in Titans, titans in Classic) are removed to free up build slots and icons.

    You should not shadow build.js, but you must still shadow `unit_list.json`.

    Legacy `icon_atlas` Methods

    These methods formally performed icon limit management. They are now stub implementations, documented here since some mods were calling them directly and they must be considered part of the public interface.
    • model.requestIcons
      • model.requestIcons(['one', 'two', {three: ['fallbackthree']}])
      • model.requestIcons({one: ['fallbackone'], two: ['fallbacktwo']})
    • model.releaseIcons(['one', 'two', 'three']) // now a no-op stub
    Changes

    ## 2.3.0

    - Restore model.requestIcons, model.releaseIcons as stubs since mods were calling them directly.

    ## 2.2.1

    - Fixed modinfo error left from local testing

    ## 2.2.0 for >= 112176

    - Remove icon limit and aliasing; the game crashes before any discoverable limit (between 12k and 15k on my system)
    - in particular, `si_fallback` is no longer implemented

    ## 2.1.0

    - `si_fallback` is supported again, this time internally
    - Enforces hard icon limit to try and prevent black-boxes
    Last edited: October 22, 2018
    proeleert and Killerkiwijuice like this.
  2. wondible

    wondible Post Master General

    Messages:
    3,278
    Likes Received:
    2,078
    HodgePodge 0.2.1 - First pass at allocating units to an available build bar slot, instead of blind-setting the first requested slot.
  3. wondible

    wondible Post Master General

    Messages:
    3,278
    Likes Received:
    2,078
    HodgePodge 0.3.0

    - Drives Icon Reloader id replacement.
    - Mod authors should add an `si_name` property the addUnits call if the unit has that property
  4. wondible

    wondible Post Master General

    Messages:
    3,278
    Likes Received:
    2,078
    HodgePodge 1.0.0

    - First pass at removing units from build bar.
    - Reworked build bar allocation; units will get a slot on the tab of their first preferred build before considering later choices
    - Tab level allocations run bottom-up
    - specify `si_name: null` to turn off icon integration
  5. wondible

    wondible Post Master General

    Messages:
    3,278
    Likes Received:
    2,078
    HodgePodge 1.1.0

    - Add `si_fallback` property
    - Remove Deep Space Radar in Titans, and titans in Classic
  6. wondible

    wondible Post Master General

    Messages:
    3,278
    Likes Received:
    2,078
    HodgePodge 1.1.1 - Fix undefined symbol when not running with Icon Reloader
  7. wondible

    wondible Post Master General

    Messages:
    3,278
    Likes Received:
    2,078
    HodgePodge

    ## 2.0.1

    - Update build number

    ## 2.0.0 (previously special release to Community Mods)

    - New property: `ammo_build_hover` for nuke missiles etc
    - `si_fallback` is no longer used
    - Now handles strategic icons internally instead of cooperating with Icon Reloader
    - Move most processing to `shared_build` scene
    - Replace regexp hack with master spec map editing
  8. Quitch

    Quitch Post Master General

    Messages:
    5,077
    Likes Received:
    5,853
    Release date on this mod is in the future.
  9. wondible

    wondible Post Master General

    Messages:
    3,278
    Likes Received:
    2,078
    HodgePodge 2.0.2 - Fix typo in release date
  10. wondible

    wondible Post Master General

    Messages:
    3,278
    Likes Received:
    2,078
    HodgePodge 2.1.0

    - `si_fallback` is supported again, this time internally
    - Enforces hard icon limit to try and prevent black-boxes
  11. Quitch

    Quitch Post Master General

    Messages:
    5,077
    Likes Received:
    5,853
    This mod is currently MISSING for some reason.
  12. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,074
    Likes Received:
    2,894
    @mikeyh @wyao , isn't most of this functionality now included into the core game? It might be why, and excuse me if I'm wrong, I distinctly remember mod-related loading being mentioned.
  13. wondible

    wondible Post Master General

    Messages:
    3,278
    Likes Received:
    2,078
    I'm currently able to download it from both my server and in PA.

    It's significantly easier to do this yourself, but Hodgepodge still has some utility in managing requests for build bar positions. It's also taken on the icon management formally in Icon Reloader, which still comes into play on certain graphics cards.
  14. Quitch

    Quitch Post Master General

    Messages:
    5,077
    Likes Received:
    5,853
    It was a CMM issue caused by the sale.
    thetrophysystem likes this.
  15. wondible

    wondible Post Master General

    Messages:
    3,278
    Likes Received:
    2,078
    Hodgepodge 2.2.0 for >= 112176

    - Remove icon limit and aliasing; the game crashes before any discoverable limit (between 12k and 15k on my system)
    - in particular, `si_fallback` is no longer implemented
    stuart98 and Quitch like this.
  16. wondible

    wondible Post Master General

    Messages:
    3,278
    Likes Received:
    2,078
    Hodgepodge 2.3.0 - Restore model.requestIcons, model.releaseIcons as stubs since mods were calling them directly.

Share This Page