Skip to content

Improve moddability of various "loading" maps #1092

@Xymanek

Description

@Xymanek

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions