OpenXcom Forum

Modding => Help => Topic started by: The Reaver of Darkness on September 12, 2018, 10:03:42 pm

Title: Retaliation missions have completely stopped
Post by: The Reaver of Darkness 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.
Title: Re: Retaliation missions have completely stopped
Post by: Meridian 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.
Title: Re: Retaliation missions have completely stopped
Post by: The Reaver of Darkness 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.
Title: Re: Retaliation missions have completely stopped
Post by: Meridian 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.
Title: Re: Retaliation missions have completely stopped
Post by: Hobbes 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
Title: Re: Retaliation missions have completely stopped
Post by: The Reaver of Darkness 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.
Title: Re: Retaliation missions have completely stopped
Post by: Hobbes 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
Title: Re: Retaliation missions have completely stopped
Post by: The Reaver of Darkness 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.