Space Engineers

Space Engineers

Procedurally Generated Ore
Lemmiwinks  [developer] 13 Feb, 2019 @ 7:47pm
Procedural Ore Generator release
I added some extra functionality and polish to the procedural ore generator tool I used to create this mod. It is now available on github here[github.com]. The readme.md file explains how to use it and the configuration options. You can view the readme online with pretty formatting here[github.com]. If you do create a steam workshop item using this tool, can you please paste a like to it in this thread so I can keep track of how it's being used/what to focus on. Thanks!

If you have any issues/questions then post in this thread or create an issue on the github page.
Last edited by Lemmiwinks; 27 Apr, 2021 @ 5:50am
< >
Showing 1-15 of 143 comments
hi, first of all, thanks for the mod, i always use it.

Now, i want to make some changes in the ore spawn settings, because i use a lot of npc mods, and i constally lose stuff in fights, and some of the ore veins are really small to my liking.

i just know the basic of how this mod works, and ill like a litle bit of help, since i cant get the procedural tool to work.

so far i only get to the point where i get a sbc file [PlanetGeneratorDefinitions.sbc] by launching the Procedural_Ore_Generator.jar, the bat file does´t do anything.

This is the config.json file. Note that i havent change anyting yet, i what it to work first, and then do some changes in the config.


{
"planetDataPath": "D:\\Steam\\steamapps\\common\\SpaceEngineers\\Content\\Data\\PlanetDataFiles",
"planetGeneratorDefinitionsPath": "D:\\Steam\\steamapps\\common\\SpaceEngineers\\Content\\Data\\PlanetGeneratorDefinitions.sbc",
"makeColouredMaps": true,
"surfaceHintMaps": true,
"shape": 1,
"density": 0.9,
"oreTemplates": [
{
"id": 1,
"type": "Iron_02",
"surfaceArea": 200,
"startDepth": 12,
"depth": 6,
"testColourHex": "E00000"
},
{
"id": 24,
"type": "Nickel_01",
"surfaceArea": 80,
"startDepth": 16,
"depth": 6,
"testColourHex": "FF9741"
},
{
"id": 48,
"type": "Silicon_01",
"surfaceArea": 80,
"startDepth": 18,
"depth": 6,
"testColourHex": "FFFFFF"
},
{
"id": 72,
"type": "Cobalt_01",
"surfaceArea": 80,
"startDepth": 30,
"depth": 6,
"testColourHex": "0033FF"
},
{
"id": 96,
"type": "Silver_01",
"surfaceArea": 15,
"startDepth": 40,
"depth": 5,
"testColourHex": "A0A0A0"
},
{
"id": 120,
"type": "Magnesium_01",
"surfaceArea": 60,
"startDepth": 32,
"depth": 6,
"testColourHex": "958CFF"
},
{
"id": 168,
"type": "Gold_01",
"surfaceArea": 5,
"startDepth": 55,
"depth": 4,
"testColourHex": "FFD800"
},
{
"id": 144,
"type": "Uraninite_01",
"surfaceArea": 7,
"density": 0.7,
"startDepth": 70,
"depth": 4,
"surfaceHintProbability": 0.2,
"testColourHex": "00FF00"
},
{
"id": 192,
"type": "Platinum_01",
"surfaceArea": 10,
"density": 0.6,
"startDepth": 120,
"depth": 4,
"surfaceHintProbability": 0.2,
"testColourHex": "5D188E"
}
],
"planets": [
{
"name": "EarthLike",
"seed": 1,
"surfaceHintColour": 144,
"ores": [
{
"id": 1,
"p": 0.4
},
{
"id": 24,
"p": 0.2
},
{
"id": 48,
"p": 0.2
},
{
"id": 72,
"p": 0.4
},
{
"id": 96,
"p": 0.02
},
{
"id": 120,
"p": 0.15
},
{
"id": 168
},
{
"id": 144,
"p": 0.008
},
{
"id": 192
}
]
},
{
"name": "Moon",
"seed": 2,
"surfaceHintColour": 176,
"ores": [
{
"id": 1,
"p": 0.1
},
{
"id": 24,
"p": 0.05
},
{
"id": 48,
"p": 0.3
},
{
"id": 72
},
{
"id": 96,
"p": 0.4,
"planetFaces": ["BACK"]
},
{
"id": 120,
"p": 0.05
},
{
"id": 168,
"p": 0.2,
"planetFaces": ["FRONT"]
},
{
"id": 144
},
{
"id": 192,
"p": 0.005
}
]
},
{
"name": "Mars",
"seed": 3,
"ores": [
{
"id": 1,
"p": 0.5,
"surfaceArea": 300
},
{
"id": 24,
"p": 0.05,
"surfaceArea": 10
},
{
"id": 48,
"p": 0.05,
"surfaceArea": 10
},
{
"id": 72,
"p": 0.005,
"surfaceArea": 10
},
{
"id": 96
},
{
"id": 120,
"p": 0.1
},
{
"id": 168
},
{
"id": 144
},
{
"id": 192,
"p": 0.6,
"surfaceArea": 25
}
]
},
{
"name": "Europa",
"seed": 4,
"ores": [
{
"id": 1,
"p": 0.1
},
{
"id": 24,
"p": 0.05
},
{
"id": 48,
"p": 0.05
},
{
"id": 72
},
{
"id": 96,
"p": 0.2
},
{
"id": 120,
"p": 0.6
},
{
"id": 168,
"p": 0.2
},
{
"id": 144,
"p": 0.01
},
{
"id": 192
}
]
},
{
"name": "Alien",
"seed": 5,
"surfaceHintColour": 160,
"maxOreTiles": 50000,
"ores": [
{
"id": 1
},
{
"id": 24
},
{
"id": 48
},
{
"id": 72
},
{
"id": 96
},
{
"id": 120
},
{
"id": 168,
"p": 0.4
},
{
"id": 144,
"p": 1.0,
"surfaceArea": 25
},
{
"id": 192
}
]
},
{
"name": "Titan",
"seed": 6,
"ores": [
{
"id": 1,
"p": 0.2
},
{
"id": 24,
"p": 0.7
},
{
"id": 48,
"p": 0.2
},
{
"id": 72
},
{
"id": 96,
"p": 0.2
},
{
"id": 120
},
{
"id": 168
},
{
"id": 144,
"p": 0.1,
"surfaceArea": 5
},
{
"id": 192,
"p": 0.3
}
]
}
]
}
Last edited by Un patron desalineado; 5 Oct, 2019 @ 12:48pm
Lemmiwinks  [developer] 5 Oct, 2019 @ 3:26pm 
Hi MatBlader,

