1. Archmage Rises
  2. News

Archmage Rises News

Build 0.2.17 is Live!

[h2]IMPROVED:[/h2]
Now when someone requests you to find a resource as part of a quest, you don't have to take the extra steps to ask where the resource is, they will just tell you! Unless they don't know... but in that case at least they will tell you who in town you should talk to to get that info! Saves you a few extra clicks :)

Dynamic Quests #3: Making Quest Tasks Make Sense

Last week a fan stated: “You only wrote that article to talk about Indiana Jones.” I’m trying to be transparent, but not that transparent! 😛

This is our super secret process, and so far we’re sticking to it!

See those loops that go backwards? Ya, that was last week.

As a reminder our context is: We’re trying to make a dynamic quest generator able to spit out a simple “kill the monster for me”. If we can do that well, we believe we’ll have the tech baseline to make the other kinds of quests with all the nuances required.

[h2]From Tasks to Text[/h2]

Our goal for the week is to go from basic story outline of motivations and tasks of the previous week, to generating some dialogue text.

Prepare to be underwhelmed!

[h3]TWO CHALLENGES[/h3]

  • Inappropriate Tasks - we’re generating quest task lists which may not have anything to do with the NPC’s goal. If they want a skeleton lair destroyed, but the tasks they give you are: Talk to NPC, Study a book, Fetch some Stone… it just doesn’t match the objective or feel right.

  • Pacing and Tension - if the tasks are in a randomized order, we go from amazing stories where the tasks seemingly build from the previous, to stupid ones that make no sense.

The solution to both of these is to use Templates!

[h2]Templates[/h2]

A template is a heuristic (I think i’m using that word right) to guide the hand of the generator to results we want.

For every given problem type and motivation, we can have a template for the kinds of tasks which would resolve it. Not so much a script as a trope.

Inappropriate tasks? Gone, we can use the template to define only the task types we know are appropriate.

Pacing and tension? Nolan was thrilled he can now control types of tasks and the size of them to build and release tension and build narrative progression.

I’m not afraid of some manual labor of making templates, as long as the # of templates is reasonable. I’ll define reasonable as < 300. Past that, it is too laborious to be useful to a game in active development.



Not a template like this!

We created a really rough template like this:

Quest Plot 1: Rohesia Streatfield wants Eliminate - Kill Unique Template: cEeiraaaaa

The length of the template determines how many tasks (steps) are in the quest. This can vary and we can modify the hand made templates at runtime with changes so we don’t have to create tons of templates

Each letter of the template defines a category of task allowed.

  • c = Combat, e = Exploration, E = Economy, i = Information, r = Relationship
  • a = any category

To make this work we needed some way of defining the data pools and allow Nolan to modify it. I was sick of doing all the grunt work myself!

Like all good game devs, we use Excel to store some of our very textual data. It’s better than JSON which we use for more crunchy data like monster hitpoints, and much much easier to read and edit.

For any curious programmers, we use ExcelDataReader to work with binary Excel files in C#. I already wrote an Adapter class (for the NPC dialogue system) that gets down to the business of reading in an excel file and turning it into custom class data objects in about 3 lines of code. Unfortunately, this code was only on the game side not our tooling, so I had to integrate it in and be able to read in data like this from Excel:



It took a day to rewrite the hacky prototype code we had from class/object based to external data driven. I got it all setup and working.

I showed the results to Nolan.

It sucked.

