1. Now the attacking UFO appears instantly and immediately on the player's base. I would like to be able to customize the trajectory of the UFO so that it flies to the player's base as it does the last UFO in the original retaliation mission (generated in "spawnUfo"): from a random point in a straight line to the player's base. This way, the player may have the possibility to intercept such a UFO before attacking the base.
For example, the "spawnOnPlayerBase" parameter: when it is in the "true" state, the UFO will be generated instantly at the player's base (as it works now). When it in "false" state, the UFO is generated away from the base and flies to the player's base.
So, it's a normal retaliation mission without the "UFO scouting phase"?
If so, I can add a parameter to skip that phase for standard retaliation, that's much easier to do than changing the instant retaliation code.
2. I would like to specify the number of UFOs attacking the player's base, not just one.
For example, their number should be specified in the new parameter "spawnUfoCount", and the interval of their generation would be set in the parameter "spawnUfoTimer". This is true for both the regular retaliation mission and this new instant retaliation mission.
You can already specify multiple UFOs spawning in each wave and even say that the UFOs should not be automagically destroyed after the first base defense.
(But they must spawn either at the same time, or at least before the first base defense mission starts... if that's not enough I can add a parameter to keep spawning everything until the alien mission ends with last wave).
Try this in vanilla:
alienMissions:
- type: STR_ALIEN_RETALIATION
multiUfoRetaliation: true
points: 0
objective: 4
spawnUfo: STR_BATTLESHIP # Spawned for the final retaliation run
raceWeights: # In the case of a shootdown, race comes from the UFO that triggered the mission.
0:
STR_SECTOID: 20
STR_SNAKEMAN: 20
STR_ETHEREAL: 20
STR_MUTON: 20
STR_FLOATER: 20
waves:
- ufo: STR_SMALL_SCOUT
count: 1
trajectory: P8
timer: 3000
- ufo: STR_SMALL_SCOUT
count: 2
trajectory: P8
timer: 0
- ufo: STR_MEDIUM_SCOUT
count: 1
trajectory: P8
timer: 3000
- ufo: STR_MEDIUM_SCOUT
count: 2
trajectory: P8
timer: 0
- ufo: STR_LARGE_SCOUT
count: 1
trajectory: P8
timer: 3000
- ufo: STR_LARGE_SCOUT
count: 2
trajectory: P8
timer: 0
- ufo: STR_TERROR_SHIP
count: 1
trajectory: P8
timer: 3000
- ufo: STR_TERROR_SHIP
count: 2
trajectory: P8
timer: 0
It spawns 3 small scouts, then 3 medium scouts, then 3 large scouts and at the end 3 terror ships.
When the base is found, the next wave will be replaced by 3 spawnUFOs (battleships); and because of `
multiUfoRetaliation: true` all three will attack (or better said the 2nd and 3rd will not be automagically destroyed after the first base defense).
3. How about adding retaliation UFO generation to the "waves" section (in addition to "spawnUfo")?
For example, a wave that should generate UFOs to attack the player base could be labeled with "isRetaliationWave: true". UFOs from such a wave would not be generated if previous "normal" waves have not found the player's base. The "trajectory" parameter in this wave is ignored: UFOs fly in a straight trajectory to attack the base. This opens up the possibility to make several waves to attack the player's base, between which there can be normal waves searching for the player's base.
In standard retaliation, all waves are retaliation waves.
I can add a parameter to NOT replace the current UFO (from the wave definition) with spawnUFO if that helps...