Author Topic: CO System Generation  (Read 14146 times)

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: 6353
  • 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: 4141
    • 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: 6353
  • 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.