Here's a final summary of what i came up with with a LOT of help from the folks here (thanks guys!)...
A GENERAL METHOD FOR GENERATING QUESTS / MISSIONS / PLAYER OBJECTIVES IN COMPUTER GAMES
1. Quest - a single action performed by the player, either for benefits gained along the way, or for benefits gained plus a reward. quests have prerequisites that must be met to begin the quest.
2. Combo quest - a series of two quests that always appear together, such as get item A, use item A.
3. Campaign stage: one or more quests that make up a section of a campaign.
4. Campaign: a series of campaign stages.
5. Questor: an NPC or entity that sends the player on a quest.
6. Rewarder: an NPC or entity who rewards the player for completing a quest, for quests with rewards.
7. quest encounter: an event or action that triggers the start of a new campaign, such as talking to a questor who offers you a quest.
1. players are expected to defend their party and it's possessions at all times, this includes quest items to be turnd over to a questor, prisoners, escortees, etc.
2. one must go to locations of quest events. killing Rufio implies going to Rufio's location (the Inn of Ill Omen).
3. its assumed that the game engine implements all features and tracks all info required for a valid quest type for a given title.
1. straight: no deceit on part of questor(s)
2. bad info reward: prereq for last stage is location. stage before last gives wrong location as reward (rewarder lies/is misinformed).
3. red herring: quest is bogus. objects dont actually exist, locations wrong, etc. can't be completed.
4. delay tactic: time consuming quest followed by quest with unmeetable deadline.
CAMPAIGN STAGE TYPES:
1. a single quest
2. split/merge: mission flow splits on success/failure of first quest in the stage, and merges again at the beginning of the next stage.
3. loop: mission flow splits on success/failure of first quest in the stage, looping back to the first quest after completion of zero ro more side quests.
4. split: mission flow splits on success / failure.
5. a multiple-simultaneous stage: complete one or more quests in any order to progress to next stage.
6. a combo quest:
A. get special item/power followed by use special item/power
B. delay tactic followed by un-meetable deadline special condition
C. any quest followed by get reward
6. use/interact with
7. successfully execute (do something [combo/trick move/ title specific action])
8. be guinea pig.
1. person/NPC/friendy unit or monster/badguy/hostile unit
2. item/ including special/unique quest items
4. landmark, location, building (a fixed position).
5. combo/trick maneuver
6. stat/skill/exp/special power, etc
in general: a person, place, or thing.
1. don't get caught
2. don't be seen (covert vs overt action)
3. no killing (non-lethal only)
4. methods of acquisition: make, steal, take from dead opponnet, find, gather, buy, blackmail/coercion
5. Don't attack (Not even non-lethals are allowed)
6. time limit/window
7. using special item / power etc. usually the special item / power is one time use only.
8. dont break the law
1. quest is for reward - talk to rewarder to get reward once main goal completed + get any benefits gained during pursuit of the quest.
2. quest is for treasure - get any benefits gained during pursuit of the quest, but no reward from a rewarder.
1. state_is(subject,state) where subject is basically any variable in the game, and state is some value , range, limit, etc.
1. player knows location. transport(subject,location) where player is already in possession of subject. transport(player,location), a goto() quest, appears to be the most common type of quest with this prereq.
2. player at questor location/ talks to questor / receives orders from questor. this is just about all quest types.
3. player has special quest item(s)/power(s). for "get A, to unlock B, to kill C" type quests.
PLOT TWISTS, and what types of quest they apply to:
1. mistaken identity - any quest where the player is supposed to do harm to someone or something.
2. wrong location - any quest where the player must go to some location.
3. badguy attempts bribe - any quest were the player's target can negotiate with the player.
4. object already dead/destroyed - any quest with a target.
5. rewarder dies before giving reward - any quest with a rewarder.
6. rewarder refuses to reward player - any quest with a rewarder.
7. questor/rewarder attempts to do away with player to hide evidence - any quest that breaks a crime, or needs to be covered up.
8. someone attempts to acquire item in transport by whatever means (attack, theft, purchase) - transport and "acquire for NPC" quests.
9. target already influenced - influence quests.
10. special item/power malfunction - use special item/power quests
11. side effects / wrong effect - guinea pig quests
tgt dead, tgt influenced, and tgt tries bribe are mutually exclusive.
rewarder: dies, renegs, attacks player are mutually exclusive.
randomly generated back story that makes sense will help keep quests looking unique. an example for a "kill badguy" quest might be:
"while speaking to (questor), they tell you that:
(when) (where) (badguy) (did what) (by what means) (for what reason).
(goodguy) asks you to kill (badguy). If yo do this, they will give you (reward)."
this requires the generation of when, where, did what, etc.
To apply to a game:
make lists of the action+object[+modifier(s)] combos that are valid for the title in question. this is basically a list of the actions, objects, and mods that the game engine supports, and are allowed according to the designer's rules for the game.
1. make list of valid quest actions
2. make list of valid quest objects for each action
3. make list of valid mods for each action/object combo
4. make list of valid offenses
5. make list of valid "reasons for offense" for each offense
6. make list/rules for valid "time of offense"
7. make list of valid "offense locations"
8. make list of valid "means of offense"
these lists or tables will be used to genrate the quests.
to genErate a campaign:
1. generate length of campaign in stages, or use a "stopping rule" such as 10% chance that any stage will be the first stage.
2. generate stages from last to first.
to generate a stage:
1. generate stage type.
2. generate quest(s) for that stage.
if this is the 1st stage , prereq=quest encounter.
else prereq=completion of preceding stage.
to generate a quest, generate:
1. rewarder / no rewarder
4. mods, if any
5. random back story: offense type, time, location, means, and reason.
6. any plot twists that may apply to that type of quest, maybe a 10% chance of each possible plot twist happening.
implementation will be title dependent, but the basic data structure desgin would be:
all info for a quest would be kept in an object or struct. one for each quest in each stage of each campaign.
a campaign would simply be a list of quests, most likely with a current_quest variable to track the player's progress in the campaign.
a player character would have a list of zero or more active campaigns, perhaps with a current_campaign variable.
1. code that generates the campaigns, stages, and quests, and places them in the data structures that store them.
2. code to check for success / failure of mission conditions, and advance to the next stage in the campaign.
It should be possible to apply this sort of system, or appropriate parts thereof, to most types of games.