Quest Plot 1: Rohesia Streatfield wants Eliminate - Kill Unique Template: cEeiraaaaa
  1. Rohesia Streatfield: Meet quest giver. Get introduction to quest ()
  2. Rohesia Streatfield: Capture Enemy (Combat) (Allied - Eliminate - Kill Unique)
  3. Reginald Steed: Find Town (Exploration) (Allied - Eliminate - Persuade Other NPC for Current NPC) They provide assistance
  4. Grecia Pugsley: Get Generic Item (Economy) (Allied - Eliminate - Kill Enemy in Certain Place) They provide assistance
  5. Isabella Mossman: Ask Other NPC About Topic (Information) (Allied - Eliminate - Kill Enemy in Certain Place) They provide assistance
  6. Rohesia Streatfield: Persuade Other NPC (Relationship) (Allied - Eliminate - Kill Unique)
  7. Isabella Mossman: Raise Relationship with Current NPC (Relationship) (Allied - Eliminate - Kill Enemy in Certain Place) They provide assistance
  8. Estrilda Tibbles: Find Text (Exploration) (Allied - Eliminate - Clear Lair) They provide assistance
  9. Reginald Steed: Persuade Other NPC (Optional) (Relationship) (Allied - Eliminate - Persuade Other NPC for Current NPC) They provide assistance
  10. Grecia Pugsley: Get Training (Economy) (Allied - Eliminate - Kill Enemy in Certain Place) They provide assistance
  11. Lauretta Devereux: Persuade Current NPC [End Quest] (Relationship) (Allied - Eliminate - Clear Lair) They provide assistance


We hadn’t solved our core issue because we didn’t have enough detailed data on the NPCs actual problem. If their goal for the quest was Eliminate a Skeleton Lair we couldn’t just have any combat task at the end, we had to have a Destroy a Lair task!

I won’t make you figure it out but just tell you: There ain’t enough letters in the english alphabet to identify all the possible tasks we need now and in the future to make a letter based template work.

We were at a dead end.

I threw out what I’d done and started again with a new idea. A quote from a 1930’s journalist…

[h2]Enter Malcolm Muggeridge[/h2]



Malcolm Muggeridge - British writer and social critic, was one of the most brilliant controversialists and media personalities of his generation.

"All new news is old news happening to new people." — Malcolm Muggeridge

This is a fascinating insight on the human condition that we can take advantage of for game quests.

I’m playing Assassin’s Creed Valhalla right now (and will be for at 10 more months if I want to finish the story!), and each quest more or less follows this basic template:

  1. Go talk to some person
  2. Go talk to another person
  3. Fight some soldiers in some place
  4. Go talk to the original person

Am I bored? No.

Its not just similar across AC series, but its similar to Witcher, or Pillars, or Skyrim. It’s old news (tasks) happening to new people for new and contextually relevant reasons.

Worry less about task variety, and focus on better more detailed reasons for the goal.

With this new insight I added more data to the NPC goals:

  1. A reason why the NPC wants the objective, like a Lair destroyed.

    1. The [@target] have been proliferating again.
    2. The [@target] have been venturing dangerously close to our town.

  2. A scale for how strongly the NPC feels about the goal.

    1. If they are afraid of skeletons a little bit then the tasks will be reserved and quest rewards they are willing to pay small.
    2. If their passion is dialed to 11, they’ll take the most extreme measures and pay anything, up to half their kingdom!

  3. A separate value for tracking their feeling towards each monster type in the world. Similar to Ken Levine’s Orc who hates all elves, but indifferent to goblins.
We can utilize this data in other interesting ways.

  • Events can happen that increase NPC’s passion about something.
  • Players can do/say something to change an NPCs passion scale value.

With this new approach, we created a new template system. These are comma separated lists of task ID’s that are super easy to read:



The output now looks like this. We show the task categories in ():

Quest Plot 1: Gilbert Worthington wants Eliminate - Kill Unique
Template: Ask Other NPC About Topic, Find Lair, Clear Lair, Kill Unique


  1. Gilbert Worthington: Meet quest giver. Get introduction to quest ()
  2. Gilbert Worthington: Ask Other NPC About Topic (Information) (Allied - Eliminate - Kill Unique)
  3. Eleanor Bastable: Find Lair (Exploration) (Allied - Eliminate - Get Generic Item) They provide assistance
  4. Gilbert Worthington: Clear Lair (Combat) (Allied - Eliminate - Kill Unique)
  5. Gilbert Worthington: Kill Unique [End Quest] (Combat) (Allied - Eliminate - Kill Unique)

And another

