Jump to content

How to ensure compatibility between enemy mods (e.g. conflicting mission.ini files)


DerBK

Recommended Posts

How does XCOM2 handle multiple mods that edit the same files? Usually, as a mod creator i can avoid changing most things and just extend the files instead without overwriting anything to minimize overlap with other mods.

The one glaring exception seems to be the Mission.ini for mods that add new characters. There you have to put the new enemies into the different spawn groups.

If you have two mods of this kind loaded, i would expect that only one "wins", locking the other one out.

 

That doesn't seem to be the case, however. For example, people have been using Mods like "Advent Commander", "Advent Sniper" and the Long War Muton with each other and apparently it works somehow. I am not sure why and that worries me, because i need to understand it to ensure that my own mod works with them as well.

 

So my question is:

How can i make sure that my mod (the "Better ADVENT" mod) remains compatible with other mods that spawn new enemies?

 

 

Link to comment
Share on other sites

Does that help?

 

Not quite. I am not at home, so i don't have a file in front of me, but the missions.ini has at the top a number of arrays where the enemies are grouped together. If i understand things correctly, you need to add new enemies to these groups for them to show up.

 

To do that, i " - " the default line and " + " my own.

 

But if i use another enemy mod, they would do the same.

Link to comment
Share on other sites

If you are both modifying the same groups, I agree these will conflict. But in general, it is possible for mods to the same ini file to coexist if they modify different things.

 

That would mean we can only have one mod that adds new enemies installed at a time because they all need to edit those same lines in the mission.ini. That's a huge limitation.

Link to comment
Share on other sites

I have not looked into this particular file in detail. Why are you modifying existing groups? Surely it is possible to add new groups? Maybe you have to go up one level higher, and add a new (whatever the parent of the group is).

 

I'll look into it later today when i have the files in front of me.

I'll also have a closer look at the LW Muton again for reference. Maybe i missed something there.

Link to comment
Share on other sites

Here's what i was talking about in more detail:

 

The XComMissions.ini is responsible for how groups of enemies are generated. The first part are a couple "InclusionExlusionLists", looking like this:

InclusionExclusionLists=(ListID="Open",            bIncludeNames=false,            TemplateName[0]="AdvPsiWitchM3",            TemplateName[1]="Faceless")
InclusionExclusionLists=(ListID="NoBosses",            bIncludeNames=false,            TemplateName[0]="Sectopod",            TemplateName[1]="Gatekeeper",            TemplateName[2]="AdvPsiWitchM3",            TemplateName[3]="Faceless")
InclusionExclusionLists=(ListID="NoTerror",            bIncludeNames=false,            TemplateName[0]="AdvPsiWitchM3",            TemplateName[1]="Faceless",            TemplateName[2]="Chryssalid",            TemplateName[3]="Berserker")

And so on. Other notable lists are "BossLeader" and "AdventGlobal", for example.

Next up are a bunch of "Configurable Encouters", defining groups of enemies that are pulled from the Inclusion Lists above. They decide how a pod is built. They look like this:

ConfigurableEncounters=(EncounterID="OPNx2_Weak",           MaxSpawnCount=2,           OffsetForceLevel=-2,           LeaderInclusionExclusionCharacterTypes="NoTerrorOrBosses",           FollowerInclusionExclusionCharacterTypes="NoTerrorOrBosses")
ConfigurableEncounters=(EncounterID="BOSSx2_Strong",           MaxSpawnCount=2,           OffsetForceLevel=2,           MinRequiredForceLevel=16,           MaxRequiredForceLevel=20,           LeaderInclusionExclusionCharacterTypes="BossLeader",           FollowerInclusionExclusionCharacterTypes="NoTerror")
ConfigurableEncounters=(EncounterID="ADVx2_Strong",           MaxSpawnCount=2,           OffsetForceLevel=2,           LeaderInclusionExclusionCharacterTypes="AdventGlobal",           FollowerInclusionExclusionCharacterTypes="AdventGlobal")

