Recommended Posts

Gaons    3

one more question, to they run nice they need only the dll file? all that was in the previously folder doesnt matter(like cjson and on)?

Share this post


Link to post
Share on other sites
Fury1SOG    10

Some of the mods seem very interesting! Is there any way to get the Modloader working with MacOS?

Share this post


Link to post
Share on other sites
Pan_opticon    1
On 04.04.2018 at 6:55 PM, MidnightSteam said:

I would like to know why you want to do this. If it interests me then I might look into it. No promises.

If your goal is to edit the Stats of the Duplicants, then try out my MaxAttribute mod where your Duplicants run faster than The Flash, build faster than The Flash, pee faster than The Flash, etc... Here's the link to my fork - GitHub fork

I want to try to delete geysers through save editing, because I can't do that via debug mode. And yeah, maybe some trait or stat altering along the way, but not maxed-out kind.

Share this post


Link to post
Share on other sites

@Pan_opticonHere's how to destroy the geysers and make new ones in Debug mode:

1: Hit "Backspace" on your keyboard

2: Click "Destroy" and then click on your geyser

3: Now you paste in the geyser template that you want

DestroyGeyser.png.5c98f94ed5da4a60edc55ee9ef0da64f.png

 

Share this post


Link to post
Share on other sites
Pan_opticon    1
2 hours ago, MidnightSteam said:

@Pan_opticonHere's how to destroy the geysers and make new ones in Debug mode:

1: Hit "Backspace" on your keyboard

2: Click "Destroy" and then click on your geyser

3: Now you paste in the geyser template that you want

DestroyGeyser.png.5c98f94ed5da4a60edc55ee9ef0da64f.png

 

Well, I was initially confused by one of the templates with a natural gas geyser. I can't delete it via "destroy" button. But anyway, the ability to tune geyser parameters via save editing would be better than repeatedly fish for decent one...

Share this post


Link to post
Share on other sites
Pan_opticon    1

Can someone PM me a good example of a Harmony-based mod that uses Transpiler patching? If I understand correctly, that's what I need to completely replace a method of a class.

Share this post


Link to post
Share on other sites
wondiblle    0

Just a note for others... for Material Color I had to copy not only the MaterialColor directory but the Overlays and Sprites directories. Without those I had no interaction in game mode and had to alt-f4 out. I picked up on Overlays from reading _Logs, and saw the material color icon in Sprites, so I didn't really test if that is strictly required.

Share this post


Link to post
Share on other sites
RoboPhred    30
On 4/6/2018 at 11:17 AM, Pan_opticon said:

I want to try to delete geysers through save editing, because I can't do that via debug mode. And yeah, maybe some trait or stat altering along the way, but not maxed-out kind.

 

I have a save editor in the works.  It's UI is currently extremely limited and temporary, but you can do dup stat editing.  I will see about shoving in geyser tweaking for you on a temporary basis until I can get the UI more refined.

You can find the editor at https://robophred.github.io/oni-duplicity/, and the source to the save file parser itself at https://github.com/RoboPhred/oni-save-parser.

  • Thanks 1

Share this post


Link to post
Share on other sites
Pan_opticon    1
14 hours ago, RoboPhred said:

 

I have a save editor in the works.  It's UI is currently extremely limited and temporary, but you can do dup stat editing.  I will see about shoving in geyser tweaking for you on a temporary basis until I can get the UI more refined.

You can find the editor at https://robophred.github.io/oni-duplicity/, and the source to the save file parser itself at https://github.com/RoboPhred/oni-save-parser.

Doesn't work for me.

Error: Identifier "WorkChore`1+StatesInstance[[Deconstructable, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]" has invalid characters.

 

Share this post


Link to post
Share on other sites
RoboPhred    30
Posted (edited)

On it.  Looks like my sanity check for reading strings is too strict.

To avoid filling up this thread with unrelated support, can you report issues on the github for the parser?

https://github.com/RoboPhred/oni-save-parser/issues

I will make a separate thread for this when its (relatively) stable.

 

Edit:

This bug has been fixed.

Edited by RoboPhred
  • Thanks 1

Share this post


Link to post
Share on other sites

It seems there is a new Bug in the Modloader.

If i try to load my save i can't see the status window when i click on stuff. (savegame attached)

If i remove the modloader the menu shows just fine. (The menu that shows on the right site where you can set prios, deconstrukt see current temp etc)

The problem dosn't show on a new game unless i load a new game after i load the affected save.

 

Test.sav

output_log.txt

Share this post


