Smaller diameter for suns and planets

Please post here for questions and discussion about data, event, art and sound modding and the game editor for Distant Worlds.

Moderator: MOD_DW2

User avatar
rxnnxs
Posts: 501
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Smaller diameter for suns and planets

Post by rxnnxs »

I just did a quick and dirty change to the size of the stellar objects.

Maybe you check if you get a crash. I did not, others did. But not with this version. I changed some data inconsistencies (min-size was bigger than max-size for asteroids).
smallerObjects.jpg
smallerObjects.jpg (86.16 KiB) Viewed 1730 times
P.S.: Take the version from 26.08.2022. That is much better!
Attachments
OrbTypes.7z
(9.8 KiB) Downloaded 23 times
Last edited by rxnnxs on Sat Mar 04, 2023 12:36 pm, edited 2 times in total.
User avatar
rxnnxs
Posts: 501
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Smaller Radii for Suns and Planets

Post by rxnnxs »

sorry, I have to work on this.
there is more to it than i found out. the outer orbits, when zooming in, are not visible when close to it.
orbits for suns have to be smaller, orbits for planets have to be bigger.
maybe tonight i upload a much better version.
User avatar
rxnnxs
Posts: 501
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Smaller Radii for Suns and Planets

Post by rxnnxs »

Ok, now here is a version that works!
What is not possible (right now, with my knowledge or limited by the game),
is, that the orbit of moons is increased. They are to big in size and too close to the planet they belong to.
It can not changed, because if I change the orbit of a planet, it changes its behaviour related to the sun AND to the planet.
Because there are no moons.
All are described as a child to the sun.

the range goes from 0 to 1. if you set a distance to 0.5, it is in the middle of the outmost orbit and directly in the sun.
now the range for the moons is taken from exactly the same ratio.

and on the other hand, if I set a diameter to lets say 650, in the game, they still have some other proportions.
I do not know how they are calculated.

and another thing is that the moons are much too big in relation to the planets.

i would love to change that. maybe a future version supports more variables.

up to there, here is the newest file for you to use.
see the attachement
Attachments
OrbTypes_goodScale.7z
(9.9 KiB) Downloaded 17 times
mordachai
Posts: 684
Joined: Fri Mar 06, 2015 4:55 pm

Re: Smaller Radii for Suns and Planets

Post by mordachai »

I'm interested in this. Might add it to my mod (see mods subforum). Will check it out soon :)
User avatar
rxnnxs
Posts: 501
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Smaller Radii for Suns and Planets

Post by rxnnxs »

Sure, you are welcome!
User avatar
Thineboot
Posts: 523
Joined: Mon Mar 21, 2022 2:19 pm
Location: Earth

Re: Smaller Radii for Suns and Planets

Post by Thineboot »

Since it started with moon-packing and a few pn's I'm glad you've started a MOD thread dedicated to Orbs :)

I did some tests today with Einstein-universe values for star diameters (1/200) and no Super Giants as they are just too big (5-20x Red Giants).
max zoomed out
max zoomed out
image_2022-08-24_211623546.png (3.88 MiB) Viewed 1678 times
These packed together red giants can be easily separated when zooming in.



I've also tried to add a "star" to a "star", namely a Red Giant to a Black Hole, which isn't uncommon.
Black Hole with Red Giant - ugh, planets have to go
Black Hole with Red Giant - ugh, planets have to go
image_2022-08-24_213423316.png (2.46 MiB) Viewed 1678 times
While Black Holes have a single child in this case, a single Red Giant, it's up to 8 children were somehow interpreted as children of the Black Hole, it ended up with 7, 1-5 and 7 are planets, while the No 6, the Red Giant, ended up with 7 moons of it's won. See orb sizes at the bottom. To see the orbits you'll have to zoom in.
Obviously that's not who it should work. But by copying stars (OrbType) without own children (ChildTypes) we should be able to create Block Holes with stars in orbit, binary neutron stars (also common), aso.


As of now inner planets can end up near or even within Red Giants, which should be solvable by tuning OrbitalDistanceFromSunRatioMinimum (probably).
When done carefully, at least Races.xml refers to OrbTypeId, we could copy Orbs and adjust distances aso for specific stars.

Binary star systems are possible, too. An invisible barycenter and handcrafted two innermost planets being stars (without own planets).


Next test will be adjusting planet sizes, than moon distances, and finally all the hulls have to fit, too. Giant stations around tiny planets would contradict the whole effort ;)
User avatar
rxnnxs
Posts: 501
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Smaller Radii for Suns and Planets

Post by rxnnxs »

Correct and well done, you are experimenting.

So I conclude and also have the following in mind:

To have better moon ortbits, we have to have planets that have children which are only children. those children have a larger orbit than one (1).