There's a whole bunch of them.

Finally, there are "MissionSchedules" which define the number of pods in a mission and the type of the pod (among other things)

They look like this:

MissionSchedules=(ScheduleID="Guerilla_D2_FlightDevice",           MinRequiredAlertLevel=2, MaxRequiredAlertLevel=2,           IdealXComSpawnDistance=44,           MinXComSpawnDistance=40,           EncounterZonePatrolDepth=4.0,           PrePlacedEncounters[0]=(EncounterID="ADVx2_FlightDevice", EncounterZoneOffsetAlongLOP=10.0),           PrePlacedEncounters[1]=(EncounterID="ADVx2_FlightDevice", EncounterZoneOffsetAlongLOP=-4.0, EncounterZoneWidth=6.0),           PrePlacedEncounters[2]=(EncounterID="ADVx3_FlightDeviceBoss", EncounterZoneOffsetAlongLOP=-18.0),           )
MissionSchedules=(ScheduleID="Council_D2_Extract",           MinRequiredAlertLevel=2, MaxRequiredAlertLevel=2,           XComSquadStartsConcealed=false,           IdealXComSpawnDistance=48,           MinXComSpawnDistance=40,           EncounterZonePatrolDepth=4.0,           PrePlacedEncounters[0]=(EncounterID="OPNx2_Standard", EncounterZoneOffsetAlongLOP=24.0),           PrePlacedEncounters[1]=(EncounterID="BOSSx2_Standard", EncounterZoneOffsetAlongLOP=10.0),           PrePlacedEncounters[2]=(EncounterID="BOSSx2_FillStandard", EncounterZoneOffsetAlongLOP=10.0),           PrePlacedEncounters[3]=(EncounterID="OPNx2_Standard", EncounterZoneOffsetAlongLOP=-4.0, EncounterZoneWidth=6.0),           PrePlacedEncounters[4]=(EncounterID="DKVx2_FacelessAndCivilians", EncounterZoneOffsetAlongLOP=17.0, IncludeTacticalTag="DarkEvent_Infiltrator"),           PrePlacedEncounters[5]=(EncounterID="DKVx2_FacelessAndCivilians", EncounterZoneOffsetAlongLOP=6.0, IncludeTacticalTag="DarkEvent_Infiltrator"),           )
MissionSchedules=(ScheduleID="Retaliation_D5_Faceless",           MinRequiredAlertLevel=5, MaxRequiredAlertLevel=5,           MinRequiredForceLevel=1, MaxRequiredForceLevel=6,           XComSquadStartsConcealed=false,           IdealXComSpawnDistance=48,           MinXComSpawnDistance=44,           EncounterZonePatrolDepth=4.0,           PrePlacedEncounters[0]=(EncounterID="OPNx3_Standard", EncounterZoneOffsetAlongLOP=24.0, EncounterZoneWidth=36.0),           PrePlacedEncounters[1]=(EncounterID="OPNx3_Standard", EncounterZoneOffsetAlongLOP=7.0, EncounterZoneWidth=28.0),           PrePlacedEncounters[2]=(EncounterID="OPNx3_Standard", EncounterZoneOffsetAlongLOP=-10.0, EncounterZoneWidth=18.0),           PrePlacedEncounters[3]=(EncounterID="TERx1_Faceless", EncounterZoneOffsetAlongLOP=15.0, EncounterZoneWidth=36.0),           PrePlacedEncounters[4]=(EncounterID="TERx1_Faceless", EncounterZoneOffsetAlongLOP=-1.0, EncounterZoneWidth=36.0),     PrePlacedEncounters[5]=(EncounterID="OPNx2_Weak", EncounterZoneOffsetAlongLOP=-14.0, EncounterZoneWidth=4.0, EncounterZoneOffsetFromLOP=-10.0, EncounterZoneDepthOverride=48.0),     PrePlacedEncounters[6]=(EncounterID="TERx1_CivilianGroup", EncounterZoneOffsetAlongLOP=33.0, EncounterZoneWidth=14.0),           PrePlacedEncounters[7]=(EncounterID="TERx1_CivilianGroup", EncounterZoneOffsetAlongLOP=28.0, EncounterZoneWidth=12.0),           PrePlacedEncounters[8]=(EncounterID="TERx1_CivilianGroup", EncounterZoneOffsetAlongLOP=23.0, EncounterZoneWidth=30.0),           PrePlacedEncounters[9]=(EncounterID="TERx1_CivilianGroup", EncounterZoneOffsetAlongLOP=18.0, EncounterZoneWidth=44.0),           PrePlacedEncounters[10]=(EncounterID="TERx1_CivilianGroup", EncounterZoneOffsetAlongLOP=14.0, EncounterZoneWidth=44.0),           PrePlacedEncounters[11]=(EncounterID="TERx1_CivilianGroup", EncounterZoneOffsetAlongLOP=11.0, EncounterZoneWidth=44.0),           PrePlacedEncounters[12]=(EncounterID="TERx1_CivilianGroup", EncounterZoneOffsetAlongLOP=8.0, EncounterZoneWidth=44.0),           PrePlacedEncounters[13]=(EncounterID="TERx1_CivilianGroup", EncounterZoneOffsetAlongLOP=5.0, EncounterZoneWidth=44.0),           PrePlacedEncounters[14]=(EncounterID="TERx1_CivilianGroup", EncounterZoneOffsetAlongLOP=3.0, EncounterZoneWidth=44.0),           PrePlacedEncounters[15]=(EncounterID="TERx1_CivilianGroup", EncounterZoneOffsetAlongLOP=1.0, EncounterZoneWidth=44.0),           PrePlacedEncounters[16]=(EncounterID="TERx1_CivilianGroup", EncounterZoneOffsetAlongLOP=0.0, EncounterZoneWidth=44.0),           PrePlacedEncounters[17]=(EncounterID="TERx1_CivilianGroup", EncounterZoneOffsetAlongLOP=-3.0, EncounterZoneWidth=36.0),           PrePlacedEncounters[18]=(EncounterID="TERx1_CivilianGroup", EncounterZoneOffsetAlongLOP=-6.0, EncounterZoneWidth=28.0),           )

