sixsevensix Posted October 18, 2017 Share Posted October 18, 2017 So I noticed that the helicona world presets don't spawn with things such as marsh biomes or oil pockets and I found it is fairly simple to edit and make your own world presets. In your steam directory where ONI is contained you can go to script files that define how the worlds are genned. "...\OxygenNotIncluded\OxygenNotIncluded_Data\StreamingAssets\worldgen\worlds" In this folder by default you have the presets: Default, Helicona, and TheRock. I edited TheRock for my preset since it seems to use a much simpler set of functions to call up which biomes to draw (it also looks like a meteor). You can use any text editor but I used notepad++ and basically just imported the desired biomes I wanted loaded, and added them to the corresponding functions. It took some trial and error to see how each function would draw the biomes and what the distance variables did. There are four commands that we can modify: Spoiler - tagcommand: Default # By default add in all the Human warm and hot areas command: UnionWith subworldNames: - Frozen - Surface - Bottom and the three below look similar but have slightly different parameters: Spoiler - tagcommand: DistanceFrom tagset: StartWorld distance: 3 maxDistance: 200 distCmp: -1 # -1 less than, 0 equal, 1 greater than command: UnionWith subworldNames: ... These last three look nearly identical except they have different subworldNames, commands, and extra parameters that vary. In the beginning of the file it will say: Spoiler ZoneFiles: - name: subworlds/StartWorld - name: subworlds/Frozen - name: subworlds/TheVoid - name: subworlds/Surface weight: 0.3 - name: subworlds/Bottom - name: subworlds/TheVoid overrideName: Default This is where the biomes are loaded in. For each one you want to load simply add a new line in this definition like so: Spoiler ZoneFiles: - name: subworlds/StartWorld - name: subworlds/Frozen - name: subworlds/TheVoid - name: subworlds/Surface weight: 0.3 - name: subworlds/HotMarsh - name: subworlds/Jungle - name: subworlds/OilPockets - name: subworlds/Bottom - name: subworlds/TheVoid overrideName: Default Then you can add them to the corresponding section in a tagcommand function. The distCmp variable tells you what layer of the meteor is being genned. The distance variable tells you how far that layer will be genned from the startzone I think. Say you want to make your surface out of oil pockets. You want to add to the tagcommand that has distCmp: 0 like so: Spoiler - tagcommand: DistanceFrom tagset: StartWorld distance: 3 maxDistance: 200 distCmp: 0 # -1 less than, 0 equal, 1 greater than command: Replace subworldNames: - Surface - OilPockets I'm still playing around with the files and seeing how minor tweaks change the worldgen. I've attached the preset I've been working on at the moment as well as an image of it. The seed is 1540373150 with this custom preset. Let me know if this helps anyone or if I'm completely off on how I'm interpreting this code lol. EDIT/UPDATE: I've been playing around more with creating biomes and learning how the poi's are placed and have started documenting the files as I edit them. I've attached a zip with all my current modifications to the RWG. Its a little more modifications than the Active_Moon preset so I would suggest backing up your worldgen folder. I've also attached my templates folder which has a template spawner for every geyser, creature (even unimplemented like Fluts and Shockworms), and plant individually as well as some super gas and liquid pumps. I made a template spawn of a single pump, then edited the corresponding .yaml file: Spoiler buildings: - id: GasPump element: Cuprite temperature: 293.357941 storage: [] rottable: {} amounts: [] Change element to Katairite and you have an invincible Gas Pump. This can be done for ANY building I believe but there may be exceptions. EDIT/UPDATE 2: I've cleaned up my preset files and templates and reuploaded them. The readme for the worldgen file now has a list of which files are new and which have been modified. UPDATE 3: Adding a Core to the map is proving to be the most difficult part. At least without a crash. It gens the world an allows you to pick your dupes, however the map crashes on embark. When restarting the game the map is loadable however no dupes spawn. This happens 99% of the time. After running about 50 different seeds, 2 embarked flawlessly. BUT when trying to regen with the SAME SEED... Crash. In order to add the core I changed the startworld.yaml subworld into a magma biome and placed a new biome identical to the actual start world in the default ring (jungle, dirt, marsh). This is supposed to draw all the biomes in reference to the core, and randomly place a base in any of the areas defined in the start ring. And It does, but for some reason I think whatever makes the dupes spawn is interrupted and crashes the game. Checking the outputlogs I get this: Spoiler [15:34:48.230] [1] ERROR: Error in: WattsonMessage.WattsonMessage.OnSpawn System.NullReferenceException: Object reference not set to an instance of an object at WattsonMessage.OnActivate () [0x00091] in D:\JenkinsWorkspace\Preview_Simgame_Windows\game\Assets\scripts\screens\WattsonMessage.cs:86 at KScreen.Activate () [0x00017] in D:\JenkinsWorkspace\Preview_Simgame_Windows\game\Assets\Plugins\Klei\ui\KScreen.cs:122 at KScreen.OnSpawn () [0x0004f] in D:\JenkinsWorkspace\Preview_Simgame_Windows\game\Assets\Plugins\Klei\ui\KScreen.cs:79 at WattsonMessage.OnSpawn () [0x00000] in D:\JenkinsWorkspace\Preview_Simgame_Windows\game\Assets\scripts\screens\WattsonMessage.cs:35 at KMonoBehaviour.Spawn () [0x0008f] in D:\JenkinsWorkspace\Preview_Simgame_Windows\game\Assets\Plugins\Klei\util\KMonoBehaviour.cs:186 UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object) UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[]) UnityEngine.Logger:Log(LogType, Object) UnityEngine.Debug:LogError(Object) Debug:LogError(Object, Object) (at D:\JenkinsWorkspace\Preview_Simgame_Windows\game\Assets\Plugins\Debug.cs:96) Output:LogError(String) (at D:\JenkinsWorkspace\Preview_Simgame_Windows\game\Assets\Plugins\Output.cs:163) Output:LogError(Object[]) (at D:\JenkinsWorkspace\Preview_Simgame_Windows\game\Assets\Plugins\Output.cs:46) KMonoBehaviour:Spawn() (at D:\JenkinsWorkspace\Preview_Simgame_Windows\game\Assets\Plugins\Klei\util\KMonoBehaviour.cs:190) KMonoBehaviour:Start() (at D:\JenkinsWorkspace\Preview_Simgame_Windows\game\Assets\Plugins\Klei\util\KMonoBehaviour.cs:138) (Filename: D:/JenkinsWorkspace/Preview_Simgame_Windows/game/Assets/Plugins/Debug.cs Line: 96) I'm not sure what to make of it other than it can't spawn dupes because it is choosing an area that isn't the start room OR it isn't able to select the HQ to activate spawning. Any feedback or insights into this would be appreciated. EDIT/UPDATE 4: This bug is really throwing me for a loop so I have uploaded a few of the working planet saves until I can get the RWG to handle the preset properly. There are three different saves available to choose from. UPDATE 5: I've drastically reduced the crashes when genning a world, with some tweaking I may eliminate the crash. The crash was a result of the FOW not being revealed over where the starting base was, since there were multiple start biomes being placed the game had an issue selecting the same chunk that had the base to reveal. I created a separate tag command that strictly defines the dirt ring and used a default biome to push the weight against the real start biome. Once I'm sure the crash is eliminated I'll clean up my files and post an updated version of the RWG map presets. Active_Moon.yaml ONICustomTemplates.zip ONIMapPresets.zip WorkingPlanetSaves.zip Link to comment Share on other sites More sharing options...
jamesbread Posted October 19, 2017 Share Posted October 19, 2017 Thank you! I will play next time Link to comment Share on other sites More sharing options...
The Plum Gate Posted October 19, 2017 Share Posted October 19, 2017 Keep up the good works. Feel free to look at the files I posted - I learned how to add features and pois to biomes. Think I made 100 or so changes to default RWG but haven't messed with the starting biome at all, nor have I tried to move biome locations around yet. I'm trying to figure out the noise files ( not having much luck, but I haven't really made any significant effort to do so either ) I can tell you from experience that the biomes are heat-treated all filled with filled with Katairite (Abyssalite) when worldgen first begins.. had my fair share of worldgen screw ups while I was editing things - yaml formatting is important. Link to comment Share on other sites More sharing options...
sixsevensix Posted October 19, 2017 Author Share Posted October 19, 2017 Thanks! The noise files I THINK affect the texturing among tiles in a biome. From the variables it looks like they are using Perlin noise and other algorithms to more or less create a natural look when distributing tiles. Perlin noise is used to create a realistic texture in CG. primative: BevinsGradient and primative: SimplexPerlin are what I'm going by but I may be wrong. I've only looked through these files a few times to see what others they reference. I haven't done any modding to the default preset so far. The Meteor felt right so I set out to try and make it what I envision the meteor is supposed to look like. I've created a couple of custom biomes to see what I can get away with. So far I've been playing with a new frozen biome with clusters of solid hydrogen. I had to tweak the ExtremelyCold temperature range to a lower temperature and shift some of the biomes temperature sets, adding a new temperature range gives me problems so far. I see that TheRock and other meteor gens override the default.yaml world file so I've been wondering what exactly gets overwritten and what gets inherited. So many mysteries... Link to comment Share on other sites More sharing options...
Risu Posted October 19, 2017 Share Posted October 19, 2017 If you want something different change OverworldSampleBehaviour in defaults.yaml from UniformHex to UniformSquare. Then square root both OverworldDensityMin and OverworldDensityMax. PoissonDisk is also acceptable behavior. There are others but they don't make a uniform point distribution which this requires. Link to comment Share on other sites More sharing options...
sixsevensix Posted October 19, 2017 Author Share Posted October 19, 2017 Thanks! That will be really useful. I'll have to try some different combinations, I've also seen these distributions used in other areas so I might see what happens when switching them around there. Also I ran the UniformHex through with the square rooted values and it seems to make it more jagged than the original min and max densities. I'm testing to see what I can do with these distribution values now. Link to comment Share on other sites More sharing options...
The Plum Gate Posted October 19, 2017 Share Posted October 19, 2017 The over world noise can be Voroni, or PowerTree. You can take the square root on those exponents by setting it to 0.5. I get that the noise files define how tiles are distributed, just not which line targets are doing what and if they directly are associated with biome features. Link to comment Share on other sites More sharing options...
GrindThisGame Posted October 19, 2017 Share Posted October 19, 2017 Seems like magma should be in the core and frozen biome on the surface. Link to comment Share on other sites More sharing options...
sixsevensix Posted October 19, 2017 Author Share Posted October 19, 2017 56 minutes ago, GrindThisGame said: Seems like magma should be in the core and frozen biome on the surface. I've been playing around with different layouts, I just had to move around the biomes to get the magma core. Link to comment Share on other sites More sharing options...
Le0n1des Posted October 20, 2017 Share Posted October 20, 2017 11 hours ago, sixsevensix said: I've been playing around with different layouts, I just had to move around the biomes to get the magma core. This is great! Can the starting point be moved to the dirt ring (randomly of possible, fixed to (0x,2/3y) if not) and the core filled with overheated magma? Link to comment Share on other sites More sharing options...
sixsevensix Posted October 20, 2017 Author Share Posted October 20, 2017 I'm looking at trying to get that distribution next. It seems the rest of the biomes are generated by taking the distance from your Start biome so I'm not sure how I can move it to the dirt ring which in my current file is here: - tagcommand: Default # By default add in all the Human warm and hot areas command: UnionWith subworldNames: - HotMarsh - Jungle - Earthy The default tagcommand basically is what fills in between the core (distCmp=-1) and the surface (distCmp=0) biomes. #Defines the biome surrounding the StartBiome - tagcommand: DistanceFrom tagset: StartWorld distance: 2 maxDistance: 200 distCmp: -1 # -1 less than, 0 equal, 1 greater than command: Replace subworldNames: - MagmaEdge - OilPockets #Defines the surface biome - tagcommand: DistanceFrom tagset: StartWorld distance: 4 maxDistance: 200 distCmp: 0 # -1 less than, 0 equal, 1 greater than command: Replace subworldNames: - Hydro - Frozen One way I might be able to actually make a magma core and move the start is by redefining what the DistanceFrom tagcommands use as a reference point. I would create a new Core biome that would act as a giant core of magma at say 2000K. and replace the tagset: StartWorld with this core biome. Then I would have to make the StartWorld biome spawn at least one StartLocation. But that is just kind of how I see it in my head, Ill have to tinker with it some and see. EDIT: I'm getting super close to having a core. Right now the game crashes but the map can be loaded on restart, no dupes spawn but the base spawns in the temperate/dirt ring! Hopefully I can figure out how to stop the crash, if not it still is playable once you reload it, you instantly lose since no dupes spawn so you have to ctrl+F2 some in to play. Link to comment Share on other sites More sharing options...
GrindThisGame Posted October 20, 2017 Share Posted October 20, 2017 That is awesome looking! Is that all the data I need above to try out this map? Link to comment Share on other sites More sharing options...
sixsevensix Posted October 20, 2017 Author Share Posted October 20, 2017 16 minutes ago, GrindThisGame said: That is awesome looking! Is that all the data I need above to try out this map? In the ONIMapPreset file it should have everything you need. Testing from a vanilla backup of my worldgen it worked with no problems so you should be able to just plug and play. Be sure to back up your worldgen file before you make any replacements. I've been playing on this new preset and It presents an awesome challenge. The heat creeps in and makes it unlivable so its a mad rush to research insulated tiles and break out through one of the oil biomes. Let me know how everything works. Link to comment Share on other sites More sharing options...
GrindThisGame Posted October 23, 2017 Share Posted October 23, 2017 On 10/20/2017 at 10:53 AM, sixsevensix said: In the ONIMapPreset file it should have everything you need. Testing from a vanilla backup of my worldgen it worked with no problems so you should be able to just plug and play. Be sure to back up your worldgen file before you make any replacements. I've been playing on this new preset and It presents an awesome challenge. The heat creeps in and makes it unlivable so its a mad rush to research insulated tiles and break out through one of the oil biomes. Let me know how everything works. All of these experimental maps look so cool. It does also create "challenges" like you describe above. Race to survive the LAVA! Link to comment Share on other sites More sharing options...
donutman07 Posted January 15, 2018 Share Posted January 15, 2018 This is neat stuff. Necro bump. It'd be sweet if we could get a wiki going for map creation. Or at least a sticky so people add knowledge in one place. My own attempt showed me how difficult it is to make changes as the vocabulary of options is not immediately obvious. As a simple example, it took some effort to find out copper was cuprite. I also had issues trying to add my own temperature range as mentioned above, ended up just using the existing ones. Link to comment Share on other sites More sharing options...
QuQuasar Posted January 15, 2018 Share Posted January 15, 2018 I’ve been exploring the worldgen files myself, but have been held back by a few problems: most notably, I am unable to add ‘features’ without turning the area they spawn in into void. The feature itself spawns fine, but the area around it goes voidy. This happens even with an exact copy of the SandGeode feature. Since features define the majority of space in most biomes (most rooms, and the tiles that border them, are a part of features), this leaves me unable to significantly edit the biomes, which rather noticeably limits what shennanigans I can get up to. I had some luck getting rid of features entirely, but none with creating or editing them. I’ve had more success with the other files, though. The worldgen files are structured like so: 1. The world is partitioned into subworlds using the file in the “World” folder (Default, Heliconia, TheRock). Abyssalite borders between subworlds prevent them from severely affecting each other’s temperature. 2. Subworlds are further broken up into Biomes. For example, the frozen subworld has a Wet biome, which spawns bands of ice and polluted ice, and a Dry biome, which spawns bands of granite and wolframite. Biomes use Noise files to determine how to spawn these bands. 3. The entire subworld is then overlaid with Features. Features are procedurally generated from a template (‘Blob’, ‘Circle’, ‘TallRoom’), and have a selection of one or more materials in their center, bordered by a different selection of materials. Most of these are rooms, with a gas in the center bordered by ore or rock, or lakes which have both gas and liquid. Some like sand geodes replace the gas with a mineral. Features spawn inside subworlds, so they never break Abyssalite borders. 4. Finally, the world as a whole is overlaid with a set number of Places Of Interest for each subworld. These are ruins, geysers, oil wells and thermal nullifiers. Since these can be quite large and are overlaid last, they can break Abyssalite borders and cause some interesting effects. Material definitions in Biomes and Features can also have material overrides for mass, temperature or germs. This is used to spawn slimelung, for example, and could theoretically be abused in endlessly entertaining ways if I could only get features to spawn properly... Link to comment Share on other sites More sharing options...
donutman07 Posted January 15, 2018 Share Posted January 15, 2018 9 minutes ago, QuQuasar said: I’ve been exploring the worldgen files myself, but have been held back by a few problems: most notably, I am unable to add ‘features’ without turning the area they spawn in into void. The feature itself spawns fine, but the area around it goes voidy. This happens even with an exact copy of the SandGeode feature. I had issues there too, but I did manage to make my own features in that Hygiea map I made. If you download it and just unzip to a non game directory you can check it out without changing your game. C:\Program Files (x86)\Steam\steamapps\common\OxygenNotIncluded\OxygenNotIncluded_Data\StreamingAssets\worldgen\features\frozen2\SuperColdBubble.yaml For example is a new feature for my frozen2 biome. You have to edit quite a few different things to get it to work. C:\Program Files (x86)\Steam\steamapps\common\OxygenNotIncluded\OxygenNotIncluded_Data\StreamingAssets\worldgen\subworlds\Frozen2.yaml was modified to include the new feature for example. features: - type: features/frozen2/SuperColdBubble - type: features/frozen2/SuperColdBubble - type: features/frozen2/MethaneGeode Basically any mistake you make generally leads to a void or abyssalite, which is pretty annoying. I found the easiest solution was to make only 1 change and sit through world gen after each change to make sure I didn't mess something up. Otherwise I would get too far ahead and forget what changes I made when a bug popped up SuperColdBubble.yaml Frozen2.yaml Link to comment Share on other sites More sharing options...
donutman07 Posted February 4, 2018 Share Posted February 4, 2018 linking in the newest one: Link to comment Share on other sites More sharing options...
Recommended Posts
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.