1. Archmage Rises
  2. News

Archmage Rises News

Dynamic Quest Generation #1: Inspiration & First Steps

[h2]Introduction[/h2]
I am building a world simulator and put an RPG inside it. Why?

So as to have the detailed data necessary, and the passage of time, to generate interesting procedurally generated quests.

[h2]Goals[/h2]
Chris Crawford is a smart visionary. But also broke his career on trying to solve ‘emergent narrative’ in games with his Storytron. As quoted in RPS article:

... take Crusader Kings or Civilization, for instance, which both provide complex systems upon which all sorts of interesting decisions can be made. But Crawford argues that these sorts of games don't count because they "are not very dramatically interesting stories."

"It might be fascinating to the person who experiences it," he says, "but ultimately we have to ask does it really approach the quality of what we normally call a story? And the answer with almost all games is, well, no."


The following goals may not sound terribly revelatory but Crawford is a warning a lot of resources can be wasted for little results. I’m trying to provide direction through restraint: Hey we’re here to do something cool not find the ultimate breakthrough.

[h3]1. PRAGMATIC: IT JUST HAS TO WORK AND ENTERTAIN PEOPLE. [/h3]

We’re not trying to build an AI that wins an Oscar for Best Screenplay.

We’re not trying to match hand crafted narrative.

Our goals are entirely different from Crawford’s and therefore I think achievable. He says the ‘emergent story’ of Crusader Kings or Civ aren’t compelling outside of the original player. That is totally fine by me.

Let’s entertain one person over and over again. This to me is success.

[h3]2. TAILORED TO THE TYPE OF QUEST - NOT ONE SIZE FITS ALL[/h3]

We don’t have to solve the “Singularity of Story”. If a different algorithm, approach, or paradigm is needed for a ‘murder mystery’ versus ‘find the artifact’, then we’ll do it by bringing each story type online one at a time. Of course we are looking for reuse, but the point here is it doesn’t have to happen.

[h3]3. EXISTING PROVEN TECH - BLUE OCEAN - NINTENDO WII APPROACH[/h3]

In Gen 7 of the video game wars, Sony (PS3) and Microsoft (360) were trying to outdo each other on who could bleed the most money per hardware console by packing in the latest tech for a fixed price. Nintendo simply took existing ‘old’ tech and presented it in a new way.

  • Microsoft sold 84 million 360s
  • Sony sold 87 million PS3s
  • Nintendo won by selling 110 million Wiis and made money on every single one of them.


We will use simple ‘old’ tech, like templates, randomization, filtering states, variables, tags, and make something new from it.

[h2]Core Inspiration[/h2]
Shortly after I started on Archmage Rises full time I saw this inspiring Ken Levine talk on 'Narrative Lego'

[previewyoutube][/previewyoutube]

His ideas and examples are great. Sadly, after several attempts to implement his Stars and Passions ideas I found lots of problems. This isn’t a criticism, just there are a lot of ‘gotchas’ Ken didn’t cover that we’ve run into.

10 years later, Ken was interviewed by AIAS Game Maker’s Notebook and asked about his experience implementing Narrative Legos. This link gets to that part of an excellent interview:

[previewyoutube][/previewyoutube]

When I listened to it, I heard some backpedaling from the initial broad idealism from the first talk. Restraint tempered by difficulties in implementation. Exactly where we are at. 😛

[h2]Our Approach[/h2]
The creative process is simply this: Make something crappy. Now make it better.

For those of us who tend towards perfectionism, “If you’re going to do it, do it right”, the inability to make something amazing right away can be paralyzing. Its like taking the first step of 1,000 miles and already feeling like a failure.

The above adage of make something crappy really helps break me out of stinkin’ thinkin’ and get moving. Momentum can be built over time. Rome wasn’t built in a day, yadda yadda.

There is much more to say, but I’m trying to keep this first entry simple as I introduce you to my brain and the complexity of the task.

Here is a very high level flow of where we are starting for our test.



Nolan has an undergrad in history and a masters in screenwriting. He wrote up a summary analysis of the typical narrative approaches: Hero’s Journey, Three Act structure, Dan Harmon’s Story Circle, and his own Relational.



Story is strong in this one. This is just a snippet from the analysis.

Nolan has been invaluable in the process. I told him, “We aren’t finished until you are happy with the stories we generate.”

Out of the gate, Nolan was taken aback with the idea of first generating characters then generating motivations and story. That’s backwards from how he writes or was taught. However, I think it creates a strong foundation, especially when we go to plug all this into the game world where we need to plug random NPCs into roles in the story.

