Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3

Author Topic: Magma's weird and zany text generators  (Read 4201 times)

Magmacube_tr

  • Bay Watcher
  • Praise KeK! For He is The Key and The Gate!
    • View Profile
Magma's weird and zany text generators
« on: November 08, 2023, 04:54:26 pm »

I wanted make a thread for these procedural generators I've been intermittently working on. I like writing them up, and I would really like it if you checked them out and gave some feedback. (You can peek in with the edit button on top if you want to see the nifty stuff inside.)



Astropedia: The catalogue of all worlds. By far the largest of them background-wise, and will probably stay largest forever. It is the product of about 2 and a half years of spontaneous hyperfixations followed by being forgotten about for 6 months.

1800+ 2000+ 2300+ lines and counting with every new text, subsystem, list and devnote. Pure brute force code. Cargo cult HTML. Unadulterated chaos.

Code: (devlog) [Select]
08/11/2023
            -Fixed: Gas giant atmospheric properties not showing up.
10/11/2023
            -Extensive internal changes.
            -Added: Dead worlds classified with their atmospheric compositions (venusian, martian, titanean)
18/11/2023
            -Extensive internal changes. Planet templates modularised. Planet generation selection has been refined.
            -Added: Dedicated "Orbital System" tab for all planets.
            -Added: Dedicated "Chemical Composition" tab for gas giants.
            -Added: Uninhabitable worlds now come in all sorts of different climates.
            -Added: Dwarf Planets.
19/11/2023
            -Added: "Civilisation Status" tab for all terrestrial bodies.
22/11/2023
            -Change: More varied and specific habitable biome selection. Wetness is now a much more divergent variable.
            -Added: "Habitable World" selection that generates both habitable planets and moons. I dunno why it *should* exist, but I *wanted* it to, so it does.
23/11/2023
            -Change: "Random World" selection moved to the top of the list. Now it is the default, as opposed to "Habitable Planet".
15/12/2023
            -Internal improvements. Single selection and some smaller lists are now shortened.
            -Added: Colony goverment types.
            -Added: Improvements to native civilisation generation.
            -Fixed: Chaotic atmospheric features not showing up.
            -Fixed: Various typos.
19/12/2023:
            -Added: Specific references to moons, planets and dwarf planets. No more repetitive this and that world only.
            -Added: Seed-Based world generation option. Each filter has its own seed array, so for a seed to work, you need to remember which one you enabled.
            -Added: Download button. Gives you a file of the generator that you can use offline.
            -Added: Generator description.
            -Fixed: Typos and punctuation errors.
            -Fixed: The long standing invisible white text.
20/12/2023
            -Added: Improvements to the geological activity level of terrestrial bodies. Now there will be an explanation of the activity level on lithosphere data section depending on the level.
            -Added: Chance for volcanoes to be cryovolcanoes on cold uninhabitable terrestrial worlds.
21/12/2023
            -Fixed: Cryovolcanoes not showing up.
24/12/2023
            -Major improvements to the orbital times of planets. They now abide by a bit more stricter logic.
            -Some minor improvements to orbital infos.
            -Known Issue: Detail moons in planet bios are still defying logic.
26/12/2023
            -Substantial internal improvements to habitable world climate, native civilisation, and planetary settlement generation subsystems. They take much less space now.
            -Added: More fleshed out and variable native civilisation descriptions. From early stone age to modern age.
            -Known issue: A bit of informative spice was lost when habitable climate generation was shrunken down.
27/12/2023
            -Internal improvements to atmospheric feature selection.
            -Capital letter lists destroyed; functionally replaced by .upperCase form.
31/12/2023
            -Habitable planet biome humidity selection modularised. Shrunk to 1/5 its previous size and its humidity referalls are slightly better. Line count went down to below 2500 as a result.
            -Info flavor on uninhabitable regions of habitable worlds regained.
            -New habitable climate type. Extreme is when life only exists at poles or the equator. Only occurs on hot or very cold planets.
