[Mod] Mission Control - Random Spawns, More Ally and Enemy Lances, Objectives and New AI

  • We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
v0.4.0

CWolfs

Corporal
21 Badges
Jun 27, 2018
36
26
  • BATTLETECH - Backer
  • Stellaris: Federations
  • BATTLETECH: Heavy Metal
  • BATTLETECH: Season pass
  • Stellaris: Ancient Relics
  • Prison Architect
  • BATTLETECH: Flashpoint
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • Shadowrun Returns
  • Stellaris: Distant Stars
  • Pillars of Eternity
  • BATTLETECH - Beta Backer
  • Stellaris: Apocalypse
  • Stellaris: Synthetic Dawn
  • BATTLETECH
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Archon Edition
  • Stellaris
I'm working on Mission Control. It’s a mod that a lot of people have asked for. It intelligently randomises spawns based on contract type, adds new custom contract types, reuses story maps for custom contract types, extends the map boundaries, adds allies and more enemy lances to the fight, allows you to drop more player lances (with Bigger Drops mod), adds new objectives, adds new AI to the game whilst also enabling other mods to make use of these same systems in an easy to use way. This will open things right up! Expect the coming mod updates to bring lots and lots of fun things.

Latest Version - v1.0.0

MC adds a new custom contract type called 'Blackout' - A point of interest of your employer has gone dark and they're sending you in to investigate. A low intel situation with different situations each time you play. It also adds 9 new contracts, expands duel contract type biome support and lots of quality of life features and bug fixes.

Release Notes

