UnitCaps in HWRM 2.0?

I see that the unitcaps files have three new functions.


How do they work?

1 Like

supplyLimit() = limits the number of a certain category of ship.
supplyIntend() = purely cosmetic(?), indents the category in the unit cap display list.
Still not sure exactly what supplyShow() does, but I think it determines whether or not unitcap categories are displayed in the list. I’ll do more tinkering with it later tonight.

I can check later too, rather busy and in need of a nap right now.

The reason the system was rebuilt was due to formations… and how they can throw off count (some ships need to be counted as an atomic unit, others not). Also, many Mods were doing a VERY EXPENSIVE call to manually build unit counts lists. Most of that code was not only wasteful, it was downright awful.

The new system means you can do the crazy compound and multi-category stuff many Mods wanted, and adjust how they draw for the most part how you’d want - without hacks and wasteful query calls. In many cases you can’t count the populations yourself because figuring out ‘squads’ vs ‘ships’ vs ‘formations’ isn’t all that easy to do in LUA, if possible at all in some cases.


Did you manage to figure out what all three functions do?

So now that I googled what indent means, I get that’s the old unitcapShiptype. The subcategory.
So if I make a ship with two indent categories, it’ll be one in the other?
I’ll have to look how to go about this.

I think supplyShow is intuitive just by looking at it. It got to be what categories are listed and when. You don’t list Motherships and the ones that have the NotEmpty value are listed only if any ship in that category exists, but don’t show if you don’t have one.

So this:

setSupplyValue(NewShipType, "Capital", 1.0)
setSupplyValue(NewShipType, "Cruiser", 1.0)
setSupplyValue(NewShipType, "Battlecruiser", 1.0)

Gave me this:


Which, while looking confusing, actually works perfectly. Cruisers count into Capitals, BCs count into Cruisers and Capitals. Beutiful, I love you.

Now just how to organize it graphically so it represents the actual system it is, like this?:


So it doesn’t look like the Shipyard is a Cruiser.

Silly question I suppose, but why does it seem that “Carriers” and “Shipyards” texts don’t have the shadow effect ?
(yes, I know, I should stop with this ui obsession ^^)

1 Like

They are clearly less imposing ships, so therefore do not warrant a drop shadow.

1 Like

:joy: good one ! ^^

The ordering is based on the order in the declarations, I think? There’s also a sort value (don’t have that code at this moment). You can indent (any number of steps) using the indent command - look at any of the base caps files… You can also show or hide when empty, etc.

1 Like


Don’t know if this is a bug or intentional with the latest update there is a hard unit cap limit of 250 when playing a multiplayer game. If there is another way to remove the cap please let us know where it can be done from. Can this hard cap please be removed.

Is there anyway these rules can be added to the game maybe hide the options and add a command for example -extrarules to steam command line or by shortcut to have the unlimited unit cap show in the game options. Another option that would be cool is to increase the amount of RU asteroid’s have maybe almost an unlimited option. This way we don’t have to rely on someone to update their mod, also it will be compatible with many mods if these rules exist as part of the main rules. These rules can be hidden from those who’s computer cant handle unlimited unit cap just an example.

Be nice if the Gearbox devs can step up to the plate that would be nice.

Before 2.0 Patch:

After 2.0 Patch:

Tagging the intended recipient, @BitVenom.

You’re amazing BitVenom, I love this new system., thank you.