01/01/2024
            -Two more plugins added, generator status plugin and copy text plugin.
            -Increased the spice a bit on hydrosphere and world summary generation.
            -Improved world name generation. Shrunk it down 1/3 its previous size.
            -"Improved" orbital distance generation. Now 4 times smaller and works, but at much more limited capacity. Dynamic odds aren't cooperative. Line count below 2400 now.
02/01/2024
            -Shrunk moon distance generation down half its size.
            -Metal element list was moved to own generator entirely, now functions as import. Line count below 2300.
            -Realised that above change breaks dependent picks (.evaluateItem, .selectOne, etc.) Had to revert it. Line count is +2300 again. Got two nifty little generators from that, though.
03/01/2024
            -Shrunk lithosperic feature generation down to 1/3 its previous size. Also added spice.
07/01/2024
            -Added a bunch of insignificant spice to various places.
            -Added a new stage of advancement for primitive natives, the interplanetary civilisation option.
            -Tried to add dynamic odds into planet orbit generation again. Failed. It works, but it also doesn't????
08/01/2024
            -Improved planetary ring generation a bit.
15/01/2024
            -Changed the font size of the planetary description. It is smaller now, which should help with overral readability.
            -Shrunk the name code addition selection.
01/02/2024
            -Changed the background image, removed the rocket.
2?/02/2024
            -Added some more spice.



The Deity Forge: It is a simple generator that makes up random divine figures of various alignments and assigns them portfolios.

Code: (devlog) [Select]
???
            -Added: Deity origins.
23/11/2023
            -Fixed: Repeating portfolios



Emre's Consonant Phonetics Practice: A small quiz-like "generator" that gives you consonant letters to analyse.

Unlikely to ever get another update.

Code: (devlog) [Select]
Change: Turned the answers from text boxes into checkboxes for improved ease of use.



Metallic and nonmetallic element generators: Results of a failed experiment. Useful for a potential {import:NAME}.


Star System Chart Generator: A generator that procedurally generates solar system charts. 21 different planet types. The world placement is based on real planetary system dynamics.

Code: [Select]
20/02/2024
.           -Initial release.

21/02/2024 - 05/03/2024 (forums were down)
            -Added neptunoids
            -Added lava worlds
            -Added iceshell worlds
            -Added tundra worlds
            -Added desert worlds
            -Added superhabitable worlds
            -Added 2 more orbitals
            -Tweaked planet colors to better reflect their types stand out from the black background.
            -Tweaked planet and moon sizes. Lunar-sized habitable, noxious, hycean and ocean moons no longer generate.
            -Added icy and rocky planetary rings
            -Added icy and rocky asteroid belts
            -Added generation using seed
            -Improved seed generation by making it so that the generator won't generate a new system everytime one typed
            -Added planetary guide
            -Changed how moons generate. Gas giants can now have large terrestrial planet-sized moons
            -Added 3 more orbitals
            -Added dwarf planets
10/03/2024
            -Added 3 more world types (Proto-earth, water giant, antarctic)
« Last Edit: March 15, 2024, 09:14:46 pm by Magmacube_tr »
Logged
I must submerge myself in MAGMAAAAAAAAA! daily for 17 cents, which I detest. With a new profile picture!

My gaem. JOIN NAOW!!!

My sigtext. Read if you dare!

IncompetentFortressMaker

  • Bay Watcher
  • [NATURAL_SKILL:MODDING:2]
    • View Profile
Re: Magma's weird and zany text generators
« Reply #1 on: November 08, 2023, 07:49:37 pm »

I have to say that first one is impressive! Something does seem a bit odd with it though. For instance, one of the worlds returned was this:
Quote from: Astropedia
PED-58-G is an enormous, maroon colored gas giant with undefined. It is mainly composed of Deuterium.

Orbital Information

Its moon system is mostly composed of small asteroids, but a few small icy minor spherical bodies do exist, along with a single major moon; a medium sized mountainous moon.

