Author Topic: Retaliation missions have completely stopped  (Read 3806 times)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1510
    • View Profile
Retaliation missions have completely stopped
« on: September 12, 2018, 10:03:42 pm »
I was ready to test out some base design concepts in the battlescape maps when I discovered that the retaliation missions aren't operating. I know they were previously, in fact it was only a couple weeks ago that I easily spawned a retaliation mission in a fresh game and confirmed that my new large scout retaliation works properly. But now it's not spawning at all and I can't find anything in my code that should be the cause of this. The only changes I can think are related that I have made since then are that I added the hunter-killer mechanic to existing UFOs, I added elite UFOs (which do not spawn yet), I added new deployments which are not yet used, and I have added some aliens and armor suits.

In the copy of my mod below, I have two research retaliation missions set to 100% spawn rate if you research alien alloys, elerium-115, UFO power source, and UFO navigation, and I have decreased the time it takes to research them. I'm also attaching a save file which should easily be able to spawn the mission. I also increased the radar range, so you can clearly see that the retaliation mission never spawns in the first place.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: Retaliation missions have completely stopped
« Reply #1 on: September 12, 2018, 10:31:23 pm »
You have "researchRetaliation" defined 3 times... they will overwrite each other (in potentially random order).
Most likely the third overwrites the first two... and you end up with martial solution research trigger.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1510
    • View Profile
Re: Retaliation missions have completely stopped
« Reply #2 on: September 12, 2018, 10:55:37 pm »
Thanks, I'll fix that. But how come I didn't get any kill retaliation? Bad luck? I shot down some 50+ UFOs on Superhuman without getting a single retaliation mission spawn. Game after game, I lose on the third month and still no retaliation. The random chance of that happening is around 1 in 10,000.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: Retaliation missions have completely stopped
« Reply #3 on: September 12, 2018, 11:06:30 pm »
I loaded your save, and retaliation mission was generated immediately after I shot the first detected UFO, save attached.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: Retaliation missions have completely stopped
« Reply #4 on: September 13, 2018, 06:16:02 am »
The random chance of that happening is around 1 in 10,000.

Apparently that's the same odds as getting injured in a toilet.

Even if there's 0.01% chance of RNG being responsible by a game behavior, you can't assume that there's a bug involved until you find a way to test to ensure that it is 100% non RNG related
« Last Edit: September 13, 2018, 06:18:28 am by Hobbes »

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1510
    • View Profile
Re: Retaliation missions have completely stopped
« Reply #5 on: September 13, 2018, 07:11:54 am »
Thanks. Apparently it's working now. I can't figure out what happened before.


Even if there's 0.01% chance of RNG being responsible by a game behavior, you can't assume that there's a bug involved until you find a way to test to ensure that it is 100% non RNG related
That's just it, I couldn't find a way to ensure 100% probability because AFAIK there isn't a way to change the chance of retaliation.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: Retaliation missions have completely stopped
« Reply #6 on: September 13, 2018, 05:23:39 pm »
This might also be an issue

label: 1 is assigned to multiple entries on missionScripts and I'm not sure if the script will check for all entries that are labelled '1' or if it will pick a random one

To avoid any potential problems you should give an unique label to each entry instead

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1510
    • View Profile
Re: Retaliation missions have completely stopped
« Reply #7 on: September 14, 2018, 09:43:47 pm »
To avoid any potential problems you should give an unique label to each entry instead
Thanks. I hadn't even looked up what the labels did before now. I removed all the excess labels (they should default to 0); only the original labels persist. That could spawn an excess of retaliation missions but I think the mod is built to handle it at this point.