I'm glad you get some use out of the mod :)

Can you please run the program with run.bat again then paste the contents of the file "generator.log" here. This should show any error messages from running the generator.

The only changes you've made are the paths so it probably doesn't like something about them.
Lemmiwinks  [developer] 5 Oct, 2019 @ 3:29pm 
Oh, when you say the .bat file doesn't do anything, do you mean it closes instantly or it runs to completion but produces no output files?
no outpot files, and closes instantly.
if i lauch the procedural ore generator.jar its only give me the sbc file

this is the log i get when runing the .jar file

16:23:31.094 [main] INFO Main - Attempting to load config.json
16:23:31.125 [main] INFO XMLConfigUpdater - Attempting to update PlanetGeneratorDefinitions file..
16:23:31.219 [main] INFO XMLConfigUpdater - Updated PlanetGeneratorDefinitions file
16:23:31.220 [main] INFO Main - Processing planet "EarthLike"
16:23:31.220 [main] INFO Main - Loading map data from: D:\Steam\steamapps\common\SpaceEngineers\Content\Data\PlanetDataFiles\EarthLike
16:41:51.671 [main] INFO Main - Attempting to load config.json
16:41:51.701 [main] INFO XMLConfigUpdater - Attempting to update PlanetGeneratorDefinitions file..
16:41:51.803 [main] INFO XMLConfigUpdater - Updated PlanetGeneratorDefinitions file
16:41:51.803 [main] INFO Main - Processing planet "EarthLike"
16:41:51.803 [main] INFO Main - Loading map data from: D:\Steam\steamapps\common\SpaceEngineers\Content\Data\PlanetDataFiles\EarthLike
Last edited by Un patron desalineado; 5 Oct, 2019 @ 3:55pm
any clue on what can be?
Lemmiwinks  [developer] 12 Nov, 2019 @ 2:29am 
Sorry, I've been away from my development machine for a while. I can't see anything wrong with your config file, assuming the paths are correct.

