System Long Description generator

Post Reply
Spiffor
Posts: 43
Joined: Tue Aug 07, 2018 9:13 pm

System Long Description generator

Post by Spiffor »

EDIT: First post is now the "heads up" to the project.
Initial post was moved here: viewtopic.php?f=3&t=606#p6178 for reference

Project: System long description generator

Synopsis
The aim of the project is to procedurally generated long descriptions for systems, so that they appear on the galaxy map.
There is a long way to go before it can belong to the core of the game:
- Much, much content must be created so that it doesn't get boring.
- Code would have to be written in the core mechanics.

Get a look as how it is now
Right now, you can download this mod to your pioneer\mods folder, and look for a "proof of concept" in the BBS.
Look for an entry with the $ icon (like the "Donate" ones)

Todo list

CODE
  • Write initial code of the module and content to show how it works - Done
  • Write code so that it accomodates new flavours and new paragraphs from existing categories - Done
  • Improve debugging, so that system properties can be randomized on the fly
  • Code remaining categories (Astronomy, History, Economy type, Lawlessness, IsCommodityLegal, Society) and base contents to display it
  • Code transitions
  • Make consistency conditions, so that they are more flexible.
CONTENTS
  • Write initial content for the proof of concept - Done
  • Write transitions so that the text feels unified, not just a juxtaposition of paragraphs
  • Write much more content for the trivia category (aim = 50)
  • Write contents for each category/subcategory (at least 2 of each, in two flavours, then expand)
  • Write more placeholders: company names, synonyms for words coming all the time
  • Write demonyms (e.g people living in a place finishing by "a" are the something-ans, people living in a place finishing by "n" are then something-ners etc.)
ART / UI
  • Make an actual icon for the ad in the BBS
  • Replace the generated face, either by nothing or by a generic picture
Last edited by Spiffor on Wed May 01, 2019 5:08 pm, edited 1 time in total.
WKFO
Posts: 200
Joined: Wed Jun 14, 2017 12:37 pm
Location: Turkey
Contact:

Re: System Long Description generator

Post by WKFO »

Oh, wow!
I'm not capable of answering any of your questions, but just wanted to show my support and say "Oh, wow!".

Though I wonder how the system will perform with many languages with different structures.
impaktor
Posts: 994
Joined: Fri Dec 20, 2013 9:54 am
Location: Tellus
Contact:

Re: System Long Description generator

Post by impaktor »

The only problem is that it takes me a about a week to coin a custom system, and there are zillions of waiting for a story...
In my mind, we would have 20-100 "core" custom systems that are distinct and interesting, and give dynamical game play, by unique quests (to be implemented), trade opportunities, military conflicts, factional divisions, etc.

To me, procedural generation is for "filling out" the gaps between the custom systems where the main part of the game play is set (as they will always be better constructed than the procedural ones)
Example #1
Gliese 674 (Earth Federation Democracy)
Actually, this reminds me, you know we now support multiple names for star systems? I.e. we can have accurate boring catalogue name, and also fancy schmancy name, e.g. "Solaris" or something (and you can search for either one of the names in in sector view)
Spiffor wrote:... -- Courtesy of the Encyclopedia Galactica"
This makes me think of:
https://hitchhikers.fandom.com/wiki/Ursa_Minor wrote:Ursa Minor is home to the "great publishing corporations", such as Megadodo Publications which created The Hitchhiker's Guide to the Galaxy.
Spiffor wrote:So, the idea is to create a basic framework which has the following attributes:
- Base contents (paragraphs) are already written
- Contributors can easily add new paragraphs to the game with minimal meddling with the code.
Admirable ambition, but ideally, each paragraph should then come with set of real-world consequences. Currently, only government type will actually change anything (market) in the system. So for now, these paragraph would have to be nonsense enough to not fool the player into thinking they actually can fly there and be part of some Olympic space race, or similar.
Finally, there are two flavours, the Encyclopedia Galactica and Sam's Guide to the galaxy (the description picks one of these two flavours and sticks to it).
I like that idea. Maybe Encyclopedia Galactica are by publishing house Ursa Major ;P?
I have already a working module supporting multi-language
I assume this means you have the strings in en.json file, as that's all it takes, and don't do things that might only work in English. (famous example from Elite development: they chose "Computers" to be one of the commodities as Commander also starts with "COM" and free up some ram that way).