Scientific Information

It has a below average amount of surface gravity in comparison to its size. It is the 3rd furthest and the furthest overral world from its main body. A day here takes 23 minutes, and one full rotation around its parent object takes 43 days.

Special Properties And Anomalies

...No Data...
"...gas giant with undefined" doesn't seem intentional?

Magmacube_tr

  • Bay Watcher
  • Praise KeK! For He is The Key and The Gate!
    • View Profile
Re: Magma's weird and zany text generators
« Reply #2 on: November 09, 2023, 04:00:37 am »

"...gas giant with undefined" doesn't seem intentional?

Aw heck, I forgot to change the gas giant template reference when I updated the weather feature selection. Thanks for the notice.
Logged
I must submerge myself in MAGMAAAAAAAAA! daily for 17 cents, which I detest. With a new profile picture!

My gaem. JOIN NAOW!!!

My sigtext. Read if you dare!

Strif3

  • Bay Watcher
  • The vulture on your shoulder
    • View Profile
Re: Magma's weird and zany text generators
« Reply #3 on: November 09, 2023, 07:42:42 pm »

The planet gen's getting pretty comprehensive. It's definitely more on the artistic rather than scientific side but I like it. Seems like it'd be fun for a planet-hopping sci-fy adventure.  ;D
I did notice a couple of mistakes, and a few bits of odd phrasing here and there. Nothing too big though, and it's pretty cool otherwise.
Logged
Freedom is not a spectrum.
Put me in chains, or stop telling me what to do.

Magmacube_tr

  • Bay Watcher
  • Praise KeK! For He is The Key and The Gate!
    • View Profile
Re: Magma's weird and zany text generators
« Reply #4 on: November 10, 2023, 12:42:27 am »

The planet gen's getting pretty comprehensive. It's definitely more on the artistic rather than scientific side but I like it. Seems like it'd be fun for a planet-hopping sci-fy adventure.  ;D
I did notice a couple of mistakes, and a few bits of odd phrasing here and there. Nothing too big though, and it's pretty cool otherwise.

Oh yeah, I know. Repeating biomes, snowstorms in very tropical planets. I will solve them when the time comes.
Logged
I must submerge myself in MAGMAAAAAAAAA! daily for 17 cents, which I detest. With a new profile picture!

My gaem. JOIN NAOW!!!

My sigtext. Read if you dare!

IncompetentFortressMaker

  • Bay Watcher
  • [NATURAL_SKILL:MODDING:2]
    • View Profile
Re: Magma's weird and zany text generators
« Reply #5 on: November 10, 2023, 02:21:33 am »

I will ask you to please continue to allow volcanic ice bodies to be a thing, though, whenever you decide to get around to that. Cryovolcanoes are indeed a thing, and I was nicely surprised when I saw a volcanic ice moon show up once and I was like "hey, that's interesting" because of the common assumption of volcanoes being the molten rock type.

EDIT: Well, I'm sure glad Earth hasn't turned into this Terra yet. I'd be real concerned if we manage to mess it up this badly.
Quote from: Astropedia
Terra is a barren, geologically inactive moon of a hot neptune. It is a hot, dry world, with a terrain comprised of dunes and hot wastelands.

The local hydrosphere is composed of only stagnant, freshwater subterranean aquifers.

Atmosphere Data

It has a red colored, thin, commonly unpredictable atmosphere with seasonal slushings.

Biosphere and Ecology

The moon only has unicelluar microbial life.

Lithosphere Data

It's crust is very fragile on most places, and is rather hazardous if cave systems are present, and lacks industrial metals, but contains useful minerals. It is igneous, and has deep chasms that lead to nowhere. It is a still old, but average world. The age of its crust is around 4 billion years.

Scientific Information

It is very large in scale relative to its body class, and has a high amount of surface gravity compared to it. It is the 8th furthest and the furthest overral world from its main body. A day here ilasts for 57 minutes, and one full rotation around its parent object takes 65 days.

