sven wrote:I think these mods/patches should be pretty naturally complementary. If we wanted to get really fancy with it, I'd guess the the warship_classification() code could probably be extended to read a design hint out of ship.source_design, creating a hook that would allow fleet templates to reward using multiple different designs based on the same hull; but that's probably overkill. I might just start by adjusting the chosen PartOrdering function based on the hull type and ai_state.strategy_cards.... A very short simple diff could get a lot of mileage here, I think. (And you don't necessarily need a PD, long range, and bombard version of a heavy cruiser, if your navy already has a mix of missile cruisers, heavy cruisers, and escort cruisers.)
I'm actually a little curious as to how some of the mechanisms in fleet_template.lua work.
So there's a ships table that keeps track of how many ships of each class have been built, but it gets indexed using a table created inside warship_classification(), which is called for each new ship. I thought when you use tables as keys it indexes them by their instance though?