Link to post
Share on other sites
Spork    5

Can someone please make a mod that increases the storage capacity on the Storage Lockers.  I've had some success making mods for some other buildings but after hours of trying I can't figure out how to change the storage size on the lockers.

Great job on the ModLoader btw, I've had a lot of fun messing around with it.

 

Share this post


Link to post
Share on other sites
Spork    5
On 4/13/2018 at 7:47 AM, Spork said:

Can someone please make a mod that increases the storage capacity on the Storage Lockers.  I've had some success making mods for some other buildings but after hours of trying I can't figure out how to change the storage size on the lockers.

Great job on the ModLoader btw, I've had a lot of fun messing around with it.

 

 

Nevermind, I finally figured it out.  Here is the code I used to do it if anyone else is looking to do the same.  I'm not sure if it's the correct way to go about it, but it works.

        [HarmonyPatch(typeof(Storage), "OnPrefabInit")]
        public static class StorageMod
        {
            public static void Prefix(Storage __instance)
            {
                AccessTools.Field(typeof(Storage), "capacityKg").SetValue(__instance, 50000f);
            }
        }

 

  • Like 1

Share this post


Link to post
Share on other sites
Seeker89    4

I ponder if that helps late game lag when you have a large amount of storage vs only a few with that mod. 

Share this post


Link to post
Share on other sites
djn16    1
On 4/14/2018 at 8:13 PM, Spork said:

 

Nevermind, I finally figured it out.  Here is the code I used to do it if anyone else is looking to do the same.  I'm not sure if it's the correct way to go about it, but it works.


        [HarmonyPatch(typeof(Storage), "OnPrefabInit")]
        public static class StorageMod
        {
            public static void Prefix(Storage __instance)
            {
                AccessTools.Field(typeof(Storage), "capacityKg").SetValue(__instance, 50000f);
            }
        }

 

Can u share dll capacity mod?

  • Like 1

Share this post


Link to post
Share on other sites
Gaons    3
On 15/04/2018 at 10:23 AM, djn16 said:

Can u share dll capacity mod?

also want dll @Spork , could you upload it?

Share this post


Link to post
Share on other sites
Spork    5
1 hour ago, Gaons said:

also want dll @Spork , could you upload it?

 

Sure.   

The storage locker capacity code I posted above turned out to be wrong.  It increased the storage on EVERYTHING,  Storage Lockers, Fridge, Food Box, Conveyor box, etc.   It was kinda cool, but after playing with it, it turned out having a large refrigerator caused lag issues when clicking on it.

Version 2 just increases the Storage Locker and is working great in the new game I'm playing.  Attached DLL below.   The storage size is set to 1000 tons, take it or leave it.  If you want a storage mod with a capacity other than 1000 tons you'll have to compile your own (not that hard), here is the correct code.

using Harmony;
using UnityEngine;

namespace Patches
{
    public static class LargeStorageLockerMod
    {
        [HarmonyPatch(typeof(StorageLockerConfig), "DoPostConfigureComplete")]
        public static class StorageLockerConfigPatch
        {
            public static void Postfix(StorageLockerConfig __instance, ref GameObject go)
            {
                Storage storage = go.AddOrGet<Storage>();
                storage.capacityKg = 1000000f;
            }
        }
    }
}

 

LargeStorageLockerMod.dll

  • Like 1
  • Thanks 3

Share this post


Link to post
Share on other sites
KrownKlown    0
21 hours ago, Spork said:

 

Sure.   

The storage locker capacity code I posted above turned out to be wrong.  It increased the storage on EVERYTHING,  Storage Lockers, Fridge, Food Box, Conveyor box, etc.   It was kinda cool, but after playing with it, it turned out having a large refrigerator caused lag issues when clicking on it.

Version 2 just increases the Storage Locker and is working great in the new game I'm playing.  Attached DLL below.   The storage size is set to 1000 tons, take it or leave it.  If you want a storage mod with a capacity other than 1000 tons you'll have to compile your own (not that hard), here is the correct code.


using Harmony;
using UnityEngine;

namespace Patches
{
    public static class LargeStorageLockerMod
    {
        [HarmonyPatch(typeof(StorageLockerConfig), "DoPostConfigureComplete")]
        public static class StorageLockerConfigPatch
        {
            public static void Postfix(StorageLockerConfig __instance, ref GameObject go)
            {
                Storage storage = go.AddOrGet<Storage>();
                storage.capacityKg = 1000000f;
            }
        }
    }
}

 

LargeStorageLockerMod.dll

Thanks for the file! 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now