Special Properties And Anomalies

...No Data...
« Last Edit: November 10, 2023, 02:26:12 am by IncompetentFortressMaker »
Logged

Magmacube_tr

  • Bay Watcher
  • Praise KeK! For He is The Key and The Gate!
    • View Profile
Re: Magma's weird and zany text generators
« Reply #6 on: November 10, 2023, 04:36:23 am »

I will ask you to please continue to allow volcanic ice bodies to be a thing, though, whenever you decide to get around to that. Cryovolcanoes are indeed a thing, and I was nicely surprised when I saw a volcanic ice moon show up once and I was like "hey, that's interesting" because of the common assumption of volcanoes being the molten rock type.
I already knew about cryovolcanoes. And I have plans to expand on it.

EDIT: Well, I'm sure glad Earth hasn't turned into this Terra yet. I'd be real concerned if we manage to mess it up this badly.

Ehhhh... It is one of the terrestrial planet special names. Though yea, its kinda funny.
Logged
I must submerge myself in MAGMAAAAAAAAA! daily for 17 cents, which I detest. With a new profile picture!

My gaem. JOIN NAOW!!!

My sigtext. Read if you dare!

Strif3

  • Bay Watcher
  • The vulture on your shoulder
    • View Profile
Re: Magma's weird and zany text generators
« Reply #7 on: November 10, 2023, 05:45:51 pm »

If you're okay with it, i took some time to improve (hopefully) the generator a bit. You can access the version with my changes here: https://perchance.org/e7vfbdjrd8
Feel free to copy the whole thing back to your version if you like it.

Code: (changelog) [Select]
Store planet type selection as a variable. Kinda hacky. Used by the name generator.
Changed the way a random planet type is selected by the generator. Eliminates redundant code.
Revamped name generator. All planets now use one name generator and the planet name is properly stored as a variable.
Renamed "Namemain" to "nameMain"
Generalized nameMain, functions more procedurally.
Made some style changes to how habitable planetary surfaces are described. I wanna change how these are generated in general, later.
BUGFIX: Fixed duplicate biomes. I think. imported consumable leaf lists.
Double fixed above by assigning all biomes to consumable leaf lists at the beginning of planet generation. Ensuring no biome can be picked twice at any point. Hopefully. This is currently only implemented for habitable planets.
Replaced background image with an AI generated one. Sorry Magmacube, i did like the picture you had there, but it suffered from heavy JPEG compression artifacts.
Dropped all biomes into hierarchical lists.
Fixed erroneous usage of rotation to refer to orbital period.

Code: (known bugs) [Select]
Selecting anything other than "habitable planet" as the planet type to be generated may sometimes generate habitable planets instead?
In edge cases, there may not be enough biomes to fill out an entire planet. (Cold and Hot planets with latitude banded climates, with three biomes per band.)

I didn't get to go over everything, mostly sticking to parts of the Habitable Planet generation. But i hope you will find some use in what I've done thus far.
Logged
Freedom is not a spectrum.
Put me in chains, or stop telling me what to do.

Magmacube_tr

  • Bay Watcher
  • Praise KeK! For He is The Key and The Gate!
    • View Profile
Re: Magma's weird and zany text generators
« Reply #8 on: November 10, 2023, 07:01:43 pm »

If you're okay with it, i took some time to improve (hopefully) the generator a bit. You can access the version with my changes here: https://perchance.org/e7vfbdjrd8

Wow, thats cool. Though, I am not gonna paste it over. I want to keep adding to it on my own, you see? I also changed how some stuff works on my end, so I guess yours and mine are two separate branches now?

Though, I did fixed the duplicate biomes? I think? The consumableLists at the biome selection templates only go back to the wetness selection, not all the way down. They can choose from three alternatives at max, and there are three alternatives. This way, a 3-biome climate zone always has a biome from each different wetness subcategory.
Logged
I must submerge myself in MAGMAAAAAAAAA! daily for 17 cents, which I detest. With a new profile picture!

