Jump to content

Modding System Now In Testing!


Recommended Posts

  • Developer

Hello friends!

Today's Test Branch hotfix includes the beginnings of our new Mod Support! There's a whole bunch of things that this means for you, so let me lay it out:

Supported Mods

First off, the game now natively supports mod loading!  (The game will still attempt to load ModLoader.dll so the community still has a baseline hook into the system,  but failing that the game will load mod .DLLs itself. That means no more manual downloading and copying of ModLoader.dll and mod DLLs is necessary.)

At the moment, 3 kinds of mods are supported:

  1. Translation mods remain accessible via the Translations button off of the Main Menu and should still Just Work™.
  2. DLL mods (made with Harmony, the same as it was with the ModLoader system) are now accessible via the Mods button off of the Main Menu. Most of the DLL mods we tested also Just Worked, but no promises ;)
  3. Data file mods are also accessible via the Mods button. These mods provide one or more of the worldgen, templates, elements, codex, and strings folders, whose contents are laid out the same way as the corresponding folders in OxygenNotIncluded_Data\StreamingAssets. Provided files will be used at the appropriate time during world generation or game play when the mod is enabled. New worlds created this way can be selected from the custom game dialog.

There are several kinds of mods that we plan to support but aren't currently supported. As well, we want to improve Translations and WorldGen to allow cleanly overwriting and modifying existing data, not just adding new data.

Mod Development

As we develop this system, we'll be putting out tutorials and templates to make getting started easier, but for now mod development looks similar to how it has prior to these changes. There are two things to be aware of though:

The Mod Uploader now supports all these kinds of mods, as well as a bunch of new tags to categorize your mods with

In addition to subscribed Steam mods, the mod system will look for mods in Documents\Klei\OxygenNotIncluded\mods\local\.  Place mods downloaded from locations other than Steam here (each in a subfolder).

Enjoying Your Mods

Once you've subscribed to some mods on Steam (installed some locally as above), you can now access them from the Mods button in the Main Menu. This will allow you to adjust the mod loading order (in case there are dependencies) and to toggle individual mods on and off. After a restart, you can then play your game modded!

NOTE: As with all user generated content, please exercise caution when installing mods. 

Save Games

We save the list of active mods into your save games. If you load a save game that has a different mod “footprint” than the current state of your game, we give you a brief report about what is different.

Feedback

This system is still in early development, and it's intended as a tool for you, the mod community, so we definitely want your feedback as we shape this system! We still have many things that we're working towards as this system is developed. Knowing what kinds of things you're trying to make and what parts of the process are causing you pain will help us shape the system and prioritize features as we go. We've started a new Modding Subforum, so please feel free to reply to this thread or start a new topic there!

NOTE: 

Mods with obfuscated or otherwise ambiguous code will be removed from the workshop. Players and Klei staff must be able to easily audit and verify the safety of the mod. 

Link to comment
Share on other sites

I've been told that "having a global call that activates the patch from mods instead of mods patching themselves" closes a lot of doors in the modding scene. Will the way dll modding work for oxygen not included change at any point, to allow for more extreme mod changes?

Link to comment
Share on other sites

@Ipsquiggle Am I missing something, or have you guys forgot to update the workshop uploader with the new tags? I still only have 'language' as the only possible choice, but the process in general seems to work just fine :) 

@llunak https://steamcommunity.com/sharedfiles/filedetails/?id=1702818288 I've uploaded it here, very.. hasty upload, it'll take me a while to get everything up and running with nicely formatted descriptions :p

 

 

Link to comment
Share on other sites

12 hours ago, Ipsquiggle said:

World Gen mods are also accessible via the Mods button. These mods must provide a worldgen folder, whose contents are laid out the same way as the OxygenNotIncluded_Data\StreamingAssets\worldgen folder which will be used during world generation if the mod is enabled. New worlds created this way can be selected from the custom game dialog.

So now that I come to prepare my own little mods for updating, I see, apart from the uploader having no tags besides "language"...

That there should be no problem with the new worldgen mod loading if required templates are used if the mod contains them, yes? Since the template folder is not in the worldgen folder but in the same StreamingAssets one.

And can a mod offer several different world options which are all recognized, and by what exactly? Currently it is all manual after all and one alternative set I have does not have \worldgen\worlds file (where one can find set a name) and another even just replace-templates. I'd rather not offer options at if otherwise I'd have to spam the workshop with those.

Additionally, I would obviously want my "No Neutronium" modification apply to all worlds (if allowed to), i.e is there a way to simple replace a line or few? Like just having the same file name and location, a "-" for which line should be removed and "+" to which line should be added. XCOM2 .ini were quite convenient in that regard.

