Categories
Space Engineers

Space Engineers – How to Disable Inhibitors in Modular Encounters Spawner Compatible Mods

If you’re like me and you don’t like the somewhat recent addition of inhibitors to the MES framework here’s a quick basic fix that should work for all affected mods.

The Fix

Step 1: Navigate to your Steam folder

Step 2: From there navigate to the following path:

SteamApps\workshop\content\244850\1521905890\Data\Scripts\ModularEncountersSpawner\Manipulation\

Step 3: In the folder is a file called “ArmorModuleReplacement.cs” open this one with a text editor of your liking

Step 4: In the file find the following code:

SmallModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-Nanobots-Small"));
SmallModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-JumpDrive-Small"));
SmallModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-Jetpack-Small"));
SmallModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-Drill-Small"));

LargeModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-Nanobots-Large"));
LargeModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-JumpDrive-Large"));
LargeModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-Jetpack-Large"));
LargeModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-Drill-Large"));

Step 5: Replace the code with:

/*
SmallModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-Nanobots-Small"));
SmallModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-JumpDrive-Small"));
SmallModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-Jetpack-Small"));
SmallModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-Drill-Small"));

LargeModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-Nanobots-Large"));
LargeModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-JumpDrive-Large"));
LargeModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-Jetpack-Large"));
LargeModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-Drill-Large"));
*/

Step 6: Save your changes.

Step 7: Reload your savegame or start fresh

Step 8: Bum rush the cargo ships and drill under those outposts for glory and motherland or don’t. It’s your choice now.

What Changes

This comments out the Inhibitors being registered with the Replacement logic and prevents them from being replaced by any Spawner trying to. No other functionality is affected.

Please note this only disables Inhibitors placed automatically via automatic Armor Module Replacement by spawners. Blocks manually added to ship blueprints are unaffected since the blocks themselves are still functional. Thus ships already flying around in your game world will not be affected by the change but any newly spawned ones are.

This fix will probably disappear and need to be reapplied when MES is updated or Steam decides to re-download it for whatever reason. Maybe MES will incorporate a config for stuff like this at some point for a more permanent solution or a mod appears to do it. Who knows.

Optional

If you only want some of the inhibitors gone while keeping others instead of replacing the code as shown above you can disable individual lines like this:

SmallModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-Nanobots-Small"));
SmallModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-JumpDrive-Small"));
SmallModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-Jetpack-Small"));
//SmallModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-Drill-Small"));

LargeModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-Nanobots-Large"));
LargeModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-JumpDrive-Large"));
LargeModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-Jetpack-Large"));
//LargeModules.Add(new MyDefinitionId(typeof(MyObjectBuilder_RadioAntenna), "MES-Suppressor-Drill-Large"));

This for example only disables the Drill Inhibitors while the others remain viable for auto-replacement.

Conclusion

And that's all for this Space Engineers guide. Do you have any suggestions or tips to improve this guide for Space Engineers? If yes, then make sure to leave a comment down below. This guide has been made possible by Brother Jason. You can check him out by simply clicking his name.