thorwin99 / SEWorldGenPlugin

A world generation plugin for space engineers
36 stars 8 forks source link

Feature request #9

Closed Death666Machine closed 5 years ago

Death666Machine commented 5 years ago

Would it be possible to add a whitelist/blacklist to planets that the plugin generates, and maybe a toggle for only planets or only roids

thorwin99 commented 5 years ago

You can toggle between only planets or roids by setting the probability of asteroid belts to 0 or 1. If you dont even want asteroids around planets, you have to set the porbability of asteroid rings to zero. If you request, that you want to be able to toggle between vanilla and plugin asteroid generation, i can put that in, that is not that difficult.

A whitelist or blacklist for planets is more difficult. I thought about it, however i would need to know, which planets are loaded with the world, when you set them in the settings menu, which would not be possible, at least i think it is not. I could, however, implement a blacklist for manual configuration in the global config file, see the wiki for more info. That way you could set planets, that aren't allowed to be generated by the plugin, and when you tick the useGlobal box in the world settings, it will only use them along with the global settings. Another way would be to make an extra configuration file, where you list them and could add them, and then decide to use that list on world generation in the settings menu. That would be independent of the global configuration file. But i dont know, if that would be the feature requested.

HeadWord commented 5 years ago

This just gave me a great idea and a question at the same time.

The question is - Can we use this to generate rings around specific coordinates on a world that already has a planet? Like instead of there being a chance etc. We can specify the coordinates of a planet center and specify the start and end coordinates for the ring diameter and direction?

The world does not currently have asteroids spawning enabled so theres nothing to track other than the 1 planet.

This sounds like an odd request but Death and i are working on the same group of servers which are now linked together using server jump gates and using this plugin to specify planet, belt, and roid fields would be a GREAT help to the way we are trying to build our universe.

thorwin99 commented 5 years ago

So, theoretically you can do that. If you have the planet, you can edit the systemData.xml file and add a new

`

PLANET
  <DisplayName>Name of planet</DisplayName>
  <DefName>Definitionname</DefName>
  <Size>size in metres</Size>
  <CenterPosition x="0" y="0" z="0" />
  <OffsetPosition x="0" y="0" z="0" />
  <Generated>true</Generated>
  <PlanetMoons />

`

for planets and a new

`

BELT
  <DisplayName>Belt name</DisplayName>
  <Radius>Radius in metres</Radius>
  <Width>width</Width>
  <Height>height</Height>
  <RoidSize>size of asteroids</RoidSize>

`

for belts. To add a ring around a planet, you need to add a planet to the xml, just type some stuff into the fields, the name is only relevant for gps and the center position is the center. everything else doesnt need data, if the planet is already present. Just set generated to true. If generated is false, it will generate the planet with set parameters. Now, add a new

`

RING
    <DisplayName />
    <Radius>radius around center</Radius>
    <Width>width in metres</Width>
    <Height>height in metres</Height>
    <AngleDegrees>angle</AngleDegrees>
    <RoidSize>size of roids</RoidSize>
    <Center x="0" y="0" z="0" />

`

to the planet item in the xml, where the center is the center of the planet. A planet can only have one ring and the ring will be generated in small section, when a player enters that section. If you are unsure, how it should look right, just view into another systemdata.xml generated by the plugin.

Death666Machine commented 5 years ago

I think either method for blacklisting would work pretty well, I do lean more towards the global cfg as all one would really need to know to blacklist would be the planet definition typeid, so I dont see much need for an additional cfg. As for disabling planet generation or asteroid generation, I was thinking like headword explained where planets are already pre placed and the only thing desired would be the asteroids belts and rings or in the other case, asteroids are manually placed and/or vanilla asteroid generation, and planet generation was the only thing desired. Either way I'm throughly enjoying this plugin, cant wait to see what you come up with next =D

thorwin99 commented 5 years ago

Ok, i will add a blacklist option to the global config, but it wont be available ingame. I will add another toggle, to enable or disable vanilla asteroid generation, so you can keep both, only vanilla or only plugin asteroid generation. I dont know, how easy i could get it to work, to add new rings to preplaced planets, as i cant just put a menu in, like the f10 menu, since i cant sync custom data with the server, at least i dont yet know how. To only generate belts, you can just set their probability to 1.

I will work things out, and see what works and what doesnt. At some point it would actually be easier to just implement the stuff into the game, than trying to fit it in :D

Death666Machine commented 5 years ago

Awesome, yeah you are probably right either way thanks for the consideration =D

HeadWord commented 5 years ago

So folder structure wise i have the following:

/Torchserver/Instance/SEWorldGenPlugin.dll /Torchserver/Instance/Storage/SEWorldGenPlugin.xml /Torchserver/Instance/Saves/World/Storage/SEWorldGenPlugin/AsteroidGeneratorData.xml /Torchserver/Instance/Saves/World/Storage/SEWorldGenPlugin/GlobalGpsData.xml /Torchserver/Instance/Saves/World/Storage/SEWorldGenPlugin/worldSettings.xml

But for the life of my i cannot find a file that is called systemData.xml

thorwin99 commented 5 years ago

Is the plugin enabled in the worldSettings.xml? If not, ther shouldnt be one. I think i will change it to enable it by default on dedicated servers.

HeadWord commented 5 years ago

Checking

HeadWord commented 5 years ago

oof, it wasnt, it is now, now i see the file.. <idiot

thorwin99 commented 5 years ago

I started implementing the requested features and i am close to finishing it. It would actually be finished, but i encountered an issue today, that needs a large workaround, so that players without the plugin installed still can join the server, without requiring it. If i get that working, mopst of the requested stuff will be working on servers.

thorwin99 commented 5 years ago

@HeadWord @Death666Machine I just published a new release with the requested features and some fixes. I hope they are correctly implemented and user friendly, if not i am open to improvements. It requires however, to create a new world, otherwise it might cause troubles with the systemData.xml. The patchnotes are on the release page.

Death666Machine commented 5 years ago

Thanks for the update throwin =D looks great