Quest Plot 1: Agnes Cloyne wants Eliminate - Clear Lair - (Underlying reason: NEW ENEMY LEADER) Template: Find Text, Find Lair, Track Enemy, Kill Enemy in Certain Place

  1. Agnes Cloyne: Meet quest giver. Get introduction to quest ()
  2. Geoffrey Dartrey: Find Text (Exploration) (Allied - Eliminate - Kill Enemy in Certain Place) They provide assistance
  3. Beneger Meeson: Kill Unique (Optional) (Combat)
  4. Aytrop Pannell: Find Lair (Exploration) (Allied - Eliminate - Persuade Other NPC for Current NPC) They provide assistance
  5. Aytrop Pannell: Kill Unique (Optional) (Combat)
  6. Amice Nutt: Track Enemy (Exploration) (Allied - Eliminate - Get Generic Item) They provide assistance
  7. Agnes Cloyne: Kill Enemy in Certain Place [End Quest] (Combat) (Allied - Eliminate - Clear Lair)

There is nothing special about these quests. Many a junior designer has made quests like these across many games. But that is precisely the point! The algorithm is popping out intern or junior designer quality level quests! Progress!

This is all very difficult. And it’s not as if someone wrote a book on how to do it!



Oh wait, there is a book on how to do this. I’ve read it. I’ll say we are beyond what is covered in the book.

[h2]Hey! What About the Text Gen Goal?[/h2]

With all the work (and rework) last week I did squeak in a tiny start on the quest giver dialogue. It’s pretty bad, but hey, everything is bad until it isn’t! Here is what the system currently spits out:

Quest Plot 1: Bardulf Samways wants Eliminate - Get Generic Item - (Underlying reason: DON’T UNDERSTAND THEM)
Template: Find Text, Find Lair, Track Enemy, Kill Enemy in Certain Place


  1. Bardulf Samways: Find Text (Exploration) (Allied - Eliminate - Get Generic Item)
    Well met. We’ve got a problem. These Skeleton are a mystery. Nobody understands them.I need you to Find Text
  2. Walter Maunder: Find Lair (Exploration) (Allied - Eliminate - Clear Lair) They provide assistance
    I need you to Find Lair
  3. Alan Lugg: Track Enemy (Exploration) (Allied - Eliminate - Clear Lair) They provide assistance I need you to Track Enemy
  4. Richard Mabbs: Kill Unique (Optional) (Combat)
    I need you to Kill Unique
  5. Bardulf Samways: Kill Enemy in Certain Place [End Quest] (Combat) (Allied - Eliminate - Get Generic Item)
    I need you to Kill Enemy in Certain Place


[h2]Additional Discoveries[/h2]

  • Totally random stinks, use templates BUT allow totally random sometimes to keep it spicy.
  • I wanted to push off data importing to a later time. When prototyping speed is king. But the data started to get unweildly. Nolan typing things up in confluence and then me recreating it in code was slower not faster. Also, enabling Nolan to iterate in parallel with me gets us to the end result faster.
  • There wasn’t a good place to bring this up in the narrative above, but we had a really significant realization on how to do this better in an open world. A reward for making it this far in the article!

    When the player has a task, like needing some knowledge from a scribe, or a blacksmith to sharpen a blade, we use domains of knowledge - a system we created for the NPC Update #1 to answer knowledge questions - to lead you to the correct person.

    • So if the task is to find out some knowledge about Skeletons, that could be a Scribe level 3 knowledge requirement. The game will then point you to an NPC with that knowledge (like Gandalf or Eliminster). It will try to reuse experts. So in Quest 1 you need knowledge you go to town A and ask Expert X. In Quest 8 if you need similar knowledge, it will point you back to Expert X in Town A. This reuse makes the world feel real, and the people matter!
    • Based on relationship (to you or the quest giver), the expert may not help you, unless you do some task for them. Once you do, they will then give you what you need.
    • This now allows the player to play strategically. If they come across a field expert they can purposefully build relationship with them, so that when they get to a quest and need their expert knowledge, the person just gives it to them, no quid-pro-quo!
    • If that expert dies (goblin attack, old age), time to find someone new! The game stays fresh.
  • I hope I explained this clearly. It’s a pretty exciting new idea we’ll take advantage of later.

Weekly Dev Update: Nov 6

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

Continuing my misdirection by showing random internet battle art, I’ve always liked this from the DragonLance 1985 Calendar by Clyde Caldwell

Last week was a good week in combat. The team is liking Mark’s leadership and feeling good, so we’ll continue this way. Combat Rewrite continues to be the primary development focus involving: Jessi, James, Tyler, Michel, Josh, Jonathan, Mark, Zach, and Rubi.

  • Zach is working on the new Buff/Status system which allows for stacking buffs as seen in many games. For example, fire school builds up ‘Embers’ which can then be utilized in special ways.
  • We’re going to release a new monster race with this combat update! How can we not?! Longtime supports have been staring at the same 4 races for a very long time. The new system, and reason for rewrite, allows this to be done (hopefully) easily. James is working on stats for a new race. What is the new race? Not saying yet until we get the artwork animated.


Finally, here is another new spell VFX being worked on. It’s a WIP for Ground Spike. The Earth spells in the current build are under represented, so this is part of making them a fully featured equal to the other schools.

[previewyoutube][/previewyoutube]

[h2]Dynamic Quest Generation[/h2]

I continue to publish weekly deep dives on the proc-gen quests. I’ll begin publishing these on Fridays, meaning one today and one on Friday of this week.

Summary is we zeroed in on making NPC goals more specific so we can generate meaningful tasks and dialogue text based upon them.

The first version of the dynamic quests will come in Update #3 Exploration.

[h2]Priority Tasks[/h2]

Last week’s patch contained some good quality of life improvements thanks to fan feedback. We also fixed a dungeon room with no doors problem, something that has plagued us for 6 months and thanks to a recent bug report we managed to see the problem and solve it!

This week we’re continuing with more improvements.

  • We’re going to make the NPCs a little smarter where they tell you the next step of the quest rather than requiring you to ask “Tell me about [Resource] or [Town]” to find out where it is.
  • Based on a discussion on the forums weeks ago, we’re going to make tracking tracks easier at night: Light spell +2 , torch +1 against -4 at night

Build 0.2.16 is Live!

[H2]FIXED:[/h2]
  • Fixed a bug with some dialogue options not being numbered properly
  • Fixed a bug in the randomized selection code that should improve the variety of quest generation
  • Fixed a bug causing quests to perpetually fail to be prompted by an NPC if they didn’t meet the initial quest requirements.
  • Fixed an issue that can cause a number of various dungeon-related bugs (double dungeon doors, double dungeon rooms, dungeon scene listeners triggering outside of dungeons, etc)
  • Fixed an issue of dungeon rooms being generated without doors. This bug also could potentially fix some remaining issues with dungeon levers

Big thanks to Spoorthuzad, hodak2, Drazhya, Mielepieltje, Augurianius, Mator, ManPie, Emroko, El'Reach, FluffyJadey, Osmentane, triplesixsmokey, kernoriordan1, kognito, and Seros Senric (among others) for all of your dungeon bug-related reports. While we can't guarantee all of these bugs reports have been address yet, these fixes should hopefully address many of these recently submitted bug reports.

[h2]IMPROVED:[/h2]
  • Added keyboard controls to Archopedia (thanks to KafkaExMachina and others for the suggestion). It's not pretty but it will work for now ːsteammockingː
  • Innkeepers are now the source of knowledge in the town when it comes to quest finding. If you are looking for a quest, they'll know who in town might be looking for some help and where to find them
  • The subject picker dialog window now highlights quest-related subjects and prioritizes them at the top of the list so they are easier to find when bringing them up in conversations


Dynamic Quest Gen #2: Basic Story Outlines

Last week we went over our approach philosophy and managed to get some characters with some motivations and goals around a quest object. Thanks for those who posted questions and responses. It helped us clarify our thinking.

Now we turn our attention to…

[h2]What Do These Characters Want the Player to Do?[/h2]

Thanks to some conversation with Kaylo7 it became clear we need to define terms. We like to refer to the 1989 movie Indiana Jones and the Last Crusade.