Code: Select all

  <OrbitalDistanceFromSunRatioMinimum>1</OrbitalDistanceFromSunRatioMinimum>
    <OrbitalDistanceFromSunRatioMaximum>4</OrbitalDistanceFromSunRatioMaximum>
They themself are not allowed to have children, because their orbit would be too big for a sun orbit, which has to be max 1.

by using those OrbTypeIDs for the children or not in other cases, we could get what we want.

Edit:
I tried, but the game crashes.
I can not add a new OrbTypeID and start a game... :-(
User avatar
rxnnxs
Posts: 501
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Smaller Radii for Suns and Planets

Post by rxnnxs »

For today, I am very happy with this version.
The proportions are much better, the red giants are huge, but the proportions for the rest fit better now.
Some planets are only moons now. If you do not find some, use the planet finder at the bottom :-)

Have fun!
Attachments
OrbTypes26082022.7z
(235.18 KiB) Downloaded 9 times
User avatar
rxnnxs
Posts: 501
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Smaller Radii for Suns and Planets

Post by rxnnxs »

Thineboot wrote: Wed Aug 24, 2022 8:36 pm Since it started with moon-packing and a few pn's I'm glad you've started a MOD thread dedicated to Orbs :)

I did some tests today with Einstein-universe values for star diameters (1/200) and no Super Giants as they are just too big (5-20x Red Giants).
image_2022-08-24_211623546.png

These packed together red giants can be easily separated when zooming in.



I've also tried to add a "star" to a "star", namely a Red Giant to a Black Hole, which isn't uncommon.

image_2022-08-24_213423316.png

While Black Holes have a single child in this case, a single Red Giant, it's up to 8 children were somehow interpreted as children of the Black Hole, it ended up with 7, 1-5 and 7 are planets, while the No 6, the Red Giant, ended up with 7 moons of it's won. See orb sizes at the bottom. To see the orbits you'll have to zoom in.
Obviously that's not who it should work. But by copying stars (OrbType) without own children (ChildTypes) we should be able to create Block Holes with stars in orbit, binary neutron stars (also common), aso.


As of now inner planets can end up near or even within Red Giants, which should be solvable by tuning OrbitalDistanceFromSunRatioMinimum (probably).
When done carefully, at least Races.xml refers to OrbTypeId, we could copy Orbs and adjust distances aso for specific stars.

Binary star systems are possible, too. An invisible barycenter and handcrafted two innermost planets being stars (without own planets).


Next test will be adjusting planet sizes, than moon distances, and finally all the hulls have to fit, too. Giant stations around tiny planets would contradict the whole effort ;)
So, finally I answer your post :-)

Yes, you are right with everything, as I have also found out and written above.
I started about with the same tests, and yes, red giants are too big to fit into the small galaxy..

As said, the orbits for suns and planets are the same, but if a planet is a moon, that value 0.00x to 0.0x is to small.
therefore I took some planets only for moon usage and others only for planets usage.

So, the factor for "moons" in a Main sequence star is 0.00001
<OrbTypeFactor>
<OrbTypeId>13</OrbTypeId>
<Factor>0.00001</Factor>
</OrbTypeFactor>
<OrbTypeFactor>
Or Type ID says it is a Rocky Silicon (planet or moon).

At the place where the Type 13 Rocky Silicon (Planet) is described
he gets a Diameter that fits for a moon, and the orbit is close to 1. Therefore he will be in an outmost orbit, especially neeed for gas planets, which are the biggest.
<OrbitalDistanceFromSunRatioMinimum>0.802</OrbitalDistanceFromSunRatioMinimum>
<OrbitalDistanceFromSunRatioMaximum>0.9544</OrbitalDistanceFromSunRatioMaximum>
<DiameterMinimum>40</DiameterMinimum>
<DiameterMaximum>65</DiameterMaximum>

Here the sheet to know what is what:

Code: Select all

7 continental -P
8 swamp -P
9 ocean -P
10 sandy desert -P
11 ice -P
12 volcanic -P
13 rocky silicon -M
14 gas giant ---
15 frozen gas giant
16 rocky asteroid
17 forest -P
18 grasslands -P
19 rocky desert -M
20 desert savanna -M
21 ice tundra -M
22 frozen ice -P
23 deep ocean -P
24 brown dwarf -P
25 rocky metallic -M
26 rocky ice -M
27 mangrove -P
28 star blue giant
29 carbonaceous -M
30 sulphur volcanic -P
31 ice asteroid
32 metallic asteroid
Now I wrote P for those that are in my orbittype.xml planets and an M for moons.

Those "Moon" Planets get then a great orbit and a small diameter (a 10th trom a planet),
the Planets have a bigger diameter and a fitting orbit for star orbit.
So vulcans are close, ice are outside, continental and such are in the middle, kind of.

