New and random stories every game

Alright, so this is my boldest idea yet.  In most strategy games, you have a handful of pre-set races with detailed back stories.  Sure, you can customize the attributes of your own race in most cases, but once that is done, you either have to write your own back story or use one of the pre-set back stories.

 

What if, however, every time you created a new race and started a game, you were visited by a completely novel background based on the decisions you made in creating your race?  What if each of your opponents, being randomly created, had their own unique back story each game as well, with no two ever being alike?  What's more, what if details from that backstory translated into the game world as geographic locations, dungeons, quests, and historic allies and foes?  Well, I've got a way that you can do it.  It'll take a rather formidable wall of text, so if enough people are interested, I'll start hammering away (after work).

20,381 views 36 replies
Reply #1 Top

I'm listening..... quite curious to see how you've avoided the common problems like bad-sounding CG paragraphs and repeated "objects" that players can expect to see and prepare for in advance.

Reply #2 Top

I don't think this is worth (most people won't read it). Appart that it's not doable in a good way right now. But if you have a good way, you can surely publish some papers on it, a looot of people in the scientific community would like to hear from you ;)

Reply #3 Top

Quoting VicenteC, reply 2
I don't think this is worth (most people won't read it). Appart that it's not doable in a good way right now. But if you have a good way, you can surely publish some papers on it, a looot of people in the scientific community would like to hear from you

Well, you haven't even heard my idea yet, and you are already saying it isn't doable.  I think you have the wrong idea, though.  What I'm about to propose isn't generating a story the same way that you generate a random map.  I'll start describing what I'm aiming for in the following post...

Reply #4 Top

Writing a backstory isn't easy. Writing a backstory generator looks even more difficult. Of course, one could pick from a list of background bits and  change names randomy, but still I'd like to see how you think something like this could be done.

Reply #5 Top

Alright so here is the idea.  I know the system works, because I've already created and used a simple version in excel/word for using hyperlinks for use in our sophisticated D&D sessions to generate town and city backstories and it has been a boon.  Basically, the system is something inspired by my journalistic background and formal education in genetics.  Let me first say that I am not suggesting a way by which stories are strung together, word by word, by some computer that is a literary genius.  The computer's role is to string together clauses and components, written by modders or player devs based upon specific criteria.  To put it very simply, you have many, many human written clauses and components that can be rearranged into nearly a limitless number of stories, each clause being interchangeable in a variety of circumstances.  But, of course, it's not as simple as just throwing a bunch of random sentences into a random arrangement and expecting a story to pop out.  Every clause has "parameters" that make some connect and other mutually exclussive (for instance, clauses that are tagged with a parameter defining them as part of a good aligned civ won't be matched with a parameter defining a clause used for evil civs.)   And so I'll be going over the basics of how it works in this post. 

With this method, unique stories will be generated for each civilization each game by assembling different story "clauses" together.  A story begins with a "skeleton" that demands certain requisite story components and defines the order in which clauses will be strung together.  Clauses fit into the skeleton to flesh it out, matching specific requisites demanded by the skeleton, and fit into specific locations in the skeleton.  Clauses are bits of sentences that are tagged with specific meta data that assign them a niche role within the story skeleton or piece of a story skeleton.  Also, clauses consist of "components" as well, and components would be names of characters or places which may also have a corresponding "stamp" in a randomly generated map (if the Teuton Basin is mentioned in the generated story, a corresponding pre-made stamp is also placed in the randomly generated map.)  Each component and clause has a distinct serial number that distinguishes it from other components and clauses as well as a signature of whoever wrote it.

Now let's first focus on Clauses since this is where most of the work is.  If you were to read a clause within a specific narrative during the game, it would sound something like this, with a Kingdom Name Component in brackets "[The Teuton Kingdom] was renowned for their masterful weaponsmiths and formidable soldiers."  Let's call this +5 military clause.  Now let's look beneath the hood at what parameters are attached.  The primary parameter might be military description.  The secondary parameters might be requisite +5 smithing and requisite +5 soldiery.  The tertiary parameter would be counter diplomacy +3<, "despite their capable war machine".  The Primary parameter corresponds with its location in the story skeleton, the secondary parameters define what prequisites must be met during civilization customization, and tertiary parameters interact with other secondary parameters in other clauses.  So if the story skeleton demands a military description, the first parameter is met.  If the civilization has chosen a race that has +5 soldiery and +5 smithing, the second parameter is met.  So the clause is matched with all other clauses with these parameters (they all would convey the same message, but have flavorful differences) and one is selected at random to fill the location on the story skeleton. 