Worth noticing here, is that the descriptions in the system files are read in through another lua thread, and can thus currently not be put under translation without some serious reprogramming. However, just having the procedural paragraphs in the game would be a good first step, then someone can fix the multiple lua loading threads problem.
Only problem is that you get a great load of constants, and contributors may forget about updating them. Is there any way to analyse the en.json file, so that the code decides by itself how many paragraphs come from each sub-category?
Yes. E.g. see getNumberOfFlavours() in data/modules/CargoRun.lua

Summary: I applaud your effort, and I see some dangers, as what if you get conflicting paragraphs? E.g. "Terrain: Sunny planet, population loves tanning" + "Political system: technocratic dictatorship replaced population with iron-built robots, slaving in factories 24-7"? There is still very much a place for custom descriptions, but if we can get some procedural going that would be good as well.

Ideally each paragraph would have some variables that triggers system generation such that the system is what the paragraph describes, (or the other way around), not just for government, but for other things as well.
Spiffor
Posts: 43
Joined: Tue Aug 07, 2018 9:13 pm

Re: System Long Description generator

Post by Spiffor »

Thanks guys for your input and support :)

@WKFO:
I'm using Pioneer's multi-language feature, just like any BBS mission. Well, I play the game in English, so I don't know how the multi-language behaves with different linguistic structures.

@Impaktor
I agree with you that custom systems are likely to be better than randomly generated ones (though I think the system generator is extremely good, and does a better job than me to create systems that are believable).
However, space is so big that, even if we coin 100 custom systems, it would be a minuscule drop around Sol, EE and Haber headquarters.

Indeed, my inspiration comes from the Hitch hiker's guide, but I don't nearly have Douglas Adams's talent :)

Thanks a lot for showing getNumberOfFlavours() in data/modules/CargoRun.lua! Now I can concentrate on the lua file and the en.json file, without having to create another tool.

However, I disagree with the idea that each paragraph should have real consequences in game. I rather see the paragraphs as being themselves consequences of in-game variables (most are already existing, and some could be created).

First example: a system allows animal meat. This is already in game.
- gameplay consequence: the player can easily buy meat there, and smuggle it where it's forbidden
- description consequence: we could have a paragraph explaining how this system is traditional, or another paragraph about how it is depicted as barbaric by its neighbours.

Second example (in my imagination): a system has a militaristic society
- gameplay consequence: the BBS offers more military missions, the shipyard offers more military class ships
- description consequence: we could have paragraphs depicting life in a militaristic society (such as my paragraph about teens going to military service on Ethex)
impaktor
Posts: 994
Joined: Fri Dec 20, 2013 9:54 am
Location: Tellus
Contact:

Re: System Long Description generator

Post by impaktor »

However, I disagree with the idea that each paragraph should have real consequences in game.
Well, as long as we're not sending players on false goose chases, by making them think something is there that isn't.

Off topic, but since you mentioned it: I'm thinking (for years now, so...) about implementing military, and I imagine only a few systems would have military presence and thus military missions (not neccessarily connected with militaristic gov'). In Frontier there were some routes between two different systems where you could deliver loads of secret documents and stuff.
Spiffor
Posts: 43
Joined: Tue Aug 07, 2018 9:13 pm

Re: System Long Description generator

Post by Spiffor »

Hi guys :)

And here's the proof of concept

Simply download it to your pioneers\mods folder

In the BBS, look for an entry with the $ icon (like the "donate" ones).

Right now, the contents are way too little, but I enjoy writing short paragraphs, so contents should grow as time passes.

All feedback welcome!
Last edited by Spiffor on Wed May 01, 2019 5:34 pm, edited 1 time in total.
Spiffor
Posts: 43
Joined: Tue Aug 07, 2018 9:13 pm

Re: System Long Description generator

Post by Spiffor »

First post moved here for reference

Hi guys, long time no see :)

TLDR
I present here my idea of a system's long description generator.
With this feature, all systems will get a randomly generated long description, hopefully that is consistent with what they are and with the game universe.
Custom systems will still have their custom long description.
The opening post is about the mechanics. Your comments will be welcome!
[/TLDR]


1. Base idea
You may remember me for having written the long description of custom systems.
My motivation is that this vast universe quickly gets repetitive and ought to be "populated by stories".
The only problem is that it takes me a about a week to coin a custom system, and there are zillions of waiting for a story...

