Capital squad modding help

Hi, I'm making a mod for personal use, and to figure out this game's modding possibilities.  So far, I've removed all frigates except scout and colony,  gotten rid of all fleet cap research, upped the number of capital slots for each research level, made captial slot research cost a percentage of income, and probably a few other things that I can't remember.  Without playing a game, I've predicted that bombers will be too powerful in a captial ship only game.  So, rather than go through all the trouble of putting anti-squadron weapons on each capital ship, I think I'm going to give each captial ship a squadron to start with, and let all capital ships except for the carrier only build fighter squadrons.

But I can't seem to be able to remove the ability to build bomber squadrons from a capital ship.  In each ship's entity file, these lines appear:

squadTypeEntityDef:0 "SquadPhaseCombat"
squadAntiMatterCost:0 0.000000
squadTypeEntityDef:1 "SquadPhaseBomber"
squadAntiMatterCost:1 0.000000

My first thought was to get rid of the last 2 lines.  But that causes a crash when you load the mod files.  I can't see any count entry in the file above that, where is specifies a number of lines that are expected to follow.  So my next solution was to change "SquadPhaseBomber" to "SquadPhaseCombat", and just have both options build a fighter squadron.  Doing this lets you load the mod up, and get right into a game, but when you try to build the second fighter squadron option the game freezes and uses up 100% CPU.

Any thoughts on how to remove bomber squadrons from certain captial ships?

-Neb
6,365 views 9 replies
Reply #1 Top
One thought off the top of my head is to simply make a 2nd type of combat fighter with the same name and stats (SquadPhaseCombat2) replace the bomber.

Could you try squadTypeEntityDef:1 ""? That could work as well (not sure).
Reply #2 Top
squadTypeEntityDef:1 ""
squadAntiMatterCost:1 0.000000
Reply #3 Top
Creating another squad type would probably work, but there must be a simpler way.

Getting rid of the entity name doesn't seem to work either.

Thanks for the suggestions. Anything else anyone can think of?
Reply #4 Top
I might just make the anti-matter cost ridiculously high as a work-around. Would the AI be able to handle this, or would it save some squadron slots for bombers it can't afford?
Reply #5 Top
As an alternate solution, here's what I did in my own mod to give the cap ships anti strike craft capabilities: Change the damage type on appropriate weapons to AntiLight (for tec, this was the autocannons), and set them to be able to attack fighters. Now bombers can be attacked at close range (but fighters are much more viable counters).
Reply #6 Top
That's another work around solution that would work. But I'm more interested in figuring this out in a stubborn principle sort of way now.
Reply #7 Top
Hum, I have tried but can't :) Strange you just can't delete the 2 lines. Must be stated in someplace there must be 2 squadTypeEntityDef's (0 and 1) but I can't find where. I also have tried putting in a 3 (as 2) but this not possible either. Maybe some from Dev's could assist here :)

Redion
Reply #8 Top
I believe that some options in the game are hardcoded into the .exe file. For example, I have not been able to mod in extra capital ships to be built at the cap ship factory. The number of manufacturing slots there seems to be stuck at 5 max. he only place I found where the game "activates" 5 slots for cap ships is in the .exe. I had to use a uedit to find it. It is possible that the 2 squadron slots for capital ships is in the .exe somewhere as well. In case you are curious, I have added more squadron types in, and used some on one type of capital ship but not on others. However, the number of different builds available on each capital ship remained two.
Reply #9 Top
yeah. it's looking like the only option is to make a second fighter entity and use it for the second slot of some caps as well as the original fighter. It's sloppy, but it'll do.