Now, let's say there is another clause that describes that s civilization's ability in diplomacy.  The clause might read, "The Teuton Kingdom relied very heavily on their savy diplomats to avert needless wars.  Let's call this the +5 diplomacy clause.  The Primary parameter would be diplomatic description.  The secondary parameter would be +5 diplomacy.  The tertiary parameter would be counter soldiery +3<, "despite their diplomatic leanings".  So once again, if the skeleton demands diplomatic description and the civ in questions has +5 to their diplomacy, the clause would be a candidate for the story amongst other clauses of its parameters.  However, if you have both the +5 diplomacy clause and the +5 military clause, something interesting happens.  If the +5 military clause comes after the +5 diplomacy clause on the story skeleton, you have a "modifier" clause added.  If both clauses were side by side, one after the other, the two clauses would combine with the modifier clause (with the modifier clause being in brackets):

"The Teuton Kingdom relied very heavily on their savy diplomats to avert needless war.  [Despite their diplomatic leanings,] the Kingdom was renowned for their masterful weaponsmiths and formidable soldiers."

The tertiary clauses specified that the two themes of the clauses were somewhat opposed to one another and clarified.  Now, if the skeleton demanded mention of warfare before diplomacy, the clauses would combine to form:

"The Teuton Kingdom was renowned for their masterful weaponsmiths and formidable soldiers.  [Despite their capable war machine,] the Kingdom relied very heavily on their savy diplomats to avert needless war.

So unfortunately, my computer is bugging out hard and I'll have to continue the description in a bit.  Let me know if you are understanding the guist so far.

    

Reply #6 Top

Quoting Demiansky, reply 3

Well, you haven't even heard my idea yet, and you are already saying it isn't doable.  I think you have the wrong idea, though.  What I'm about to propose isn't generating a story the same way that you generate a random map.  I'll start describing what I'm aiming for in the following post...

Doing worth to read, well constructed stories is out of the reach of a computer right now. You can put lots of texts and then select some of them in a randomized way and try to hide that fact better or worse, but generating "unique and novel background and backstories" is sadly not doable right now.

Reply #7 Top

I like the idea Demiansky, and i'd recommend switching your main point to the original post so that it has a better chance of catching the devs eye. It reminds me of something they were trying to do for GalCiv II where they would take all the events and happenings and put it into a story at the end (or maybe even during the game?) I don't remember it all because it was never finished. hmm, tho i swear i remember frogboy or boogie saying something about almost having it done but their concentration needed to be on the core game.. maybe it was just a dream lol either way it was very sad, but i wonder if they will pick it up again for this game?

Reply #8 Top

If you have the time and you believe it can work...do it!

Quoting VicenteC, reply 6
Doing worth to read, well constructed stories is out of the reach of a computer right now. You can put lots of texts and then select some of them in a randomized way and try to hide that fact better or worse, but generating "unique and novel background and backstories" is sadly not doable right now.

He may find a way, don't be so quick to judge.

Reply #9 Top

Quoting VicenteC, reply 6



Quoting Demiansky,
reply 3

Well, you haven't even heard my idea yet, and you are already saying it isn't doable.  I think you have the wrong idea, though.  What I'm about to propose isn't generating a story the same way that you generate a random map.  I'll start describing what I'm aiming for in the following post...



Doing worth to read, well constructed stories is out of the reach of a computer right now. You can put lots of texts and then select some of them in a randomized way and try to hide that fact better or worse, but generating "unique and novel background and backstories" is sadly not doable right now.

Lol, it's that kind of attitude that stagnates innovation.  And I'm not suggesting creating novellas for every civilization.  I'm talking about 5-6 paragraphs with informative information about the landscape.  As for how stories are actually, arranged, it's actually very simplistic programming--- the work comes in for modders that are interested in creating clauses and their parameters.  I'll be talking about story skeletons next.