Which is why I'm working about generating these long descriptions randomly.
This idea seems much more in tune with the spirit of Pioneer's development, with its procedurally generated systems, space bodies, and faces.

With this first post, I'd like to present you the base idea and discuss it. In the next few days, I'll present a module that will serve as a proof of concept.


Example #1
Gliese 674 (Earth Federation Democracy)

"As a system belonging the Solar Federation, Gliese 674 sends tribute to Sol and abides to many laws decided in the faraway capitol. However, the local government is the one that decides on local matters. Not only do the people vote for their governors, they also have a direct say on issues such as planetary development, social and environmental laws, taxation etc.

A popular event is Boyd’s race around Harry's Rock. Flying at high speed and low altitude, competitors must avoid risky terrain to claim victory. Most people stop their activities at the time of the race, not only to watch the thrill of it, but also to show support to their champions.

Gliese 674 is famous for its speciality, the Kreikkalainen. This recipe originated from King Starport, which remains the best choice for gourmets.

-- Courtesy of the Encyclopedia Galactica"



Example #2
Ethex (-7, 25, 8, plutocratic dictatorship)

"No matter what you do here, do not go against Petalimited's plans. Don't talk about it, don't trade against it... or the police will come see you. And no, they're NOT cool guys.

You know teenagers. Bored at school and bored at home virtually blowing stuff up while sitting on their couch. Well, over here, a teen's life is much cooler. When they turn 14, the young'uns go spend a year in the navy, with real guns and real explosions! (and no respawn, but the loss rate is reasonable, really). After having served, they become real men and women who'll get to ramble on the same navy stories over and over.

-- Sam's guide to the Galaxy, entry on Ethex"




2. A must: lots, lots and lots of contents
In a gigantic universe such as pioneer, a real difficulty is not to get repetitive.
The simplest way would be to assemble several dozens paragraphs, and claim there are 716467688 possible combinations or so.
However, as the face generator shows us, consistency is also very important.

So, the idea is to create a basic framework which has the following attributes:
- Base contents (paragraphs) are already written
- Contributors can easily add new paragraphs to the game with minimal meddling with the code.

In order to multiply the possible contents, a long description would write 1-4 paragraphs drawing from the following categories:

- Astronomy
- History
- Government
- Economy type
- Lawlessness
- IsCommodityLegal
- Society
- Trivia
- Cuisine
... and always the general paragraphs (signature, transitions)

Each category would be divided under sub-categories.
For example, Government would be divided under government_is_earthdemoc, government_is_plutocratic etc.
Another example, Astronomy could be divided under astronomy_has_startype_m, astronomy_has_icyplanet etc.

Every sub category could have as many possible paragraphs as the contributors imagine. For example, I've written 4 paragraphs describing the government EARTHDEMOC.

Finally, there are two flavours, the Encyclopedia Galactica and Sam's Guide to the galaxy (the description picks one of these two flavours and sticks to it).


3. Big question: module or long desc in the core of the game?
Right now, I'm working on a module which shows on the BBS, for two reasons:
- I'm not good enough with programming to tamper with the core of the game
- As long as there is not enough content, those long descriptions will quickly get boring.

If there is enough content, I think the idea would strongly add up to the core of the game. The module wight be left for some "pure fluff", like local rumors and ads.


4. Some questions about code
I'm not a programmer by any means, but I have already a working module supporting multi-language (right now, only about cuisine). I want to improve that module in the next days so that it adds the text I've already written so far.

However, I think it is important that contributors can easily add new paragraphs to the en.json file with as little meddling with the rest of the code as possible.
I'm using the for loop extensively. So I was thinking about creating a bunch of local constants to show the max amount of paragraphs for each sub-category. For example,

Code: Select all

local govtype_is_earthdemoc_flavour_0_max = 4
Only problem is that you get a great load of constants, and contributors may forget about updating them. Is there any way to analyse the en.json file, so that the code decides by itself how many paragraphs come from each sub-category?
impaktor
Posts: 994
Joined: Fri Dec 20, 2013 9:54 am
Location: Tellus
Contact:

Re: System Long Description generator

Post by impaktor »

Your download link doesn't work. Internal Server Error or something.
Spiffor
Posts: 43
Joined: Tue Aug 07, 2018 9:13 pm

Re: System Long Description generator

Post by Spiffor »

Oops, should work now
Post Reply