How to change bomber formation in mod editor (tutorial)

idea taken from this post

You need to create a text file and name it entities.blk and paste this code

aircraft_request{
  _override:b=yes
  _use:t="aircraft_artillery_narrator"
  _use:t="aircraft_artillery_siren"
  _use:t="replicating"
  artillery_zone__radius:r=50.0
  artillery_zone__bombingRadius:r=40.0
  artillery_zone__showOnMinimap:b=no
  artillery__name:t="aircraft_request"
  artillery__targetPos:p3=0.0, 0.0, 0.0
  artillery__lifeTime:r=360.0
  artillery__deadTime:r=0.0
  artilleryLifeTimeAfterBombing:r=5.0
  artillery__calledByTeam:i=0

  "artillery__callerEid:eid"{
  }

  "artillery__offender:eid"{
  }

  _group{
    _tags:t="server"
    aircraft_request__interval:r=100.0 // bombing call interval
    aircraft_request__spawnedAircraftsCount:i=0
    aircraft_request__aircraftStartRelativeSpeed:r=0.5
    aircraft_request__aircraftAfterBombingHeight:r=600.0
    aircraft_request__aircraftBombingHeight:r=250.0
    aircraft_request__aircraftSpawnHeight:r=600.0
    aircraft_request__aircraftSpawnDistance:r=5500.0 // Spawn distance from the called position.
    aircraft_request__aircraftTemplate:t="ju_188+plane_spawn_in_air+requested_aircraft" // what plane model to use for bombing run. ai_plnaecodename+plane_spawn_in_air+requested_aircraft
    aircraft_request__spawnDelayedTemplate:t="aircraft_request_spawn_delayed"
    aircraft_request__spawnerTemplate:t="aircraft_request_spawner"
    aircraft_request__originTm:m=[[1.0, 0.0, 0.0] [0.0, 1.0, 0.0] [0.0, 0.0, 1.0] [0.0, 0.0, 0.0]]
    aircraft_request__aircraftTargetMarkTemplate:t="aircraft_request_target_mark"

    "aircraft_request__spawners:list<eid>"{
    }

    "aircraft_request__targetMarks:list<eid>"{
    }

    "aircraft_request__spawnedAircrafts:list<eid>"{
    }
  }

"aircraft_request__aircraftBiases:list<p3>" {
    // First row (central)
    aircraftPos:p3 = 0.0, 0.0, 0.0      // Center
    aircraftPos:p3 = -30.0, 0.0, -30.0  // Left
    aircraftPos:p3 = -30.0, 0.0, 30.0   // Right
    aircraftPos:p3 = -60.0, 0.0, -60.0  // Further left
    aircraftPos:p3 = -60.0, 0.0, 60.0   // Further right

    // Second row (back, shifted left)
    aircraftPos:p3 = -90.0, 0.0, -90.0  // Extreme left
    aircraftPos:p3 = -90.0, 0.0, -30.0  // Moderate left
    aircraftPos:p3 = -120.0, 0.0, -60.0 // Center shifted left
    aircraftPos:p3 = -120.0, 0.0, -120.0 // Rear extreme left
    aircraftPos:p3 = -90.0, 0.0, -150.0 // Slight right

    // Third row (back, shifted right)
    aircraftPos:p3 = -90.0, 0.0, 90.0   // Extreme right
    aircraftPos:p3 = -90.0, 0.0, 30.0   // Moderate right
    aircraftPos:p3 = -120.0, 0.0, 60.0  // Center shifted right
    aircraftPos:p3 = -120.0, 0.0, 120.0 // Rear extreme right
    aircraftPos:p3 = -90.0, 0.0, 150.0  // Slight right
}  "aircraft_request:tag"{
  }
}

You can modify the distance from where they appear, the types of planes (it didn’t work for me) and add more planes, remember that they are all governed by the coordinates of the first plane, and it is advisable to increase the coordinates by 30.

This example shows 3 formations of 5 planes

You can add even more by increasing the value of Y, otherwise they might collide and look like this:

video of the result:

3 Likes

Is it possible to call the bombers by spawning the aircraft request entity?
If thats it, i can use zombie_paratrooper_spawner to spawn the planes