Jump to content

Do mods disable achievements and is there a mod to allow heavy watt wire to be placed in blocks?


Recommended Posts

WARNING! BACKUP YOUR Assembly-CSharp.dll file in you ONI Directories/OxygenNotIncluded_Data/Managed BEFORE DOING STEPS THAT I SHOWN.

1. download  and install dnspy 6.0.5

2. open dnspy and click file on the top left corner and then press open

3. it will open a new window, go to your ONI directories/OxygenNotIncluded_Data/Managed

4. just CTRL+A and press open

5. click view on top left and select assembly explorer

6. there will be Assembly-CSharp (0.0.0.0) click it and scroll down until you found WireHighWattageConfig

5d51da6db7730_Screenshot(6).thumb.png.e6fad929f3caf31dfc1c60b538c5c547.png

7. click it and you will see the code like in my screenshot5d51d8133a98e_Screenshot(4).thumb.png.7ac69c346b178c979f104fb2bcedba6e.png

8. you can see the BuildLocationRule.NotInTiles

9. to make the heavy watt wire can go through tiles, click edit on the top left and select Edit Class (C#)

10. Erase the NotInTiles and change to Anywhere. watch out for capitalization. press compile on the bottom right

5d51d82ab92ba_Screenshot(5).thumb.png.7337038facf90a876d7d6295c9ec6b80.png

11. click file on the top and select Save Module, don't change anything just click ok

WARNING! BACKUP YOUR Assembly-CSharp.dll file in you ONI Directories/OxygenNotIncluded_Data/Managed BEFORE DOING STEPS THAT I SHOWN.

12. open your ONI to see if the edit work

 

Sorry for the bad english. english is not my first language. hope this can help you

 

if you do it right, it will look like this

left : heavy conductive wire

right: heavy watt wire

5d51e146df399_Screenshot(7).thumb.png.3764ffccfd406d53cc4b0bbc744e424d.png

Link to comment
Share on other sites

HeavyWattWire.dll

using Harmony;
    [HarmonyPatch(typeof(WireHighWattageConfig), "CreateBuildingDef", new Type[] { })]
    internal class WireHighWattageConfig_CreateBuildingDef
    {
        private static void Postfix(BuildingDef __result)
        {
          __result.BuildLocationRule = BuildLocationRule.Anywhere;
        }
    }

    [HarmonyPatch(typeof(WireRefinedHighWattageConfig), "CreateBuildingDef", new Type[] { })]
    internal class WireRefinedHighWattageConfig_CreateBuildingDef
    {
        private static void Postfix(BuildingDef __result)
        {
                __result.BuildLocationRule = BuildLocationRule.Anywhere;
                __result.BaseDecor = -5;
                __result.BaseDecorRadius = 2;
        }
    }

 

Here, like this :)

I will add this to my mod with the next update (Customize Buildings)
 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...