Author Topic: CO System Generation  (Read 14128 times)

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
CO System Generation
« on: 16 October 2017, 08:54:51 »
So have been working on the CO system generation rules translating them into code in VB.NET to then fill out an Xml with random data for the planets that we currently do not have any data for.  But, with the stock rules of mass x orbital slot AU there are some stars(even the V ones) where you will never get a planet inside the habitable zone.  So, have been trying out different formulas and wondering if anyone would mind taking a crack at it with me.  The formula I have in there now for slots 1-15 make it where the first three inner planets are in the habitable zone but, I dont really like it and would be better if was more random some how with how many planets are in the zone for each system.

Sir Chaos

  • Captain
  • *
  • Posts: 3089
  • Artillery Fanboy
Re: CO System Generation
« Reply #1 on: 16 October 2017, 10:15:12 »
IAU and OAU are the innere and outer edge of the habitable zone?

I am not familiar with the CO system generation, but I´ve been tinkering with system generation rules for Traveller for a long time, and some of that might be of interest to you.

I don´t immediately calculate orbital radii linearly; instead, I use a logarithmic scale, where Orbit 0 is 1 AU for a star with a luminosity of 1 sol. Ten orbits in either direction is double/half the radius - i.e. if Orbit 0 is 1.0 AU, Orbit -10 is .5 AU and Orbit 10 is 2.0 AU.
This way, I don´t have to take luminosity into account immediately; I simply populate the system, and THEN worry about which orbital radius each orbit corresponds to; for example with a luminosity of 0.25 sol, Orbit 0 is 0.5 AU instead of 1.0, and all other distances are recalculated accordingly.
On this scale, "distances" of 3, 4, 5, 7, 8 or 9 orbits between two planets are a very close fit to common orbital resonance between planets.

To populate the system, I start at Orbit -40, which seems to be where the Rock Line is, the point inside which solid planets cannot form; I roll (4d6*5)-40 to determine the extent of the planetary system; so for example if the 4d6 roll is 15, the planetary system extends to orbit (15*5)-40 = 35. This means the outer edge of the planetary system is somewhere between Orbit -20 and Orbit 100 (i.e. between 0.25 AU and 1024 AU for a star like our sun), most commonly around Orbit 40.
So, beginning at Orbit -40, I roll 1d6 repeatedly to populate orbits:
1 - 3 orbits
2 - 4 orbits
3 - 5 orbits
4 - 7 orbits
5 - 8 orbits
6 - 9 orbits
For example, if the first 1d6 roll is a 4, the innermost planet is 7 orbits from the inner limit of Orbit -40, i.e. at Orbit -33. If the next 1d6 roll is a 2, the second-innermost planet is then 4 orbits from the innermost planet, i.e. at Orbit -29.
I just keep rolling and rolling and rolling, until I´ve reached the outer edge of the planetary system. If as above the system extends to Orbit 35 and I make a roll that would place a planet at Orbit 36 or beyond, that´s the cut-off point.

So that´s the extent of the system. Depending on how optimistic you want to be, the Habitable Zone probably extends about from Orbit -5 to Orbit 5 (i.e. 0.7 AU to 1.4 AU for our sun). Any planet beyond Orbit 20 is a gas giant; if there is at least one gas giant, the two planets directly in from the closest gas giants are no planets, but the inner and outer edge, respectively, of an asteroid belt.

That´s the short version of the relevant part, at least. I don´t know if any of it is useful for you.
"Artillery adds dignity to what would otherwise be a vulgar brawl."
-Frederick the Great

"Ultima Ratio Regis" ("The Last Resort of the King")
- Inscription on cannon barrel, 18th century

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #2 on: 16 October 2017, 11:40:27 »
Well in Campaign Operations they have an orbital placement system modeled off Terra with 15 slots.  Slot 1 is 0.4AU(Mercury) from the sun X the suns mass, 2 is 0.7AU(Venus), 3 is 1.0(Earth, etc.  And only for main sequence "V" stars.  And in HQ and in the BT lore some canon planets are around other than V stars and it makes my code go into an infinite loop since there are no rules for that.  Had to make them.

Quote
    public static final String LUM_IA          = "Ia"; x100,000
    public static final String LUM_IB          = "Ib"; x10,000
    public static final String LUM_II          = "II"; x1,000
    public static final String LUM_III         = "III"; x100
    public static final String LUM_IV          = "IV"; x10
    public static final String LUM_V           = "V"; x1
    public static final String LUM_VI          = "VI"; x0.1
    public static final String LUM_VII         = "VII"; x0.01

So decided to use those multipliers for the other star types and then recalculate the life zone edges based off: T4=L⊙(1−a)16πd2ơ (https://astronomy.stackexchange.com/questions/10113/how-to-calculate-the-expected-surface-temperature-of-a-planet) setting the outer average planet temp limit at 273 kelvin and inner to 308 kelvin to come up with the life zone AU's.

Mainly just trying to figure out how to come up with the AU distance for each slot in a system in a way that makes sense but isnt the same each time which probably wont be possible.  Right now I just use the formula sqrt(Luminosity)/Illumination value for each orbit getting darker the further away you are.  Using CO's  Illum = (Luminosity) ÷ AU^2 formula.  I dont really know just throwing this out there if anyone wants to play with it.

NeonKnight

  • Freelance Writer
  • Major
  • *
  • Posts: 6349
  • Cause Them My Initials!
Re: CO System Generation
« Reply #3 on: 16 October 2017, 12:10:04 »
Well...this is all well and good for systems similar to earth, but not very well to replicate systems like Trappist 1, an M8V star: where the entire system is located in less than 1 AU:



I really like the CO system builder, myself trying to build an excel spreadsheet to help me make the calculations on the quick more than a random generator.

Can't recall if CO has anything to help change the Base Orbital Placement table (page 102, CO)

Be interesting to see where this discussion leads to.
AGENT #575, Vancouver Canada

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #4 on: 16 October 2017, 12:22:30 »
Yeah because my end goal is to have the code (will be inserting the excel sheet as a DataTable) generate all this planetary stuff for the BT planets that are empty on data and have the planet in the habitable zone I guess my formula where the first 3 inner planets might work since its just going to roll until it gets a valid orbit inside that zone.  But I still want to stick close to the canon rules if I can.

Sir Chaos

  • Captain
  • *
  • Posts: 3089
  • Artillery Fanboy
Re: CO System Generation
« Reply #5 on: 16 October 2017, 12:34:54 »
Well in Campaign Operations they have an orbital placement system modeled off Terra with 15 slots.  Slot 1 is 0.4AU(Mercury) from the sun X the suns mass, 2 is 0.7AU(Venus), 3 is 1.0(Earth, etc.  And only for main sequence "V" stars.  And in HQ and in the BT lore some canon planets are around other than V stars and it makes my code go into an infinite loop since there are no rules for that.  Had to make them.

So decided to use those multipliers for the other star types and then recalculate the life zone edges based off: T4=L⊙(1−a)16πd2ơ (https://astronomy.stackexchange.com/questions/10113/how-to-calculate-the-expected-surface-temperature-of-a-planet) setting the outer average planet temp limit at 273 kelvin and inner to 308 kelvin to come up with the life zone AU's.

Mainly just trying to figure out how to come up with the AU distance for each slot in a system in a way that makes sense but isnt the same each time which probably wont be possible.  Right now I just use the formula sqrt(Luminosity)/Illumination value for each orbit getting darker the further away you are.  Using CO's  Illum = (Luminosity) ÷ AU^2 formula.  I dont really know just throwing this out there if anyone wants to play with it.

The problem with fixed intervals between slots is that there are no fixed orbital intervals; the Titius-Bode Law assumed there was, but it has been disproven for some time now. As I understand it, orbits are at their most stable if planets move in some sort of orbital resonance to each other: 2:1, 5:2, 4:3 etc etc etc; due to Kepler´s laws of planetary motion, each orbital resonance corresponds to a certain ratio of orbital radii - for example in a 4:3 resonance, the orbital radius of the outer planet will be 1.21 times that of the inner planet.

What I do with my system of Orbits and the roll for the interval between two neighboring planets is to randomly determine which orbital resonance there is between these two planets, then place them a corresponding distance apart.
"Artillery adds dignity to what would otherwise be a vulgar brawl."
-Frederick the Great

"Ultima Ratio Regis" ("The Last Resort of the King")
- Inscription on cannon barrel, 18th century

Sir Chaos

  • Captain
  • *
  • Posts: 3089
  • Artillery Fanboy
Re: CO System Generation
« Reply #6 on: 16 October 2017, 12:51:04 »
What you tell me about Illumination seems to be the concept of Black Body Temperature (BBT) - the temperature a body would have, through solar radiation, if it absorbed all radiation it received but produced no heat of its own.

I think you´ll find that, if you ignore spectral class as such and go strictly by luminosity, you´ll have much less of a problem determining orbital radii. The maximum energy a planet receives from its star while still forming as a solid planet (instead of melting/evaporating) is always the same. It is always a certain multiple (I put it at 256 times as much) of the energy a planet at the center of the habitable zone receives - and according to the law of inverse squares, this means that the minimum orbital radius around a star at which a solid planet can form is always a certain fraction (in my case, 1/16) of the radius at the center of the Habitable Zone, no matter what the Luminosity is in absolute terms or which spectral class the star has.

Thus, once you have the location of the Habitable Zone around a star, you automatically also have the innermost possible orbit for a planet. What you would need to do for your code to handle this is check some stellar date to figure out how much more luminous the average IV star, for example, is compared to the average V star.

An example from data I have lying around here:
41 Arae is a G8V star, luminosity 0.42
Delta Pavonis is a G8IV star, luminosity 1.22
Groombridge 1830 is a G8VI star, luminosity 0.21

So giving VI star half the luminosity of V stars could be a good starting point, and three times the luminosity for IV stars.

FWIW, the Snow Line, the distance beyond which gas giants can form, obey the same rules as the Rock Line - it´ll always be somewhere around four times the orbital radius of the center of the Habitable Zone, no matter what the star´s luminosity is.
"Artillery adds dignity to what would otherwise be a vulgar brawl."
-Frederick the Great

"Ultima Ratio Regis" ("The Last Resort of the King")
- Inscription on cannon barrel, 18th century

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #7 on: 16 October 2017, 14:00:44 »
Yeah the illumination thing I used the 4πR2ơT4=πR2L⊙(1−a)(4πd2) formula with (1-a) a being albedo with as (1-0.29) but thats with no greenhouse effect.  So instead just set one of the planets to mass and luminosity of 1 and adjusted a until it gave me Earth's actual average temp in Kelvin at 1AU and came up with x (1.125) instead of (1-a).  Assuming every planet listed in BT canon is habitable with an atmosphere.  Explain the orbital resonance thing more, I looked it up on wikipedia but thats information overload on there.  What resonances can I have/would make sense for slot #1 to #15 (thinks 9 would be a more realistic limit)

Sir Chaos

  • Captain
  • *
  • Posts: 3089
  • Artillery Fanboy
Re: CO System Generation
« Reply #8 on: 16 October 2017, 14:54:12 »
Explain the orbital resonance thing more, I looked it up on wikipedia but thats information overload on there.  What resonances can I have/would make sense for slot #1 to #15 (thinks 9 would be a more realistic limit)

I´m no astronomer myself, so please take the following with a grain of salt:

The central star isn´t the only thing in a star system that exerts gravity; the planets also exert gravity on each other, especially the more massive ones. Over time - and we´re speaking of billions of orbital periods for inner-system planets - even the small gravitational influence two Earth-sized planets exert from each other over interplanetary distances adds up to destabilize planetary orbits. Meaning that if the orbits are unstable, planets collide, are flung out into interstellar place, or don´t even form to begin with.

For some reason that I don´t quite understand, orbits are more stable and gravitational influences of two planets on each other are not as problematic if the orbital periods of the two planets relative to each other are at certain ratios. Those are usually pretty small numbers, such as 4:3, 2:1, 5:2 etc - e.g. 4:3 means that for every four orbits of the inner planet, the outer planet completes three orbits.

Kepler´s Third Law of Planetary Motion states that the square of the orbital period of a planet is always proportional to the cube of the semi-major axis. If orbits were perfectly circular, the semi-major axis would be the orbital radius, so it´s good enough for laymen to use it as that.
That means that, if two planets have a 4:3 orbital resonance, meaning the outer planet has 4/3 times the orbital period of the inner planet, Kepler´s Third Law tells us how much greater its orbital radius must be: The cube root of the square of the resonance ratio (4/3) - about 1.21 times, in this case.

You can use this to determine the placement of planets in a newly generated system:
Start by placing the innermost planet (Planet 1) whereever you think it makes sense for the innermost planet to be.
Then, determine what the orbital resonance between Planet 1 and Planet 2 should be. Place Planet 2 as far out from Planet 1 as Kepler´s Third Law dictates it should be for its orbital period - e.g. 1.21 times Planet 1´s orbital radius if the two have a 4:3 orbital resonance.
Now, determine what the orbital resonance between Planet 2 and Planet 3 should be, and place Planet 3 accordingly.
Keep placing planets until you are as far out from the star as you want to be, or have as many planets as you want to have, or whatever other criterion you choose.

The fun thing is, orbital resonance doesn´t just work between adjacent planets; more distant planets also attract one another, and also move in some sort of resonance. For example, if Planet 1 and Planet 2 are in a 3:2 resonance to each other, and Planet 2 and Planet 3 are in a 5:3 resonance to each other, Planet 1 and Planet 3 are also in a 5:2 resonance.

(note that real-world data isn´t an exact match for this; Venus and Earth, for example, are only in an *almost* perfect 8:5 resonance; nature is never tidy and simple)

Common orbital resonances, and the corresponding ratios of orbital radii, are:
4:3 (1.21)
3:2 (1.31)
8:5 (1.37)
5:3 (1.41)
7:4 (1.45)
9:5 (1.48)
2:1 (1.59)
7:3 (1.76)
5:2 (1.84)
3:1 (2.08)

What this could mean for the slot system is that distances between slots aren´t necessarily fixed. Instead of having the slots at 0.4, 0.7, 1.0 etc AU, you could roll dice to determine orbital resonance between the planets in adjacent slots and calculate the ratio of their orbital radii from that. Say roll 1d10, with a result of 1 indicating 4:3 resonance, a 2 indicating 3:2 resonance, and so on, up to 10 indicating 3:1 resonance. Do that separately for every system generated, and you´ll have the added benefit that intervals between planets aren´t the same everywhere any more.
"Artillery adds dignity to what would otherwise be a vulgar brawl."
-Frederick the Great

"Ultima Ratio Regis" ("The Last Resort of the King")
- Inscription on cannon barrel, 18th century

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #9 on: 16 October 2017, 15:08:21 »
Ah ok, yeah i sometimes need the math broken down barney-style for me xD Im just an automotive technician trying to learn code to get a real job so, Im not astronomer either.  I like that but, I also need each system to always have at least one position/slot that is habitable for when I run the code on all these BT planets that have no data in them.  So Im going to have to figure out how to incorporate orbital resonance "and" get at least one slot in the life zone so the code doesnt infinitely loop when there are no possible combinations. 

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #10 on: 16 October 2017, 15:12:09 »
*Note I am not actually filling out an entire system with this program just need to determine the system position of just the battletech planet that doesnt have any data already defined for it.  But am trying to make it future proof for if they ever recode HQ to handle systems instead of just planets, then will be able to generate a full system like normal.  I know i could just roll 1-15 for the system position but, pft thats too easy, no.

cray

  • Freelance Writer
  • Major
  • *
  • Posts: 6273
  • How's it sit? Pretty cunning, don't you think?
Re: CO System Generation
« Reply #11 on: 16 October 2017, 15:21:53 »
The problem with fixed intervals between slots is that there are no fixed orbital intervals; the Titius-Bode Law assumed there was, but it has been disproven for some time now.

It was disproven before I wrote the rules, which is why p. 102 puts in a disclaimer about Titius-Bode. ;) Using Titius-Bode was just a convenience for quickly placing planets in a way that could scale between little M dwarfs and big B-class stars while minimizing word count.

Can't recall if CO has anything to help change the Base Orbital Placement table (page 102, CO)

Yes, it does, on p. 98, first two paragraphs of Solar System Generation: "The following charts and rules provide gamemasters (GMs) with guidelines for producing detailed star systems, planets, and even inhabited worlds. They are not meant as firm rules, but simply guidelines for GMs and players who do not feel like creating systems purely from their own imagination." and "In particular, the provided dice rolling methods tend to produce star systems lacking habitable planets, so players should feel free to override the dice rolls if they want a habitable planet or specific star system layout."

Further, there's p. 118's Realistic Planetary Placement" options, which includes dumping the Titius-Bode Law. "The default spacing of orbital slots in these rules is based on a system that only addresses some of Sol’s brood and does not work at smaller scales or in other observed star systems (at least, not yet) ... Players with a lot of time on their hands are welcome to try to model likely spacings of gas giants, terrestrial planets, and other objects in a system."

In other words, you can make the systems however you want. The Game Police will not be sent to your house if you ignore the Titius-Bode relationship for planetary spacing. ;)
Mike Miller, Materials Engineer

**"A man walks down the street in that hat, people know he's not afraid of anything." --Wash, Firefly.
**"Well, the first class name [for pocket WarShips]: 'Ship with delusions of grandeur that is going to evaporate 3.1 seconds after coming into NPPC range' tended to cause morale problems...." --Korzon77
**"Describe the Clans." "Imagine an entire civilization built out of 80’s Ric Flairs, Hulk Hogans, & Macho Man Randy Savages ruling over an entire labor force with Einstein Level Intelligence." --Jake Mikolaitis


Disclaimer: Anything stated in this post is unofficial and non-canon unless directly quoted from a published book. Random internet musings of a BattleTech writer are not canon.

Sir Chaos

  • Captain
  • *
  • Posts: 3089
  • Artillery Fanboy
Re: CO System Generation
« Reply #12 on: 16 October 2017, 15:46:45 »
Ah ok, yeah i sometimes need the math broken down barney-style for me xD Im just an automotive technician trying to learn code to get a real job so, Im not astronomer either.  I like that but, I also need each system to always have at least one position/slot that is habitable for when I run the code on all these BT planets that have no data in them.  So Im going to have to figure out how to incorporate orbital resonance "and" get at least one slot in the life zone so the code doesnt infinitely loop when there are no possible combinations.

You can do that if you make the life zone big enough that whatever method you use to determine orbital resonance cannot completely "skip" it.

Say for example you have a star with a life zone from 1.0 AU to 2.0 AU. If you have a planet placed at 0.98 AU, and randomly determine that it has a 3:1 resonance with the next planet, that´d place that next planet at 2.04 AU - so both planets would be outside the life zone.

So either you make the life zone big enough to accomodate all orbital resonances, meaning the outer limit is *at least* 2.08 times the inner limit. Or you do not use any orbital resonances that result in a larger gap between planets than the span of the life zone - in the case of the life zone from 1.0 AU to 2.0 AU, any with a orbital radius ratio above 2.0, in other words you exclude the 3:1 resonance.
"Artillery adds dignity to what would otherwise be a vulgar brawl."
-Frederick the Great

"Ultima Ratio Regis" ("The Last Resort of the King")
- Inscription on cannon barrel, 18th century

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #13 on: 16 October 2017, 15:56:20 »
Now just need to find some kind of chart or something showing the differences between all the difference luminosity classes (Ia - VII).

worktroll

  • Ombudsman
  • Lieutenant General
  • *
  • Posts: 25637
  • 504th "Gateway" Division
    • There are Monsters in my Sky!
Re: CO System Generation
« Reply #14 on: 16 October 2017, 16:29:26 »
Some thoughts:

1) We don't have a workable model, yet, which properly explains our own solar system, although the 'bumper cars' model (requiring an additional one or two ice giants which get summarily ejected along the way) is popular at the moment. (I think it smells of Veliskovsky's "Worlds in Motion" myself  ::) ) But a sample set of one is not enough to prove anything yet.