Reply #10 Top

Quoting Demiansky, reply 9

Lol, it's that kind of attitude that stagnates innovation.  And I'm not suggesting creating novellas for every civilization.  I'm talking about 5-6 paragraphs with informative information about the landscape.  As for how stories are actually, arranged, it's actually very simplistic programming--- the work comes in for modders that are interested in creating clauses and their parameters.  I'll be talking about story skeletons next.

There's a loooot of people researching in that area (natural language) and the state of the art is unable to do what you said in your first post right now, that's a fact, not anything against innovation. It's important to know what can be done and what can't be done right now. If you said you had an idea to have 1000000 crysis-quality troops at the same time in the screen all of them acting in a beliable way with their environment, well, the answer would have been the same and that's nothing against innovation either.

Of course, now you have corrected yourself and are now saying far less ambitious things, so maybe that will be doable, but who knows...

Reply #11 Top

This could be great if done right. Very interesting post Demiansky.

You should have posted this in the Elemental Idea forums though.

Reply #12 Top

Quoting Raven, reply 11
This could be great if done right. Very interesting post Demiansky.

You should have posted this in the Elemental Idea forums though.

Hm, true.  I'll go ahead and switch it over.

Reply #13 Top

Interesting. Reminds me of ADOM character backgrounds. There was a simple skeleton, with infant/youth/apprenticeship stages. You add some prerequisites upon it.

I'm not sure you can do much on startup however, since the clause prerequisites may not be very varied? I think of FfH2 random events: Most of them have prerequisites, but early on almost none are met so you often get the same starting events (constellations...).

Reply #14 Top

Quoting Demiansky, reply 9

Quoting VicenteC, reply 6


Quoting Demiansky,
reply 3

Well, you haven't even heard my idea yet, and you are already saying it isn't doable.  I think you have the wrong idea, though.  What I'm about to propose isn't generating a story the same way that you generate a random map.  I'll start describing what I'm aiming for in the following post...



Doing worth to read, well constructed stories is out of the reach of a computer right now. You can put lots of texts and then select some of them in a randomized way and try to hide that fact better or worse, but generating "unique and novel background and backstories" is sadly not doable right now.

Lol, it's that kind of attitude that stagnates innovation.  And I'm not suggesting creating novellas for every civilization.  I'm talking about 5-6 paragraphs with informative information about the landscape.  As for how stories are actually, arranged, it's actually very simplistic programming--- the work comes in for modders that are interested in creating clauses and their parameters.  I'll be talking about story skeletons next.

It could be tied to the map generator : if the generator creates lots of islands, then some stories tied to that could be used.

Reply #15 Top

I like your idea, the same stories get old over time but the programing behind it would take some serious thought and time, not sure where to begin, mabey text options linked through a database. If this game is set up with an online community the stories could get very deep , again I like the idea.

Reply #16 Top

Quoting jeffaflord, reply 15
I like your idea, the same stories get old over time but the programing behind it would take some serious thought and time, not sure where to begin, mabey text options linked through a database. If this game is set up with an online community the stories could get very deep , again I like the idea.

Not only programming, but just raw writting (you need a looot of texts) and localizing the game (although I have no idea if that was a target for the game).

Reply #17 Top

There's a loooot of people researching in that area (natural language) and the state of the art is unable to do what you said in your first post right now, that's a fact, not anything against innovation. It's important to know what can be done and what can't be done right now. If you said you had an idea to have 1000000 crysis-quality troops at the same time in the screen all of them acting in a beliable way with their environment, well, the answer would have been the same and that's nothing against innovation either.

When you're talking about a computer generating completely natural language in response to user input, you're correct.  Assembling three or four sentences, each of two to four clauses, into a paragraph is completely doable. Make each paragraph on a different topic, and there's your backstory.  The idea is solid.

That being said, writing the clauses would take a RIDICULOUSLY long time. This would be seriously amazing as a mod, but I'd rather get the game earlier with prewritten backstory than have Stardock spend time writing the thousands of clauses that it would take to make randomly generated stories cool.

Reply #18 Top

Quoting SpoonGod, reply 17

