Need Help on Ship Limit Construction

I'm working on a mod for my son, and I've added dreadnoughts for all of the factions. I'd like for them to be limited to one dreadnought built at a time, the same way as Titans. My first try was to add the titan's research prerequisites to the dreadnoughts. This of course did not work, could still build as many as I wanted once the tech was researched. I have the dreadnoughts listed as a Capital Ship. In the titans entity files, their stat count type is listed as "Titan". So far this is what I'm thinking; Rename the dreadnought entity files, taking out capital ship and replacing it with dreadnought. Creating their own factory for the dreadnoughts to be built, and having their "stat count type" listed as "Dreadnought". A new research subject which puts a construction cap onto the dreadnoughts. The problem is, I haven't been able to find where in the game that they determine the "stat count type" at. I figured it would be in the gameplay constants entity file, but did not find anything, or anywhere else for that matter and now I'm at a loss. Any help would be most appreciated.

43,975 views 4 replies
Reply #1 Top

The only ships that are limited to one are titans. There is no way to give that behavior to a capitalship (at least without a lot of ability shenanigans). A faction can have up to 9 titans however, and the player must choose 1 and be unable to build any more titans until it is destroyed.

Reply #2 Top

How did they do it for the Titans? If I can reproduce the way they did it for the Titans, but named and classified as something else, such as Dreadnoughts, I'm hopeful that it can be done.

Reply #3 Top

It's hard coded for the Titan entity. We don't have direct access to the lower level code as modders that controls this behavior.

+1 Loading…
Reply #4 Top

Well that sucks. Thanks for the help, at least I won't be wasting anymore time trying to make something work that cannot be done.