-
|
|
XNA RPG Starter kit - extending quests
|
Hi all
I have started some work on enhancing the current quest system in the RPG starter it for XNA. It is early days yet, but I am proposing the following, and would welcome feedback as to the usefulness of my proposal and any suggestions that you may have:
The main issue I see with the current QuestLine approach, is that it only allows a sequence of quests, where finishing one quest starts the next. This fits in fine with a 'chapter' based approach, but is inflexible on the player. i.e. this allows a simple sequence of events such as:
q1 (quest 1), then q2, q3, ..., qn
My proposal is to change the current system as described below:
1. Remove questline completely
2. Remove the QuestContentName tag in the MainGameDescription.xml and replace with a list that refer to the first quests to start
3. Each quest to have a tag that contains an Item list of the next quests that will be started when the current one completes. This would allow, say, q1 to be followed by (q2a and q2b and q2c), i.e. a split of quests
4. Each quest has an optional tag, with a value from 1 to 255, that defines the number of quests that must finish, with the nextquest being this quest, before this quest starts. i.e. a join of quests
e.g. if q3 could be preceeded by any 1 of q2a, q2b or q2c, then the threshold would be 1 (the default - also used if no tag is supplied) - if all previous quests would have to be finished, then the threshold would be 3. Note also that each of q2a, q2b and q2c would have to have q3 in their NextQuest tag list
Note: when a quest is started, all preceeding quests, that are not already Completed, are forced to Failed
5. An optional tag for quests, that dictates whether the quest is visible in the quest list - and probably also whether the starting quest information is shown to the screen (any hint as to a hidden quest, would be shown in the previous completing quests message)
Other options I have considered, but am not yet planning to implement, include:
1. A quest may have a different weight regarding the threshold, i.e. to become a 'captain', the PC would have to accumulate a threshold of 10, where killing a notorious bandit might be worth 5, but catching a theif might be worth only 1
2. It would be better, at some point, to separate out the messages, and add optional parameters, so they can be constructed with more 'intelligence'. This would combine with the next option
3. There should be defined QuestVariables, that can store values, e.g. an honesty variable might be a signed integer. Every time the PC steals, the variable is reduced by 1. Every time the give to the poor, it is increased by 1. Later, the honesty could be used to decide if the PC can join the theives guild, the fighters guild, or the paladins guild
Any comments gratefully received
Andy Stratton
P.S. When (if!) finished, could this also be considered for inclusion in the Starter Kit?
|
|
-
|
|
Re: XNA RPG Starter kit - extending quests
|
Andrew Stratton:3. Each quest to have a tag that contains an Item list of the next quests that will be started when the current one completes. This would allow, say, q1 to be followed by (q2a and q2b and q2c), i.e. a split of quests
4. Each quest has an optional tag, with a value from 1 to 255, that defines the number of quests that must finish, with the nextquest being this quest, before this quest starts. i.e. a join of quests
e.g. if q3 could be preceeded by any 1 of q2a, q2b or q2c, then the threshold would be 1 (the default - also used if no tag is supplied) - if all previous quests would have to be finished, then the threshold would be 3. Note also that each of q2a, q2b and q2c would have to have q3 in their NextQuest tag list
Note: when a quest is started, all preceeding quests, that are not already Completed, are forced to Failed
There are six quests: 1, 2a, 2b, 2c, 2d, and 3. You finish 1, and move on to 2a. We'll say quest 3 has a threshold of 3, so you move on to quests 2b and 2c. Then you go do quest 3, which automatically fails quest 2d.
How does the player know that if he does quest 3, he will no longer be able to do quest 2d - and, indeed, will be penalised for his failure to do everything available?
What happens if you set the threshold for quest 3 to, say, 5? There are only four quests that list 3 as a next quest. This makes it impossible to do quest 3 at all; you do quest 1, the four 2s, and then you're stuck.
What if quest 1 has quest 3 listed as a next quest? Even though you can never do it without doing level 2 quests, this causes some strangeness - especially if quest 3 only has one prerequisite. You see what appears to be a quest 2e, except it's really quest 3 and causes all four of the level 2 quests to fail.
There are a lot of pitfalls in this mechanism you're describing. They're all solvable, but you should at least think about how you're going to solve them.
|
|
-
|
|
Re: XNA RPG Starter kit - extending quests
|
CDarklock:
There are six quests: 1, 2a, 2b, 2c, 2d, and 3. You finish 1, and move on to 2a. We'll say quest 3 has a threshold of 3, so you move on to quests 2b and 2c. Then you go do quest 3, which automatically fails quest 2d.
How does the player know that if he does quest 3, he will no longer be able to do quest 2d - and, indeed, will be penalised for his failure to do everything available?
My expectation is that you have to specifiy the quests so that they are displayed sensibly to the user. An example will hopefully clarify this.
The PC will only be let across the bridge to the wilderness when they are 'properly equipped'. They therefore need to ensure that they have at least one of a Short Sword and a Hide Shield.
This gives quest 1, that 'feeds out' into 2a, 2b, 2c. Quest 1 is completed by meeting an NPC, who tells them of the quests.
Quest 2a is visible, and tells them that they "need to get a Short Sword or a Hide Shield in order to continue". To complete this quest, the player must collect both items.
Quest 2b is hidden and is completed when they get a short sword - the player is then told they can report to the guard at the bridge.
Quest 2c is the same as 2b, but finishes when they get a hide shield.
Quest 3, to cross the bridge, is started when they meet the guard
The plan is that the player meets the NPC, which tells them to get a hide shield or a short sword. The player either buys one, or gets one from a drop, or finds one in a chest. The player is told that they have completed a quest they never saw (!). Quest 2a is still visible and has been partly completed. The player can now meet the bridge guard (which finishes quest 2a, 2b and 2c) or get a short sword, which finishes quest 2a and 2c - and the player can meet the guard.
Phew...this probably needs a bit more thought - but it looks like it could work - with some attention to completion messages, etc.
CDarklock:
What happens if you set the threshold for quest 3 to, say, 5? There are only four quests that list 3 as a next quest. This makes it impossible to do quest 3 at all; you do quest 1, the four 2s, and then you're stuck.
There could be some sort of node checker - to make sure this doesn't happen - but this can also go wrong with the current quest line - create 9 goblins and then require the player to kill 10 - or create 10 and put 1 somewhere that you can't get to yet. I think any method that attempts to auto detect this could always be defeated. The answer would probably have to be good testing...
CDarklock:
What if quest 1 has quest 3 listed as a next quest? Even though you can never do it without doing level 2 quests, this causes some strangeness - especially if quest 3 only has one prerequisite. You see what appears to be a quest 2e, except it's really quest 3 and causes all four of the level 2 quests to fail.
Actually the numbers are irrelevant - so this would just (basically) add 1 to the count for threshold purposes. A sort of pointless mistake that would probably have to be detected by testing.
There's no doubt that this makes things more complex. But the plan is that the freedom makes it worthwhile.
e.g. My proposal would allow quest 1 to start 2a and 2b, each of which could link into 2aa, 2ab, 2ba, 2bb, 2bc, then 3 could depend on 3 of them completing (allowing the player to complete 2a, 2b, 2aa or 2a, 2aa, 2ab, etc.)
Intiially I considered leaving the questline in, so that the simpler method could be used when needed, and the linked system used only when necessary. However, the code was going to get really messy - testing and maintenance would have become worse - so it made sense, to me, to stick to one mechanism.
CDarklock:There are a lot of pitfalls in this mechanism you're describing. They're all solvable, but you should at least think about how you're going to solve them.
There certainly are pitfalls, but I'm following an agile approach - so I'm assuming problems can be solved. If things get too complex - I'll just rewind to the questline point of view with some additions :).
Thank you for your comments
Andy Stratton
|
|
-
|
|
Re: XNA RPG Starter kit - extending quests
|
OK - time to rewind
I've decide to split the proposal into two parts - the definition part and the actual code behaviour:
Definition
The main advantage of the original questline mechanism is the simplicity and ease with which the structure of quests is defined - basically just a list of quest filenames.
I am now planning to extend this simple mechanism with a single questlist file, which will contain:
Multiple lists of quest filenames that follow one after the other
Rules that decide when a quest can start (i.e. how many previous quests must finish first) and whether all previous quests are then completed/failed/cancelled
e.g.
<Quests>
<item>
<Line>
<item>SaveMercadia</item>
<item>DefeatTamar</item>
</Line>
</item>
<item>
<Line>
<item>VisitTheOldWitch</item>
<item>DiscoverTheWitchesSecret</item>
<item>ReportTheWitchToTheKing</item>
<item>EvadeTheWitchesAssassins</item>
</Line>
</item>
<item>
<Line>
<item>DiscoverTheWitchesSecret</item>
<item>BlackmailTheWitchForMoney</item>
<item>EvadeTheWitchesAssassins</item>
</Line>
</item>
</Quests>
<Rules>
<item>
<Name>EvadeTheWitchesAssassins</Name>
<StartAny/>
<CancelOthers/>
</item>
</Rules>
The above defines two separate quest lines, a cut down version of the standard questline, and a questline where the player may visit an old witch, following this, the player may discover the witches secret (let's say - robbing the graveyard). The player can then either go to the King and report the witch, or go to the witch and demand payment - either of these quests will remove the other quest from being possible. Either quest will start the EvadeTheWitchesAssassins, where undead start hunting the player.
Note - the names of the quests are the file names - so can be defined in terms that make sense to the content creator - rather than the title that the player will see. Some quests can be hidden, which prevents the player from seeing all the options - but hints from npcs would be useful (or completion messages from previous quests).
Hopefully this will make the simple content creation almost as easy as the simple questline version.
Code Behaviour
The code behaviour will still depend on thesholds and nextquestnames - but these will be derived from the (hopefully) more friendly descriptions above - i.e. written by the QuestWriter and read by the Quest.reader.
Any comments welcome
Andy Stratton
|
|
|