There's a loooot of people researching in that area (natural language) and the state of the art is unable to do what you said in your first post right now, that's a fact, not anything against innovation. It's important to know what can be done and what can't be done right now. If you said you had an idea to have 1000000 crysis-quality troops at the same time in the screen all of them acting in a beliable way with their environment, well, the answer would have been the same and that's nothing against innovation either.

When you're talking about a computer generating completely natural language in response to user input, you're correct.  Assembling three or four sentences, each of two to four clauses, into a paragraph is completely doable. Make each paragraph on a different topic, and there's your backstory.  The idea is solid.

That being said, writing the clauses would take a RIDICULOUSLY long time. This would be seriously amazing as a mod, but I'd rather get the game earlier with prewritten backstory than have Stardock spend time writing the thousands of clauses that it would take to make randomly generated stories cool.

Unfortunately, my computer has been busted and I've only been able to read the forums while at work, so I guess my story skeleton description will have to wait :-(  However, the point is that stardock won't be writing the clauses--- player volunteers will.  You would have one person at stardock reading and approving clauses to make sure they fit the necessary criteria and around 10-20 capable modders who enjoy writing story components (like me).  We volunteers would also have a signature in each clause's metadata if Elemental players wanted to peek beneath the hood to see who was responsible for specific parts of the story that they enjoyed.  When a clause is used in a player's game, it will be flagged so that it isn't used again until every other clause of the same parameters have been used (this may never happen, because modders will be adding new clauses consistently).

Now, if I were a volunteer clause writer, I would work write 20-30 clauses of the same parameters at a time to me more efficient.  For instance, let's go back to my military +5 clause mentioned earlier.  If you recall, the clause read "The Teuton Kingdom was renowned for their masterful weaponsmiths and formidable soldiers."  Now, if I were a clause writer, I would write as many sentences as I could think of that captured that same essence.  Some other sentences might be:

"There were few sovereignties that could match the Teuton Kingdom in its masterful weaponsmithing and formidable soldiers."

"One of the Teuton Kingdom's greatest prides were its canny weapon crafters and hardy soldiery."

"The soldiery and weaponsmithing of the Teuton Kingdom drew much admiration from its friends, and envy from dubious neighbors."

"Its masterful weaponsmiths and well trained soldiers, when combined, made the Teuton Kingdom a formidable foe indeed."

"If the Teuton Kingdom went to war, its foes could expect a terrifying combination of well trained soldiers and superior weaponry."

Now, that took me around 1 1/2 minutes, and that's while I've been distracted by my chicken salad sandwich.  Assume that you have an additional 10 capable volunteers cranking out story clauses, and you've created many, many stories.  I bet I could actually handle the work load myself, if I had from now to release to write it all.  Yes, you would need many thousands of clauses to create unique stories every game, but as more capable writers buy elemental after release and discover clause modding options, they would join the ranks to help create new clauses as well.

Reply #19 Top

Not that this isn't a noble use of your time, I'd prefer backstories written by humans and modders rather than a computer. This is for the same reason I mostly prefer human-made maps in strategy games: someone went through the effort of handcrafting a map, so someone might as well play on it.

Teaching computers to write isn't trivial, to be sure, but teaching humans to write is down near impossible. :grin:

Reply #20 Top

Quoting MagicwillNZ, reply 19
Not that this isn't a noble use of your time, I'd prefer backstories written by humans and modders rather than a computer. This is for the same reason I mostly prefer human-made maps in strategy games: someone went through the effort of handcrafting a map, so someone might as well play on it.

Teaching computers to write isn't trivial, to be sure, but teaching humans to write is down near impossible.

Lol, well, once more, computers aren't writing anything.  Humans are writing everything, but the computer is simply following directions that humans gave them to assemble stories.  Technically, all a stories follow certain narrative rules in a person's head, so I don't see why the kind of narratives I've described would be unnacceptable.  Besides, if you had a choice between reading the same stories over and over and over again or novel stories each game, which would you choose?

Reply #21 Top

Quoting SpoonGod, reply 17

When you're talking about a computer generating completely natural language in response to user input, you're correct.  Assembling three or four sentences, each of two to four clauses, into a paragraph is completely doable. Make each paragraph on a different topic, and there's your backstory.  The idea is solid.