So that is where I am right now.

The problem I had, was, that the game crashes when I go with the orbit size over 1, MOST of the time, not always.
Also, the game generates planets that are bigger than the orbit types allows, so I do not know where that is set.
It would also be helpful to know where the distances for the suns is set.

Like you said above
When done carefully, at least Races.xml refers to OrbTypeId, we could copy Orbs and adjust distances aso for specific stars.
there is a reference to the OrbTypeID of the Planets, but the rest is hidden und unrechable for us.
The game gives that OrbType than a Diameter of 5000 but my continental is only 500 in size.
And then, it is places as a moon close to a gas planet, that is in my orbType then the same size.
That is the problem right now.

So, here my approx sizes comparisons:

Code: Select all

Sun 1 392 500 km
Jupiter 143 000 km
Earth 12 742
Moon 3474
Asteroid 240 - 1000

Distance Sun Earth 149 600 000km

For the game it is about
Red Giant 80000-120000 (out of memory, and this is still too big (I downsize actually the Sizes of the planets to have a better distance to size ratio). There are way bigger stars, but lets not talk about this here)
Sun 13 000
Gas 1 300
Planets 120
Moons 30
Asteroid 2 - 10
And with that size, the distance is about the correct scale.
So if the sun is on the screen 1mm in Diameter, the Planets like earth should have a distance of 100 to 140mm
User avatar
rxnnxs
Posts: 501
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Smaller Radii for Suns and Planets

Post by rxnnxs »

To get the most out of it, the best setting ingalaxy generation seems to be 1000 Stars, and then galaxy size 10x10 Sectors.
All other settings get not that big galaxy for that low amount of stars.
User avatar
rxnnxs
Posts: 501
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Smaller Radii for Suns and Planets

Post by rxnnxs »

Now, I did change the star sizes and also changed the orbits for the moons greater than 1, therefore we get moons that have a nice orbit (greater distance than before).
There is a probability that those moons appear as planets around a star and are than very far, faar outside of the sun.
They are not visible (that is one of the problems when going greater than 1 with orbit from sun.

Code: Select all

<OrbitalDistanceFromSunRatioMinimum>3</OrbitalDistanceFromSunRatioMinimum>
<OrbitalDistanceFromSunRatioMaximum>7</OrbitalDistanceFromSunRatioMaximum>
But lets see it positive: they are so far away, the light might not reach them, the mining stations still can be built, and this way we have moons that are in a better fitting orbit.
Attachments
OrbTypes_OrbsGreater1.7z
(235.12 KiB) Downloaded 12 times
User avatar
rxnnxs
Posts: 501
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Smaller Radii for Suns and Planets

Post by rxnnxs »

No more "moons" in sun orbit.

Now everything works out, except the too big starting colonies and the buildings that are placed inside the planets and moons.

the lower diameter is now a factor concerning the income and population limit. so.. there is just ONE homeworld that big. Those starting colonies, all other are 1/10th from it in size..
I do not know how this game turns out playwise.
But this will be the first game in DW2, I play from start to end..
Attachments
OrbTypes27082022_NoMoonsInSunOrbit.7z
(235.17 KiB) Downloaded 15 times
User avatar
Thineboot
Posts: 523
Joined: Mon Mar 21, 2022 2:19 pm
Location: Earth

Re: Smaller Radii for Suns and Planets

Post by Thineboot »

Here are some numbers:

Human on Continental Planet, Quality 100%

Code: Select all

Quality	Diam.	Amount	Start	A/D	A/D/PI	S/A
100%	4000	10054		2.5135	0.8001	0.00
100%	4282	11521	12097	2.6906	0.8564	1.05
100%	4500	12724		2.8276	0.9000	0.00
100%	5000	15708		3.1416	1.0000	0.00
100%	5620	19846	20837	3.5313	1.1241	1.05
100%	6000	22620		3.7700	1.2000	0.00
Amount is the integer at which population changes to MAX.
Start is amount at game start with old galaxy. These numbers overshoot by exactly 5% while Humans have a growth rate of 2.1%.
Note the small sample!
Note that when Quality drops the numbers change significantly, especially S/A rises much higher with one sample of 78% showing starting population at x1.33 instead of only x1.05 for 100%. But I'm running out of time now, I'll try to come back later and continue testing. For now you have some base lines.

Growth rate isn't linked to quality. Tested with 100%, 57%, 50% and below and 6000 diameter: 2570 has 6.7%; 2571 has 3.7%; below 50% the shown values change to 6.6% and 3.6% respectively - another rounding.

As you can see, max. amount is a function of diameter and pi:
Max. amount = diameter² / 5000 * π
Which makes sense since the surface area of a sphere is A = 4r²π and d = 2r
Since the max population of colonies is calculated by the game based on their diameter, changing their diameter is a no go at this moment.


Side note: Max Population, regardless of Diameter/Quality/Race in Game Editor is 30,000.
User avatar
rxnnxs
Posts: 501
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Smaller Radii for Suns and Planets

Post by rxnnxs »

yes, you are right.
and this is not the only problem.. the suitability of the planets are always, as it looks like now to me, alsways too low.

and a population under 1M (0M) and some K, lets the game calculate wrong results. it calculates with "NaN".
I am trying to fix this by removing moons from the types that races can colonize..
User avatar
rxnnxs
Posts: 501
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Smaller Radii for Suns and Planets

Post by rxnnxs »

Now I managed to circumvent that mali for lower pop. there are other mali that are not accessible.

but right now there are other probs:
the small size of the planets and moons let freighter and colonizers miss their target.
freighters try to get or send their cargo but fail.
colonizers warp away to another planet or system when colonizing, warping back and trying it again and again.

just for you to see what happens, feel free to check this both files.
Attachments
MoonsNplanets.7z
(380.4 KiB) Downloaded 13 times
User avatar
rxnnxs
Posts: 501
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Smaller Radii for Suns and Planets

Post by rxnnxs »

Now this new orbit.xml does only change the moons size, as well as above said:
only the moons are around planets, except the starting planets, and moons are not generated for the suns.

so the planets and stars are unchanged in size.
but the orbit of the moons is much greater.
better than this is not possible right now.
the statiosn are in a correct orbit, I hope colonization works. I do not know if other races have a problem.. maybe some have now only moons to expand to.
I want to play, so now i play :-)
Attachments
OrbTypesVar228082022.7z
(235.37 KiB) Downloaded 13 times
mordachai
Posts: 684
Joined: Fri Mar 06, 2015 4:55 pm