I've released a new version of the generator with better error logging:
https://github.com/asrbic/Procedural_Ore_Generator/releases/tag/0.13

If you try this new version it should give me a better idea of what's going wrong in the log file.
hi, np, but know im not really interested on SE for the moment.
i try it, and same result, i only get the sbc file if i open the .jar file
the .bat file doesn´t work

Log:
20:50:34.086 [main] INFO XMLConfigUpdater - Attempting to update PlanetGeneratorDefinitions file..
20:50:34.297 [main] INFO XMLConfigUpdater - Updated PlanetGeneratorDefinitions file
20:50:34.297 [main] INFO Main - Processing planet "EarthLike"
20:50:34.297 [main] INFO Main - Loading map data from: D:\Steam\steamapps\common\SpaceEngineers\Content\Data\PlanetDataFiles\EarthLike

welp, i think that triying to move SC to it own default directory might work, not sure, but now im not interested on moving it to be honest.

thank you for aswering, i gueest in another time ill try again.



Last edited by Un patron desalineado; 12 Nov, 2019 @ 4:09pm
Rysten 15 Nov, 2019 @ 10:48pm 
@lemmiwinks, I created a system made up of mod based planets, how would I alter to the filepaths for planet creation?
Lemmiwinks  [developer] 18 Nov, 2019 @ 1:28pm 
@MatBlader
No worries.
That's strange behaviour. Give me a yell if you try again.
Lemmiwinks  [developer] 19 Nov, 2019 @ 2:13am 
@Rysten
It depends on the directory structure of your modded planets. Basically you need to change the "planetDataPath" and "planetGeneratorDefinitionsPath" in the config.json to point to the PlanetDataFiles directory and PlanetGeneratorDefinitions.sbc file respectively of each mod which adds/changes planets.

So if all of your new modded planets are in one mod then you'd only need to run it once. If they're all in separate mods then you'd need to run it once for each mod, with a different config.json each time.

Presumably these modded planets have custom names. For starters, I'd just remove every planet from the config.json except the one named EarthLike. Then change the "name" field of EarthLike to one of your modded planets. Now run the run.bat. If running the program appears to have worked then try copy-pasting that config and changing it's name to another modded planet. That way you can see any individual planets which might give you issues. It will probably be case sensitive.

From there check: https://github.com/asrbic/Procedural_Ore_Generator/blob/master/readme.md for further info on what you can change in the config.
Rysten 19 Nov, 2019 @ 11:44am 
@Lemmiwinks, Thank you I will look at that.
Hi, this is what I get whenever I try to run the .bat file:

"Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap"

Any clue what might be causing this?
Last edited by Bacon Cheeseburger; 14 Dec, 2019 @ 8:32am
Lemmiwinks  [developer] 14 Dec, 2019 @ 1:16pm 
@Bacon Cheeseburger
How much free RAM does your computer have? The program is trying to use 2gb of RAM because the image processing takes a silly amount of memory.

You could try this:

1. right click on run.bat
2. select edit
3. change "-Xmx2g" to "-Xmx1g"
4. save and close
5. run run.bat again

This will halve the memory allocated to the program. I'll probably run slower but will hopefully not fall over.

@Lemmiwinks
My computer has 16gb of total RAM and only using about 35% of it when I ran the file.
I tried halving the allocated memory, but I got a new error message:

"19:05:58.988 [main] ERROR GlobalConfig - Failed to load config file: com.google.gson.stream.MalformedJsonException: Unterminated object at line 119 column 7 path $.planets[0].ores[6].id"

EDIT: This is what I have at line 119:
"p": 0.05
Last edited by Bacon Cheeseburger; 14 Dec, 2019 @ 4:15pm
< >
Showing 1-15 of 143 comments
Per page: 1530 50