So basically the whole makeup of the enemies is defined in this one ini. If you were to make a new enemy, lets say a new Sectopod, you'd add it to the InclusionExclusionlists "Boss Leader" and "No Terror" with the next free index. You can leave the rest untouched.

 

 

The conflict between different mods that make new enemies comes with these InclusionExlusion lists. Every mod will try to remove the standard list and replace it with its own.

 

And my question would be... do we have a way to avoid that?

We could make new IncExLists for our own creations, but then we'd run into conflicts because we'd need to touch the ConfigurableEncounters. Not only would that not help, it would also make the enemy mod uncompatible with stuff like "Bigger Enemy Groups" that edit those Encounters.

Edited by DerBK
Link to comment
Share on other sites

Okay, i just answered my own question. The problem is not as big as i though - but there is one in a specific case (in mine, ofc -.-)

 

Here's the thing: The Lists "Open", "NoBosses", "NoTerror" and "NoTerrorOrBosses" are exclusion lists, meaning that any item NOT in that list can be spawned by the game.

This of course means that not editing those lines will automatically include your new characters. This is why the LW Muton can get away without touching any of the lists, remaining completely free from conflicts with other mods that add enemies.

 

Why i stumbled on problems: I changed the "AdventGlobal" list, which is an inclusion list. My mod already has 70+ entries in that line. When it is used together with the popular "Advent Sniper" and "Advent Psi Op", only one of those mods will be able to change the AdventGlobal list - while the others can only spawn from the exclusion lists. That will still mean those guys will show up somewhere, just not in the context of Advent specific spawns...

 

These cases might require some coordination between the mod authors.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...