[h2]The Prototype Program[/h2]
I love working in C# Windows Forms. I won’t deny it! We have a tool called Bard for making Archmage Rises design data, Encounters, and Quests.

I took Bard, added a new feature World’s Worst Story, and started programming. I’m now summarizing a week’s worth of work, hopefully it will make sense.



I told you it was crappy!

[h3]1 SELECT STORY[/h3]
To keep things simple we chose a very simple story type: Kill the Monster.

[h3]2 DETERMINE OBJECT[/h3]
Again, to keep it simple we always choose “Skeleton” as an object.

[h3]3 SELECT CHARACTERS[/h3]
We generate a random number of characters within a min/max. At first all the characters I generated were of equal importance to the story. If I generated 5 roles, there were potentially 5 different agendas for the object. While it sounds interesting, it is kinda weird to have 1 protagonist and 4 equal antagonists. Each one of them become a ‘quest end’, meaning five different endings and different rewards.

Interesting, sure. But I can already see problems playing it out. It’ll just feel weird and it’s hard to keep it all straight in the player’s head. Especially with multiple quests occuring at once..

I came to realize not all ‘roles’ are equal, there are Major roles and there are Minor roles.

So I rewired it to generate X major roles and Y major roles.

[h3]4 SELECT MOTIVATION[/h3]
With our major and minor roles set, we now determine what their motivation is in this story. Moving fast and loose, we came up with a combinatorial composite system of motivations using a specific End Goal and a broad Conviction:

Conviction: Fight, Study, or Avoid

Goal: Eliminate, Study, Trophy, LiveAndLetLive, Fear, Resource

What’s cool about this system is that an NPC can want the skeleton fought because they want it Eliminated OR because they are afraid of it. Another NPC could want a skeleton left alone because they want to Study it OR because they believe in ‘Live and Let Live’.

Our intent is not to be exhaustive but to just come up with a few motivations and see if it works. And it does, surprisingly well! With even rudimentary data we’re already getting some interesting nuanced complexity.

Aside: I tested adding a new motivation to the system. It took 3.5 minutes and full worked. I was pleased with the data structure we have so far.

[h3]5. ASSIGN QUEST GIVER AND OTHER ROLES[/h3]
Philosophically we are all in the staring role of our own life’s theater. We play smaller roles in each other’s stories. Putting all that aside, we found it easier to pick a Quest Giver and make that the protagonist. Everyone else is either an Ally, Neutral, or Against the protagonist Quest Giver getting what they desire.

So if two NPCs both want the skeleton dead, they are said to be Allied. The second NPC will provide assistance to the quest giver getting what they want: a dead skeleton.

But wait! What if NPC A wants the skeleton killed so they can study the body, and NPC B wants the skeleton killed so they can use it’s body as a resource in some crazy experiment. They want the skeleton dead, yes, but it is a zero sum game: there is only one skeleton body (theoretically), so they are actually at odds with each other.

This required assigning Ownership to motivations. If F wants a skeleton dead so it can have it as a trophy on the wall, the goal requires ownership. If G wants it dead because they are afraid of skeletons, that motivation does not require ownership and the two are in agreement.

So we go through all our characters and figure out their disposition and role in the story based on comparison of motivations.

[h3]6. THE OUTPUT THUS FAR[/h3]
With all the above done and considered, here is a sample of the output. You can see where I made it clear where any disagreements are so we could validate everything is working as we would expect.

There are a series of Minor roles. Their motivation is simply to support major players. If they are against the quest giver, then they will help the antagonist and provide roadblocks to the player. If they are neutral, they can be persuaded to join a side (more on that another time). If they are Allied, they provide help and resources to player so the quest giver gets what they desire.

**Quest Giver:**

Guichard Peake, Male, Low wealth, age 46
Motivation: Fight - Skeletons terrify me.

**Majors:**
Emma Godwin, Female, High wealth, age 40
Motivation: Avoid - Skeletons terrify me.
ALLIED quest giver.

Emma Mellish, Female, High wealth, age 29
Motivation: Avoid - Skeletons have just as much right to exist as we do.
AGAINST quest giver. Disagree on: Skeleton should be Intact

Hugh Rooke, Male, High wealth, age 24
Motivation: Capture - A Intact Skeleton will make an excellent trophy.
AGAINST quest giver. Disagree on: Skeleton should be Intact

**Minors:**

Guichard Naylor, Male, High wealth, age 56
Motivation: Support -
ALLIED quest giver.

Imayna Buggy, Female, Low wealth, age 22
Motivation: Support -
NEUTRAL quest giver.