DEFINING TERMS
  • Quest - A series of one or more plots around a certain subject. Like Indy rescuing his dad. Or needing to get the journal back from Germany.

  • Plot - A set of tasks oriented around a quest objective from a specific character’s perspective.

    • Indy’s Dad Henry - wants to get the Holy Grail.
    • Nazi’s - want to get the Holy Grail
    • Order of the Cruciform Sword - want to hide the Grail and prevent anyone from getting it
  • Task - Something you do like: Fetch, Find, or Kill. Ideally with increasing tension. First Indy has to reach the castle he is imprisoned in. Then he has to sneak in. Then he has to get him out, etc…

    • Tasks can be shared across plots of equal goal alignment. Indy finding the tomb with the missing top half of the etching is in total alignment with his and the Nazi’s agenda which is why they initially help Indy do it. It is only later Indy finds out there is a second plot.
    • Tasks can be mutually exclusive, where once completed, invalidate and ‘fail’ the other plotlines. These kind of tasks are the ‘Moment of Decision’ for the player where they commit to a particular plot. Our goal is to delay these as late as possible because it leads to better story feel.
  • Story - A sequence of Quests chained together. Ideally with some kind of arc and increasing tension.

    • I'm playing Assassin Creed Valhalla right now. I like how they group their quests by Storyline. I also like their UI for it.


THE TASK OF TASKS

Here is the latest output from the generator program. Starting with our major and minor characters. If Majors disagree on end goal, that creates a different plotline. Minors provide stepping stones along the plot line based on their agreement, disagreement, or neutrality with the quest giver.

Majors:

Amice Middlemas, Female, High wealth, age 27 Motivation: Capture - A Intact Skeleton will make an excellent trophy.

Alfred Swaffer, Male, High wealth, age 26 Motivation: Avoid - We must prepare and protect ourselves against the Skeletons.

Minors:

Sabina Rait, Female, High wealth, age 47 Motivation: Fight - A Skeleton carcass is a valuable resource.

Robert Stanhope, Male, Low wealth, age 63 Motivation: Capture - I want to study a Intact Skeleton.

Eleanor Gorringe, Female, High wealth, age 51 Motivation: Capture - I want to study a Intact Skeleton.

Nicholas Ward, Male, Mid wealth, age 40 Motivation: Avoid - We must prepare and protect ourselves against the Skeletons.

Cecily Gigg, Female, High wealth, age 28 Motivation: Avoid - Skeletons have just as much right to exist as we do.

Avice Bunce, Female, High wealth, age 23 Motivation: Avoid - We must prepare and protect ourselves against the Skeletons.

=============================

Quest Plot 1: Amice Middlemas wants Capture - A Intact Skeleton will make an excellent trophy.

1. Amice Middlemas: Meet quest giver. Get introduction to quest

2. Robert Stanhope: Inquire about enemy (Allied - Capture - Study) They provide assistance

4. Alfred Swaffer: Interference: Plants an ambush for you (Against - Avoid - LiveAndLetLive) - Disagree on: ownership)

3. Amice Middlemas: Persuade X to do Y [End Quest] (Allied - Capture - Trophy)


===================

Quest Plot 2: Alfred Swaffer wants Avoid - We must prepare and protect ourselves against the Skeletons.

1. Alfred Swaffer: Meet quest giver. Get introduction to quest

2. Alfred Swaffer: Hire NPC to create item (Allied - Avoid - Defend)

3. Cecily Gigg: Persuade X to do Y (Allied - Avoid - LiveAndLetLive) They provide assistance

4. Avice Bunce: Appease enemy (Allied - Avoid - Defend) They provide assistance

5. Alfred Swaffer: Appease enemy [End Quest] (Allied - Avoid - Defend)


The above is a single quest that branches as soon as you start it. Amice wants a skeleton and Alfred doesn’t want to poke the bear, just leave them alone and build up protection from skeletons.