Major Features
  • Heavily expanded the custom contract type builder (check out the API docson MC's website)
    • The API is currently being updated so it should be complete in a few days time
  • Contract Types: Added new custom contract type
    • Blackout - A point of interest of your employer has gone dark and they're sending youin to investigate. A low intel situation with different situations each time you play.
      • Contains new non-vanilla map logic.
      • Includes new ally chatter specific to Blackout
  • Contracts: Added 3 contracts for Blackout
    • Dug in Deep
    • Heavy Static
    • Unknown Cause
  • Contracts: Added 3 contracts for Solo Duel
    • All Eyes On
    • Challenge Accepted
    • Cornered Revenge
  • Contracts: Added 3 contracts for Duo Duel
    • At High Noon
    • Last Minute Replacements
    • Yearly Tussle
  • Maps: Added 4 maps/biomes to Blackout
    • frostyslopes map on tundra biome
    • mountainhold map on lunar biome
    • story2 map on badlands biome
    • story7 map on lowlands biome
  • Maps: Added 3 more maps/biomes to Solo Duel and Duo Duel
    • deathvalley map on desert biome
    • story3 map on lunar craters biome
    • story6 map on frozen poles biome
  • AI: Follow AI - Added alternative pathfinding for 'Follow Player' AI
    • Configurable in settings.json with the new Alternative being the new default with Original being the v0.4.6 version
  • Additional Lances: Alternative spawn calculation system
    • Off by default
    • Variable enemy/ally lance drops based on player drop skulls/difficulty level
    • settings.json under DropWeightInfluence
Minor Features
  • Additional Lances: Option to indepedently disable allies and/or enemy lances
    • settings.json as DisableAllies and DisableEnemies
  • Additional Lances: Option to disabe/enable objective markers under certain conditions.
    • This allows the AL objective to be hidden to make the contract more unpredicable.
    • settings.json as HideObjective and ForceDisplayOfHiddenObjectiveIfPrimary
  • Additional Lances: Added a MRB influence for lance selection
    • For example, MRB_Level:4 to spawn specific lances for MRB level 4
    • Or, MRB_Rating:200:300, to spawn when MRB rating is between 200 and 300
  • AI: Follow AI - Fixed broken vanilla method call.
    • NeutralToAll units (and maybe others) were being identified as enemies for 'Follow AI' pathfinding. This might have caused some situations where the allies stopped following the player.
  • Random Spawns: Exposed the boundary 'buffer' zone
    • This is where a lance is allowed to spawn (beyond X and within Y distance) when using the SpawnLanceAtEdgeBounadry spawner profile.
    • settings.json under the SpawnLanceAtEdgeBoundary section
  • Extended Lances: Added a system to skip extending a lance by exclude tags
    • Skip if they have a set tag under their lance lanceExcludedTagSet in the contract override JSON
    • settings.json as SkipWhenExcludeTagsContain
  • Extended Lances: Added a system to skip extending a lance by tags
    • Skip if they have a set tag under their lance lanceTagSet in the contract override JSON
    • settings.json as SkipWhenTaggedWithAny and SkipWhenTaggedWithAll
  • Extended Boundaries: Increased the boundary size for SimpleBattle and mapGeneral_desertDam_aDes map
Changes
  • Solo/Duo Duels: Enforced weight limits on all contracts lower than difficulty 8
  • Solo/Duo Duels: Prevented vehicles from spawning
Bugs Fixed
  • Additional Lances: ExcludeContractTypes didn't work correctly and was using the wrong setting. It was picking up the ExtendedLances one instead.
  • Additional Lances: Comma based decimal locales caused rewards to be much higher than intended
  • Random Spawns: Fixed one cause of Defend Base and Destroy Base sometimes spawning you in the wrong location, or in the enemy base
  • Random Spawns: Added a set distance the player must spawn beyond on Destroy Base (roughly 16 hexes away)
  • Contract Types: Custom contract types weren't being picked up for ExcludeContractTypes or IncludeContractTypes settings
  • Droppods: Fixed a vanilla bug where droppod animations and effects sometimes weren't synced up in position to the actual drop pod and landing mech/vehicle

Major Features
  • Added BT 1.9 support

Changes
  • Additional Lances: Reduced the lance reward from 150% to 75%.
Bugs Fixed
  • Original Flashpoints: MC runs for original flashpoints regardless of the settings.json option. This doesn't affect Heavy Metal flashpoints.

Bugs Fixed
  • Campaign / Flashpoints: MC breaks regions logic in campaign and flashpoints. This resulted in completely broken logic in the contracts.
  • Skirmish: MC completely broke the loading of Skirmish
  • Additional Lances: Portrait config was not set to use the new portraits introduced in v0.4.3

Minor Features
  • Additional Lances: Added an option (MatchAllyLanceCountToEnemy) to 'match' ally lance count to the rolled enemy lance count. This is off by default but can be turned on in the settings.json.
  • Additional Lances: Added an option (IsPrimaryObjectiveIn) in the settings.json to specify if the enemy AL lance(s) should be a primary objective or not.
  • Additional Lances: Added better friendly lance portraits (Thanks @17783 / Spectre)
  • UI: Added an update notification. When a new version of MC is released the Main Menu will show a notification. This can be disabled in the settings.json.
  • AI: Follow Player - Exposed TargetZoneRadius setting in the settings.json. This specifies the target zone the following mech will try to enter before not following anymore. If this zone is left, they will try to follow again.
Changes
  • Load Times: Decreased on average between 30% - 50%
  • Additional Lances: Lower tonnage lances can now spawn for higher difficulty contracts (since v0.4.2 only the same class of lance [e.g. heavy, assault] would spawn for the difficulty level).
  • Additional Lances: Reduced max lances to 1. MC is just too brutal at times. This can be edited back under the configs MissionControl/config/AdditionalLances/ if you want it harder again.
  • Additional Lances: Substantially increased bonus payout from 20% to 150%. This is to try and offset the huge Company cost to fighting extra lances like the repairs, new mechs and pilot recruitment costs.
  • Extended Boundaries: Increase specific boundary size for contract type & map combinations
    • Capture Base with mapGeneral_frigidSteppes_iTnd
    • Capture Base with mapGeneral_icyOutpost_iGlc
    • Simple Battle with mapGeneral_highPeak_iGlc
    • Fire Mission (all of them)
  • Extended Boundaries: Increase default boundary increase from 20% to 30%
  • Rescue: Added a minimum distance to objective check for the player lance spawn
  • Hot Drop Protection: Changed evasion pips from 4 to 6 (effectively a change from 40% to 60% evasion) if the starting drop is within enemy detection range
  • AI: Follow AI - Reduced 'should sprint' range from 200 to 120 units. This means the following unit should keep up better with the player mechs
Bugs Fixed
  • Random Spawns: Fixed issue where mechs wouldn't be able to move after spawning (stuck in one place from spawn)
  • Random Spawns: Fixed issue where mechs would spawn in rocks or buildings
  • Random Spawns: Fixed a few issues that could cause long loads
  • Random Spawns: Fixed the Array out of Bounds errors when testing for valid spawn points
  • Random Spawns: Fixed issue where the map 'plot' (point of interest) could not be found to orientate spawns on for the map mapGeneral_gridLock_uTech (and possibly others who shared the same map set up)
  • Random Spawns: Fixed issue where the pathfinder mechs would trigger any Region they entered causing an error
  • Extended Boundaries: Setting the sub-override IncreaseBoundarySizeByPercentage was not read. This is a similar issue as v0.4.2 but for the contract type & map Overrides section instead.
  • Extended Boundaries: Customised size position can be wrong causing key points outside of boundary (same bug as in v0.4.2). Should be properly fixed now.
  • Localisation: Fixed a possible issue with locales that don't use period / fullstop for their decimal place. An error would occur when loading a map with an Additional Lance reward
  • Additional Lances: Fixed issue where if the player restarted a contract 3 or more times then no more AL lances would spawn (friendly or enemy)
  • Additional Lances: Fixed issue where Heavy Metal campaign contracts would allow Mission Control to run (and Bigger Drops). There's a setting (DisableIfFlashpointContract) in the settings.json to allow for MC to run in flashpoints but it's off by default.

Changes
  • Balanced Additional Lances for every difficulty level.
    • No enemy lances on very low difficulty contracts
    • Lances that appear should now be lower than your lance level so to not overload players
    • Higher levels are roughly the same as before
    • Default fallback lance is now a light lance instead of a range between light up to assault
    • Removed example MC lance configs that did nothing but resulted in using the fallback. This could lead to a case where a 1/2 skull contract would give you two enemy assault lances (yikes! sorry guys!)
  • AI: Follow AI can now be configured.
    • Can decide the follow logic (HeaviestMech or LanceOrder)
    • Can decide when to stop using this AI (OnEnemyDetected, OnEnemyVisible, WhenNotNeeded [previous default])
    • Can decide how far away from the target the AI should only sprint to catch up

Bugs Fixed
  • Additional Lances: Units used to sometimes spawn inside each other. This was harmless for player units in player units but issues could occur with allies and enemies. If droppods were involved there was often a mess on the floor afterwards and a dead mech
  • Story / Restoration contracts: MC was running for Restoration contracts since v0.4.0. This has now been prevented and is a similar fix that went in for Story contracts in v0.4.1.
  • Extended Boundaries: Setting IncreaseBoundarySizeByPercentage was not read. This meant there was no way to manually change the boundary size.
  • Extended Boundaries: Custom sizes, including the default of 20% increase, caused some contracts to have extraction points and other important locations to fall outside the boundary.
  • AI: Follow AI has been improved. Now, the Follow AI no longer runs when a condition is met (defaults to OnEnemyDetected). This means the allied units will actually fight instead of ignore combat.
  • AI: Various contract types were missing Follow AI for important reasons. This could sometimes cause the AI to do nothing. This was reworked to allow the AI to run in all contract types.
  • Encounters: Fixed the cause of SaveSpawnPositions errors

Bug Fixed
  • Fixed issue where some story missions would crash on loading due to contract type fallback support added in v0.4.0

Major Features
  • Added a system to build contract types at runtime
  • Added custom contract types
    • Solo Duel - A 1v1 fight in the arena showcased in the story mission ‘Showdown’
    • Duo Duel - A 2v2 fight in the arena showcased in the story mission ‘Showdown’
  • Added 3 contracts for Solo Duel
    • A Taste for War
    • Life Lesson
    • Proxy War
  • Added 3 contracts for Duo Duel
    • Double Trouble
    • Festive Couple
    • Words Hurt
Minor Features
  • Unknown contract type fallback ruleset - If an unknown countract type is encountered, a fallback contract type ruleset will be applied so access to the full MC featureset will still work for that contract type
  • Added IncludeContractTypes and ExcludeContractTypes to RandomSpawns, HotDrop, AdditionalLances, ExtendedLances, ExtendedBoundaries and DynamicWithdraw settings.json options
Bugs Fixed
  • AI - Friendly turrets will no longer get the 'Follow Heaviest Mech' AI applied to them. This was causing issues where turrets wouldn't fire on the enemy if the player's heaviest mech was too far away. The turrets wanted to sprint after the player.
  • Additional Lance Dialogue - Fixed spelling mistake

Major Features
  • Added BattleTech 1.8 support
  • Additional Lances: Added contract rewards for destroying Additional Lance enemy lances.
    • Read the AL documentation for the RewardsPerLance section. Default is 20% contract value reward.
  • Extended Boundaries: Provided more control on the size of the encounter boundaries
    • Read the EB documentarion for how to control the boundary size.
  • Added ability to prevent specific Additional Lance lance configs from autofilling with Extended Lance autofill
    • Read the AL documentation for the supportAutofill property.
Minor Features
  • Random Spawns: Provided a setting to turn off random spawns for the original map spawns (Additional Lances and Extended Lances will still spawn according to their spawn profile even with this turned to false)
Bugs Fixed
  • Quick Skirmish: Launching into a Quick Skirmish is now fixed. Thanks KMiSSioN
  • Quick Skmirish: Completing a Quick Skirmish fight is now fixed.

BT 1.7 forced me to release early to bring in BT 1.7 support. Mainly adds support for this, plus some additional features and minor bug fixes. Any remaining v0.3.1 milestone items are pushed to v0.3.2.

Major Features
  • Added BattleTech 1.7 support
  • Added 'Battle+ / Three-Way' contract type support
Minor Features
  • Additional Lances: Support added for mult-folder support under the MC/lances directory
  • Additional Lances: Support madlibs for lance and unit tags for MC/lances configs
Improvements
  • Random Spawns: Made the search algorithm more efficient. It might help with load times a little.
Bugs Fixed
  • Random Spawns: Caught an error that occurs in the pathfinder when the nodes are out of index

Major Features
  • Extended Boundaries - Increases the map size to the maximum possible. Sometimes up to four times the size.
  • Dynamic Withdraw - When withdrawing, a dynamic extraction zone is created that you must get your lance to before you can escape the mission
  • Added 'Attack Defend' contract type support
  • Added 'Fire Mission' contract type support
Minor Features
  • Extended Lances: Allowed for specifying a difficulty modifier to the faction to allow for individual lance selection tweaks
  • Extended Lances: Added Better Base Defence compatibility
Improvements
  • Map loading times are improved again
  • Prevented turret lances from being influenced by Extended Lances
  • Reduced the amount of bad lance spawns where you're stuck on a hill / mountain but can move a little bit
Bugs Fixed
  • Fixed infinite load screen caused by Extended Lances
  • Fixed Extended Lances adding bad spawns for the additional lance units
  • Fixed a bug where Extended Lances couldn't handle a bad contract json usecase

Improvements
  • Map load times are much faster, even in a worst case situation.
Bugs Fixed
  • Fixed infinite load screen wait bugs
  • Fixed unit spawns that didn't allow a unit to move
  • Fixed units spawning on buildings (urban maps highlighted this bug)
  • Fixed 'Follow Player' AI - Between BTv1.4 and BTv1.6.2 a tag was changed that broke this AI
[Mod edit: NO unapproved links: Github/Nexus]

* BT v1.6.2 Compatibility

* BT v1.4 Compatibility
* Set 'Extended Lances' to disabled by default to prevent conflicts with 'Better Base Defense'. You can still enable it in the mod settings.json

Major Features
  • BT v1.3 / FP Support

  • Ally Lance Combat Dialogue - Unique dialogue per contract type and MC contract type variations if you have an ally lance dropping with you.

  • Additional Lances Skull Lance Difficulty - Additional Lances now take into account skull difficulty when selecting lances to drop into a contract.

  • Additional Lances in Battle are Primary Objectives - This makes a lot of sense for a Battle as the contract sometimes would end seemingly at random when the original targets were destroyed.

  • Hot Drop Safety Features - When dropping into close proximity of enemies hot drop safety features will take effect. In the settings.json you can modify these. It supports auto-guard, auto-evasion and an option to include the enemies in this protection mode too.

  • Extended Lances - Increase the size of a faction's lances allowing for clan stars (5 mechs) and reinforced lances / comstar demi-lances (6 mechs). Works for vanilla spawns and Mission Control spawns.

  • Additional Lances Faction Rep - Allow faction reputation range to select which lance to use

  • Additional Lances Elite Lances - Allow elite lances to be selected if allied or enemy with a faction

  • Flashpoint options - Allow for disabling Mission Control entirely, or just disabling only Additional Lances for FPs

  • Additional Lances Skull Lance Difficulty - Added a full initial set of lances to fit different difficulty levels

  • Additional Lances Tonnage Restrictions - Ability to disable Additional Lances on various tonnage rules
Minor Features
  • Added damaged lances to the Additional Lances selection

  • Added more pilot names for combat dialogue

  • Added more pilot portraits for combat dialogue

  • Added option to turn ally drop combat dialogue off
Changes
  • Changed the Additional Lance keys from all uppercase to upper snake case.

  • Tweaked the path finder checks for spawning to make it slightly more lenient on sloped spawns
Bugs Fixed
  • Skirmish would crash if ally combat dialogue referenced 'Commander' string replacement as no Commander exists like in the Sim Game

  • Contract Loading Freezes - A few contract loading freezes were fixed

  • Contract Loading Loops - A few contract loading loop issues were fixed

  • Contract Loading Times Improved - Contract loading times are drastically improved

  • Random Spawns Fallback Fixes - Fallbacks weren't always activated correctly and when they were used sometimes the lance orientation was incorrect.


v0.2.0

So finally I managed to get Mission Control v0.2.0 full release out the door. I did a soft v0.2.0 pre-release to throw in Flashpoint / v1.3 compatibility in but it was far from complete. Now things are wrapped up and released on github and Nexus.

This release is a mix of functionality for core Mission Control and functionality for mods to take advantage of. Plans for the next release will be a dedicated bug fix patch for trying to hunt down the annoying load and spawn bugs that exist.

Anyway, a lot of effort has gone into this so I hope you all enjoy. As always, please let me know if you get bugs and I'll definitely fix them.

-------------------

Original Post

Over the past few months, with the encouragement and support of the modding community, I’ve managed to crack the encounter system in the game (thanks Eck!). So… what does this really mean? A lot of the contract type data was stored in the map data (called ‘encounters’). Now I’m able to manipulate this information we can finally add a lot of very fun things like completely new variations on the existing contract types, additional lances (allies & enemies) and a lot more replayability with new spawn locations. Even better, I’ve set up an easy to use system to allow other modders to write encounter rules that will allow them to do the same for their own mod.


Not to stop short... in the process of making this mod I realised I needed to make new AI as the vanilla game AI didn’t handle what I wanted. I needed a custom ‘Follow Lance’ AI that your allies dropping in can use in certain contract variations. Due to this, Mission Control can now add new AI to the game. In the coming updates I’ll expose an easy to use approach for other mods to do the same if they depend on this mod.

What should you expect in the coming updates from me? I plan to add a lot of map logic that we’ll be able to use to make many different contract type variations. I aim to add more AI to fit the different variations we make. I’m hoping to bring in the story maps into play with the generic contracts. Maybe even entirely new contract types. And one of the reasons I made this mod - new story missions.

I hope you all enjoy this mod. I’ve put a lot of my energy into it and I aim to keep adding now that the framework is in place. Already playing the maps from a different position opens up the feeling of the unknown and it feels great. Especially when you have a friendly lance of allies backing you up going into that unknown!

I’ve worked hard to make a stable v0.1 release but expect some bugs - if you encounter them I hope they are minor. Most of all - enjoy!

The above system only activates for the generic contract types like Battle, Rescue etc. I didn't activate it for the story missions as I felt it would break the story mission balance.
 
Last edited:
You can still use this whilst playing the campaign but it won't do anything in the story missions. It only works for the generic contract types like Battle, Rescue etc. I felt it would probably break the story missions' balance if I enabled it for those.
 
Thank you, Good @CWolfs! :bow:

I can't wait to see what use our Community's Mods make of your Mission Control Mod. : )


 
Last edited:
My favorite part of Mission Control...

