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
HodgePodge 0.2.1 - First pass at allocating units to an available build bar slot, instead of blind-setting the first requested slot.
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
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
HodgePodge 1.1.0 - Add `si_fallback` property - Remove Deep Space Radar in Titans, and titans in Classic
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
HodgePodge 2.1.0 - `si_fallback` is supported again, this time internally - Enforces hard icon limit to try and prevent black-boxes
@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.
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.
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
Hodgepodge 2.3.0 - Restore model.requestIcons, model.releaseIcons as stubs since mods were calling them directly.