View Issue Details

IDProjectCategoryLast Update
0019363AI War 2Gameplay IdeaFeb 6, 2018 8:52 pm
ReporterChris_McElligottPark Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Fixed in Version0.706 
Summary0019363: the subsquad work for fleet ships.
DescriptionFrom Keith:

On changing the bomber squads from 10 ships to 3 "ships" (that are visually groups of 3 each), I don't think you need anything from me for that to work. There are some xml changes but I'm not going to know what prefabs need to be swapped in, so it's probably simpler for you to handle it, which you can do by:

1) Go into GameData/Configuration/Balance_Granularity/KDL_VanillaGranularities.xml and find this:

<granularity name="MildLowCap"
    ships_per_cap="100"
    squads_per_cap="10"
    visuals_idle_formation="assets/arcensquads/grids/2_BomberVertical_3x_10.prefab"
    dps_multiplier="0.9"
/>

(MildLowCap is the granularity that the Bomber uses)

2) And make a copy that looks like this:

<granularity name="MildLowCap_ThreeSubFormations"
    ships_per_cap="30"
    squads_per_cap="10"
    visuals_idle_formation="assets/arcensquads/grids/2_BomberVertical_3x_10.prefab"
    dps_multiplier="0.9"
/>

3) Change the new granularity's change visuals_idle_formation to whatever formation prefab that does what you want with the new arrangement.

4) Go to GameData/Configuration/GameEntity/KDL_Ships/FleetShips.xml and find "<entity name="Bomber_Mark1", and change balance_granularity="MildLowCap" to balance_granularity="MildLowCap_ThreeSubFormations" or whatever you called it.

5) Change "visuals="assets/_finalgamemeshes/fleetships/bomber/bomber.prefab" to whatever it needs to be for the new arrangement. Or perhaps you're keeping the prefab the same and multi-drawing it in some other way, but you get the idea.

6) Test to make sure the Bomber does what you want now, in a new game (in a previous save it may look weird due to remembering squads that have lost 5 ships but now that puts them at -2, etc).

7) Once the Bomber works, do a find-all in GameData/Configuration/GameEntity/ for balance_granularity="MildLowCap", and for each of those entity types do 1 of three things:
a) If you want that entity type to continue having 10 "ships" per squad just leave it alone.
b) If you want it to use the same new arrangement as the bomber, set it to use the same granularity and repeat steps 5 and 6 for that entity type.
c) If you want to use a different new arrangement, repeat steps 1 through 6 for that entity type.

8) Repeat step 7 for the other granularities used for small things. To wit, Swarmer, MildSwarmer, Normal, LowCap, VeryLowCap, Mines_Swarmer, Turrets_LowCap. You might choose to leave some of the lower-cap ones alone since they're already coarse. The variants Normal_Grid, MildLowCap_Checker, and LowCap_Checker can all be ignored.

On the UI front, I think it only reports the number of squads or the combined strength, not the number of ships, since combined-strength drops as ship losses are taken (in the more detailed cases like the sidebar) and the number of ships does not add any additional utility to the display. If there's some case where it does still show I can add a ship_count_multiple to the granularity elements and then factor that into the appropriate cases.
TagsNo tags attached.

Activities

Chris_McElligottPark

Feb 6, 2018 8:52 pm

administrator   ~0046895

* The Multi Needler Corvettes are now the first example of our new "subsquad rendering" approach that we'll be using for a number of the fleet ships.
** Rather than having a separate GameObject with all its attendant overhead for each ship, we're instead merging some of the ships into groups -- in this case, into two groups of three rather than five groups of one.
** This lets us save an enormous amout of overhead and makes the game run faster while drawing actually more ships than before.
** We're also combining this with an approach where we're having the ships (in the small squads at least) bob up and down to give them some more visual interest.
*** But the really cool thing about this is that we're using colors baked into the vertices of each subsquad ship before we combined them so that they are at different offsets in their bobbing, actually making them look a lot more separate than they are.
** The main downside of this approach is that we can't blow up individual ships using this approach; just entire subsquads at a time. So we have to balance performance against that. The GOOD side of that, however, is that individual explosions are a lot more impressive, since more ships going up at once looks cooler anyway.
*** In practice, you're unlikely to notice any difference except that explosions look cooler, there are more ships and they have better formations, and the performance is better. The Multi-Needler actually isn't really a stellar example of this, since we only get a savings of 60%. In other cases we'll be able to save up to 80% or more if we want. Even so, the performance improvement is really notable in one of our test cases that was spamming hundreds of multi-needler squads.

Issue History

Date Modified Username Field Change
Jan 26, 2018 1:16 pm Chris_McElligottPark New Issue
Jan 26, 2018 1:16 pm Chris_McElligottPark Status new => assigned
Jan 26, 2018 1:16 pm Chris_McElligottPark Assigned To => Chris_McElligottPark
Feb 6, 2018 8:52 pm Chris_McElligottPark Status assigned => resolved
Feb 6, 2018 8:52 pm Chris_McElligottPark Resolution open => fixed
Feb 6, 2018 8:52 pm Chris_McElligottPark Fixed in Version => 0.706
Feb 6, 2018 8:52 pm Chris_McElligottPark Note Added: 0046895