(OXCE V7.8 - Increased Alien Randomization TFTD V0.3 (https://openxcom.org/forum/index.php?action=dlattach;topic=11061.0;attach=58973) mod)
I have encountered something unexpected involving the 'Retaliation / Floating Base Attack' missions.
Crafts that should spawn with the a placeholder race of "High Threat" are instead being crewed by "Low Threat" race.
(https://openxcom.org/forum/index.php?action=dlattach;topic=11061.0;attach=58975)
In that battlescape it spawned as a Lobster which confirms it really was the "High Threat" and the wrong race had been assigned.
(https://openxcom.org/forum/index.php?action=dlattach;topic=11061.0;attach=58977)
All UFOs & Mission types should match with the 'threat level' placeholder race matching either the normal, advanced or elite UFO. I've temporarily placed an 'A' after the name for all advanced Sub Type / Mission and an 'E' for the elites to make debugging easier using a Transmission Resolver.
My guess was that the UFO was inheriting the race of the base that was launching it so I added the following code to all alienDeployments: entries:
genMissionRaceFromAlienBase: false # true (default) = take race from base (vanilla behavior); false = take from mission 'raceWeights' if not empty (if empty take from base)
huntMissionRaceFromAlienBase: false
And that did clear up a similar problem with other UFOs but unfortunately the retaliation UFOs continued to be crewed by the wrong race.
I have the elite retaliation missions in alienMissions: setup to only have the "High Threat" race in its raceWeights: so I'm not sure how it is assigning any race outside of that list.
alienMissions:
# [=] Alien Retaliation [=] <Elite>
- type: STR_ALIEN_RETALIATION_ELITE
refNode: *STR_ALIEN_RETALIATION
raceWeights:
0:
STR_IAR_HIGH_THREAT: 100
waves:
- ufo: STR_SURVEY_SHIP_ELITE
count: 1
trajectory: P8
timer: 3000
- ufo: STR_ESCORT_ELITE
count: 2
trajectory: P8
timer: 3000
- ufo: STR_CRUISER_ELITE
count: 3
trajectory: P8
timer: 3000
- ufo: STR_DREADNOUGHT_ELITE
count: 2
trajectory: P8
timer: 3000
Are 'Alien Retaliation / Floating Base Attack' missions configured differently than the rest since they can be spawned as a result to X-Com's activity?
There hadn't been any alien craft shot down when I was debugging so I was not expecting to see retaliation missions yet and I don't think enough time had passed to trip any of the difficulty retaliation mission scripts. It is possible that using Debug mode turned on the researchRetaliation mission script due to granting all research, but that entry should also have spawned an elite ship with the matching placeholder 'High Threat' race.
I'm stepping through the code to see if I've accidently misconfigured one the retaliation missions but so far everything seems to have the right race assigned. Does huntMissionRaceFromAlienBase: & genMissionRaceFromAlienBase: not effect retaliation missions?
For convenience an updated version of the mod (https://openxcom.org/forum/index.php?action=dlattach;topic=11061.0;attach=58973) and a save file with the Alien Sub-30 (https://openxcom.org/forum/index.php?action=dlattach;topic=11061.0;attach=58974) from the screenshot is attached to this post.
In alienRaces: I added the retaliationMission: variable to each entry.
# [=] Low Threat [=]
- id: STR_IAR_LOW_THREAT
retaliationMission: STR_ALIEN_RETALIATION
# [=] Intermediate Threat [=]
- id: STR_IAR_INTERMEDIATE_THREAT
retaliationMission: STR_ALIEN_RETALIATION_ADVANCED
# [=] High Threat [=]
- id: STR_IAR_HIGH_THREAT
retaliationMission: STR_ALIEN_RETALIATION_ELITE
Unfortunately the retaliation UFO with the wrong race is still appearing.
I've attached a new version of the mod (https://openxcom.org/forum/index.php?action=dlattach;topic=11061.0;attach=58997) and also a save game (https://openxcom.org/forum/index.php?action=dlattach;topic=11061.0;attach=58998) that is at the end of the month. At the start of the next month (Should be February) two UFOs will spawn, the 2nd one will be the retaliation UFO with the incorrect race.
Oddly the saved game only spawns the UFO (Alien Sub-10) with the wrong race if I load the saved game and then activate debug mode before the next month begins. (Advanced Options: Save scumming = NO)
If the saved game is loaded and debug is re-activated on Jan 31 2040.
(https://openxcom.org/forum/index.php?action=dlattach;topic=11061.0;attach=58999)
If the saved game is loaded and debug is NOT re-activated before February starts.
(https://openxcom.org/forum/index.php?action=dlattach;topic=11061.0;attach=59001)
If it is the debug unlocking STR_THE_ULTIMATE_THREAT research and starting the researchRetaliation mission script shouldn't that be spawning STR_ALIEN_RETALIATION_ELITE which is configured to always spawn the "High Threat" race.
missionScripts:
# [=] Alien Retaliation - Research [=] <Elite>
- type: researchRetaliation
missionWeights:
0:
STR_ALIEN_RETALIATION_ELITE: 100
researchTriggers:
STR_THE_ULTIMATE_THREAT: true
startDelay: 150
targetBaseOdds: 100
useTable: false
label: 3
missionScripts:
# [=] Alien Retaliation [=] <Elite>
- type: STR_ALIEN_RETALIATION_ELITE
refNode: *STR_ALIEN_RETALIATION
raceWeights:
0:
STR_IAR_HIGH_THREAT: 100
waves:
- ufo: STR_SURVEY_SHIP_ELITE
count: 1
trajectory: P8
timer: 3000
- ufo: STR_ESCORT_ELITE
count: 2
trajectory: P8
timer: 3000
- ufo: STR_CRUISER_ELITE
count: 3
trajectory: P8
timer: 3000
- ufo: STR_DREADNOUGHT_ELITE
count: 2
trajectory: P8
timer: 3000
Could it be the anchor and refNode: is duplicating the "STR_IAR_LOW_THREAT: 100" raceWeights: in both the Advanced & Elite versions causing the lists to unintentionally read like this:
# [=] Alien Retaliation [=]
- &STR_ALIEN_RETALIATION
type: STR_ALIEN_RETALIATION
raceWeights:
0:
STR_IAR_LOW_THREAT: 100
# [=] Alien Retaliation [=] <Advanced>
- type: STR_ALIEN_RETALIATION_ADVANCED
refNode: *STR_ALIEN_RETALIATION
raceWeights:
0:
STR_IAR_LOW_THREAT: 100 # <====== Potential unexpected duplication
STR_IAR_INTERMEDIATE_THREAT: 100
# [=] Alien Retaliation [=] <Elite>
- type: STR_ALIEN_RETALIATION_ELITE
refNode: *STR_ALIEN_RETALIATION
raceWeights:
0:
STR_IAR_LOW_THREAT: 100 # <====== Potential unexpected duplication
STR_IAR_HIGH_THREAT: 100
Instead of this?
# [=] Alien Retaliation [=] <Advanced>
- type: STR_ALIEN_RETALIATION_ADVANCED
refNode: *STR_ALIEN_RETALIATION
raceWeights:
0:
STR_IAR_INTERMEDIATE_THREAT: 100
# [=] Alien Retaliation [=] <Elite>
- type: STR_ALIEN_RETALIATION_ELITE
refNode: *STR_ALIEN_RETALIATION
raceWeights:
0:
STR_IAR_HIGH_THREAT: 100
Could it be the anchor and refNode: is duplicating the "STR_IAR_LOW_THREAT: 100" raceWeights: in both the Advanced & Elite versions causing the lists to unintentionally read like this:
# [=] Alien Retaliation [=]
# [=] Alien Retaliation [=] <Elite>
- type: STR_ALIEN_RETALIATION_ELITE
refNode: *STR_ALIEN_RETALIATION
raceWeights:
0:
STR_IAR_LOW_THREAT: 100 # <====== Potential unexpected duplication
STR_IAR_HIGH_THREAT: 100
This is exactly what happens (see attached screenshot).
You will need to set
# [=] Alien Retaliation [=] <Elite>
- type: STR_ALIEN_RETALIATION_ELITE
refNode: *STR_ALIEN_RETALIATION
raceWeights:
0:
STR_IAR_LOW_THREAT: 0 # <--------------
STR_IAR_HIGH_THREAT: 100
You will also need to do that if you ever want to disable missions created by regions.
I added raceWeights: STR_IAR_LOW_THREAT: 0 to all Advanced & Elite entries in the alienMissions: section.
alienMissions:
# [=] Alien Probe Mission [=]
- &STR_ALIEN_PROBE_MISSION
type: STR_ALIEN_PROBE_MISSION
raceWeights:
0:
STR_IAR_LOW_THREAT: 100
# [=] Alien Probe Mission [=] <Advanced>
- type: STR_ALIEN_PROBE_MISSION_ADVANCED
refNode: *STR_ALIEN_PROBE_MISSION
raceWeights:
0:
STR_IAR_LOW_THREAT: 0
STR_IAR_INTERMEDIATE_THREAT: 100
# [=] Alien Probe Mission [=] <Elite>
- type: STR_ALIEN_PROBE_MISSION_ELITE
refNode: *STR_ALIEN_PROBE_MISSION
raceWeights:
0:
STR_IAR_LOW_THREAT: 0
STR_IAR_HIGH_THREAT: 100
Reloaded the saved game and turned on debug mod... Alien Sub-10 spawned and:
(https://openxcom.org/forum/index.php?action=dlattach;topic=11061.0;attach=59007)
It works! (https://openxcom.org/forum/Themes/InsidiousV1-k/images/post/thumbup.gif)
Thank you for the help. ^_^