for ONI I guess one still needs to have something like 

-pointsOfInterest:
    geysers_a:
      - poi_jungle_geyser_steam 

+pointsOfInterest:
    geysers_a:
      - poi_SCP_jungle_geyser_steam 

although there is already a "-" which could be mistaken as command for the mod loader if not told to look only for headers/categories... mind you, I am a little modder and have no idea how to do what for I fail at coding but I still believe that plenty of small mods can be beneficial for all, even if just to see where preferences lie (and I am honestly baffled how apparently many might not mind Neutronium, well, lack of publicity of mods+lack of luck might also be a reason... that's why we need more and let natural selection do the rest!)

Last but not least I am looking forward to the tutorials, and to be frank, templates which can basically serve as simple config for in-code stuff. I just mean to remove the bombardment from the MeteorSeason (or rather adjust it to be less like an Armageddon)! Since it is not like I can write any new even just alternative code...(but one can still write easy one with the very same template/way).

In any event, thanks for making ONI greater again~

Link to comment
Share on other sites

  • Developer
14 hours ago, lbphero said:

I've been told that "having a global call that activates the patch from mods instead of mods patching themselves" closes a lot of doors in the modding scene. Will the way dll modding work for oxygen not included change at any point, to allow for more extreme mod changes?

I'm not actually sure what you mean here. Can you point me to a discussion or anything like this? We'd like to understand the problem.

 

4 hours ago, Cairath said:

@Ipsquiggle Am I missing something, or have you guys forgot to update the workshop uploader with the new tags? I still only have 'language' as the only possible choice, but the process in general seems to work just fine :) 

We're still working on getting the new version uploaded, thanks for the heads-up though! Glad it's working out!

 

1 hour ago, Sebastiangperez said:

Does anyone can share some link or a tutorial on how to start modding this game, i mean, where to start, whats things we can do or not. 

Thanks . 

 

8 minutes ago, linainverse said:

Please, let the second tutorial be about adding a technology

We'll get some tutorials put together in the near future. In the mean time, this guide is still a good start to code modding (plus download other people's mods and see how they did things!)

It might be worth making a new post in the Mods Forum with a list of systems you'd like to mod or tutorials you'd like to see. This will give us an idea of where we can focus our attention.

Link to comment
Share on other sites

  • Developer

@SakuraKoi You can have as many world files in worldgen/worlds as you like, so you can package all your worlds into one mod if you like. It's your choice to create a new world or to stomp an existing world/biome/feature/etc. with your own data (though obviously only one mod at a time can stomp any particular file. To you other point, we would indeed like to allow more fine-grained tweaking of worlds so that mods can cooperate with each other, but that's not likely to happen in the short term.

Link to comment
Share on other sites

  • Developer

The Oxygen Not Included Uploader tool (found in Steam under Library/Tools) has been updated to support more and multiple tags. You may need to Verify Integrity of Tool Files (found in the Local Files tab of the Oxygen Not Included Uploader Properties dialog) to get the updated version.

Link to comment
Share on other sites

"Content", may be not the best tag I dare to say since it is rather vague... at least I want to consider my POIs as content as well rather than "just" worldgen and as much as I know that I won't be stoned for that, on the contrary I neither want to set a bad precedent so I hope you are open for tag suggestions like "Templates" or "Points of Interest", "Buildings", "Material", "Hats" and more as soon as enough mod with such content emerge or perhaps even early on.

 

Well, actually I already know that you are, just found it worth mentioning additionally to the main piece: Steam Workshop has the tags "Mod", "Scenario" and "Duplicants" as well as "Translation" which one can not select in the uploader. I supposed "Language" should simply be ported to "Translation" while "Mod" removed. "Scenario" should remain but Duplicants is vague as well.

 

Also a neat tag I'd specifically request is "New Features", basically the best modders could do and which of course should be encouraged, possible it is after all.

Link to comment
Share on other sites

1 hour ago, Gurgel said:

Do I have to use Visual Studio and C# to do mods? I am kind of an Emacs+gcc person...

I'm new to this too, but I doubt you'll get around C#. You might however be able to execute the C# build from a Makefile or whatever you are used to doing, so you could still use Emacs I think...

Link to comment
Share on other sites

1 hour ago, QuantumFlux said:

I'm new to this too, but I doubt you'll get around C#. You might however be able to execute the C# build from a Makefile or whatever you are used to doing, so you could still use Emacs I think...

Well, I hope to find the time to give it a try. In principle, I am not opposed to C#, it is just a niche language (large niche as all of the incompatible MS stuff).

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...