The maps in question:
- Transition map - by default, soldiers sitting in the skyranger (
CIN_Loading_Interior)
- Mission intro - most commonly, skyranger flying in and soldiers jumping down
- Post-mission walkup on avenger's "roof deck" (
UIAfterAction)
Existing systems
Mods can easily "attach" their own .umaps to existing mission intros:
|
struct native AdditionalMissionIntroPackageMapping |
|
{ |
|
var string OriginalIntroMatineePackage; // original matinee package in the MissionIntroDefinition structure for a mission |
|
var string AdditionalIntroMatineePackage; // additional matinee package to load when OriginalIntroMatineePackage is loaded |
|
}; |
|
var config array<AdditionalMissionIntroPackageMapping> AdditionalMissionIntroPackages; // for modding, allows packages with intros for new character types to be loaded |
|
foreach MissionManager.AdditionalMissionIntroPackages(AdditionalIntroPackage) |
|
{ |
|
if (AdditionalIntroPackage.OriginalIntroMatineePackage == MissionIntro.MatineePackage) |
|
{ |
|
`MAPS.AddStreamingMap(AdditionalIntroPackage.AdditionalIntroMatineePackage, kSoldierSpawn.Location, ObjectiveFacing, false).bForceNoDupe = true; |
|
} |
|
} |
However, the usability of this system is limited because making use of it requires overriding a character template variable
class X2CharacterTemplate /**/;
var(X2CharacterTemplate) string strIntroMatineeSlotPrefix; // prefix of the matinee groups this character can fill in mission intros
There is no straight-forward system for overriding the other 2
Existing solutions in mods
Directly patching SeqAct_Interps (which is rather hacky): https://github.com/Musashi1584/PrimarySecondaries/blob/94fd404571a16bd868fe7bc2025a24eb324fef3c/PrimarySecondaries/Src/PrimarySecondaries/Classes/ShellMapMatinee.uc
Ideal situation
A delegate or a DLCInfo hook that will provide mods with following:
Then the mods will respond with the following:
- Additional maps to load (if any)
- Remote events to trigger per-unit (override)
This way, we can reuse the majority of the approach used already by firaxis (+ the (relative) convenience of the editor), while getting the required flexibility
Considerations
The additional maps will need to be unloaded once they are no longer needed
The maps in question:
CIN_Loading_Interior)UIAfterAction)Existing systems
Mods can easily "attach" their own
.umaps to existing mission intros:X2WOTCCommunityHighlander/X2WOTCCommunityHighlander/Src/XComGame/Classes/XComTacticalMissionManager.uc
Lines 73 to 77 in cd2e225
X2WOTCCommunityHighlander/X2WOTCCommunityHighlander/Src/XComGame/Classes/XComTacticalMissionManager.uc
Line 99 in cd2e225
X2WOTCCommunityHighlander/X2WOTCCommunityHighlander/Src/XComGame/Classes/X2TacticalGameRuleset.uc
Lines 1414 to 1420 in cd2e225
However, the usability of this system is limited because making use of it requires overriding a character template variable
There is no straight-forward system for overriding the other 2
Existing solutions in mods
Directly patching
SeqAct_Interps (which is rather hacky): https://github.com/Musashi1584/PrimarySecondaries/blob/94fd404571a16bd868fe7bc2025a24eb324fef3c/PrimarySecondaries/Src/PrimarySecondaries/Classes/ShellMapMatinee.ucIdeal situation
A delegate or a DLCInfo hook that will provide mods with following:
XCOMHQ.Squad)Then the mods will respond with the following:
This way, we can reuse the majority of the approach used already by firaxis (+ the (relative) convenience of the editor), while getting the required flexibility
Considerations
The additional maps will need to be unloaded once they are no longer needed