Bertha Petrie, Female, Mid wealth, age 31
Motivation: Support -
NEUTRAL quest giver.

Isabel Guy, Female, Low wealth, age 31
Motivation: Support -
NEUTRAL quest giver.

Cecily Radcliffe, Female, High wealth, age 30
Motivation: Support -
NEUTRAL quest giver.

Walter Grubb, Male, High wealth, age 62
Motivation: Support -
AGAINST quest giver.

We took a step back and analyzed our results. So far so good. This seems to be going in the right direction. Nolan is happy, and at the end of the day that is what we’re all here for. 😛

[h2]Next Steps[/h2]
Next week we’re going to assign tasks based on motivation and alignment

Thanks for reading. Hope this was clear!

Weekly Dev Update: Oct 23

We’re working hard to bring this game vision to fruition. Here is what we are doing.

[h2]Update #2b Combat Rewrite[/h2]



Last week we were down a programmer due to illness, and our tech lead Jonathan is moving continents. But Michel was able to achieve something big which has taken months to do: Proper Damage Calculations with immunity, resistances, and weaknesses.

I am putting more resources on Combat to speed it up. Zach is moving from polishing to combat. Mark is taking a more involved role providing design priority and leadership.

Combat is now being made by Jessi, James, Tyler, Michel, Josh, Jonathan, Mark, Zach, and Rubi.

After all this work the goal is to make it good, not just get it out the door.

Still no dates yet.

[h2]Update #3 Exploration[/h2]



The first step in planning out an Update is deciding scope: what is in and what is out.

In order to decide this, we start the Inception phase with the Roadmap bullet points and what players have written on the forums, then determine how to achieve the feel we want. We dream up many features and ways of achieving our goals. This is where Mark is right now: turn creative dreams into solid designs. For instance, we just discussed how we might better do food & nourishment, moving it from a negative to a positive system. Still lots of flux.

We are close to the end of this Inception phase and deciding what exactly Exploration is.

One thing we need to determine is how much of Dynamic Quest generation will be in Exploration.

[h2]Procedurally Generated Dynamic Quests[/h2]



This is the biggest challenge of my 20+ year tech career. Others have tried to tackle ‘Computer Generated Story’ and broken their brains and career on it. I have been thinking and tinkering on it for almost a decade. I think as a team, we have the right people to do something special and compelling. This could be the core secret sauce of Archmage Rises.

To that end, I’m going to document the journey in more detail. Writing up weekly summaries, like this, as it helps clarify thinking and may be of interest to others.

Last week I wrote that I needed to stop thinking and start doing!

Well, I did, and managed to get something really terrible working.

As awful as it is, it shows real promise. It only gets better from here!

I think with another week or two of effort we can really have a solid direction.

[h2]Priority Fixes[/h2]

  • Based on some weirdness we found with how mount inventories are handled, Zach is rewriting and streamlining the inventory system. This will fix current and future bugs. In his words “Make it difficult for other programmers to use it wrong.” 😛
  • RiverSideHibbard requested the ability to see what the character’s current skill is when viewing an item with a skill prerequisite (mounts, weapons, armor).

Build 0.2.14 Is Live!

Hey! It's another Friday, and another patch day! Let's dive in to what's changed:

[h2]FIXED:[/h2]
Kaylo7 reported an issue with books that being read passively while physically in a mount's inventory not being able to be removed from the inventory afterwards. We've fixed this along with several related issues stemming from this.
Books will now be removed from passive reading list if it is moved to an inventory that isn't the player's or a mount they have with them. They will also be removed if in a mount's inventory then gets placed on display in a tower.
Docks are now open 24/7. No more worrying about landing on an island only to discover that the docks have permanently closed and out of business. As much as being stranded on an island might also be fun... :P

[h2]IMPROVED:[/h2]
Now when talking with an NPC about a quest that has a time limit, you'll be able to see what the time limit is before accepting/declining the quest.
Running out of time to complete a time-limited quest? No worries, now you can ask for an extension to give yourself more time to complete the quest!
Icons for dungeons are now removed from the map when you complete the dungeon
Updated lair/dungeon completion/destroy logic to check not just whether all patrols were cleared but also if all rooms have been explored, otherwise the dungeon is still considered active
Added a tooltip on the map view when hovering over partially explored dungeons to get more details on dungeon exploration progress
Existing save files with destroyed dungeons will now have their completed lair location icons removed.

Weekly Dev Update: Oct 17

[h2]Update #2b: Combat[/h2]
It’s not quite ready to ship yet.. 😂

[previewyoutube][/previewyoutube]

