3 levels of Unit Caps

I have a question. It’s more of a “please devs, could you add a simple functionality” then “how to mod something”, but since it has nothing to do with the vanilla game, I’m bound to post it under the modding section.

Could we get unitcaps 3 levels deep?

I’ll give you my specific example:
I want Cruisers. I have nice Cruiser concepts already flying and shooting stuff in the game. The Crusiers are a class in between Destroyers and Battlecruisers. But in order to not upset the balance of force distribution, I don’t want to make unitcaps like:

Capital ships:

That makes the game too capital ship heavy and renders Destroyers/Frigates weaker in comparison. What I want instead is:

Capital ships:

If it’s not too complicated, can I get it? Please?
I really want it from the ballance point of view. It helps to relief the game from Battlecruisers and creates much healthier combat environment. And it doesn’t seem like a big functionality to add. Just one more unitcap level.


OH! Really good idea. I second that request.

1 Like

i dont get it. how is that different from ship specific unit caps?

What do you mean? I explained it on a specific example.

-Say you want a Cruiser umbrella family for all kinds of cruisers and Battlecruiser in it. (which for my mod I really need)

-But also you want the Cruisers to remain under the Capital Ships, because it
a) makes sense
b) under the High or Huge unitcaps get less restrictive and you want to keep the original structure to keep it less restrictive by having Cruisers under Capital ships.
c) you don’t want to do either Frigates - Capships (Carrier, DD, SY) - Cruisers, …or Frigates - Cruisers - Capships (Carrier, DD, SY), because then you have either Crusiers at the very end after Shipyards or Cruiser before Destroyers…

Under the current system the two are mutually exclusive.

Under the umbrella of Capital you have 2 categories that will share the unit cap slot (Destroyer / Cruiser). Under the Cruiser umbrella you have Battlecruiser which shares the slot with Cruiser. If the cap for Cruiser is 3 and the cap for Battlecruiser is 1, then you can either build 2 Cruisers and 1 Battlecruiser, or you can build 3 Cruisers. This way it doesn’t matter whether you build all Cruisers or 2 Cruisers and 1 BattleCruisers. It doesn’t interfere with the Destroyer / Cruiser cap under the Capital cap.

I understand that this is not the purpose of the thread, but just in case: it is easy to mod this.^^

It is? How? I’m all ears.
There’s a “unitcapsFamily” and then “unitcapsShipType”. So you just add another third custom familly class, give ships inside it a proper display priorities, give a third family line to your ship and add that new family type into unitcaps like normal.lua and it’ll work?

If that’s what you’re saying then alright, I’ve never thought about it. It never even crossed my mind. I’m going to try it now.

I renamed Battlecrusiers to Cruisers, that worked just fine, that’s not a problem.

But doing this crashes the game and .log doesn’t offer any explanations:


unitcapsSubCategory =
    	-- Cruisers	
    		name = "Battlecruiser",
    		numParam = 34,
    		stringParam = "$2127",


UC_Family("Capital", 14);
UC_FamilyOverride("Vaygr", "Capital", 15);
UC_ShipType("Destroyer", 7);
UC_ShipType("Carrier", 4);
UC_ShipTypeOverride("Hiigaran", "Carrier", 3);

and Vgr_Battlecruiser.ship:


Are you sure it’s not hardcoded? Because unless I missed something, it looks pretty alright to me.
(As I said, renaming UnitcapsShipType to Cruisers isn’t the problem, that worked. It’s the new UnitCapsSubCategory.)

My solution is to manage this in the gametype lua. See simple example for player 0 and HGN BC only, but it’s easy to expand.

You can do the same in the custom code of your battlecruisers as well. It is probably more efficient.

And in case you wonder, you can tweak the unitcap UI to let it show the cap is hit.^^

function OnInit()
    iCapBC = 1
    Rule_AddInterval("Rule_SpecialUnitCaps", 2)

function Rule_SpecialUnitCaps()
    iNumberBC = Stats_SquadronsActive(0, GetShipId("hgn_battlecruiser"))
    if iNumberBC >= iCapBC then
         SobGroup_RestrictBuildOption("Player_Ships0", "hgn_battlecruiser")
         SobGroup_UnRestrictBuildOption("Player_Ships0", "hgn_battlecruiser")

And that would look how? A text printed on a screen saying you reached the cap? Or are we actually talking about visible subcategory here when you press the “I” key?

Have a look at the capinfopopup.lua You can tweak it to add an additional entry that you control from the game type lua.

Are you sure that’s not a mod file? If yes, where is it in the vanilla game?


I don’t have the game on this computer, only mod files from 8 years ago. But since you’re asking the same questions as I asked myself at that time, this should be it.

Alright thanks. I’ll see whether I’ll be able to get something out of it with my limited to non-existend scripting skills. But as long as it’s in the realm of modifying and not writing it myself, I should be fine.
With that I’m not even exactly sure what I should expect this to do, but I’ll give it a try and see. Or maybe first download your mod and see whether it’s present there. Thanks for the help.

Edit: Would that be PDS?

I worked on unit caps for PDS 7.3.? but I do not think it ever made it into the mod.

I do not remember if I released it standalone as"dynamic unit caps" minimod or something in 2007. Since then none of my HW files survived a couple of HD crashes. The only files I still have about this are wip files exchanged by emails (thanks to yahoo forever mail storage). If I released something “final”, perhaps somebody still has it.

Well if that can get scripted in then by all means please do so. :smiley: everything that makes the game better is a welcome prospect. And if not devs your turn. :blush:

By the way you forgot a category:


This should be possible and easy in the next patch.


I love you.

1 Like

Pouk, your designs are gorgeous, so please don’t take this the wrong way… but why do we need a ship class between destroyers and battlecruisers?

Granted: it’s your mod and everything, but if I were gonna do it, I’d want to see cruisers as hybrids between destroyers and carriers – say, half the firepower of a destroyer, half the docking capacity of a carrier – but you get dock-repair capability for your strike craft. So, two cruisers could take a destroyer, but they’d also be able to support a task force of fighters or corvettes.

This would provide an interesting transition for strike-craft-heavy early game compositions, yes?

Battlestar Galactica?

Well, the concept started pre-beta balance mod, when the BCs had 240 000 HP and DDs 85 000 HP and the Cruisers served as a buffer for the allmighty Battlecruisers. The gap was really big there, both in firepower and in simply just size:

Now in the balance mod the transition is softer. Yet it still takes two Destroyers to kill a Cruiser and two Cruisers to kill a Battlecruiser. So as you can see, the gap is stil noticeable.

Another thing is that if it has half the firepower of a Destroyer, I can’t possibly justify calling it a Cruiser in the first place.

Plus I can’t imagine how this could be an early unit. If you wanted it in the early game, would you have it without any research, like the Carrier?

What you describe here would be a battle carrier. Some extra carriers are planned for the second wave of ships post realease.