That being said, writing the clauses would take a RIDICULOUSLY long time. This would be seriously amazing as a mod, but I'd rather get the game earlier with prewritten backstory than have Stardock spend time writing the thousands of clauses that it would take to make randomly generated stories cool.

That's what I said, if this is a program that picks sentences (with some logic behind it) and put them together, then it's doable, but that's pretty different from what the first post was saying. Of course, it continues to have the problem of producing the ton of strings (while community effort is nice, those strings have to be tested, reviewed, maintained, standarized for quality,...) and localization would be a pain (would be nice to know if that's important for Stardock or not btw).

Reply #22 Top

Alright, so on to story skeletons.  A story skeleton will have description types which correspond with primary clause parameters.  So if a clause has a military description parameter, it will link up with the military description parameter on the story skeleton.  So when you are making story skeletons, you will be stringing together primary parameters.  So the first part of the story skeleton might look something like this:

1. Historical description.

2. Geographic description with 3 geographic stamps and 2 resource stamps, 1 supporting modifier with 1 geographic stamp

3. Historical Rival description (aggressor will be faction with higher native aggression level) 1 link and 1 diplomatic stamp, 1 supporting modifier with 1 linked geographic stamp and 1 supporting rival description

4. Rival match description (based on relative military strength)

5. Military Description, 1 supporting modifier with rival link (based on prior frequency of wars)

6. Diplomatic Description, 1 supporting modifier, 1 supporting modifier: friendly ally stamp 

7. Resolution clause, military reference, ally reference, and rival reference

Before the Rending of the World, the [Teuton Kingdom] was well renowned throughout the lands of [Endor].  Nestled between the [Ferlong Mountains] and [Kannary Hills], the [Teuton Basin] provided a bounty of [wheat] and [lumber], and the [Neridan River] meandered through the [Basin] to offer a natural corridor for trade and transportation.  Blessed with such resources, it is understandable that the [Teuton Kingdom] would catch the envious eyes of neighbors and rivals, one such foe being the [Khaninate of Persolonis].  The [Khaninate of Persolonis], natives of the [Bloody Foothills], would fight many wars with the [Teuton Kingom] to wrest away control of the [Teuton Basin].  As a consequence of persistant war, the [denizens of Teuton] were well prepared and well armed.  Its masterful weaponsmiths and well trained soldiers, when combined, made the [people of Teuton] a formidable foe indeed.  Their skill was honed by many wars with the [Khaninate of Persolonis].  Despite their capable war machine, [the Kingdom] relied very heavily on their savy diplomats to avert needless war which they employed both to end vendettas as well as cultivate friendships in royal courts.  [They] would call upon, and fiercely aid, friends such as [The Kindgom of Gracia].  With a proud military tradition and fertile lands, [the peoples of Teuton] would carry with them old grudges and old allies, even after the Rain of Fire had settled. 

Now obviously the clauses seen above in the skeleton will interact with other clauses differently depending on tertiary parameters, but we haven't specified tertiary parameters for anything but the military and diplomacy clauses so I've assumed them.  In most cases where you see comas, there are underlying tertiary parameters which add subordinate auxiliary clauses.  

This was a very basic skeleton, which neglected other elements that the Teuton Kingdom may have possessed, such as their scholarship or industrial skills.  When a particular kingdom excels in an area, additional supporting secondary clauses are added to give more depth.  If a kingdom has only moderate ability in an area, it might only have one clause that mentions it, and possibly a tertiary clause which explains why, as is seen in brackets: [With such heavy emphasis on warfare], scholarly pursuits were of only a small priority throughout the kindgom. 

Multiple types of skeletons can be created, depending on what you want the story to emphasize.  You could place organic clauses, which add supporting clauses based on a what a kingdom thrives on, or you could make a skeleton which forces certain elements (for instance, even if a kingdom has poor military fluency, you could mandate supporting clauses in the skeleton to mention why they do not thrive in this element.)  

You will notice that throughout the story skeleton, reference to geographic features, rivals, and allies were made.  In this instance, they were given "stamps" or "links."  A stamp is an element that the story writer sets parameters for ahead of time, like a geographic feature such as a forest, mountain, basin etc. which will appear on the map within a certain range of a player's starting location.  A link connects details from the story clauses of a different opponent and stamps that opponent with a former relationship modifier.  For instance, if an opponent was stamped a rival, you would start the game with a negative modifier to your relationship with that nation.  If they are stamped an ally, you get a positive diplomatic modifier, and these former relationships might be reflected in dialogue with that nation.  When you first meet your rival, they might confront you with something to the effect of: "The slaughter you inflicted on our people will never be scored away, not even by the Rain of Fire that racked our world!" or if they are historic allies: "We will never forget our friends, the [Kingdom name].  We trust that the enduring loyalty of your people has weathered even the rending of the world."

Ideally, when a player has customized their civilization attributes, they can also choose to enable or disable things like historic rivals and allies, at which point a skeleton will be selected which does not sport those features or removes them.  If a player likes, they can continue to generate random stories until they get one that sounds like it has interesting historical elements to play off of (for instance, they may want to play a game with a proximate rival for a war-wrought opening game or a distant arch rival for an endgame showdown.)

Now, for the next post, we will explore a second segment of novel story trees: the quest narrative.  This is the optional, second portion of the story tree that creates a narrative about specific hero characters and dungeons that will consequently appear throughout the game and that have specific relavence to different opponents.   

Reply #23 Top

I have two grammatical remarks about your skeleton:

[the peoples of Teuton] would carry
works fine but what if it was
[the peoples of Teuton] carry
? If you remove the 's' in people, you need to conjugate 'carry' into 'carries'. English grammar is rather simple (verbs often don't change) but localisation for such stuff may be a nightmare (translate into French or Spanish for instance).

Anyway, gender and plural, in English, are going to be an issue. "[XXX] is a vast land ruled by [YYY] who is reputed for his wisdom" would require metadata on XXX (singular/(dual)/plural) and YYY (gender). Of course, such metadata vary according to the language (YYY's gender is irrelevant in this case in French for instance).

Another thing I'd like to understand is how you manage to get the pronoun 'They' in

[They] would call
.

I mean, it's dependent upon the previous noun? 'denizens of Teuton' was followed by 'people of Teuton' (singular) and 'the Kingdom' (singular). I can't see how the 'They' came up here. I think it's either replacing the same noun as 'theirs' in the previous sentence, or 'royal courts' in the previous sentence, the latter not making much sense, and both requiring to parse the body of the clause rather than the keys. All this to mean that 'They' can probably not be inferred at all. A similar remark for 'the Kingdom'. This would be mightily ambiguous, given that 'The Kingdom of Gracia' comes later on and one would have a problem guessing which kingdom we're talking about in the first place.

All this to say that simplifications like pronouns are going to be extremely difficult to infer or use inside your clauses, because pronouns are by definition shortcuts and are very often only disambiguated by context. And they need to be gender/plural consistent.

Edit: And also, pronouns vary widely in English based on their grammatical role: They, theirs, them...?

Reply #24 Top

Cesare, good questions.  I'm on lunch, so I think I can only 1 answer to your pronoun question.  Each subject, such as the "Teuton Kingdom" have minor traits and standards by which you can substitute the subject name with the appropriate pronoun.  For instance, you would choose appropriate pronouns and define when they would substitute in a narrative--- for instance, after "The Teuton Kingdom" has been mentioned twice, or after it has been used once and mentioned a second time as a separate pronoun.  Ideally, you wouldn't have to choose subject pronouns for every single name, but instead would assign formulas for appropriate pronouns placement and sets of pronouns based on whether the subject is singular or plural "The Principalities of Eman" (plural) or "The Teuton Kingdom."

More to come later when I've got the time.

Reply #25 Top

Quoting Demiansky, reply 20

Lol, well, once more, computers aren't writing anything.  Humans are writing everything, but the computer is simply following directions that humans gave them to assemble stories.  Technically, all a stories follow certain narrative rules in a person's head, so I don't see why the kind of narratives I've described would be unnacceptable.  Besides, if you had a choice between reading the same stories over and over and over again or novel stories each game, which would you choose?

Yeah, I understand the concept. It's hardly a bad idea and certainly a programming challenge. I would even consider submitting clauses to the generator. Sometimes, though, I think there's too much focus on the random stuff when there's so much human generated stuff to enjoy. I think this mostly extends to maps for me.