Re: Smaller Radii for Suns and Planets

Post by mordachai »

rxnnxs wrote: Sun Aug 28, 2022 11:59 am Now this new orbit.xml does only change the moons size, as well as above said:
only the moons are around planets, except the starting planets, and moons are not generated for the suns.

so the planets and stars are unchanged in size.
but the orbit of the moons is much greater.
better than this is not possible right now.
the stations are in a correct orbit, I hope colonization works. I do not know if other races have a problem.. maybe some have now only moons to expand to.
I want to play, so now i play :-)
Heh - know the feeling! Seems like a reasonable compromise for now. I hope to playtest this myself soon - but I've got a decent game in progress! :D
User avatar
rxnnxs
Posts: 501
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Smaller Radii for Suns and Planets

Post by rxnnxs »

good to know. It looks like we are not that much here - not much ppl around here that love such games and do something and write about it :-)
as a side question:
your avatar.. reminds me of my favorite race - the ants with their unbeatable strong ships from sword of the stars. am i right?

P.S.: small update to the orbit.xml.
the blue giant had a moon that was not supposed to appear in that orbit.
OrbTypesVar228082022.7z
(11.04 KiB) Downloaded 15 times
User avatar
frankycl
Posts: 401
Joined: Mon Mar 01, 2021 5:16 pm

Re: Smaller Radii for Suns and Planets

Post by frankycl »

Sorry, just had to answer, in order to update this damn forum program (because otherwise the thread is always marked as "unread", independent of how often I read the posts. :roll: )

Just keep on the good work. ;)
User avatar
rxnnxs
Posts: 501
Joined: Sat Jun 01, 2013 10:25 am
Location: what goes on
Contact:

Re: Smaller Radii for Suns and Planets

Post by rxnnxs »

Now I have found a way to make the universe a bit better in my eyes.
There are stellar objects possible up to a number of 50.
If there is any one interested in this, please tell me and I will upload the orbital.xml.

So the trick was to increase the orbit for those stellar objects that are supposed to be a moon, and keep those that are supposed to be a planet.
I therefore edited the objects for the suns to only use those objects that I want as planets.
The planets get only objects that are a moon. And there the radius is much bigger than those for the stellar objects, i.e. a Planet goes from 0 to 1 regarding orbit wise, and moons get 1 to 5 or so.
Also, moons are about 300 to 800 in size, planets stay as they are.
That was needed because otherwise the planets, when smaller, are not able to be self-sustainable.

Reason to do this the recategorizing into planets and moons: The orbit range is written in the object itself, not in the child-row where it would really fit better into.

Then I wanted to decrease the amount of objects most stars have, and gas planets should also only have moons, but more than normal. Therefore maybe the game pace is slower but the cpu demand is lower.

I can go into detail but I know there is not much happening here in the forum.

So who is interested in the data and who in the how to?

Cheers!
Post Reply

Return to “Design and Modding”