My gaem. JOIN NAOW!!!

My sigtext. Read if you dare!

Strif3

  • Bay Watcher
  • The vulture on your shoulder
    • View Profile
Re: Magma's weird and zany text generators
« Reply #9 on: November 11, 2023, 04:59:44 am »


Wow, thats cool. Though, I am not gonna paste it over. I want to keep adding to it on my own, you see? I also changed how some stuff works on my end, so I guess yours and mine are two separate branches now?

I'm okay with that. Though, we will benefit from working together on it. You will certainly always have more creativity than I, and I feel like i have a better knack for the more technical aspects.

Though, I did fixed the duplicate biomes? I think? The consumableLists at the biome selection templates only go back to the wetness selection, not all the way down. They can choose from three alternatives at max, and there are three alternatives. This way, a 3-biome climate zone always has a biome from each different wetness subcategory.

When i grabbed your version, You did have the separate lists for wetness categories, but no consumbaleLists yet. I did try the standard consumableList first, but discovered two problems with it: One, in the case of NAhot and NAcold, there are (were?) only two categories, so a consumableList trying to pull from those lists would only get two entries, then throw an error when trying to fill a zone with three biomes.  The second, since the consumable lists would be rebuilt each time biomes are selected, there is a possibility of picking the same biome across multiple zones.

I opted to drop the distinction between the different wetness categories, allowing any zone to pick multiple biomes from the same category. Makes zone generation less predictable.
Logged
Freedom is not a spectrum.
Put me in chains, or stop telling me what to do.

Magmacube_tr

  • Bay Watcher
  • Praise KeK! For He is The Key and The Gate!
    • View Profile
Re: Magma's weird and zany text generators
« Reply #10 on: November 11, 2023, 05:29:07 am »


Though, I did fixed the duplicate biomes? I think? The consumableLists at the biome selection templates only go back to the wetness selection, not all the way down. They can choose from three alternatives at max, and there are three alternatives. This way, a 3-biome climate zone always has a biome from each different wetness subcategory.

When i grabbed your version, You did have the separate lists for wetness categories, but no consumbaleLists yet. I did try the standard consumableList first, but discovered two problems with it: One, in the case of NAhot and NAcold, there are (were?) only two categories, so a consumableList trying to pull from those lists would only get two entries, then throw an error when trying to fill a zone with three biomes.  The second, since the consumable lists would be rebuilt each time biomes are selected, there is a possibility of picking the same biome across multiple zones.

I got rid of the sublists for the NA terrain types. consumableList wouldn't work otherwise. They shouldn't repeat now either.
Logged
I must submerge myself in MAGMAAAAAAAAA! daily for 17 cents, which I detest. With a new profile picture!

My gaem. JOIN NAOW!!!

My sigtext. Read if you dare!

Strif3

  • Bay Watcher
  • The vulture on your shoulder
    • View Profile
Re: Magma's weird and zany text generators
« Reply #11 on: November 11, 2023, 05:37:39 am »


Though, I did fixed the duplicate biomes? I think? The consumableLists at the biome selection templates only go back to the wetness selection, not all the way down. They can choose from three alternatives at max, and there are three alternatives. This way, a 3-biome climate zone always has a biome from each different wetness subcategory.

When i grabbed your version, You did have the separate lists for wetness categories, but no consumbaleLists yet. I did try the standard consumableList first, but discovered two problems with it: One, in the case of NAhot and NAcold, there are (were?) only two categories, so a consumableList trying to pull from those lists would only get two entries, then throw an error when trying to fill a zone with three biomes.  The second, since the consumable lists would be rebuilt each time biomes are selected, there is a possibility of picking the same biome across multiple zones.

I got rid of the sublists for the NA terrain types. consumableList wouldn't work otherwise. They shouldn't repeat now either.

