Jump to content

has anyone made any mods?

Recommended Posts

Well, these dupes started in a pickle and no mistake:



At least they have some new friends though:



Ok, so not technically a mod, its just features that are not enabled by default and not ready for testing.  The files that generate the world are easy enough to change however, and allow for all sorts of shenanigans.  Many of these things could be done with a lot of patience and the debug tool as well, mind you.  But there are a few features that can't be reached, such as rivers that act as an endless source of water or magma.


If you do play with this, keep in mind the game doesn't have these things by default for a reason.  At best, they are unready to be tested, and at worse they flat out crash the game.  Make a backup before you change things, don't leave it modified for long, and think carefully before reporting a bug in case it may be caused by your tampering.

With Great Modding comes Great Responsibility.


Seriously, we probably shouldn't be doing this.

But because we are all too curious for our own good, here's how to do it:

You can find the worldgen files at

<ONI install dir>/OxygenNotIncluded_Data/StreamingAssets/worldgen

In general, you want to modify subworlds.yaml.  The file format uses 2 spaces to indicate if an entry is contained within the previous one, and "-" to indicate an item in a list.  Do not use tabs to indent anything, stick with 2 spaces per indent.

Rivers act as both a source and a sink of their material.  You can add them to biomes by finding the "features:" section of your target biome, and adding "type: River" or "type: MagmaRiver" to the list.

For example, to add rivers to the starting biome, find the StartWorld zone in subworlds.yml, and find the "features:" entry underneath it.  In this case, it is located at line 73 as of version 208698.  A modified copy would look like:

    - type: River
    - type: feature_Sedimentary_SmallLake
    - type: feature_Sedimentary_FlatLake
    - type: feature_Sedimentary_MediumLake
    - type: feature_Sedimentary_MetalVacuumBlob  
    - type: feature_Sedimentary_MetalVacuumBlob   

There's a discussion of the rivers.yml over at 



If you want to add some more creatures, add them to the "tags:" section.  A list of creatures can be found in mobs.yml, although often not by their in-game name.  Be Careful with these, some of them are not actually in the game, and cause it to crash when it encounters them.

For example, the fish above is named "Flut" in the files (I think?  I don't recall and forgot to write it down), but appear as Pacu in-game.  To add it to the starting biome lake rooms, find the StartWorld zone section named "name: biome_Sedimentary_Lake_Oxygen", and add "Flut" to the list of tags.  The section should be on line 38 as of version 208698.

An example entry enabling the fish might look like:

      - name: biome_Sedimentary_Lake_Oxygen
        weight: 2
          - Flut
          - PrickleGrass
          - PrickleFlower
          - Hatch
          - BasicSingleHarvestPlantSeed
          - BasicSingleHarvestPlant
          - BasicForagePlant
          - BasicForagePlantPlanted


Note that spawn rates for mobs continues to be low-ish.  You can change them by changing the min and max density values in mobs.yml.  If memory serves me correctly (it usually doesn't), I had both min and max density set to 0.5 for the screenshot of the fish.

Link to comment
Share on other sites

Just to prevent people from getting all paranoid about playing around with worldgen:

You can make backup copies of any valuable saves you have, or simply move your saves to a different directory before modifying any files.

If you forgot to make backup copies of any game files, or some other way mess the game up, you can simply use Steam's "verify integrity of game files" to fix the game.

Link to comment
Share on other sites

I'm trying to get a decent save to upload for people to play with rivers, fish, and copious amounts of pufts without having to modify their files.  The rivers in particular often are short and not too interesting, but on occasion a glorious river will span the entire map.  Unfortunately, I ended up overriding the save that produced it.  Will edit the post when I get one.

Link to comment
Share on other sites

Just now, Destros09 said:

Change one of the plants or other objects to spawn pufts like morbs (only slower)

I haven't seen any externally modifiable files for building behavior.  I believe this is all in the game's IL, and would need a patch tool like OnionPatcher to do so.

Link to comment
Share on other sites

OP, it's Klei's tradition to allow modding, so I'm sure it will happen.  Don't know yet if it will be standard .Lua files or something else, but I'm confident it will happen.  And it will be wonderful. :D  Heck as evident in this thread, people are already chomping at the bit.

My personal experience as a heavy modder for Don't Starve, though, involved a LOT of pain when modding the game that isn't even close to final yet.  Very elaborate mods were created much too early in a lot of cases and were just left to die because the core game changed too much.

Give it time though. ;)

Link to comment
Share on other sites

I added rivers and it's annoying! The water level constantly rises! Where the water comes from who knows! I'm having to constantly move up to avoid getting drowned and the water temp is like 200+ F! I'm hoping it turns to ice when it hits the cold biome but it'll probably just melt through it all until the entire map is a literal (figurative?) hot mess!

Link to comment
Share on other sites

I'm currently working on a mod manager to act as a platform for any community mods people would like to create (as well as creating some mods to act as samples and fun things to play with in-game), which will essentially mean that creating a new mod is as simple as creating a single new class in C# and adding the code file to the mod folder. Taking longer than expected due to other life commitments, but it's coming along.

Hoping I'll have something to post in the next week or so. :) Just have to finalize the in-game mod management menu and I'll post the early version, but there's still a chunk of work to do beyond that (work on safely unloading mods, new asset integration, and a number of other features).

Link to comment
Share on other sites

On 4/30/2017 at 3:47 AM, zink1701 said:

I have a sort of workaround for Dupe Stat editing, its more of a cheat than a mod but thought I would share.


I made a tool for editing the save files, which can be found here: https://github.com/RoboPhred/Oni2Xml

The save files contain a table at the start which describes the data structure for most (but not all) of the data contained in the file.  This program reads that in, and outputs the data in a human readable form.  It also allows recombining the output back into an existing save file.

The benefit of this method over hex editing is that you can introduce new game behaviors or entities, or change some of the more esoteric values.

Link to comment
Share on other sites


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