(And we don't have good sample sets outside Sol yet; we only can detect the freakshows, at the moment.)

2) Habitable zone ain't black-body temp at distance, otherwise we'd be experiencing Lunar-style surface extremes. Presence of an atmosphere can minimise the extremes, and raises overall average temps by some tens of degrees at the equator. Heck, Mars could be warmed up with a thick enough gas blanket.

So ... as the Master (Cray) says, "make the systems how you want."
* No, FASA wasn't big on errata - ColBosch
* The Housebook series is from the 80's and is the foundation of Btech, the 80's heart wrapped in heavy metal that beats to this day - Sigma
* To sum it up: FASAnomics: By Cthulhu, for Cthulhu - Moonsword
* Because Battletech is a conspiracy by Habsburg & Bourbon pretenders - MadCapellan
* The Hellbringer is cool, either way. It's not cool because it's bad, it's cool because it's bad with balls - Nightsky
* It was a glorious time for people who felt that we didn't have enough Marauder variants - HABeas2, re "Empires Aflame"

Sir Chaos

  • Captain
  • *
  • Posts: 3089
  • Artillery Fanboy
Re: CO System Generation
« Reply #15 on: 16 October 2017, 16:46:01 »
Now just need to find some kind of chart or something showing the differences between all the difference luminosity classes (Ia - VII).

The closest I can give you to that chart is the Hertzsprung-Russell-diagram, which maps luminosity on one axis and spectral class on the other.  Here´s a pretty clean version of it: https://en.wikipedia.org/wiki/File:HR-diag-no-text-2.svg

Luminosity doesn´t seem to scale with spectral class for giants the way it does for dwarf stars. Sub-wwarfs (class VI) seem to have about half the luminosity of a normal dwarf star of the same spectral class, but others, luminosity depends more on size class than on spectral class.

Look at the Hertzsprung-Russell diagram; sub-giants and sub-dwarfs are more or less parallel to the main sequence stars (class V). But the others lie along a more or less horizontal line for each class. So for classes Ia to III, you could probably get away with giving all stars of a class the same luminosity.
You could for example check out the stars given as examples for classes Ia to III, and use that data as typical for their size class: https://en.wikipedia.org/wiki/Stellar_classification#Yerkes_spectral_classification

As for class VII, white dwarfs - as far as I understand it, they don´t use the regular spectral classes, like G4VII or something, but are classified as spectral class D. From the data I have available, I figure you can give a white dwarf roughly the luminosity of a class M star of the same subclass - i.e. a D9 white dwarf would be as luminous as a M9V star.

Okay, it´s getting late here. I´ll be back tomorrow.
"Artillery adds dignity to what would otherwise be a vulgar brawl."
-Frederick the Great

"Ultima Ratio Regis" ("The Last Resort of the King")
- Inscription on cannon barrel, 18th century

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #16 on: 16 October 2017, 17:04:31 »
https://upload.wikimedia.org/wikipedia/commons/6/6b/HRDiagram.png
Yeah thats^ the chart I used to come up with the x100,000 - x 0.001 multipliers to the main sequence stars mass and luminosity, obviously thats wrong for mass though. 

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #17 on: 16 October 2017, 17:27:52 »
Star   Mass   Temperature   Luminosity
M9Ia   5.598   2400.000   415.00000
M9Ib   2.899   2400.000   41.50000
M9II   1.502   2400.000   4.15000
M9III   0.778   2400.000   0.41500
M9IV   0.403   2400.000   0.04150
M9V   0.209   2400.000   0.00415
M9VI   0.108   2400.000   0.00042
M9VII   0.056   2400.000   0.00004
That make more sense?  L = M^3.5 so took the L^(1/3.5) = M.
Not sure if I even need to worry about mass for figuring out orbits.

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #18 on: 16 October 2017, 23:46:46 »
Did the orbital thing, sorta.  Just had it pick a random integer between 1 - 10 / another random 1 - 10.  Wasnt able to find a list of 15+ stable resonances so just did it that way.  But the very first slot I had to force in the life zone, the code will infinite loop otherwise, i cant have a system with no viable planet when it goes to fill out the data for a planet with nothing in it.

Quote
   <planet>
      <name>Abagnar</name>
      <xcood>380.231</xcood>
      <ycood>314.823</ycood>
      <faction>UND</faction>
      <factionChange>
         <date>2750-01-01</date>
         <faction>DC</faction>
      </factionChange>
   </planet>
Like that^ planet for example I plan to have the program generate all the missing stuff from these rules or modified rules since it needs to be habitable.

Sir Chaos

  • Captain
  • *
  • Posts: 3089
  • Artillery Fanboy
Re: CO System Generation
« Reply #19 on: 17 October 2017, 03:27:27 »
https://upload.wikimedia.org/wikipedia/commons/6/6b/HRDiagram.png
Yeah thats^ the chart I used to come up with the x100,000 - x 0.001 multipliers to the main sequence stars mass and luminosity, obviously thats wrong for mass though.

I think for classes Ia through III you are probably better off using flat values - say 50,000 for Ia, 10,000 for Ib, 2,500 for II and 250 for III, since as the chart shows, luminosity doesn´t scale with spectral type like it does for classes IV, V and VI.

Mass, though... as I understand it, giants aren´t necessarily more massive than dwarf stars of the same spectral type. They are simply a later stage in the life cycle of such stars. Stars that are exhausting their hydrogen supplies and about to begin fusing heavier elements will bloat and become much more luminous. And, obviously, a star does not suddenly drastically change its mass when that happens.
And since giant stars are former dwarf stars, I would generate orbits as if the star was a class V dwarf star - because that´s what it used to be when the planetary system formed - and then remove all planets that are too close to the now much more luminous giant star to remain solid.
"Artillery adds dignity to what would otherwise be a vulgar brawl."
-Frederick the Great

"Ultima Ratio Regis" ("The Last Resort of the King")
- Inscription on cannon barrel, 18th century

Sir Chaos

  • Captain
  • *
  • Posts: 3089
  • Artillery Fanboy
Re: CO System Generation
« Reply #20 on: 17 October 2017, 03:31:14 »
Did the orbital thing, sorta.  Just had it pick a random integer between 1 - 10 / another random 1 - 10.  Wasnt able to find a list of 15+ stable resonances so just did it that way.  But the very first slot I had to force in the life zone, the code will infinite loop otherwise, i cant have a system with no viable planet when it goes to fill out the data for a planet with nothing in it.
Like that^ planet for example I plan to have the program generate all the missing stuff from these rules or modified rules since it needs to be habitable.

You could try yet another approach: Since you want every system to have a planet in the habitable zone, you could start out by placing a planet somewhere in the habitable zone at random, roll 1d6 to determine which slot that planet is in, then use the orbital resonances to place whatever other planets you want inside and outside that planet´s orbit.
"Artillery adds dignity to what would otherwise be a vulgar brawl."
-Frederick the Great

"Ultima Ratio Regis" ("The Last Resort of the King")
- Inscription on cannon barrel, 18th century

Sir Chaos

  • Captain
  • *
  • Posts: 3089
  • Artillery Fanboy
Re: CO System Generation
« Reply #21 on: 17 October 2017, 04:00:52 »
There´s another consideration to keep in mind, which BattleTech doesn´t really do to my knowledge: Habitability is kind of a delicate flower.

You see, the Habitable Zone should really be called the "Liquid Water Zone", in that it´s the distance where planets can have liquid surface water, which we consider a prerequisite for life. But for a planet to actually become habitable, a few more things need to happen.

Mainly, we need oxygen. Oxygen as a molecule is very eager to react with anything and everything (such as oxidising iron, which we call "rust"), so it kind of depletes over, astronomically speaking, very short timespans. The only way to have lots of oxygen is to have lots of oxygen-producing biomass. That doesn´t necessarily mean plant life; oxygen production on Earth originally began with cyanobacteria.

That, however, is a problem. It takes time - LOTS of time. Apparently it took about a billion years on Earth from the moment the planet formed to the point where cyanobacteria had a measureable effect on atmospheric composition; it took 4 billion years or so for life to spread onto dry land.
Why is that a problem? Because a lot of stars don´t live that long. The more massive a star, the faster it uses up its hydrogen; our sun is 5-ish billion years old and will remain in dwarf star the business for maybe another five billion years before turning into a giant star, whereas the most massive O-type and B-type stars live maybe 10 million years in total. This alone rules all O-, B- and A-type stars, possibly some of the hotter F-type stars as well; fortunately, all those make up only maybe 2-3% of all stars.
You won´t find habitable planets around giants, either. Once they started bloating, any planet in what used to be their Liquid Water Zone was either fried, or outright swallowed by the expanding star; the giant phase won´t last long enough for those planets that are in their new Liquid Water Zone to get very far in spawning life, either. Likewise, white dwarfs (class VII) are what is left of stars that are done with being giants; they´re much less luminous than they used to be even when they were regular dwarf stars, but all you will find in their current Liquid Water Zone is thoroughly sterilized airless rock balls.
The jury is still of whether life can develop on planets around M-type stars; their Liquid Water Zone is so close to the stars that a planet there would most likely be tide-locked, meaning it has the same side facing the star constantly, much like our moon does to Earth. Since that would mean one side of the planet is constantly scorched by sunlight, while the other is perpetually cold and dark, I´m sure you can see that this would be problematic. There are apparently some models indicating that certain circumstances might allow for life to form, such as if a dense atmosphere helps carry heat from the day side to the night side, but I haven´t seen anything on how likely such circumstances would be - never mind that the dense atmosphere would be wracked by unimaginably massive storms from the temperature differentials on that world. That would rule out most or all of the M-type stars, which is kind of a problem because those make up about 75% of all stars out there.

So, if you want to go with the science, restrict habitable planets to F-, G- and K-type stars of class V, *possibly* classes IV and VI, plus some or all M-type stars. As far as I can tell, BattleTech didn´t do that with the canonical planets, so it´s really up to you. If it was me, I would restrict other kinds of stars to systems that canonically do not have habitable worlds, such as Star´s End.
"Artillery adds dignity to what would otherwise be a vulgar brawl."
-Frederick the Great

"Ultima Ratio Regis" ("The Last Resort of the King")
- Inscription on cannon barrel, 18th century

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #22 on: 17 October 2017, 08:43:10 »
I think for classes Ia through III you are probably better off using flat values - say 50,000 for Ia, 10,000 for Ib, 2,500 for II and 250 for III, since as the chart shows, luminosity doesn´t scale with spectral type like it does for classes IV, V and VI.

Mass, though... as I understand it, giants aren´t necessarily more massive than dwarf stars of the same spectral type. They are simply a later stage in the life cycle of such stars. Stars that are exhausting their hydrogen supplies and about to begin fusing heavier elements will bloat and become much more luminous. And, obviously, a star does not suddenly drastically change its mass when that happens.
And since giant stars are former dwarf stars, I would generate orbits as if the star was a class V dwarf star - because that´s what it used to be when the planetary system formed - and then remove all planets that are too close to the now much more luminous giant star to remain solid.

I cannot easily do that in the code or on this spreadsheet, too complex. I dont know how to tell a computer to do that.

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #23 on: 17 October 2017, 09:01:51 »
Yes it says the same thing in CO that these giant stars dont live long enough to have life but regardless BT still put planets near class I and II stars so i had to make this sheet to figure stuff out for those planets.  Believe me I would have been more than happy to leave the rules as is and consider every star V class but, makes the code infinitely loop.  Ill go back in tonight and delete the class VII stars that are outside the temp range for white dwarfs and then for class VI sub dwarfs.  Hopefully there are no canon planets around a VI or VII star that doesnt make sense for those.

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #24 on: 17 October 2017, 09:08:20 »

Sir Chaos

  • Captain
  • *
  • Posts: 3089
  • Artillery Fanboy
Re: CO System Generation
« Reply #25 on: 17 October 2017, 09:46:13 »
I cannot easily do that in the code or on this spreadsheet, too complex. I dont know how to tell a computer to do that.

Unfortunately I know even less about code than you do; I haven´t written a line of code since 1995 or so, and I doubt you´re using Q-Basic anyway...

As for placing planets around giant stars, I agree completely; I think BT could do with a retcon that changes all giants and O/B/A stars with habitable planets around them to something scientifically plausible.
For canonical planets around such stars, I´d just sigh and roll my eyes and pretend there´s nothing wrong with it when generating the rest of the system; but if you randomly determine spectral type and class for stars where there is no canonical information, I´d limit the option of the random generation F/G/K/M class V stars.