Some assumptions to clear up:

  • Not every quest will have multiple plots. If an innkeeper needs dye for a sign, it is unlikely anyone will disagree and thwart that.

  • There are two entrances into the quest depending on who you talk to first: Amice or Alfred. I really like how it isn’t set to just one NPC.

  • We have to introduce the other party, immediately, upon talking to the first quest giver.

    • This could be via a letter: “It’s come to my attention you are working for Amice to secure a skeleton. Meet me at the Inn. It’ll be worth your while.”
    • Or just embedding it in the dialog with Amice ‘And make sure you don’t talk to Alfred about this. He is a fool and not to be indulged’. First thing I’ll do is go and see this Alfred!
  • We are making the quest giver the first and last part of the plot. It doesn’t have to be this way, but it feels good for now.

  • Characters with opposite goals can do things to thrwart your progress. We to better define this, but for now they can plant an ambush, attack, or report you to authorities.


[h2]Things we Discovered in Generating Tasks[/h2]
  • Pretty obvious, but we had to tie tasks to goal outcomes. When we had a generic pool of tasks to draw upon we were getting weird things like pacifists asking you to kill and destroy the thing they were trying to protect.

  • We had to split tasks into two kinds (for now) of ‘major’ and ‘minor’ to control pacing and tension. It was pretty silly and anti-climatic when the first task was an epic battle and the last task was to deliver a letter across town. We expect escalation. And while this can be subverted sometimes, its an expectation for a reason.

  • Had to write something in to stop duplicates from occurring… but not always. Randomization is interesting and a quick way to start, but a quest where you have to do the same task 3 times in a row because that is how it rolled up randomly, it just isn’t interesting.

  • Nolan comes from writing and screenwriting. In books and TV when a character goes against type it is ‘interesting nuance’. But what is true in those mediums isn’t true in video games. Once you inject interactivity and the chance for the player to get lost or confused between story points, it’s not ‘fun’ when characters are inconsistent in behavior or task.

  • Originally we had major characters with complex goals and minor characters without real goals, we just slotted them into Allied, Against, or Neutral towards a certain major character and gave them the Support goal. This was insufficient when we needed to figure out how and where they provide assistance. We needed more data on the why. So we went back to giving all characters complex goals and it is the alignment of goals that determines which plot they get involved in for assistance or obstacles.

  • With better character goals the player can have a dialogue choice like "why are you helping" and the answer is "Because I want the corpse myself!" then the player knows the npc will make an offer near the end of the plot. I think this deduction and foreshadowing is cool. It also creates the option for late branches and multiple endpoints of the plot beyond just the quest giver.

  • For better stories it was important to not just know two people disagree, but to know how much and on what do they disagree. This allows us the Nazi & Indy situation where both want the tomb with the etching to be found, and overcoming the 3 trials at the grail’s location, it is only the last step of who possesses the grail is where they differ. This means we do late breaking branches of plot rather than having entirely different plots for essentially the same tasks to a similar objective. Which leads to my next point…

  • We started designing a ‘Reaction based’ system, where the plot can twist and turn based on variable thresholds along the way. Like if the mayors approval rating is < 50 the quest continues, but if it is > 50 then it is over. What I came to realize is there is no difference between reaction in real time (a quest of 8 steps that can end at each step) or just generating 3 or 5 steps. There is no way for the player to know so don’t overcomplicate it.

    • It's hard to come up with a reaction necessary at runtime besides skill checks like persuasion. We’ll think more on this.
  • It isn’t the quest writer’s (person or algorithm) job to come up with specific ordeals to block the player’s progress in a plot. It is the job of the world to oppose the player naturally. Like if you need a resource, there is a 'trial' in it's just hard to locate, or there are goblins around it, or whatever. We don't need to PLAN on those things, just rely on the game to do them.

  • But there is the occasion where someone actively wants to stop you from doing that precise task. So they interject a trial, like Saruman making the snow pass collapse causing the fellowship to have to go into the mines of Moria.

  • Keep it relational. Choice has to be based on the person and not the task/goal. The longer we delay a branch, the more the player can interact with the disagreeing parties, and therefore the more likely they are to care about each one’s perspective. When the choice comes, make it a choice between people.

    • This is super important and removes the emotional impact from the actual tasks or writing (which may be basic and samey) but the people and their reasons will differ. For example, a thousand different people can rob a bank. And while each one does it ‘for the money’, it is their personal and specific reason that makes it interesting though the act is the same.


We’re working on the tasks more this week and hope to have something cooler to show soon!