What you are seeing above is a NEW combat scene with all new GameObjects recreating basically what we have already: showing an enemy, casting a spell, etc.

There is entirely new damage calculations happening under the hood. Something Michel thought would take about a day and now has invested three. Why? Because it matters how and the order it is done. If you cast a spell doing 100 damage, and it crits for +50% damage, but the target has 75% resistance, is the +50% = +50 damage or +12.5 damage?

The combatrons that make this all work are separate little pieces of data to make this all clear to you through onscreen UI and the combat log.

I’m expecting we have our first data-driven spell working tomorrow or at least this week. Once that happens things will go faster.

This new data driven (as opposed to code driven) makes it possible to do mod support for spells. Am I saying we’re going to support mods? No. I’m saying we are not doing anything that precludes mods, if we want to go that way in the future.

Combat is James, Mark, Tyler, Michel, Josh, Jonathan, and Rubi. Rubi is back from her honeymoon and ready to start making VFX for your spells.


[h2]Update #3: Exploration[/h2]
Had a great internal meeting with Design Lead Mark and Narrative Lead Nolan about the new way players will go about exploring and interacting with the map. The new fatigue system is way better than the current stamina system. Based on Kaylo7 and other’s feedback about big resource harvesting we are looking to have the player find an abandoned (and monster filled) mine, clear it out, and setup a foreman and workers to harvest the goods for you. No more living the fantasy of being a solitary mage running around with a pickaxe.*

It’s gonna be amazing, I’m super excited about it and think we are solving core problems that need solvin’.

(* Apparently no one actually has this fantasy)


[h2]Dynamic Quests: A Story Engine[/h2]


Work continues on the dynamic quest system. We’ve argued through many points of what it is and isn’t and now the time is to stop talking and just make something terrible.

Yes, you read that right. The next step is to make a completely awful quest/story generator that is embarrassingly horrible. So that we can test and see what is so very horribly wrong and fix or redesign it. That’s how iterative creation goes.

I hope this test can be completed this week. Maybe i’ll even share the completely awful generation.

Thomas and Nolan are focused on this.

[h2]Priority Fixes[/h2]
  • Taliensin recommended we remove completed dungeons from the map. We will, and add a tooltip to let you know what is remaining (rooms, # of monsters) if you got to the end but missed some stuff.
  • Allow the player to get extensions on quest time limits. This requires a persuasion check to negotiate more time to do your job!
  • When buying items that require a skill prereq (like weapons or armor) we will show the player skill next to it
  • We’re going to make the Innkeeper be able to provide a list of everyone in town who has an available quest, this will make it easier to see who to visit
  • Dock Travel sometimes causes a crash, or gets stuck, or is closed. It’s been dragging on for a long time and it’s time to finally make it work nice nice.


Zach and Thomas are heading up this effort.

Patch is coming out Thursday.

Patch 0.2.13 Now Live!

Happy to report the following fixes this week!

Improvements
  • NPCs answer questions based on "domain knowledge". So if you ask them a question and they don't know, they tell you who has the domain knowledge. A helpful player reported the NPC would tell you the expert's name, but not the town they were in! Now they do so you no longer have to go looking for Joan Coppard in EVERY SINGLE TOWN. ːsteamfacepalmː
  • Loot drops in the final room of a dungeon were too RNG. One poor adventurer only got 6gp! :crying_yeti: We've bumped them up to make them feel much more significant. This is excellent feedback and relatively easy to fix. Early Access helps us see where the RNG needs 'help'. :happystar2022:
  • A VFX will now play when casting Light or Arcane Insight
  • We added a button to the quest log for abandoning a quest. This is intended only for situations where a quest breaks and you'd like to restart it. This is much easier than using console commands, though console commands makes you feel more like a Hacker! :poeIIshifty:
  • Princess Katherine (which my staff assumed was my wife but I assured them definitely was not! I cannot get her to play the game!) reported a problem with the weaponsmith hammer duke quest turn in options. These have been better clarified. Thanks!


Fixes
  • JBreezy reported a problem removing a Book from a tower room display slot: it was going to the tower inventory instead of the player inventory. It now goes to the player inventory.
  • TrojanKaisar and Watuhboy reported issues with loading a New Game. This ended up being an inability to spawn the tower quest throwing an error and wrecking everything. We downgraded the error so it will no longer block, and updated the quest tech so that save should be able to have the tower quest now
  • Monster Tamer Bloba reports being stuck in dungeon after a fight. This is a tough one due to race conditions, we made a temporary bandaid for it that we hope will quash the error. More investigation necessary.