Speaking of Betelgeuse - another slightly less obvious craziness is the distance to the jump point. This seems to be calculated in BT primarily from spectral type - M1 in this case, which pegs Betelgeuse as a fairly dim star. A flight time of 2.86 days at 1g implies that the jump point is maybe 1 AU or so from the planet.
The problem here is, if the jump point is above the star and the planet is in the liquid water zone (which should be roughly 300-400 AU away from Betelgeuse with its luminosity of 100,000-150,000 sol), the jump point should also be 300-400 AU away from the planet - with a transit time somewhere between 50 and 55 days. If the "height" of the jump point above the star scales with the luminosity of the star as well, then going by 10 AU for a G2V star (I think that was the value BT used) the jump point should be 3,000 to 4,000 AU - roughly 160-180 days of transit time at 1g.
Assuming the "height" of the jump point above the star depends on the mass of the star, I guess BT does a fair job accounting for that, but not accounting for the distance of the world from the star, which depends on luminosity. But then, a discrepancy between mass and luminosity happens mostly when you´re looking at giants, which for the most part shouldn´t have inhabited planets to begin with.



Either way, and completely independently of what I wrote above, I would like to thank you for rekindling my interest in this. I think I´m going to go back to tinkering with my rules again.
"Artillery adds dignity to what would otherwise be a vulgar brawl."
-Frederick the Great

"Ultima Ratio Regis" ("The Last Resort of the King")
- Inscription on cannon barrel, 18th century

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #26 on: 17 October 2017, 09:55:44 »
Yeah I seen how complicated the transit time rules were in CO and completely avoided that.  Specially for Ia supergiants omg that would prob be months if not years to the planet for a B0Ia star.  Didnt even want to go there.
For my B0Ia habitable zone is between 52,000 and 67,000 AU from the star and 1 LY = 63,241 AU so yeah.  Jump into system, charge, jump to planet lol.  I think they did it where safe jump distance ^2 + distance to planet ^2 and then square root, trig, to find the distance and then time for transit.   And thats more than i wanted to calculate on just this spreadsheet.
« Last Edit: 17 October 2017, 10:01:05 by BLOODWOLF »

Sir Chaos

  • Captain
  • *
  • Posts: 3089
  • Artillery Fanboy
Re: CO System Generation
« Reply #27 on: 17 October 2017, 10:09:11 »
Yeah I seen how complicated the transit time rules were in CO and completely avoided that.  Specially for Ia supergiants omg that would prob be months if not years to the planet for a B0Ia star.  Didnt even want to go there.

