• Advertisement
Sign in to follow this  

Narrative techniques from a developer background

This topic is 435 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am looking for some material or pointers in the direction of data modelling techniques in regards to player choices in an RPG.

 

Specifically how would you go about modelling the actions, consequences, and the rules that go along with the choices you present to the player.

When developing a branching story, with choices that affect the world, story, and player itself, there is a lot of coupling between elements in the game.

I have been thinking it like a state-pattern approach. But I would like to see a more well-described suggestion.

 

It would be really great if you could help me find maybe some articles on this topic.

Be it academically or a company written article on how to tackle this problem in a well structured way.

Share this post


Link to post
Share on other sites
Advertisement

Learn software architecture to tackle this issue.

I think you are thinking too abstractly, you can find different approaches for different games because they have different ways to interact with the user.

 

I'd advise to read some open source engines if you really want to learn.

To learn how to write code -> You need to read code. 

Share this post


Link to post
Share on other sites

Seems like the primary concern would be making it accessible to your design team.

 

Otherwise I don't really get what you're asking. Possibly this is due to vocabulary decay rendering the term RPG meaningless.

Share this post


Link to post
Share on other sites

Seems like the primary concern would be making it accessible to your design team.

 

Otherwise I don't really get what you're asking. Possibly this is due to vocabulary decay rendering the term RPG meaningless.

What you are saying is kinda along the right lines.

Basically how you would structure the choices so that they comply with the design choices.

  • Making the correct actions available due to the current state of the game.
  • Letting the design changes that come during development ease the life of programmers.
  • Describing what consequences "game-term" will have from an action.

I would be interested in seeing, papers describing techniques or ideas about how to structure this.
My initial guess would be using some xml parsing of these informations.

Share this post


Link to post
Share on other sites

I honestly can't say I get what the question is. Reading your first paragraph makes it sound like you're asking about how to handle the design aspect of dialogue/story/player choice in an RPG. But then your later comments start talking about programming.

Share this post


Link to post
Share on other sites

If the game is heavily story-driven then the progression of the story is probably represented broadly as a flow-chart. Developers can then assign some sort of value to each state and that value can be checked in any part of the code that needs to. I see the term "state pattern" in the original post and if that is referring to the programming concept, I think it very unlikely that would be used here. That would be hard-coding gameplay features in an inflexible way. Most likely the current 'macro' state can be represented in a single number representing where the player is in the game. It would be like the page number in a Choose Your Own Adventure or Fighting Fantasy gamebook. That value can be queried by different game subsystems - or, more commonly, a scripting system exposed to designers - so that each system can respond to different stages of the game as required.

 

More common in RPGs these days is to have a variety of overlapping quests and subquests, and as such each one of these will commonly have its own state value. For example, each quest in Skyrim has a 'stage' value which represents how far you are through the quest. For example, this quest has 4 intermediate stages and a final completion stage, represented by numbers 30, 50, 102, 150, 200. Presumably a value of 0 represents not having started or discovered the quest at all. Any other part of the game that cares about your progress on this quest can ask the game engine for this value and act accordingly - whether that might be offering new dialogue options, responding with hostility or friendliness, offering different prices at a store, etc.

 

Changes to wider gameplay can be achieved in 2 easy ways. If the change is immediate during the quest, it can be done explicitly (e.g. there's a script function which basically says "When Quest 10 reaches Stage 200, Enable Dragon Spawn Point 15") or implicitly (e.g. you receive a weapon at the end of the quest, and other characters can react to the presence of the weapon, without needing to query the quest state). If a change is delayed - for example, certain things only start happening in the world once you pass a certain point - that can just be a condition tied to the relevant system. (e.g. Monster spawn points that have a scripted condition which checks a quest state value.)

Share this post


Link to post
Share on other sites

It would be like the page number in a Choose Your Own Adventure or Fighting Fantasy gamebook.

 

 

I generally agree with the idea of lets call it xml with id and an action would get you to an encounter of id x. However, would you then define unlockable actions in a new encounter, or would you define locked actions in the first encounter.

Let me try to give an example here:

  • You meet a man that has been robbed. You can here choose to help him or ignore him. Those are two choices on an encounter of id x. Here you could say that the man and location is bound to encounter x.
  • You choose to help him and you track down the gang that took his money and now you choose to return to the man.

Here you could either say that this is the encounter of id y, where you have new choices, or you could say that this is still encounter x but due to you previous actions you will have unlocked new interactions, and maybe others are locked or still available due to different reasons. 

How would you model this? In terms of easiness I would guess the x and y encounters would be easiest. However it would cause there to be a, potentially, large number of encounters on the same location and with the same person, based on how you handled the situation with the robbers.
 

More common in RPGs these days is to have a variety of overlapping quests and subquests, and as such each one of these will commonly have its own state value.

For me it makes sense to have a state value, like the idea of completion stage numbers is a very good idea. However a relationship model between characters might also be interesting to look into. Where interactions can vary based on your actions, can be more dynamic than the state value allows.

Generally the ideas are amazing, however I am more focused on how to model reactions than progress. If that makes any sense at all? :)

 

Share this post


Link to post
Share on other sites

Your example could be modelled either way. What matter are the external constraints. Skyrim has a quest system, which requires that you have a clear entry point and name for a set of linked situations, and one or more clear exit points when the quest is removed from the journal. So they would want to lay out the various alternatives, assign them a state value, and work out how to check for state transitions (e.g. collecting the money, handing over the money or spending it, etc). But you're talking about individual encounters rather than individual quests, and that would require a different data model, since most games are not interested in modelling individual encounters, nor easily able to do so.

 

You say "However it would cause there to be a, potentially, large number of encounters on the same location and with the same person, based on how you handled the situation with the robbers" but it's clear from most games that there are not a large number of different encounters; the designers create a small number explicitly (e.g. conversations with a limited number of options) and allow for another small number of implicit ones (e.g. killing the person). Progress through the quest is based on checking preconditions, e.g. "is this character dead yet?", "did I just hand back their lost ring?", "have I spoken to this character yet?", and so on. Each stage might have one or two such preconditions and there probably aren't more than a handful of stages.

 

Modelling relationships between characters is interesting but, again, what matters are the external constraints. For example, if you need to play back voice acting for each line of dialogue, there are a fixed and discrete number of lines you can use and therefore allowing something much more dynamic than a simple state value is probably not useful. It's also not something we're good at modelling yet, sadly.

 

You said in the first post, "when developing a branching story, with choices that affect the world, story, and player itself, there is a lot of coupling between elements in the game", but obviously in most games there is little branching at all, because it's too expensive to implement. Some games that do manage it are doing so by using a lot of unvoiced dialogue, so that it feels like a lot has changed in narrative terms, when in reality you just saw different words on-screen, and maybe there was some other simple post-condition such as a fight triggering at the end, or an artifact being handed over.

Share this post


Link to post
Share on other sites

The more I read about this the more I think of the entire subject here as bad. It's sort of like saying "How do I do math?"

 

What kind of math? What are the goals? What are the constraints?

 

You're talking about data modeling for scenarios in games but you seem to be working backwards. Instead of having a goal of how you want a system to work and then figuring out a data model that fits the constraints you're basically spitballing at ideas that might work under different scenarios. Coding is one of those things where you can't really set a goal without knowing what constraints you want on it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement