Space Engineers

Space Engineers

Procedurally Generated Ore
Adding A Modded Ore?
I have adjusted all the proper values for adding a modded ore to this mod's actions under both "VoxelMaterialChanges.sbc", "VoxelMaterials_asteroids.sbc", but do I have to make any changes to "PlanetGeneratorDefinitions.sbc"???
< >
Showing 1-7 of 7 comments
Lemmiwinks  [developer] 17 Feb, 2020 @ 2:00am 
If you want to add modded ores, the easiest approach would be to download the generator tool, add the extra modded ores to the config and regenerate the ore maps. There's documentation for this in the Github page linked in the other thread on this mod.

Your current approach will probably not achieve what you're after. You can't add any additional ores to be spawned. The issue is that Space Engineers doesn't actually decide where planetary ore will go in game or on world generation. This is all predetermined by ore maps included with the game files. They dictate exactly where all the ores will be on each planet. All you could do to the PlanetGeneratorDefinitions.sbc of this mod is replace a vanilla ore with a modded ore. If that's what you're after, then just change the OreMappings/Ore->Type field of one of the vanilla ores to a modded ore.

Asteroid ore spawns are different - they are actually randomly generated in game. You can change those freely.
ApexAlphaGaming 17 Feb, 2020 @ 3:57pm 
Alright that software was super easy and straightforward BUT how do I go about altering the density of ores on asteroids? I don't quite understand the settings in "VoxelMaterials_asteroids.sbc"
ApexAlphaGaming 17 Feb, 2020 @ 4:38pm 
Also, the modded ore I'm trying to add is already part of another mod, but I keep getting an error though:

"Object reference not set to an instance of an object.
Sandbox.Game
at Sandbox.Definitions.MyDefinitionManager.LoadDefinitions(List`1 contexts, List`1 definitionSets, Boolean failOnDebug, Boolean isPreload)"

One for all 6 phases of loading.

I can only imagine it is in reference to the modded ore I added into the config, but I even tried adding the "Textures" folder from the mod containing said ore into this mod folder but I don't believe that is where the "definitions" are kept for ores added to the game.
Lemmiwinks  [developer] 26 Feb, 2020 @ 3:14am 
If you remove the references to the modded ores from VoxelMaterials_asteroids.sbc, do you still get the errors?

I haven't dabbled into asteroid ore spawning much myself. You might have better luck asking a mod author who has workshop items relating to it.
ApexAlphaGaming 26 Feb, 2020 @ 3:59pm 
It's actually pretty funny the issue was related to the naming of the file by consequence. The file I was using wasn't named VoxelMaterials_asteroids.sbc, it was some VoxelMaterials_Custom or something and I never thought the system cared about the name of the file but I guess it made a difference and it was finding duplicates. It makes total sense now but it was really getting to me then lol. It's funny how perfectly it works now, almost by accident, I had set all the values based on guesswork from the Planet Modding Guide on Steam and they spawn in asteroids in the exact amount I just have to test the planets next.
Lemmiwinks  [developer] 28 Feb, 2020 @ 6:30pm 
Cool beans, glad it's working now
ApexAlphaGaming 28 Feb, 2020 @ 10:08pm 
So just for future inquirers that happen to have the same issue - here is a checklist of what to watch out for when adding your own custom ores and using the Procedural Generator:

1) Ensure you keep the filename as VoxelMaterials_asteroids, when it comes to where you keep ore and texture info for ores, (NOT non-ore voxels, unless you want things like grass and mountain stone to spawn on asteroids). It seems to be fine when named as anything you want if you are not using the Procedural Generator, but there seems to be some issue where the vanilla file and the modded file are clashing, so best to keep the name the same.

2) (IMPORTANT) At the top of each .sbc file, you should see: "<?xml version="1.0" encoding="utf-8"?>", if not, add anything here that is missing there. There doesn't seem to be a pattern as to which files can load fine without the "encoding="utf-8", so just ensure each file you edit/add has it, adding it does not cause any issues/crashes as far as I've tested.

3) Ensure that all texture filenames and file locations are accurate in: "VoxelMaterials_asteroids.sbc, VoxelMaterials-planetary.sbc, and PlanetGeneratorDefinitions.sbc, one small character off and the game will decide to either set it to "null" or outright crash.

4) Most everything else that you need to know can be found here: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=566387835
It may look pretty outdated but not much has or really can change about planet and ore generation in the base game, it's hardcoded in, so this shouldn't ever become outdated.

Thanks again Lemmiwinks for the awesome mod, ores spawn much more naturally/realistically and this mod makes custom ore spawning so much easier than having to mess with each image file individually and make alterations on each RGBA channel.
Last edited by ApexAlphaGaming; 28 Feb, 2020 @ 10:10pm
< >
Showing 1-7 of 7 comments
Per page: 1530 50