Actually I just looked up the readily available data, purely out of curiosity... the most massive star known (https://en.wikipedia.org/wiki/R136a1) is assumed to have around 315 solar masses, so if Sol´s jump point is 10.2 AU above Sol, this one´s should be 180-ish AU above the star (10.2 times the square root of 315). That same star has a luminosity of around 8.7 MILLION sol, so its liquid water zone should be around just short of 3,000 AU from the star - let´s say 3,000 AU from the planet to the jump point, which gives us a transit time at 1g of somewhere around 150 days.

Except, of course, dropships in BT tend to carry fuel and life support for what - 30 days?

One more reason why there shouldn´t be planets in giant star systems.
"Artillery adds dignity to what would otherwise be a vulgar brawl."
-Frederick the Great

"Ultima Ratio Regis" ("The Last Resort of the King")
- Inscription on cannon barrel, 18th century

Daryk

  • Lieutenant General
  • *
  • Posts: 37342
  • The Double Deuce II/II-σ
Re: CO System Generation
« Reply #28 on: 17 October 2017, 10:21:49 »
"Pirate" points are de rigeur for systems with stars that big.  I think it was even stated in canon somewhere (probably by Cray).

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #29 on: 17 October 2017, 11:03:20 »
And going off that chart I shared with the luminosity and temp i set those values for each star and then had it calculate the mass and radius from those values in the last spreadsheet I posted so, those should be close.
I think ill try to set the orbital resonance for the first planet off the stars radius AU and each consecutive planet after the 1st is already set to be a resonance value based off the previous planet in the new spreadsheet.
I might just have the code re-roll the star type and then orbital slot in the case it cant find a valid one, worried it will make the program hang if i do that though.

cray

  • Freelance Writer
  • Major
  • *
  • Posts: 6273
  • How's it sit? Pretty cunning, don't you think?
Re: CO System Generation
« Reply #30 on: 17 October 2017, 19:48:09 »
That, however, is a problem. It takes time - LOTS of time. Apparently it took about a billion years on Earth from the moment the planet formed to the point where cyanobacteria had a measureable effect on atmospheric composition; it took 4 billion years or so for life to spread onto dry land.

That's addressed in the habitability modifiers in the Primary Stats table and the optional rules at the end of the section.

Quote
whereas the most massive O-type and B-type stars live maybe 10 million years in total.

Hence the commentary in the "Hot, Hot, Hot" section.

Quote
So, if you want to go with the science, restrict habitable planets to F-, G- and K-type stars of class V, *possibly* classes IV and VI, plus some or all M-type stars.

Did the habitability modifiers and optional rules on those stars in CO address your concerns, or would you tweak them a bit?

As for placing planets around giant stars, I agree completely; I think BT could do with a retcon that changes all giants and O/B/A stars with habitable planets around them to something scientifically plausible.

There's a partial retcon underway. Most stars with non-main sequence stellar types get tweaked to -V when possible.
Mike Miller, Materials Engineer

**"A man walks down the street in that hat, people know he's not afraid of anything." --Wash, Firefly.
**"Well, the first class name [for pocket WarShips]: 'Ship with delusions of grandeur that is going to evaporate 3.1 seconds after coming into NPPC range' tended to cause morale problems...." --Korzon77
**"Describe the Clans." "Imagine an entire civilization built out of 80’s Ric Flairs, Hulk Hogans, & Macho Man Randy Savages ruling over an entire labor force with Einstein Level Intelligence." --Jake Mikolaitis


Disclaimer: Anything stated in this post is unofficial and non-canon unless directly quoted from a published book. Random internet musings of a BattleTech writer are not canon.

worktroll

  • Ombudsman
  • Lieutenant General
  • *
  • Posts: 25637
  • 504th "Gateway" Division
    • There are Monsters in my Sky!
Re: CO System Generation
« Reply #31 on: 17 October 2017, 20:56:44 »
The jury is still of whether life can develop on planets around M-type stars; their Liquid Water Zone is so close to the stars that a planet there would most likely be tide-locked, meaning it has the same side facing the star constantly, much like our moon does to Earth. Since that would mean one side of the planet is constantly scorched by sunlight, while the other is perpetually cold and dark, I´m sure you can see that this would be problematic. There are apparently some models indicating that certain circumstances might allow for life to form, such as if a dense atmosphere helps carry heat from the day side to the night side, but I haven´t seen anything on how likely such circumstances would be - never mind that the dense atmosphere would be wracked by unimaginably massive storms from the temperature differentials on that world. That would rule out most or all of the M-type stars, which is kind of a problem because those make up about 75% of all stars out there.

Leaning on the "jury likely to decide yes" side, myself. One-face worlds will certainly have less than ideal locations - sub-solar point, and the antipode, for example - but there's likely to be a considerable ring around the terminator with viable conditions.

Yes, there are dependancies - atmospheric density, and a funny little thing called "scale height", which relates to the surface gravity and how rapidly air density falls off with altitude, which also has a lot to do with atmospheric transmission of heat. The EBMs - Energy balance models - for climate I used to work with (30-40 years ago) would have been ideal for modelling this ...  :(

A larger problem is the tendency for red dwarves to be flare stars - major solar flares with enhanced UV. As close as a world would be, they would be ... dramatic.
* No, FASA wasn't big on errata - ColBosch
* The Housebook series is from the 80's and is the foundation of Btech, the 80's heart wrapped in heavy metal that beats to this day - Sigma
* To sum it up: FASAnomics: By Cthulhu, for Cthulhu - Moonsword
* Because Battletech is a conspiracy by Habsburg & Bourbon pretenders - MadCapellan
* The Hellbringer is cool, either way. It's not cool because it's bad, it's cool because it's bad with balls - Nightsky
* It was a glorious time for people who felt that we didn't have enough Marauder variants - HABeas2, re "Empires Aflame"

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #32 on: 17 October 2017, 23:54:31 »
Ok this spreadsheet is done.  1 - 15 slots, ten different stable orbital resonances that it rolls for each time with every slot (press F9 to recalculate sheet), correct/close mass, radius, temp, and luminosity values.  White dwarf stars never have a slot in the life zone (too small of an AU) *shrugs* I mean that would make sense would it not?  White dwarfs have already been through the main sequence, red giant and swallowed up any nearby planets, and now is a dwarf....that system is dead.



Removed the sub-giants and white dwarfs from the 480 stars where they dont show up on the chart to be more accurate.

NeonKnight

  • Freelance Writer
  • Major
  • *
  • Posts: 6349
  • Cause Them My Initials!
Re: CO System Generation
« Reply #33 on: 18 October 2017, 00:55:28 »
Ok this spreadsheet is done.  1 - 15 slots, ten different stable orbital resonances that it rolls for each time with every slot (press F9 to recalculate sheet), correct/close mass, radius, temp, and luminosity values.  White dwarf stars never have a slot in the life zone (too small of an AU) *shrugs* I mean that would make sense would it not?  White dwarfs have already been through the main sequence, red giant and swallowed up any nearby planets, and now is a dwarf....that system is dead.



Removed the sub-giants and white dwarfs from the 480 stars where they dont show up on the chart to be more accurate.

Awww....I like the idea of a white dwarf having a Life Zone :D

I play a lot of Elite Dangerous (they have a really good Stellar Forge in that game it seems), and one of my most WOW moments was finding a terrestial Water World in orbit of a White Dwarf:



and a nice shot of my Ship too in orbit of the water world with the White Dwarf the 'BRIGHT STAR' to the left.

I know it would be nice to know the math behind Frontier's Stellar forge engine, so good, it even 'predicted' the Trappist System:

http://mashable.com/2017/02/26/elite-dangerous-trappist-1-nasa-discovery/#yI6fXK39QaqQ
AGENT #575, Vancouver Canada

Sir Chaos

  • Captain
  • *
  • Posts: 3089
  • Artillery Fanboy
Re: CO System Generation
« Reply #34 on: 18 October 2017, 02:14:29 »
That's addressed in the habitability modifiers in the Primary Stats table and the optional rules at the end of the section.

Hence the commentary in the "Hot, Hot, Hot" section.

Did the habitability modifiers and optional rules on those stars in CO address your concerns, or would you tweak them a bit?

There's a partial retcon underway. Most stars with non-main sequence stellar types get tweaked to -V when possible.

I don´t have CO. I thought I had mentioned that previously? I have little doubt you did a stellar (pun intended) job there, but I can´t comment on what I never read.

I wholeheartedly agree with the retcon, though, FWIW.
"Artillery adds dignity to what would otherwise be a vulgar brawl."
-Frederick the Great

"Ultima Ratio Regis" ("The Last Resort of the King")
- Inscription on cannon barrel, 18th century

Frabby

  • Major
  • *
  • Posts: 4252
Re: CO System Generation
« Reply #35 on: 18 October 2017, 02:41:53 »
There's a partial retcon underway. Most stars with non-main sequence stellar types get tweaked to -V when possible.
BattleTech may have been ahead of its time. As far as I gathered, planets have by now been found in a lot of places previously thought unlikely; and the goldilocks zone around a star isn't an absolute requirement for habitability either. There are always ways to explain how life could exist in unlikely places under the right circumstances.
Sarna.net BattleTechWiki Admin
Author of the BattleCorps stories Feather vs. Mountain, Rise and Shine, Proprietary, Trial of Faith & scenario Twins

Sir Chaos

  • Captain
  • *
  • Posts: 3089
  • Artillery Fanboy
Re: CO System Generation
« Reply #36 on: 18 October 2017, 03:23:53 »
Awww....I like the idea of a white dwarf having a Life Zone :D

I play a lot of Elite Dangerous (they have a really good Stellar Forge in that game it seems), and one of my most WOW moments was finding a terrestial Water World in orbit of a White Dwarf:



and a nice shot of my Ship too in orbit of the water world with the White Dwarf the 'BRIGHT STAR' to the left.

I know it would be nice to know the math behind Frontier's Stellar forge engine, so good, it even 'predicted' the Trappist System:

http://mashable.com/2017/02/26/elite-dangerous-trappist-1-nasa-discovery/#yI6fXK39QaqQ

That could be a rogue planet captured after the star turned into a white dwarf - which would explain the high orbital eccentricity. It would also explain why the water and atmosphere (or even the planet itself) weren´t burned away during the star´s giant phase.
"Artillery adds dignity to what would otherwise be a vulgar brawl."
-Frederick the Great

"Ultima Ratio Regis" ("The Last Resort of the King")
- Inscription on cannon barrel, 18th century

NeonKnight

  • Freelance Writer
  • Major
  • *
  • Posts: 6349
  • Cause Them My Initials!
Re: CO System Generation
« Reply #37 on: 18 October 2017, 03:48:32 »
That could be a rogue planet captured after the star turned into a white dwarf - which would explain the high orbital eccentricity. It would also explain why the water and atmosphere (or even the planet itself) weren´t burned away during the star´s giant phase.

Yep, my thoughts too. Waaaaaaaaaaaaaaaaaaaaaaay to close to not have been burned away during the red Giant stage. But still, a fun find for me.

Just realised, the SHIP SHOT never made it :/

AGENT #575, Vancouver Canada

Daryk

  • Lieutenant General
  • *
  • Posts: 37342
  • The Double Deuce II/II-σ
Re: CO System Generation
« Reply #38 on: 18 October 2017, 05:06:15 »
If it's tidally locked, shouldn't it have two temperatures (day side/night side)?

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #39 on: 18 October 2017, 08:28:13 »
I might change the formulas to try and get a life zone in these <1 mass stars, just did Chaos' orbital resonance thing (always >1) * the previous planet's AU.  Could multiply it by the star's mass like how CO is done but will need to add each result to the previous instead so dont end up with 0.17 * 0.89 and get smaller and smaller AU for the slots.  And these Ia supergiants are only around 20 Masses now (which matches Wikipedia)  instead of 400+ like before.

NeonKnight

  • Freelance Writer
  • Major
  • *
  • Posts: 6349
  • Cause Them My Initials!
Re: CO System Generation
« Reply #40 on: 18 October 2017, 08:46:55 »
If it's tidally locked, shouldn't it have two temperatures (day side/night side)?

If you are referring to the ELITE DANGEROUS image, I think all their measurements are averages, so, Day TEMP & Night TEMP averaged.
AGENT #575, Vancouver Canada

Daryk

  • Lieutenant General
  • *
  • Posts: 37342
  • The Double Deuce II/II-σ
Re: CO System Generation
« Reply #41 on: 18 October 2017, 08:50:06 »
Yes, that's what I meant... an average in that case isn't particularly informative, unfortunately.

cray

  • Freelance Writer
  • Major
  • *
  • Posts: 6273
  • How's it sit? Pretty cunning, don't you think?
Re: CO System Generation
« Reply #42 on: 18 October 2017, 14:52:29 »
I don´t have CO. I thought I had mentioned that previously?

D'oh! Skimmed too fast, sorry.
Mike Miller, Materials Engineer

**"A man walks down the street in that hat, people know he's not afraid of anything." --Wash, Firefly.
**"Well, the first class name [for pocket WarShips]: 'Ship with delusions of grandeur that is going to evaporate 3.1 seconds after coming into NPPC range' tended to cause morale problems...." --Korzon77
**"Describe the Clans." "Imagine an entire civilization built out of 80’s Ric Flairs, Hulk Hogans, & Macho Man Randy Savages ruling over an entire labor force with Einstein Level Intelligence." --Jake Mikolaitis


Disclaimer: Anything stated in this post is unofficial and non-canon unless directly quoted from a published book. Random internet musings of a BattleTech writer are not canon.

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #43 on: 18 October 2017, 18:51:12 »
I still cant get subdwarfs (VI) or whitedwarfs(VII) to have slots in the habitable zone.  Looking through the planets.xml min temp of all the planets is -20C (Mannedorf) max is Dustball (71C) so i think the max should be 70C and Min....idk this should be limits on what is human colonizeble over what actually will support life I think.

worktroll

  • Ombudsman
  • Lieutenant General
  • *
  • Posts: 25637
  • 504th "Gateway" Division
    • There are Monsters in my Sky!
Re: CO System Generation
« Reply #44 on: 18 October 2017, 19:59:31 »
With domes, underground cities, and a lot of cash to splash, -20C and 70C are entirely livable. Which isn't quite the same thing as you're considering, I know.

If there's sufficient interest - eg minerals, or border post - the planet will be settled. See Halstead Station, with it's atmosphere of argon and cyanide compounds  :o !
* No, FASA wasn't big on errata - ColBosch
* The Housebook series is from the 80's and is the foundation of Btech, the 80's heart wrapped in heavy metal that beats to this day - Sigma
* To sum it up: FASAnomics: By Cthulhu, for Cthulhu - Moonsword
* Because Battletech is a conspiracy by Habsburg & Bourbon pretenders - MadCapellan
* The Hellbringer is cool, either way. It's not cool because it's bad, it's cool because it's bad with balls - Nightsky
* It was a glorious time for people who felt that we didn't have enough Marauder variants - HABeas2, re "Empires Aflame"

Hammer

  • Numerorum Malleo
  • Global Moderator
  • Major
  • *
  • Posts: 4139
    • MegaMek Website
Re: CO System Generation
« Reply #45 on: 18 October 2017, 20:13:19 »
With domes, underground cities, and a lot of cash to splash, -20C and 70C are entirely livable. Which isn't quite the same thing as you're considering, I know.

-20 C, as Canadian that's when I put a sweater on  :))

I think -60 C to 70c would be a good temperature range, but gravity could be a bigger issue.
MegaMek Projects Wiki
Bug Trackers
MegaMek Tracker
MekHQ Tracker
MegaMekLab Tracker
New Units and RAT's aren't added until after the 2 month release moratorium is passed.
Join the official MegaMek Discord

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #46 on: 18 October 2017, 21:25:05 »
Ok I think the max avg temp should be 71'C 344'K (Dustball).
Max lowest temp.......I dont know.  And these are planet-wide average temperatures of the planets from pole to pole so if its avg temp is -70 then the poles are how much colder?  Would man settle this iceball being so cold and would it have any resources worth the effort?  The maximum min temp is going to help the most with getting a planet in the habitable zone around these VI and VII stars (especially the M cold suns where the life zone is around 0.01 AU)  still looking like class VI and VII stars are just going to be SOL for having habitable planets. 

*Edit:  Im going with +73 and -73 C (346K / 200K) as the upper and lower limits for planets within the habitable zone that man would colonize.
« Last Edit: 18 October 2017, 22:09:10 by BLOODWOLF »

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #47 on: 18 October 2017, 22:48:00 »
Final product.  Will just have to create a check in the code for:

Code: [Select]
If (1.211 * mass) > outerLife Then
'generate a new star
While (1.211 * mass) > outerLife
spectralClass = getSC()
subtype = getST()
luminosity = getL()
spectralType = getST()
End While
Else
End If

Because VI and VII stars are not going to work (VI does sometimes for the big hot stars past K I believe).  Current method sometimes gives me up to 4 habitable planets and not always in the same range of slots so, Im happy with it.

Sir Chaos

  • Captain
  • *
  • Posts: 3089
  • Artillery Fanboy
Re: CO System Generation
« Reply #48 on: 19 October 2017, 14:29:43 »
-20 C, as Canadian that's when I put a sweater on  :))

I think -60 C to 70c would be a good temperature range, but gravity could be a bigger issue.

Don´t forget that those are average temperatures, presumably in the middle latitudes.

Even in pre-industrial (and thus before any "climate control" other than open fires) times, people on Earth settled in places with temperatures ranging from what... -10°C to 50°C? 0°C to 40°C? And temperature varies fairly wildly by latitude, so even with more or less complete loss of technology during the Succession Wars, temperature would not a planet completely uninhabitable as long as there are latitudes in which temperatures are within the above range - the equatorial regions of cold planets, or the arctic/sub-arctic regions of hot planets.

Air pressure would also be a limiting factor - at higher pressures, low-lying regions might be uninhabitable, while at lower pressure, high altitudes might be near vacuum. IIRC the former is the case on Hesperus II, while the latter showed up on the periphery world where the Northwind Highlanders fought that Smoke Jaguar galaxy... Wayside, I think. There´ll be some planets where air pressure is too low even at sea level, and some with high air pressure and few or no highlands far enough up to provide sufficiently low air pressure, but those probably won´t be many. Well, there will be many worlds with too low an air pressure, but few of those will have complex life because they won´t have liquid surface water.
"Artillery adds dignity to what would otherwise be a vulgar brawl."
-Frederick the Great

"Ultima Ratio Regis" ("The Last Resort of the King")
- Inscription on cannon barrel, 18th century

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #49 on: 19 October 2017, 14:43:10 »
Yeah, we decided on slack that this should be more of what temperature limits for the life zone could planets be that man would colonize over what would actually support life.  And keeping in mind its the avg temp from pole to pole, i know.  Pressure and gravity and all that will be after this right now just worried about getting a system working for coming up with system positions for the planets.

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #50 on: 19 October 2017, 22:21:28 »


It works! ......sorta

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #51 on: 21 October 2017, 22:53:50 »
Gwithian has an impossible star K6IV (sub-giants dont exist for stars colder than K3) and no system position so makes my code array index out of bounds exception.

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #52 on: 24 October 2017, 00:23:24 »
Baxley also has an impossible K5IV star, Redfield has an impossible K5IV, Tall Trees with a M2IV, Telos IV with a K7IV, Tokasha with a K5IV, Victoria with  K7IV, Muana Loa with a M6IV, Frobisher with a K5IV, and Dunklewälderdunklerflüssenschattenwelt (Bob 2822+) with a M1IV.

Some of these planets Im going to have to have it redo the system position because some have a star and position defined but no temp or gravity and all that.  Im doing the planetary temp off the real world formula as if the planet has an Earth like atmosphere and if it doesnt perform the slots subroutine for finding a sysPos then it has no idea what distance from the star position 5 is for example.

monbvol

  • Colonel
  • *
  • Posts: 13286
  • I said don't look!
Re: CO System Generation
« Reply #53 on: 24 October 2017, 16:22:56 »
I happen to be working on a project where I could use a utility like this to complete it.

Any chance I could convince you to PM me a link where I can download it?

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #54 on: 24 October 2017, 16:56:08 »
I'm currently working on building it right now.  Only have the star variables, system position, axis and orbit fields done so far.  And just broke it last night lol.  If I can fix it will finally get to Jayof9s planet generation sheet and fill out the rest but, this xml part is mainly for just filling out data that is empty in MekHQ's planets.xml.  What is your project about?

monbvol

  • Colonel
  • *
  • Posts: 13286
  • I said don't look!
Re: CO System Generation
« Reply #55 on: 24 October 2017, 17:53:59 »
I have a full conversion AU I've been working on.  I've managed to get a fair portion of it translated to MekHQ thanks to the easy to edit XML files but I could use a way that is a lot less tedious to fill in the star types and even primary inhabited orbital position.

So this looks really helpful toward that end.

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #56 on: 24 October 2017, 22:11:52 »
Oh, I already got star and sysPos covered.  Should get on the slack channel where Im working on this with Hammer and Jayof9s

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #57 on: 24 October 2017, 22:37:23 »
Code: [Select]
Mauna Loa
Geophysical
System position 6th[1]
Jump point
distance 2.34 days[1]
Moons None[1]
Surface gravity 0.78[1]
Atmospheric pressure High (Toxic)[1]
Equatorial temperature 347°C (Inferno)[1]
Surface water 68%[1]
Highest native life None[1]
Reference Year 3095[1]

68% surface water on a planet with an avg temp of 347.....really?

monbvol

  • Colonel
  • *
  • Posts: 13286
  • I said don't look!
Re: CO System Generation
« Reply #58 on: 24 October 2017, 23:22:53 »
When I say full conversion I mean I'm not even using the same map, factions, or designs.  It is very extensive.

So something that can let me randomly generate about 100 stars and which orbit their habited planet is in or so and export it in a plantes.xml friendly format would be most welcome.  Even if I had to copy paste the output.

Factions and designs were easy and I even managed to figure out how to implement most of my construction based house rules and a couple game play ones.

RATs, maybe altering the files that randomly generate pilot names, and waiting for MegaMekLab to cover the remaining unit types are on my to do list for it.

I do have a link to a rather outdated* version of MekHQ that I have cobbled together in a thread linked in my signature if you want to take a look at what I'm talking about.

*The version of MekHQ is very out of date.  Very is not a strong enough word I think in this case.  But the planets.xml file should actually be fairly accurate but I know I've done some work on it since last uploading it.

NeonKnight

  • Freelance Writer
  • Major
  • *
  • Posts: 6349
  • Cause Them My Initials!
Re: CO System Generation
« Reply #59 on: 25 October 2017, 01:33:25 »
Would be cool if you could convert the maps made by this software to megamech on the fly:

https://secure.profantasy.com/products/ft.asp
AGENT #575, Vancouver Canada

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #60 on: 25 October 2017, 08:20:20 »
Yes it would once I get better and then learn java.  Right now I just use this site http://topps.diku.dk/torbenm/maps.msp which will make you a whole planetary map which I then convert into an icon for the planet in HQ.  And then can have it draw the map in a rectangle shape with grid square and even set the water percentage and then I just mock it up in gimp with force icons to have a working strategic map.


cray

  • Freelance Writer
  • Major
  • *
  • Posts: 6273
  • How's it sit? Pretty cunning, don't you think?
Re: CO System Generation
« Reply #61 on: 25 October 2017, 20:17:34 »
68% surface water on a planet with an avg temp of 347.....really?

Sure. The atmospheric pressure's noted as high and toxic. Liquid water can exist at those temperatures with sufficient pressure. Though 347C is pretty near the point where water transitions to a supercritical fluid.

Late 31st Century Venus has a similar situation, skyrocketing temperatures (over 200C, IIRC) and some remaining liquid water.
Mike Miller, Materials Engineer

**"A man walks down the street in that hat, people know he's not afraid of anything." --Wash, Firefly.
**"Well, the first class name [for pocket WarShips]: 'Ship with delusions of grandeur that is going to evaporate 3.1 seconds after coming into NPPC range' tended to cause morale problems...." --Korzon77
**"Describe the Clans." "Imagine an entire civilization built out of 80’s Ric Flairs, Hulk Hogans, & Macho Man Randy Savages ruling over an entire labor force with Einstein Level Intelligence." --Jake Mikolaitis


Disclaimer: Anything stated in this post is unofficial and non-canon unless directly quoted from a published book. Random internet musings of a BattleTech writer are not canon.

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #62 on: 25 October 2017, 23:21:27 »
Now that I am on generating the atmosphere/pressure field for the planets I realize all this life zone crap doesnt apply anymore.  If I go with "what would man colonize" over what would actually produce life then everything I just did needs to change.  Going to have to generate the planets atmosphere type first, then system position, then equatorial temp (instead of the planetary average temp like I was doing) based off the system position.  And had to now make five data tables for each atmosphere type with different albedos and Min Max temp values for the life zone/not really even a life zone anymore.  And since MM's max map temp is -200 : 200 'C thats the extreme limits.

Vacuum = -200 : 200
Trace = -100 : 100
Thin = -50 : 50
Standard = 0 : 50
High = 0 : 100
Very High = 0 : 200'C
*temp of planet at equator now

And now the zipped up spreadsheet is too big to post, dang lol.

Sir Chaos

  • Captain
  • *
  • Posts: 3089
  • Artillery Fanboy
Re: CO System Generation
« Reply #63 on: 26 October 2017, 06:10:49 »
Now that I am on generating the atmosphere/pressure field for the planets I realize all this life zone crap doesnt apply anymore.  If I go with "what would man colonize" over what would actually produce life then everything I just did needs to change.  Going to have to generate the planets atmosphere type first, then system position, then equatorial temp (instead of the planetary average temp like I was doing) based off the system position.  And had to now make five data tables for each atmosphere type with different albedos and Min Max temp values for the life zone/not really even a life zone anymore.  And since MM's max map temp is -200 : 200 'C thats the extreme limits.

Vacuum = -200 : 200
Trace = -100 : 100
Thin = -50 : 50
Standard = 0 : 50
High = 0 : 100
Very High = 0 : 200'C
*temp of planet at equator now

And now the zipped up spreadsheet is too big to post, dang lol.

I would make the temperature range smaller at above-average pressure. Denser atmosphere means more daytime heat is retained during the night, so less variation and higher average temperature. AFAIK on Venus, temperature basically does not vary over the day cycle, even with how long it is, or with seasons - it basically varies only by altitude.

Maybe like this:
Standard = -25 : 50
High = 25 : 75
Very High = 75 : 100
"Artillery adds dignity to what would otherwise be a vulgar brawl."
-Frederick the Great

"Ultima Ratio Regis" ("The Last Resort of the King")
- Inscription on cannon barrel, 18th century

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #64 on: 26 October 2017, 08:48:05 »
How about:

-150:150
-100:100
-50:50
0:50 (We're doing equator temp now instead of average with terra at 30'C so I dont think its too much of a stretch for standard atmosphere planets to have a 0 : 50'C range at their equators?)
0:100
0:150 (probably better not to go to the temp limit in Megamek so I can still have some variation when I get to seasons and temp modifier from lighting/time of day conditions later)

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #65 on: 27 October 2017, 00:02:49 »
https://drive.google.com/open?id=0Bz2R9oe3rM_bajdEM2tXU3UwU28
Now has all the stars for each of the five atmospheres since am treating this more like a valid temperature zone more than a life zone.  And instead set the limits for high to 25 - 100'C and very high to 50 - 150'C.  Didnt make sense to me that a high atmosphere world would have an equator temp of 0'C so bumped them up.  And then had to add in and come up with the values for the habitability modifiers for each star as well for the life form field in each planet.

And water is very scarce, keeping getting hundreds of 0 - 10% water on these planets.  roll 2d6 x lifezoneposmod x escapeV / V and am always ending up with results of < 2.

Code: [Select]
Private Function getPW(planet) As Integer

        Dim r As Integer = roll2D6()
        Dim EV As Decimal = planet.escapeV()
        Dim V As Decimal = 1.12 * (10 ^ 4)
        Dim inner As Decimal
        Dim outer As Decimal
        Dim arraySlots() As Decimal = {planet.slot1(), planet.slot2(), planet.slot3(), planet.slot4(), planet.slot5(), planet.slot6(), planet.slot7(),
            planet.slot8(), planet.slot9(), planet.slot10(), planet.slot11(), planet.slot12(), planet.slot13(), planet.slot14(), planet.slot15()}
        Dim slotIndex As Integer = planet.sysPos() - 1
        Dim pos As Decimal = arraySlots(slotIndex)
        Console.WriteLine("Position= " & pos)
        Dim lzpm As Decimal
        Dim table As DataTable = getStarTable(planet.pressure())
        Dim expression As String = "[Spectral Type] = " & "'" & planet.spectralType() & "'"
        Dim selectRow As DataRow()
        selectRow = table.Select(expression)
        inner = selectRow(0)(3)
        Console.WriteLine("inner= " & inner)
        outer = selectRow(0)(4)
        Console.WriteLine("outer= " & outer)
        lzpm = (pos - inner) / (inner + outer)
        Dim rM As Integer = CInt(r * lzpm * (EV / V))
        Console.WriteLine("2D6 roll= " & r & " lzpm= " & lzpm & " EV= " & EV & " / " & " V= " & V)
        Select Case rM

            Case < 0

                Return 0

            Case 0

                Return 5

            Case 1

                Return 10

            Case 2

                Return 20

            Case 3

                Return 30

            Case 4

                Return 40

            Case 5

                Return 40

            Case 6

                Return 50

            Case 7

                Return 50

            Case 8

                Return 60

            Case 9

                Return 70

            Case 10

                Return 80

            Case 11

                Return 90

            Case >= 12

                Return 100

            Case Else

                Return 999

        End Select

    End Function

Sample of the planets it generates:

Code: [Select]
Abadan star class= F
Abadan star subtype= 1
Abadan star luminosity= V
Abadan star type= F1V generated
Abadan Gravity= 1.03
Abadan Atmosphere= 3
Abadan SysPos= 5
Abadan Temp= 22
Abadan life form= 7
Abadan percent water= 63
Abadan Axis= No Tilt generated
Abadan Orbit= Circular generated
Abadan Faction= UND
Abagnar star class= F generated
Abagnar star subtype= 0 generated
Abagnar star luminosity= V generated
Abagnar star type= F0V generated
Abagnar Gravity= 1.4 generated
Abagnar Atmosphere= 1 generated
Abagnar SysPos= 5 generated
Abagnar Temp= 33 generated
Abagnar life form= 0 generated
Abagnar percent water= 0 generated
Abagnar Atmosphere= None / Toxic Atmosphere generated
Abagnar Axis= Tilted generated
Abagnar Orbit= Elliptical generated
Abagnar Faction= UND
Abbadiyah star class= G generated
Abbadiyah star subtype= 6 generated
Abbadiyah star luminosity= V generated
Abbadiyah star type= G6V generated
Abbadiyah Gravity= 1 generated
Abbadiyah Atmosphere= 1 generated
Abbadiyah SysPos= 6 generated
Abbadiyah Temp= -96 generated
Abbadiyah life form= 0 generated
Abbadiyah percent water= 0 generated
Abbadiyah Atmosphere= None / Toxic Atmosphere generated
Abbadiyah Axis= Tilted generated
Abbadiyah Orbit= Elliptical generated
Abbadiyah Faction= UND
Abbeville star class= F generated
Abbeville star subtype= 3 generated
Abbeville star luminosity= V generated
Abbeville star type= F3V generated
Abbeville Gravity= 1 generated
Abbeville Atmosphere= 3 generated
Abbeville SysPos= 5 generated
Abbeville Temp= 49 generated
Abbeville life form= 5 generated
Position= 2.1347447613097025225948244913
inner= 2.125
outer= 2.974
2D6 roll= 5 lzpm= 0.0019111122395964939389732283 EV= 11183.7190719238 /  V= 11200
Abbeville percent water= 5 generated
Abbeville Atmosphere= Tainted Atmosphere generated
Abbeville Axis= No Tilt generated
Abbeville Orbit= Circular generated
Abbeville Faction= UND
Abejorral star class= G generated
Abejorral star subtype= 0 generated
Abejorral star luminosity= V generated
Abejorral star type= G0V generated
Abejorral Gravity= 1.2 generated
Abejorral Atmosphere= 5 generated
Abejorral SysPos= 3 generated
Abejorral Temp= 52 generated
Abejorral life form= 3 generated
Position= 0.9372775471792610377810035482
inner= 0.554
outer= 0.951
2D6 roll= 12 lzpm= 0.2546694665642930483594707961 EV= 11183.7190719238 /  V= 11200
Abejorral percent water= 30 generated
Abejorral Atmosphere= Tainted Atmosphere generated
Abejorral Axis= Tilted generated
Abejorral Orbit= Elliptical generated
Abejorral Faction= UND
Aberystwyth star class= K generated
Aberystwyth star subtype= 7 generated
Aberystwyth star luminosity= II generated
Aberystwyth star type= K7II generated
Aberystwyth Gravity= 0.8 generated
Aberystwyth Atmosphere= 2 generated
Aberystwyth SysPos= 7 generated
Aberystwyth Temp= -20 generated
Aberystwyth life form= 7 generated
Position= 40.888732995695158957578421423
inner= 25.022
outer= 52.495
2D6 roll= 7 lzpm= 0.2046871395396514178512896709 EV= 10707.5958049914 /  V= 11200
Aberystwyth percent water= 10 generated
Aberystwyth Atmosphere= Breathable Atmosphere generated
Aberystwyth Axis= No Tilt generated
Aberystwyth Orbit= Elliptical generated
Aberystwyth Faction= UND
Abiy Adi star class= G
Abiy Adi star subtype= 2
Abiy Adi star luminosity= V
Abiy Adi star type= G2V generated
Abiy Adi Gravity= 1.2
Abiy Adi Atmosphere= 3
Abiy Adi SysPos= 3
Abiy Adi Temp= 45
Abiy Adi life form= 0
Abiy Adi percent water= 18
Abiy Adi Axis= No Tilt generated
Abiy Adi Orbit= Elliptical generated
Abiy Adi Faction= UND
Abramkovo star class= K generated
Abramkovo star subtype= 0 generated
Abramkovo star luminosity= V generated
Abramkovo star type= K0V generated
Abramkovo Gravity= 0.7 generated
Abramkovo Atmosphere= 1 generated
Abramkovo SysPos= 5 generated
Abramkovo Temp= -62 generated
Abramkovo life form= 0 generated
Abramkovo percent water= 0 generated
Abramkovo Atmosphere= None / Toxic Atmosphere generated
Abramkovo Axis= No Tilt generated
Abramkovo Orbit= Elliptical generated
Abramkovo Faction= UND
Abruzzi star class= M generated
Abruzzi star subtype= 9 generated
Abruzzi star luminosity= V generated
Abruzzi star type= M9V generated
Abruzzi Gravity= 1.2 generated
Abruzzi Atmosphere= 4 generated
Abruzzi SysPos= 3 generated
Abruzzi Temp= 69 generated
Abruzzi life form= 8 generated
Position= 2.0887443559697752477303127880
inner= 1.76
outer= 2.758
2D6 roll= 8 lzpm= 0.0727632483332835873683737911 EV= 11349.2065537214 /  V= 11200
Abruzzi percent water= 10 generated
Abruzzi Atmosphere= Breathable Atmosphere generated
Abruzzi Axis= No Tilt generated
Abruzzi Orbit= Elliptical generated
Abruzzi Faction= UND
Acala star class= K generated
Acala star subtype= 3 generated
Acala star luminosity= V generated
Acala star type= K3V generated
Acala Gravity= 1.4 generated
Acala Atmosphere= 4 generated
Acala SysPos= 2 generated
Acala Temp= 67 generated
Acala life form= 5 generated
Position= 0.3291378671237344554954704875
inner= 0.274
outer= 0.429
2D6 roll= 8 lzpm= 0.0784322434192524260248513336 EV= 12130.4464919383 /  V= 11200
Acala percent water= 10 generated
Acala Atmosphere= Tainted Atmosphere generated
Acala Axis= Tilted generated
Acala Orbit= Circular generated
Acala Faction= UND
Acamar star class= G
Acamar star subtype= 2
Acamar star luminosity= II
Acamar star type= G2II generated
Acamar Gravity= 1.0
Acamar Atmosphere= 3
Acamar SysPos= 8
Acamar Temp= 20
Acamar life form= 7
Acamar percent water= 63
Acamar Axis= No Tilt generated
Acamar Orbit= Elliptical generated
Acamar Faction= UND
Accrington star class= G generated
Accrington star subtype= 3 generated
Accrington star luminosity= V generated
Accrington star type= G3V generated
Accrington Gravity= 1.2 generated
Accrington Atmosphere= 2 generated
Accrington SysPos= 5 generated
Accrington Temp= -3 generated
Accrington life form= 6 generated
Position= 1.0389037758846599156199537043
inner= 0.727
outer= 1.525
2D6 roll= 7 lzpm= 0.1385007885811100868649883234 EV= 11757.6112366996 /  V= 11200
Accrington percent water= 10 generated
Accrington Atmosphere= Breathable Atmosphere generated
Accrington Axis= No Tilt generated
Accrington Orbit= Circular generated
Accrington Faction= UND
Achernar star class= B
Achernar star subtype= 3
Achernar star luminosity= V
Achernar star type= B3V generated
Achernar Gravity= 0.9
Achernar Atmosphere= 3
Achernar SysPos= 2
Achernar Temp= 28
Achernar life form= 2
Achernar percent water= 30
Achernar Axis= Tilted generated
Achernar Orbit= Elliptical generated
Achernar Faction= UND
Aconcagua star class= M generated
Aconcagua star subtype= 3 generated
Aconcagua star luminosity= III generated
Aconcagua star type= M3III generated
Aconcagua Gravity= 0.7 generated
Aconcagua Atmosphere= 4 generated
Aconcagua SysPos= 5 generated
Aconcagua Temp= 71 generated
Aconcagua life form= 6 generated
Position= 8.816280554157291224256168525
inner= 7.505
outer= 11.759
2D6 roll= 8 lzpm= 0.0680689656435470942824007748 EV= 9685.38482507451 /  V= 11200
Aconcagua percent water= 5 generated
Aconcagua Atmosphere= Breathable Atmosphere generated
Aconcagua Axis= No Tilt generated
Aconcagua Orbit= Circular generated
Aconcagua Faction= UND
Acrux star class= K generated
Acrux star subtype= 1 generated
Acrux star luminosity= V generated
Acrux star type= K1V generated
Acrux Gravity= 1.1 generated
Acrux Atmosphere= 3 generated
Acrux SysPos= 3 generated
Acrux Temp= 16 generated
Acrux life form= 5 generated
Position= 0.5778372685565595748191875698
inner= 0.463
outer= 0.648
2D6 roll= 5 lzpm= 0.1033638780887124885861274256 EV= 11729.5835180829 /  V= 11200
Acrux percent water= 10 generated
Acrux Atmosphere= Breathable Atmosphere generated
Acrux Axis= No Tilt generated
Acrux Orbit= Circular generated
Acrux Faction= UND
Acubens star class= K generated
Acubens star subtype= 5 generated
Acubens star luminosity= V generated
Acubens star type= K5V generated
Acubens Gravity= 1.2 generated
Acubens Atmosphere= 3 generated
Acubens SysPos= 3 generated
Acubens Temp= 46 generated
Acubens life form= 8 generated
Position= 0.2610636685932155017005671867
inner= 0.255
outer= 0.357
2D6 roll= 8 lzpm= 0.0099079552176723883996195861 EV= 11757.6112366996 /  V= 11200
Acubens percent water= 5 generated
Acubens Atmosphere= Tainted Atmosphere generated
Acubens Axis= No Tilt generated
Acubens Orbit= Circular generated
Acubens Faction= UND
Ad Duwayd star class= F generated
Ad Duwayd star subtype= 7 generated
Ad Duwayd star luminosity= V generated
Ad Duwayd star type= F7V generated
Ad Duwayd Gravity= 0.8 generated
Ad Duwayd Atmosphere= 2 generated
Ad Duwayd SysPos= 4 generated
Ad Duwayd Temp= 8 generated
Ad Duwayd life form= 4 generated
Position= 1.9398951301940214550174562656
inner= 1.469
outer= 3.081
2D6 roll= 10 lzpm= 0.103493435207477242860979399 EV= 10062.3880739237 /  V= 11200
Ad Duwayd percent water= 10 generated
Ad Duwayd Atmosphere= Breathable Atmosphere generated
Ad Duwayd Axis= Tilted generated
Ad Duwayd Orbit= Elliptical generated
Ad Duwayd Faction= UND
Addasar star class= G generated
Addasar star subtype= 5 generated
Addasar star luminosity= V generated
Addasar star type= G5V generated
Addasar Gravity= 1.3 generated
Addasar Atmosphere= 5 generated
Addasar SysPos= 2 generated
Addasar Temp= 86 generated
Addasar life form= 6 generated
Position= 0.6143660400709398526122916494
inner= 0.444
outer= 0.761
2D6 roll= 6 lzpm= 0.1413826058679998776865490866 EV= 11963.1141151566 /  V= 11200
Addasar percent water= 10 generated
Addasar Atmosphere= Tainted Atmosphere generated
Addasar Axis= Tilted generated
Addasar Orbit= Elliptical generated
Addasar Faction= UND
« Last Edit: 27 October 2017, 00:16:46 by BLOODWOLF »

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #66 on: 27 October 2017, 08:13:15 »
I realize I did the life zone width formula wrong.  Should be outer - inner.

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #67 on: 28 October 2017, 21:29:29 »
Im not having a whole lot of luck searching online for a database or list of scifi/fantasy continent names out there I can use to generate the new landmasses and moons for these planets.  Does anyone know of a source for coming up with names that isnt an in-browser generator?  I need an actual txt file of a list of names that i then can have the code randomly pick from.

Code: [Select]
```A Place star class= F generated
A Place star subtype= 0 generated
A Place star luminosity= V generated
A Place star type= F0V generated
A Place Gravity= 1.2 generated
A Place Atmosphere= 3
A Place SysPos= 4 generated
A Place Temp= 37 generated
A Place life form= 8 generated
A Place percent water= 10 generated
A Place climate= SUPERTROPCIAL generated
A Place Axis= No Tilt generated
A Place Orbit= Elliptical generated
A Place 1D6= 6
A Place diameter= 10842600
A Place percent water= 10
A Place number continents off diameter= 9
A Place number continents off water= 4.5
A Place land mass= Continent1 generated
A Place land mass= Continent2 generated
A Place land mass= Continent3 generated
A Place land mass= Continent4 generated
A Place Faction= UND```

idea weenie

  • Major
  • *
  • Posts: 4879
Re: CO System Generation
« Reply #68 on: 28 October 2017, 23:01:05 »
Copy the names generated from online into a text file?

You could have standard 2-part names where the system selects a random first part of the name and a second part of the name.  You could even have a table for weird names, where you toss the unusual ideas you have (Planet Bob)

The real fun might be a 27x27 lookup table, where on the left side are the 26 letters of the alphabet, and a row labeled as 'Begin'.  On the top are the 26 letters of the alphabet, and a column labeled 'End'.  You start on the row that has 'Begin' on it, count how many options there are total in that row, and pick a random number from 1 to that total, counting over until it is within the number range in that cell, and selecting the letter above it as the first letter in the name.  You then look up that first letter on the left side of the table, count how many options are for its row, random between 1 to that number, and get the next letter, aso.  Repeat until one of the letters gets a lookup that has 'End' as the result.

Using a 6x6 table:
End  A    G    N    U    V 
Begin  0    8    4    2    5    1 
A  7    4    3    9    3    2 
G  3    8    8    3    7    7 
N  1    3    9    1    1    3 
U  0    1    2    7    8    5 
V  2    7    6    4    4    6 

So you start on the 'Begin' row.  There are 20 possibilities, and you randomly pick #13.  8 is not enough, 12 is not enough, so the first letter is 'N'.  You then look at row 'N', and see its total is 18.  The random number is 4, which means the second letter is 'A'.  Applying rules for English you make it lower case, and the name of the location so far is 'Na'.  Row 'A' has a total of 28, and you get 18, meaning the third letter is 'G'.  Repeat this process until one of the rows gets a low enough lookup to 'End' the word.

The fun part is making this sort of table allows you to simulate almost any language style.  You just need a program to populate the table based on a text file you put in, with the more words in it the better.  The words in that text file create the numbers in the above table, and a sneaky programmer adds a counter to the leader character of each row, instead of having to count every time.

Links to the concept:
http://crappycoding.com/2015/02/procedural-names/

Have fun

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #69 on: 28 October 2017, 23:49:19 »
Oh wow, so just have it go through and count the probability of all the first letters, second letters and what they come after, third letters and what two they come after, etc, etc.

Hammer pointed out we have 72,700 surnames in the MegaMek data\names folder so, Im going to try it with those first and see if we're happy with it or not.

NeonKnight

  • Freelance Writer
  • Major
  • *
  • Posts: 6349
  • Cause Them My Initials!
Re: CO System Generation
« Reply #70 on: 29 October 2017, 12:48:03 »
If you are doing this as a software use for us peons to use, may I request this be a feature that can be turned off/on?

Reason is, years ago I wrote a short article/forum post over on the Cartographer's Guild with regards to Toponymy (Toponym is the general name for any place or geographical entity. Related, more specific types of toponym include hydronym for a body of water and oronym for a mountain or hill. A toponymist is one who studies toponymy.).

And while sure we could slap a couple of words together and call that a place, bear in mind we are dealing with place not so much of a fantasy nature, but rather more of a 'realistic' nature.

Remember, we have here in North america:

New York - Settled by Europeans, more than likely hailing from York England
New Orleans - Settled likely by a large percentage of French Settlers from Orléans France

and that is just Cities. In Canada we have:

New Brunswick which was formerly Nouveau-Brunswick (french) which was named after the city of Braunschweig (Brunswick in English and Low German) in the former Duchy of Brunswick-Lüneburg, what is now Lower Saxony in northern Germany. The then-colony was named in 1784 to honour the reigning British monarch, George III, who was concurrently Duke and prince-elector of Brunswick-Lüneburg ("Hanover") in the Holy Roman Empire.

Nova Scotia - or New Scotland

So, if you are looking for a random name generator, I would highly suggest having the first name be words like:

New
Nouveau
Nova
etc

see https://www.indifferentlanguages.com/words/new
AGENT #575, Vancouver Canada

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #71 on: 29 October 2017, 16:20:46 »
Yeah Hammer wants the chance for "New / Old" on names too but, I resisted because this is for continents and moons.  I guess I could create another function to roll for if it has nothing or Old or New in front of the name in whatever language the name is (MekHQ has surnames in 32 different languages that I am using for this, 72,700+ total names).  I thought about maybe tacking on roman numerals at the end on some of them like Solaris VII for example but, that is going to get complex.

What it does so far:
Code: [Select]
  <planet>
    <name>Abagnar</name>
    <xcood>380.231</xcood>
    <ycood>314.823</ycood>
    <spectralClass>K</spectralClass>
    <subtype>1</subtype>
    <luminosity>V</luminosity>
    <spectralType>K1V</spectralType>
    <sysPos>3</sysPos>
    <axis>No Tilt</axis>
    <orbit>Circular</orbit>
    <pressure>1</pressure>
    <gravity>0.7</gravity>
    <lifeForm>0</lifeForm>
    <climate>ARCTIC</climate>
    <percentWater>0</percentWater>
    <temperature>-85</temperature>
    <landMass>Shimazu</landMass>
    <landMass>Tokuoka</landMass>
    <landMass>Sørhaug</landMass>
    <faction>UND</faction>
    <factionChange>
      <date>2750-01-01</date>
      <faction>DC</faction>
    </factionChange>
    <desc>[None / Toxic Atmosphere] </desc>
  </planet>

MegaMek masterancestry.txt (languages)
Code: [Select]
1,U.S.
2,English
3,Scottish
4,Irish
5,German
6,Dutch
7,Scandanavian
8,French
9,Italian
10,Hispanic
11,Portugese
12,Russian
13,Slavic
14,Polish
15,Romanian
16,Finnish
17,Albanian
18,Serbian
19,Greek
20,Turkish
21,Armenian
22,Arabic
23,African
24,Pakistani
25,Indian
26,Japanese
27,Korean
28,Chinese
29,Vietnamese
30,Indonesian
31,Polynesian
32,Filipino

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #72 on: 29 October 2017, 19:18:48 »
Ok had to create functions to allow a small chance of having "New" or "Old" in front of the name generated for the landmass.  And translate those words for 32 languages.....because Hammer makes my life difficult.

Example showing it generate "New" in some language for the name:
Code: [Select]
<planet>
    <name>Adhara (Trip 3040+)</name>
    <xcood>-123.314</xcood>
    <ycood>-468.96</ycood>
    <spectralClass>K</spectralClass>
    <subtype>3</subtype>
    <luminosity>V</luminosity>
    <spectralType>K3V</spectralType>
    <sysPos>3</sysPos>
    <axis>Tilted</axis>
    <orbit>Elliptical</orbit>
    <pressure>3</pressure>
    <gravity>1.2</gravity>
    <lifeForm>5</lifeForm>
    <climate>SUPERTROPCIAL</climate>
    <percentWater>10</percentWater>
    <temperature>40</temperature>
    <landMass>Nuovo Lucetti</landMass>
    <landMass>Vasiliou</landMass>
    <faction>UND</faction>
    <factionChange>
      <date>2750-01-01</date>
      <faction>MOC</faction>
    </factionChange>
    <desc>[Tainted Atmosphere] </desc>
  </planet>

New code:
Code: [Select]
    Private Function getName(planet) As String

        Dim l As Integer = getLanguage(planet)
        Dim pre As String = getPre(l)
        Dim expression As String = "Language = " & l
        Dim selectRows As DataRow()
        selectRows = table.Select(expression)
        Dim r As Integer = rollX(selectRows.Length - 1)
        Dim name As String = ""
        If String.IsNullOrEmpty(pre) = True Then

            name = selectRows(r)(0)

        ElseIf String.IsNullOrEmpty(pre) = False Then

            name = pre & " " & selectRows(r)(0)

        Else

        End If

        Return name

    End Function

    Private Function getLanguage(planet) As Integer

        Dim d As String

        If planet.factionChange() Is Nothing Then

            d = planet.faction()

        Else

            d = planet.factionChange(0).faction()

        End If

        Select Case d

            Case "CC", "FR", "NCR", "NIOPS"

                Return getCCLanguage()

            Case "SLIE", "CBS", "CB", "CCC", "CCO", "CDS", "CFM", "CGB", "CGS", "CHH", "CIH", "CJF", "CMG", "CNC", "CSJ", "CSR", "CSA", "CSV", "CWI", "CW", "CWOV"

                Return getClanLanguage()

            Case "DC"

                Return getDCLanguage()

            Case "FRR", "EF", "JF"

                Return getFRRLanguage()

            Case "FS", "THW", "TC", "OA", "CDP", "TD", "FOR", "MM"

                Return getFSLanguage()

            Case "FWL", "MOC", "IP", "LL", "MH"

                Return getFWLLanguage()

            Case "LA", "RWR", "CIR", "GV", "HL", "MV", "BoS", "OC", "RIM", "RCM", "RT", "TB"

                Return getLALanguage()

            Case Else

                Return rollX(31) + 1

        End Select

    End Function

    Private Function getCCLanguage() As Integer

        Dim r As Integer = rollX(44)
        Select Case r

            Case 0 To 9

                Return 1

            Case 10 To 24

                Return 12

            Case 25 To 44

                Return 20

            Case Else

                Return 0

        End Select

    End Function

    Private Function getClanLanguage() As Integer

        Dim r As Integer = rollX(59)
        Select Case r

            Case 0 To 14

                Return 1

            Case 15 To 24

                Return 9

            Case 25 To 44

                Return 19

            Case 45 To 59

                Return 20

            Case Else

                Return 0

        End Select

    End Function

    Private Function getDCLanguage() As Integer

        Dim r As Integer = rollX(54)
        Select Case r

            Case 0 To 9

                Return 1

            Case 10 To 24

                Return 7

            Case 25 To 34

                Return 22

            Case 35 To 54

                Return 26

            Case Else

                Return 0

        End Select

    End Function

    Private Function getFRRLanguage() As Integer

        Dim r As Integer = rollX(74)
        Select Case r

            Case 0 To 9

                Return 1

            Case 10 To 24

                Return 5

            Case 25 To 54

                Return 7

            Case 55 To 74

                Return 26

            Case Else

                Return 0

        End Select

    End Function

    Private Function getFSLanguage() As Integer

        Dim r As Integer = rollX(84)
        Select Case r

            Case 0 To 9

                Return 1

            Case 10 To 29

                Return 2

            Case 30 To 44

                Return 3

            Case 45 To 59

                Return 4

            Case 60 To 69

                Return 8

            Case 70 To 84

                Return 25

            Case Else

                Return 0

        End Select

    End Function

    Private Function getFWLLanguage() As Integer

        Dim r As Integer = rollX(144)
        Select Case r

            Case 0 To 9

                Return 1

            Case 10 To 29

                Return 9

            Case 30 To 44

                Return 10

            Case 45 To 54

                Return 13

            Case 55 To 64

                Return 14

            Case 65 To 74

                Return 15

            Case 75 To 84

                Return 18

            Case 85 To 104

                Return 19

            Case 105 To 114

                Return 20

            Case 115 To 124

                Return 24

            Case 125 To 144

                Return 25

            Case Else

                Return 0

        End Select

    End Function

    Private Function getLALanguage() As Integer

        Dim r As Integer = rollX(79)
        Select Case r

            Case 0 To 9

                Return 1

            Case 10 To 24

                Return 3

            Case 25 To 39

                Return 4

            Case 40 To 59

                Return 5

            Case 60 To 79

                Return 7

            Case Else

                Return 0

        End Select

    End Function

    Private Function getNew(l As Integer) As String

        Select Case l

            Case 1 To 3

                Return "New"

            Case 4

                Return "Nua"

            Case 5

                Return "Neu"

            Case 6

                Return "Nieuwe"

            Case 7

                Return "Nýtt"

            Case 8

                Return "Nouveau"

            Case 9

                Return "Nuovo"

            Case 10

                Return "Nuevo"

            Case 11

                Return "Novo"

            Case 12

                Return "Novyy"

            Case 13

                Return "Nový"

            Case 14

                Return "Nowy"

            Case 15

                Return "Nou"

            Case 16

                Return "Uusi"

            Case 17

                Return "I Ri"

            Case 18

                Return "Novi"

            Case 19

                Return "Néos"

            Case 20

                Return "Yeni"

            Case 21

                Return "Nor"

            Case 22

                Return "Aljadid"

            Case 23

                Return "Nuwe"

            Case 24

                Return "Nya"

            Case 25

                Return "Naya"

            Case 26

                Return "Atarashī"

            Case 27

                Return "Saeloun"

            Case 28

                Return "Xīn"

            Case 29

                Return "Mới"

            Case 30

                Return "Baru"

            Case 31

                Return "Fou"

            Case 32

                Return "Bago"

            Case Else

                Return "Error"

        End Select

    End Function

    Private Function getOld(l As Integer) As String

        Select Case l

            Case 1 To 3

                Return "Old"

            Case 4

                Return "Sean"

            Case 5

                Return "Alt"

            Case 6

                Return "Oud"

            Case 7

                Return "Gamall"

            Case 8

                Return "Vieux"

            Case 9

                Return "Vecchio"

            Case 10

                Return "Antiguo"

            Case 11

                Return "Velho"

            Case 12

                Return "Staryy"

            Case 13

                Return "Starý"

            Case 14

                Return "Stary"

            Case 15

                Return "Vechi"

            Case 16

                Return "Vanha"

            Case 17

                Return "I Vjetër"

            Case 18

                Return "Stari"

            Case 19

                Return "Palaiós"

            Case 20

                Return "Eski"

            Case 21

                Return "Hin"

            Case 22

                Return "Qadim"

            Case 23

                Return "Ou"

            Case 24

                Return "Puraana"

            Case 25

                Return "Puraana"

            Case 26

                Return "Furui"

            Case 27

                Return "Neulg-eun"

            Case 28

                Return "Jiù"

            Case 29

                Return "Cũ"

            Case 30

                Return "Tua"

            Case 31

                Return "Tuai"

            Case 32

                Return "Matanda"

            Case Else

                Return "Error"

        End Select

    End Function

    Private Function getPre(l As Integer) As String

        Dim r As Integer = roll2D6()
        Select Case r

            Case 2

                Return getOld(l)

            Case 3

                Return getNew(l)

            Case Else

                Return ""

        End Select

    End Function

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #73 on: 29 October 2017, 23:07:41 »
Has the option of generating "new" or "old" or nothing for the prefix before a name.  Has the option for nothing or "land" or a bunch of conditions for what vowel the name ends with as the suffix.  All in whatever language of the 32 that the name is in.

Shows the conditions working:
Code: [Select]
Zindao star class= M generated
Zindao star subtype= 0 generated
Zindao star luminosity= V generated
Zindao star type= M0V generated
Zindao Gravity= 0.9 generated
Zindao Atmosphere= 2 generated
Zindao SysPos= 2 generated
Zindao Temp= -29 generated
Zindao life form= 7 generated
Zindao percent water= 50 generated
Zindao climate= ARCTIC generated
Zindao Axis= Tilted generated
Zindao Orbit= Circular generated
Weidmeyer
r
er
Weidmeyer did not match any conditions
Zindao land mass= Weidmeyer generated
Zindao land mass= Old Winram generated
Ramsaur
r
ur
Ramsaur did not match any conditions
Zindao land mass= Ramsaur generated
Kilgore
e
re
Kilgore ends in 'e'
Zindao land mass= Kilgorea generated
Zindao Faction= UND

Generated in the xml:
Code: [Select]
  <planet>
    <name>Adelaide</name>
    <xcood>-250.471</xcood>
    <ycood>315.316</ycood>
    <spectralClass>F</spectralClass>
    <subtype>7</subtype>
    <luminosity>VI</luminosity>
    <spectralType>F7VI</spectralType>
    <sysPos>2</sysPos>
    <axis>No Tilt</axis>
    <orbit>Circular</orbit>
    <pressure>1</pressure>
    <gravity>1</gravity>
    <lifeForm>0</lifeForm>
    <climate>TROPICAL</climate>
    <percentWater>0</percentWater>
    <temperature>31</temperature>
    <landMass>Mcgrealand</landMass>
    <landMass>Schuetzenuer</landMass>
    <landMass>Nua Monkstalamh</landMass>
    <faction>UND</faction>
    <factionChange>
      <date>2571-07-09</date>
      <faction>LA</faction>
    </factionChange>
    <factionChange>
      <date>3040-01-01</date>
      <faction>FC</faction>
    </factionChange>
    <factionChange>
      <date>3057-09-18</date>
      <faction>LA</faction>
    </factionChange>
    <desc>[None / Toxic Atmosphere] </desc>
  </planet>

New or Old function:
Code: [Select]
    Private Function getPre(l As Integer) As String

        Dim r As Integer = roll2D6()
        Select Case r

            Case 2 To 4

                Return getOld(l)

            Case 5 To 6

                Return getNew(l)

            Case 7 To 12

                Return ""

            Case Else

                Return "Error"

        End Select

    End Function

Suffix function:
Code: [Select]
    Private Function getSuf(l As Integer, name As String) As String

        Dim r As Integer = roll2D6()
        Select Case r

            Case 2 To 4

                Return name

            Case 5 To 6

                Return getLandEnd(l, name)

            Case 7 To 12

                Return getEnd(l, name)

            Case Else

                Return "Error"

        End Select

    End Function

Ending suffix function (what vowel does the name end with):
Code: [Select]
    Private Function getEnd(l As Integer, name As String) As String

        If name.Length() <= 2 Then

            Return name

        Else

        End If

        Console.WriteLine(name)
        Dim last As String = name.Substring(name.Length() - 1, 1)
        Console.WriteLine(last)
        Dim ll As String = name.Substring(name.Length() - 2, 2)
        Console.WriteLine(ll)

        If last = "a" Then
            Console.WriteLine(name & " ends in 'a'")
            Return name.Insert(name.Length(), "n")

        ElseIf ll = "ae" Then

            Console.WriteLine(name & " ends in 'ae'")
            Return name.Insert(name.Length(), "n")

        ElseIf last = "e" Then

            Console.WriteLine(name & " ends in 'e'")
            Return name.Insert(name.Length(), "a")

        ElseIf ll = "ai" Then
            Console.WriteLine(name & " ends in 'ai'")
            Return name.Insert(name.Length(), "n")

        ElseIf last = "i" Then
            Console.WriteLine(name & " ends in 'i'")
            Return name.Insert(name.Length(), "a")

        ElseIf last = "o" OrElse last = "u" Then

            Console.WriteLine(name & " ends in 'o' or 'u'")
            Return name

        ElseIf last = "y" Then
            Console.WriteLine(name & " ends in 'y'")
            name.Remove(name.Length() - 1, 1)
            Console.WriteLine(name)
            Return name.Insert(name.Length(), "ia")

        Else
            Console.WriteLine(name & " did not match any conditions")
            Return name

        End If

    End Function

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #74 on: 31 October 2017, 00:05:35 »
Moons and rings are done :D

Code: [Select]
<planet>
    <name>Abejorral</name>
    <xcood>-299.341</xcood>
    <ycood>127.388</ycood>
    <spectralClass>F</spectralClass>
    <subtype>0</subtype>
    <luminosity>V</luminosity>
    <spectralType>F0V</spectralType>
    <sysPos>3</sysPos>
    <axis>No Tilt</axis>
    <orbit>Circular</orbit>
    <pressure>4</pressure>
    <gravity>0.7</gravity>
    <lifeForm>8</lifeForm>
    <climate>HELL</climate>
    <percentWater>20</percentWater>
    <temperature>72</temperature>
    <satellite>Ring System</satellite>
    <satellite>Kohlmann</satellite>
    <landMass>Sørum</landMass>
    <faction>UND</faction>
    <factionChange>
      <date>2750-01-01</date>
      <faction>LA</faction>
    </factionChange>
    <factionChange>
      <date>3040-01-01</date>
      <faction>FC</faction>
    </factionChange>
    <factionChange>
      <date>3057-09-18</date>
      <faction>LA</faction>
    </factionChange>
    <desc>[Breathable Atmosphere] </desc>
  </planet>

idea weenie

  • Major
  • *
  • Posts: 4879
Re: CO System Generation
« Reply #75 on: 31 October 2017, 21:10:50 »
Oh wow, so just have it go through and count the probability of all the first letters, second letters and what they come after, third letters and what two they come after, etc, etc. 

Third letter would only care about what second letter came before it, fourth letter would only care about letter #3, aso.  Letter #1 has no direct effect on what letter #3 will be.

Try this pseudo-code:
Variables and stuff:
input-file (where it reads one word in at a time)
Table-Letters [27][27] (value zeroes)  (Table is indexed by Begin and A-Z on the first index, and by End and A-Z on the second index)
ws-word (long enough to fit any word you put in, capable of being read one letter at a time, initially set to spaces)


Main-program
initialize ws-word (makes sure there is only spaces in the variable)
read input-file into ws-word  (where word(0) is equal to the beginning), and word(i+1) is equal to End, where i is the number of letters in the word)
perform until end-of-the-input
     Perform Process-Word
     initialize ws-word
     read input-file into ws-word (reads the next record in, and if it reaches the end of the input)
end-perform
Output Table-letters (however you want to do this so the table can be used elsewhere)
End program

Process-Word
move +1 to i (gotta start at the first letter of the word)
Add +1 to Table-Letters[Begin][ws-word(i)]
Perform until ws-word(i+1) = spaces
     Add +1 to Table-Letters[ws-word(i)][ws-word(i+1)]
     Add +1 to i
End-perform
Add +1 to Table-Letters[ws-word(i)][End]

The above code takes in one word at a time in the Main program, stopping when it gets to the end of the input file.  The subprogram Process-Word iterates through each letter in the word, stopping when it finds a space.  Since the space means the word has finished, it adds 1 to the row for that letter where the 'End' tag exists in the columns.

If you want, you set it up to where it takes in letters #1 and #2, and adds  to the intersection of those two letters and letter #3.  You then feed in letters #2 and #3, with +1 at the intersection of those and letter #4, aso.

Now if you really want to get fancy, you dynamically allocate the table, adding rows and columns as letters show up so if a certain letter never appears in the input file, you don't allocate a row/column for it.  Also, if special characters occur, you add extra rows and columns to make room for them (initializing the new rows/columns as necessary).

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #76 on: 31 October 2017, 21:34:29 »
http://bg.battletech.com/forums/index.php?topic=59271.0

I am not sure which way to go with this???

Hammer

  • Numerorum Malleo
  • Global Moderator
  • Major
  • *
  • Posts: 4139
    • MegaMek Website
Re: CO System Generation
« Reply #77 on: 31 October 2017, 21:43:47 »
http://bg.battletech.com/forums/index.php?topic=59271.0

I am not sure which way to go with this???

Hit's the summon Cray button and waits...... :)
MegaMek Projects Wiki
Bug Trackers
MegaMek Tracker
MekHQ Tracker
MegaMekLab Tracker
New Units and RAT's aren't added until after the 2 month release moratorium is passed.
Join the official MegaMek Discord

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #78 on: 31 October 2017, 23:33:51 »
I went with subtracting the star's habitability mod to the 2D6 roll, can change it if thats wrong.

Code: [Select]
  <planet>
    <name>Zumbo</name>
    <xcood>711.438</xcood>
    <ycood>162.875</ycood>
    <spectralClass>G</spectralClass>
    <subtype>4</subtype>
    <luminosity>V</luminosity>
    <spectralType>G4V</spectralType>
    <sysPos>2</sysPos>
    <axis>Tilted</axis>
    <orbit>Circular</orbit>
    <pressure>3</pressure>
    <gravity>1.6</gravity>
    <lifeForm>4</lifeForm>
    <climate>TROPICAL</climate>
    <percentWater>40</percentWater>
    <temperature>25</temperature>
    <landMass>New Hockridgeland</landMass>
    <landMass>Chaundlerland</landMass>
    <landMass>Devaux</landMass>
    <faction>UND</faction>
    <factionChange>
      <date>2750-01-01</date>
      <faction>OA</faction>
    </factionChange>
    <factionChange>
      <date>2864-01-01</date>
      <faction>PIND</faction>
    </factionChange>
    <factionChange>
      <date>2890-01-01</date>
      <faction>ABN</faction>
    </factionChange>
    <desc>[Hostile Life Form] [Breathable Atmosphere] </desc>
  </planet>

cray

  • Freelance Writer
  • Major
  • *
  • Posts: 6273
  • How's it sit? Pretty cunning, don't you think?
Re: CO System Generation
« Reply #79 on: 01 November 2017, 16:01:01 »
The original intent was to add habitability modifier to the special planet type modifier of that paragraph. Some punctuation got lost in years of editing and rewording.
Mike Miller, Materials Engineer

**"A man walks down the street in that hat, people know he's not afraid of anything." --Wash, Firefly.
**"Well, the first class name [for pocket WarShips]: 'Ship with delusions of grandeur that is going to evaporate 3.1 seconds after coming into NPPC range' tended to cause morale problems...." --Korzon77
**"Describe the Clans." "Imagine an entire civilization built out of 80’s Ric Flairs, Hulk Hogans, & Macho Man Randy Savages ruling over an entire labor force with Einstein Level Intelligence." --Jake Mikolaitis


Disclaimer: Anything stated in this post is unofficial and non-canon unless directly quoted from a published book. Random internet musings of a BattleTech writer are not canon.

NeonKnight

  • Freelance Writer
  • Major
  • *
  • Posts: 6349
  • Cause Them My Initials!
Re: CO System Generation
« Reply #80 on: 03 November 2017, 19:37:17 »
So, what is the status of this project? Looking to make a system etc, and while I could do by hand...would rather do by buttons :D
AGENT #575, Vancouver Canada

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #81 on: 03 November 2017, 22:54:33 »
I could very well make it create a system.  But, since MekHQ isnt coded for that yet we have stuck to just planets.  I just completed special features and have been dinking around with getting it to add "new" or "old" in front of a land mass' name and then also able to tack on "land" to the end of a name in 32 languages with some of them being backwards (not fun I am not a linguist).  But this is what is does for the Xml so far (attachment).

Next will be the colony creation stuff, which wont show up in the Xml but will be fields behind the scenes for each planet which I need to define for sociIndustrial and HPGs.  Then I can finally work on the actual form window that will display all this data to the user with [regenerate] buttons beside each field and also a manual entry box with a [submit] button for if the user doesnt like what it did for a particular planet can use the UI to regen or manually change them.  Do you guys already have a tool for this?


BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #82 on: 04 November 2017, 11:06:36 »
doesnt a planet having a ring system add a (-1) to the habitability modifier?  I might need to make that hab mod a xmlIgnore field for each planet so rings can modify it "before" I do all the rolls for lifeform and everything else
1. Generate star
2. Generate satellites
3. Generate landmass
4. Generate everything else

Work from the outside-in kinda thing i guess.  I've just been doing it in the order the tags are in the xml but, I think I need to change that up.

cray

  • Freelance Writer
  • Major
  • *
  • Posts: 6273
  • How's it sit? Pretty cunning, don't you think?
Re: CO System Generation
« Reply #83 on: 04 November 2017, 13:50:00 »
doesnt a planet having a ring system add a (-1) to the habitability modifier?

No. The habitability problem of rings is mentioned in text (p. 106), but doesn't actually impact (har har) habitability rolls. The text mentions common issues players may wish to consider when placing moons, but doesn't actually implement those in the same way "realistic planetary placement" is left to Options p. 118 - you can do it, but it won't happen with the basic dice rolls.
Mike Miller, Materials Engineer

**"A man walks down the street in that hat, people know he's not afraid of anything." --Wash, Firefly.
**"Well, the first class name [for pocket WarShips]: 'Ship with delusions of grandeur that is going to evaporate 3.1 seconds after coming into NPPC range' tended to cause morale problems...." --Korzon77
**"Describe the Clans." "Imagine an entire civilization built out of 80’s Ric Flairs, Hulk Hogans, & Macho Man Randy Savages ruling over an entire labor force with Einstein Level Intelligence." --Jake Mikolaitis


Disclaimer: Anything stated in this post is unofficial and non-canon unless directly quoted from a published book. Random internet musings of a BattleTech writer are not canon.

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #84 on: 05 November 2017, 15:36:22 »
So I am doing space stations and asteroid fields a different way now.  We are going to try and have the descriptions for each planet, spacestation, asteroidfield formatted more like an actual description so, had to change some things.
Before was using those [Space Station][Asteroid Field] strings in the description to determine what gets generated for a planet.  Now I can just change the tag from <planet> to <spacestation> or <asteroidfield> instead.  But, system position is determine off the pressure and temp of the body so this raises a question.

Some of the space stations and asteroid field already have predefined temps of -270 and pressure 0.  In megamek at least temp and gravity and all that do not matter for space battles.  But, would it make sense to have a space stations system position placed where its temp is -270 and still realistically receive enough energy from the star to stay charged?
I could maybe have it treat a space stations pressure as 0 (temp ranges from -150 to +150) 1 (-100 to +100) 2 (-50 To +50) just for a realistic system placement.  When you roll for a contract that takes you to a "planet" that is actually a space station how are those battle scenarios played out?  ASF battles or mechs fighting on the outer hull of the station? (cant really do in MegaMek / HQ)

Similar question for asteroid fields.  Are asteroid field scenarios ASF battles where temp and gravity do not matter or are they mech battles on the surface of an asteroid where temp and gravity would have an effect? (can be done in MegaMek)

Star's End has gravity, pressure, surfaceWater, and all that defined for it in the lore but.....does it matter for an asteroid?

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #85 on: 05 November 2017, 16:08:18 »
Code: [Select]
<asteroidfield>
<name>Star's End (Novo Cressidas)</name>
<xcood>-83.244</xcood>
<ycood>432.154</ycood>
<pressure>0</pressure>
<gravity>0.75</gravity>
<percentWater>15</percentWater>
<temperature>-270</temperature>
<spectralClass>M</spectralClass>
<subtype>5</subtype>
<luminosity>V</luminosity>
<sysPos>2</sysPos>
<socioIndustrial>A-B-D-C-F</socioIndustrial>
<hpg>A</hpg>

Since my code isnt generating a system or anything the sysPos is actually the orbital slot #.  So when my thing generates a position of 5 for planet that might actually only be the 3rd planet in a system and not actually the 5th but, my thing's only purpose is to fill them out so HQ can use them with how it is coded now.

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #86 on: 05 November 2017, 18:40:12 »
Code: [Select]
<name>Wynn's Roost</name>
    <xcood>610.609</xcood>
    <ycood>269.932</ycood>
    <spectralClass>M</spectralClass>
    <subtype>0</subtype>
    <luminosity>V</luminosity>
    <spectralType>M0V</spectralType>
    <sysPos>1</sysPos>
    <axis>No Tilt</axis>
    <orbit>Circular</orbit>
    <pressure>3</pressure>
    <gravity>1.1</gravity>
    <lifeForm>6</lifeForm>
    <climate>TROPICAL</climate>
    <percentWater>40</percentWater>
    <temperature>29</temperature>
    <satellite>Tobitt</satellite>
    <satellite>Turner</satellite>
    <satellite>Khursh</satellite>
    <satellite>Hawes</satellite>
    <satellite>Boddy</satellite>
    <satellite>McReyney</satellite>
    <landMass>MacEwing</landMass>
    <faction>UND</faction>

I think the RAW generate too many moons fairly often.

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #87 on: 06 November 2017, 21:33:56 »
So, this is what I do for a planets mass and diameter:

Mass
Code: [Select]
    Private Function getMass() As Decimal

        Dim r As Integer = roll2D6()
        Select Case r

            Case 2
                '75% Earth
                Return 4.485 * (10 ^ 24)

            Case 3

                Return 4.784 * (10 ^ 24)

            Case 4

                Return 5.083 * (10 ^ 24)

            Case 5

                Return 5.382 * (10 ^ 24)

            Case 6

                Return 5.681 * (10 ^ 24)

            Case 7
                'Earth
                Return 5.98 * (10 ^ 24)

            Case 8

                Return 6.279 * (10 ^ 24)

            Case 9

                Return 6.578 * (10 ^ 24)

            Case 10

                Return 6.877 * (10 ^ 24)

            Case 11

                Return 7.176 * (10 ^ 24)

            Case 12
                '125% Earth
                Return 7.475 * (10 ^ 24)

            Case Else

                Return 0

        End Select

    End Function

Diameter
Code: [Select]
    Private Function getDiameter() As Decimal

        Dim r As Integer = roll2D6()
        Select Case r

            Case 2
                '75% Earth
                Return 9.567 * (10 ^ 6)

            Case 3

                Return 1.02048 * (10 ^ 7)

            Case 4

                Return 1.08426 * (10 ^ 7)

            Case 5

                Return 1.114804 * (10 ^ 7)

            Case 6

                Return 1.21182 * (10 ^ 7)

            Case 7
                'Earth
                Return 1.2756 * (10 ^ 7)

            Case 8

                Return 1.33938 * (10 ^ 7)

            Case 9

                Return 1.40316 * (10 ^ 7)

            Case 10

                Return 1.46694 * (10 ^ 7)

            Case 11

                Return 1.53072 * (10 ^ 7)

            Case 12
                '125% Earth
                Return 1.5945 * (10 ^ 7)

            Case Else

                Return 0

        End Select

    End Function

Escape Velocity
Code: [Select]
    Private Function getEscapeV(planet) As Decimal

        Return ((2 * G * planet.mass()) / (planet.diameter() / 2)) ^ (1 / 2)

    End Function

Gravity
Code: [Select]
    Private Function getGravity(planet) As Decimal

        Dim accel As Decimal = (G * planet.mass()) / ((planet.diameter() / 2) ^ 2)
        Return Math.Round(accel / 9.81, 1, MidpointRounding.AwayFromZero)

    End Function

Const G As Decimal = 6.67 * (10 ^ -11)

So the least dense planet:
-Mass = 4.485 * (10 ^ 24) (75% of E)
-Diameter = 1.5945 * (10 ^ 7) (125% of E)
-EscapeV = 8662.871543
-Gravity = 0.47976683

Most dense planet:
-Mass = 7.475 * (10 ^ 24) (125% of E)
-Diameter = 9.567 * (10 ^ 6) (75% of E)
-EscapeV = 14438.11924
-Gravity = 2.221142729

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #88 on: 07 November 2017, 02:47:00 »
Now that I finally got all the String.Format()'s setup right (don't really like how it displays scientific notation but, oh well)

Code: [Select]
<planet>
<name>Alfirk</name>
<xcood>588.602</xcood>
<ycood>454.172</ycood>
<spectralClass>M</spectralClass>
<subtype>0</subtype>
<luminosity>III</luminosity>
<spectralType>M0III</spectralType>
<sysPos>8</sysPos>
<pressure>2</pressure>
<gravity>1.3</gravity>
<lifeForm>6</lifeForm>
<climate>ARCTIC</climate>
<percentWater>40</percentWater>
<temperature>-16</temperature>
<landMass>Navāṁ Nirupaman</landMass>
<landMass>Frenkiel</landMass>
<landMass>Studs</landMass>
<landMass>Thain</landMass>
<faction>UND</faction>
<factionChange>
<date>2271-01-01</date>
<faction>IND</faction>
</factionChange>
<desc>Alfirk has a diameter of 12,118km, has a mass of 6.877000e+024kg, has an escape velocity of 12.305km/s, axis tilt does not effect or create seasons, has short summers and long winters due to an elliptical orbit, has a tainted atmosphere, experiences intense volcanic activity, and has a population of 12,800,000.</desc>
</planet>

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #89 on: 07 November 2017, 14:04:42 »
Code: [Select]
    <planet>
        <name>Abagnar</name>
        <xcood>380.231</xcood>
        <ycood>314.823</ycood>
        <spectralClass>F</spectralClass>
        <subtype>2</subtype>
        <luminosity>IV</luminosity>
        <spectralType>F2IV</spectralType>
        <sysPos>4</sysPos>
        <pressure>5</pressure>
        <gravity>1</gravity>
        <lifeForm>3</lifeForm>
        <climate>HELL</climate>
        <percentWater>5</percentWater>
        <temperature>144</temperature>
        <satellite>Benedict</satellite>
        <satellite>Kanesaka</satellite>
        <landMass>Miyauchia</landMass>
        <landMass>Fahad Alqadim</landMass>
        <faction>UND</faction>
        <factionChange>
            <date>2750-01-01</date>
            <faction>DC</faction>
        </factionChange>
        <desc>Abagnar has a diameter of 12,756km(100% of standard), has a density of 5.778g/cm3(105% of standard), has an escape velocity of 11.460km/s, axis tilt does not effect or create seasons, has short summers and long winters due to an elliptical orbit, has a breathable atmosphere, and has a population of 17,600,000.</desc>
    </planet>

Added a % of standard(Earth) for diameter and went with density instead since the raw material dependence modifiers depend on density of the planet instead of mass.  And changed the wording to "axial tilt" after it made this.

Sir Chaos

  • Captain
  • *
  • Posts: 3089
  • Artillery Fanboy
Re: CO System Generation
« Reply #90 on: 07 November 2017, 15:25:14 »
Code: [Select]
    <planet>
        <name>Abagnar</name>
        <xcood>380.231</xcood>
        <ycood>314.823</ycood>
        <spectralClass>F</spectralClass>
        <subtype>2</subtype>
        <luminosity>IV</luminosity>
        <spectralType>F2IV</spectralType>
        <sysPos>4</sysPos>
        <pressure>5</pressure>
        <gravity>1</gravity>
        <lifeForm>3</lifeForm>
        <climate>HELL</climate>
        <percentWater>5</percentWater>
        <temperature>144</temperature>
        <satellite>Benedict</satellite>
        <satellite>Kanesaka</satellite>
        <landMass>Miyauchia</landMass>
        <landMass>Fahad Alqadim</landMass>
        <faction>UND</faction>
        <factionChange>
            <date>2750-01-01</date>
            <faction>DC</faction>
        </factionChange>
        <desc>Abagnar has a diameter of 12,756km(100% of standard), has a density of 5.778g/cm3(105% of standard), has an escape velocity of 11.460km/s, axis tilt does not effect or create seasons, has short summers and long winters due to an elliptical orbit, has a breathable atmosphere, and has a population of 17,600,000.</desc>
    </planet>

Added a % of standard(Earth) for diameter and went with density instead since the raw material dependence modifiers depend on density of the planet instead of mass.  And changed the wording to "axial tilt" after it made this.

I´d use "1.0 Earth diameters" or just "1.0 Earth" instead of "standard", but that´s mostly a matter of preference.

Also, surface gravity is proportional to the product of diameter and density: 1.0 Earth diameters and 1.0 times Earth´s density gives you 1.0 g surface gravity. Abagnar would have 1.05 g gravity, not 1.0 g, thus.
"Artillery adds dignity to what would otherwise be a vulgar brawl."
-Frederick the Great

"Ultima Ratio Regis" ("The Last Resort of the King")
- Inscription on cannon barrel, 18th century

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #91 on: 07 November 2017, 16:38:40 »
It's rounded to one decimal place.  So, the 1.04.... becomes 1.0  It will be ok.  The tabletop rules dont care about past the first decimal place so thats why I rounded it.

Code: [Select]
    Const G As Decimal = 6.67 * (10 ^ -11)   

    Private Function getGravity(planet) As Decimal

        Dim accel As Decimal = (G * planet.pMass()) / ((planet.diameter() / 2) ^ 2)
        Return Math.Round(accel / 9.81, 1, MidpointRounding.AwayFromZero)

    End Function

So:
(6.67E-11  * 6.27942E+24) / ((12756000 / 2) ^ 2) and then / 9.81 = 1.049560525 G's


BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #92 on: 07 November 2017, 19:17:44 »
Code: [Select]
<planet>
<name>Aberystwyth</name>
<xcood>-430.967</xcood>
<ycood>58.633</ycood>
<spectralClass>G</spectralClass>
<subtype>5</subtype>
<luminosity>III</luminosity>
<spectralType>G5III</spectralType>
<sysPos>5</sysPos>
<pressure>4</pressure>
<gravity>0.73</gravity>
<lifeForm>7</lifeForm>
<climate>HELL</climate>
<percentWater>40</percentWater>
<temperature>46</temperature>
<satellite>Kirkeby</satellite>
<satellite>Meekins</satellite>
<satellite>Sachs</satellite>
<satellite>Jaeger</satellite>
<satellite>Lyvet</satellite>
<satellite>Tosh</satellite>
<satellite>Pfeffer</satellite>
<satellite>Fischer</satellite>
<landMass>Gammalt Trondsenland</landMass>
<landMass>Bjørgenland</landMass>
<landMass>Sollid</landMass>
<landMass>Remmea</landMass>
<landMass>Ramsay</landMass>
<landMass>Nytt Bratberg</landMass>
<landMass>Altes Hòbsch</landMass>
<landMass>Old Greusach</landMass>
<landMass>McKill</landMass>
<faction>UND</faction>
<factionChange>
<date>2750-01-01</date>
<faction>RWR</faction>
</factionChange>
<factionChange>
<date>2779-01-01</date>
<faction>LA</faction>
</factionChange>
<factionChange>
<date>3040-01-01</date>
<faction>FC</faction>
</factionChange>
<factionChange>
<date>3057-09-18</date>
<faction>LA</faction>
</factionChange>
<desc>Aberystwyth has a diameter of 15,307km(1.20 of standard), has a density of 3.344g/cm3(0.61 of standard), has an escape velocity of 10.461km/s, axial tilt does not effect or create seasons, has short summers and long winters due to an elliptical orbit, has a breathable atmosphere, is home to a hostile life form, and has a population of 230,400,000.</desc>
</planet>

There.  Has some kind of hostile bird or dinosaur I guess.  Am using standard just for I guess the RP element.  Some people in the IS may have never been to Earth so, standard just seems right to me for this.

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #93 on: 08 November 2017, 23:28:27 »
Code: [Select]
Zumbo does not have lore
Zumbo star class= G generated
Zumbo star subtype= 2 generated
Zumbo star luminosity= Ia generated
Zumbo star type= G2Ia generated
Zumbo Gravity= 1.11 generated
Zumbo Atmosphere= 3 generated
Zumbo SysPos= 9 generated
Zumbo Temp= 29 generated
Zumbo life form= 3 generated
Zumbo percent water= 40 generated
Zumbo climate= TROPICAL generated
Zumbo Axis=  has seasons due to an axial tilt generated
Zumbo Orbit=  has short summers and long winters due to an elliptical orbit generated
Zumbo land mass= Old Whiteway generated
Zumbo land mass= Pennan generated
Zumbo land mass= Samir generated
Zumbo land mass= Sarika generated
Zumbo land mass= Chell generated
Zumbo has a tainted atmosphere
Zumbo
Zumbo initial population= 32,500,000
Zumbo modified population= 20,800,000
date index <= 3025 2
faction (<=3025)= ABN
founded during Star League
 new tech= 2
does not belong to a major faction as of 3025
 new tech= 3
less than 100 million people
 new tech= 4
Zumbo tech score= 4
less than 100 million people
new dev score= 5
Zumbo development score= 5
technology of D or F
new output score= 4
industrial development of D or less
new output score= 5
Zumbo output score= 5
settled date= 2750
density is >= 5.5 g/cm3
new material score= 1
settled over 250 years ago
new material score= 2
Zumbo material score= 2
less than 50% surface water
new agr score= 4
 has a tainted atmosphere
new agr score= 5
Zumbo agricultural score= 5
Zumbo USILR= D-F-B-F-F

SocioIndustrial is done.

idea weenie

  • Major
  • *
  • Posts: 4879
Re: CO System Generation
« Reply #94 on: 11 November 2017, 15:02:32 »
So, this is what I do for a planets mass and diameter:
Mass
Code: [Select]
    Private Function getMass() As Decimal
        Dim r As Integer = roll2D6()
        Select Case r
            Case 7
                'Earth
                Return 5.98 * (10 ^ 24)
            Case Else
                Return 0
        End Select
    End Function

Diameter
Code: [Select]
    Private Function getDiameter() As Decimal
        Dim r As Integer = roll2D6()
        Select Case r
            Case 7
                'Earth
                Return 1.2756 * (10 ^ 7)
            Case Else
                Return 0
        End Select
    End Function

I'd be tempted to be sneaky and leave off the Case 7 by using Earth as the Case Other, to answer why there are so many Earth-like planets.  (Or for practicality turn the Case 12 into Case Other as it will be at the end anyway)

My other wondering is if you can store the exponents elsewhere to make other math simpler for the CPU.  Instead of having the number cruncher having to work with large numbers due to the exponents, you factor it down.

For example removing the scientific notation and just storing Planet Mass as 5.98 and Diameter as 1.2756, then converting from the original equation to the following for escape velocity:
Code: [Select]
Return ((2 * G * planet.mass() * 10^24) / (planet.diameter() * 10^7 / 2)) ^ (1 / 2)
Return ((2 * G * 10^24/10^7 * planet.mass() / (planet.diameter() / 2)) ^ (1 / 2)
Return ((2 * G * 10^17 * planet.mass() / (planet.diameter() / 2)) ^ (1 / 2)
Return ((2 * G * 10^16 * 10 * planet.mass() / (planet.diameter() / 2)) ^ (1 / 2)
Return ((2 * G * 10 * planet.mass() / (planet.diameter() / 2)) ^ (1 / 2) * 10^8
Return ((20 * G * planet.mass() / (planet.diameter() / 2)) ^ (1 / 2) * 10^8
Return ((4 * 5 * G * planet.mass() / (planet.diameter() / 2)) ^ (1 / 2) * 10^8
Return ((5 * G * planet.mass() / (planet.diameter() / 2)) ^ (1 / 2) * 2 * 10^8

I can understand why you didn't do it initially, as you'd have to keep notes as to what the formulas were descended from.  Does your language allow for easy scientific notation calculations, or is the potential CPU savings not really worth it?

Nice code though.  Simple and to the point, it almost doesn't even need comments

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #95 on: 12 November 2017, 22:33:29 »
The Case Else is (not possible) if the switch ends up being something other than the define values.  Its just there for if there is an error with the case that its is checking.  And honestly I dont know if scientific notation makes it slow or not, I just started learning code and started with VB.NET.  It has to do all of these checks and generate functions for 3,146 planets so, the program is going to be kinda slow regardless.  I think it takes almost 5 min on my laptop 1.3Ghz but you guys wont ever have to do this.  Once I fully generate everything for all the planets that xml will be saved then the app will be for going in an re-generating anything that doesnt make sense or manually entering new data but will never need to regen 3000 planets again.

idea weenie

  • Major
  • *
  • Posts: 4879
Re: CO System Generation
« Reply #96 on: 14 November 2017, 18:34:29 »
The Case Else is (not possible) if the switch ends up being something other than the define values.  Its just there for if there is an error with the case that its is checking.  And honestly I dont know if scientific notation makes it slow or not, I just started learning code and started with VB.NET.  It has to do all of these checks and generate functions for 3,146 planets so, the program is going to be kinda slow regardless.  I think it takes almost 5 min on my laptop 1.3Ghz but you guys wont ever have to do this.  Once I fully generate everything for all the planets that xml will be saved then the app will be for going in an re-generating anything that doesnt make sense or manually entering new data but will never need to regen 3000 planets again.

For the Case Else, I was thinking that you'd have the 7s and Other drop into that last field (or 12s and Other).  That way you guarantee returning good values.  Chances are the Other case would never get executed since you are rolling 2d6 (and likely forcing the return value to be an integer), but it would serve to catch the last possible value and still be able to handle a hiccup.

But if you need it to error out by outputting zeroes, that works too.


The other idea would be using seed pseudo random values, where if you put in a specific number a seed, you ill always get the same result out.  Great for debugging, as you can have a system simply error out and display the seed value, but the rest of the systems keep getting printed.  You can then go in afterward, put in the seed value, and step through the code to see why it horked up.


Impressive database with the xml, hope you have a way to search it and display only a few systems at a time, instead of trying to display everything.  One cheat method to plot jump radius might be to compare the 2 locations' X and y coordinates, and ignore everything that has an X or Y that is over 30 light years away.  You then only run the calculations on what remains.  Just under 80% of those systems will be valid destinations.

BLOODWOLF

  • Warrant Officer
  • *
  • Posts: 695
Re: CO System Generation
« Reply #97 on: 18 November 2017, 11:00:30 »
So found out HQ can read more xml tags than just what are in the planets.xml.  Akjosch had coded a bunch of new things and planets can have albedo, greenhouse, tilt, orbit eccentricity, orbit inclination, etc lots of stuff.  So, am probably going to have to redo my Primary stats spreadsheet for all the stars and their "colonizeable zone". 

Planet equatorial temp(30 for terra) = (planet average temp from the spreadsheet actually using the correct formula with albedo now)-16'C(earth) + (percentWater(75 for terra) * 0.204 * pressure(integer 3 for standard))

But again this is going to bring up the same problem I had previously.  How to define the "colonizeable" zone edges (not life zone) that man would colonize the planet?  In the BT lore man has colonized at least one planet I know of that is tidally locked and theyre on the dark side of the airless rock (like Mercury).

So a planet with a vacuum atmosphere very close to the sun would I assume man would colonize it?  Or only if that planet was tidally locked?

Planets with very high atmospheres, what is too hot?  Venus I would think as a very high atmosphere planet with a surface temp of almost 900'F but man terra-formed it......idk how I could code for that edge-case.

If man would colonize anything and everything then there almost isnt any point to the colonizeable zone edges and everything is fair game but, Im wanting to come up some some limits for this.

I see why Cray went with the life zone thing because we actually have some kind of conditions that would have to be met for life to exist but, trying to instead come up with conditions for if man would colonize the planet (solely to populate the canon planets we have now with no data remember) there are not clearly defined conditions as to what planet meets those criteria since they can terra-form.

idea weenie

  • Major
  • *
  • Posts: 4879
Re: CO System Generation
« Reply #98 on: 19 November 2017, 12:26:58 »
You could put notes on what the life zone is for the star, and if the colonized planet is outside at least one of those zones, it will list the zone(s), and how far out the planet is.  This would allow people to determine how difficult it was to colonize/terraform the planet, and how much of their production likely goes to keeping everyone alive.

I.e. if the planet has a methane atmosphere, then the colonists live in domes, and that maintenance is a critical part of their economy.  Living on the dark side of a Mercury like planet?  At that point the whole place is uninhabitable, and there likely has to be a reason they colonized that nightmare.  Perhaps it has easily accessible veins of metal from one side being heated, the 'lava' flowing around to the dark side, and as the metal cools the high temperature stuff cools first, followed by lower and lower temperatures, like zone refining on a planetary scale.  The planet exports valuable metals and uses the available temperature for high-temperature smelting, also exporting valuable alloys.  Imports would be water, food, and similar biologicals.

Another planet might have been too cold for casual colonization initially, but the sponsoring company was looking to the far future, when there would be enough waste heat from industry and individuals to warm the planet up (Atreus?).  Unfortunately, the Star League fell, and the descendants have to deal with frozen keesters every day of their lives.  Communal buildings could be the norm, as it allows for shared body warmth.  On that planet, there is no such thing as waste heat, as every part of the industrial process that produces heat is used to heat up other products, or radiate into the building central heating system.  (I.e. 1920s coal boiler electrical plant would be 25% efficient, and that electricity was used to power heaters in a nearby building.  One person looked at it and said the electricity should be used for something else, and the waste steam should be used to heat the building instead.)
« Last Edit: 06 January 2018, 22:12:04 by idea weenie »

 

Register