I did notice that, looking through your version now. Without resorting to consumableLeafLists, it makes sense. I kept mine separate inside the hierarchical list, as i noticed that the "b" biomes sound a bit more extreme than the "a" biomes in those lists, so that's something cool that something can be done with later, maybe.
Logged
Freedom is not a spectrum.
Put me in chains, or stop telling me what to do.

Magmacube_tr

  • Bay Watcher
  • Praise KeK! For He is The Key and The Gate!
    • View Profile
Re: Magma's weird and zany text generators
« Reply #12 on: November 11, 2023, 06:32:57 pm »

So, as I was studying Linguistics for my upcoming exam season, I started to practice phonology. You know, those stuff where the sounds of the letters are shown? Anyways I am studying the sounds of consonants. Where in the oral cavity they are produced, if they are voiced or voiceless,  and how they are produced. All the good stuff.

NOT! It is boring and confusing. And since I am hyperfixated on the whole generator business right now, that had an impact on how I decided to make it more engaging.

So I got to work to make it more fun.

Lo and behold, Emre's Consonant Phonetics Practice! It gives you a consonant, you try to get that consonants properties right, and then you get the correct answer in the spoiler bar underneath and get to compare!

I hope I don't interrupt your studying though...
« Last Edit: November 11, 2023, 06:35:34 pm by Magmacube_tr »
Logged
I must submerge myself in MAGMAAAAAAAAA! daily for 17 cents, which I detest. With a new profile picture!

My gaem. JOIN NAOW!!!

My sigtext. Read if you dare!

Strif3

  • Bay Watcher
  • The vulture on your shoulder
    • View Profile
Re: Magma's weird and zany text generators
« Reply #13 on: November 13, 2023, 05:41:07 pm »

Meanwhile, i've continued work on Astropedia: Strife Edition.

Code: (changelog) [Select]
Mucked about more with name generator. Now uses a function to render the main parts of names in title-case. No more need for the "initial" version of the syllable generator.
Improved on Magma's implementation of codenames. Now using {A-Z} rather than clumsily picking from the list of both vowels and consonants.
Removed capitalized vowel list, since that's now handled via the titleize function.
Changed the way the Habitable Planets are rendered as a test. Each section of the generator is on its own line, and are joined together using $output = [this.joinItems("<br><br>")]. First step toward unifying all of the planet generators.
Some HTML/CSS changes.
Imported standard Leaf Selection, changed the way special names are selected.
General cleanup. Got source under 2k lines.
All biomes shoved into one gigantic, multi-leveled list.
Revamped how biomes are selected. Now using only 1 list, and some JS witchcraft involving an array.
Scrunched all habitable planet biome/terrain stuff down, all habitable world climate-types now use one generator.
Made all of the non-habitable biome stuff also use this system now. Still need to do Gas Giants.
Removed a particularly cringeworthy and unfunny joke.
Yoinked a bit of JS code from the net for generating numbers on a curve.
For habitable planets, a randomly generated amount of axial tilt and orbital inclination is now listed, using the aforementioned code.

Code: (ToDo) [Select]
Per-climate hydrosphere stuff got lost in the transition. Need to find a way to reimplement gracefully.
Logged
Freedom is not a spectrum.
Put me in chains, or stop telling me what to do.

Magmacube_tr

  • Bay Watcher
  • Praise KeK! For He is The Key and The Gate!
    • View Profile
Re: Magma's weird and zany text generators
« Reply #14 on: November 14, 2023, 02:38:05 am »

Meanwhile, i've continued work on Astropedia: Strife Edition.


Okay, one question. How did you made it so that habitable planet and moon templates are written in different lines in the code? It would really help me to know. Figured it out.

Also, I'll have you know that my sense of humor is impeccable!
« Last Edit: November 14, 2023, 02:57:44 am by Magmacube_tr »
Logged
I must submerge myself in MAGMAAAAAAAAA! daily for 17 cents, which I detest. With a new profile picture!

My gaem. JOIN NAOW!!!

My sigtext. Read if you dare!
Pages: [1] 2 3