CWolf Mission Control.png
 
@CWolfs, let me see if I have this right, "It is my understanding that the Code isn't there for Player Control of a second and third Lance... but the "Follow Along" AI Code is now doing double duty for the OpFor and your one or two additional Lances."

Confirm, Deny or Change?
 
This current version does not support additional player lances. In the future it will be possible with MC but it needs a large UI chunk of work too.

Enemies are just your usual extra enemy lance with an optional destroy lance objective.

Allies need the Follow AI in some contract types (whenever the allies spawn on the map boundary with you). If the allies are already mid fight on contract start (e.g a variation of Destroy Base I added) then they don't have the new AI.
 
This current version does not support additional player lances. In the future it will be possible with MC but it needs a large UI chunk of work too.

Enemies are just your usual extra enemy lance with an optional destroy lance objective.

Allies need the Follow AI in some contract types (whenever the allies spawn on the map boundary with you). If the allies are already mid fight on contract start (e.g a variation of Destroy Base I added) then they don't have the new AI.
Just to ensure I have it right, Mission Control does have Player Allied AI-Lances.

Just no Player-controlled Allied-Lances.
 
No. Currently it only takes the random chance from the `settings.json` (40% chance for allies and 40% chance for enemies) and it spawns based on that. For every additional lance spawned (e.g. for enemies who have a max of '2' like set in the default config) it's a compound chance. So for the second lance to spawn it will be 40% x 40% = 16%.

It was meant to half simulate the 'bad intel' situations that can already happen in the vanilla game.
 
Last edited:
Ok thanks. So I'm guessing you couldn't get around it by doing a ruleset for each skull level either because the game reference is eg "Rescue" and therefore there isn't a way to tie it all together.
 
This has the potential to be revolutionary.

Giving it a spin now and looking forward to seeing your plans come to fruition.
 
@Stonehouse Actually, if I'm honest I really didn't consider skull value at all when developing this. I was concentrating on how to get it to work at all. Now you've mentioned skulls it makes sense to have some kind of influence on this system.

I definitely still want additional lances spawning on low skull contracts but maybe they can influence the types of lances that spawn (like you can already do with biome and contract type in the settings.json of the mod). Thanks for your thoughts.

@Eximar Thanks. Hopefully you have a mostly bug free experience. Load times can be increased a little with the odd occasion of a longer load time if the random spawner struggles on a particularly hard map (small with lots of bad locations to spawn like steep mountains and deep water).
 
I guess I was thinking straight away how great your mod would be integrated into Consolidated Company Commander's sandbox mode. So the randomness that your mod gives the players coupled with some sort linkage to the skull rating of the merc deployments etc would result in some pretty epic missions.
 
Understood.