Okay, so! Following what I decided about the intro, the next real step is to get the quest system going. The way it works is by a few structures:
@p
ent_quest -- top level structure; contains an ent_task, as well as some information about the difficulty/etc. of the quest
@p
ent_task -- virtual tree structure used to describe something the player has to do, what rewards are required, and what rewards are produced
@p
ent_reward -- an item, piece of information, etc. for the player to get
@p
So! Basically, to construct the quests, I first lay out all the rewards (rewards have a real-valued order, to help sort-out dependancies) throughout the game universe.
@p
Once those are laid out, I produce a quest. The quest is generated to produce a given reward, and will look for rewards of lesser order to use as inputs when creating the task.
@p
So, the player will always be able to get to rewards of a higher order, until they attain a peak reward and win the game.
@p
The tricks are in:
@p
1. ent_world -- has to lay out the rewards for the entire galaxy
@p
2. ent_quest -- not really that tricky, just has to sub-initialize
@p
3. ent_task -- quite tricky; has to produce clues (phrase narratives) for the task (in some logical way), as well as know how to initialize itself for any given reward.
@p
4. ent_reward -- not really tricky at all
@p
Stuff I need to be careful about:
@p
-- if a reward is an input for more than one quest, it means that only ONE of those branches can be followed by the player (since completing that task will burn up the reward); i can counteract this by allowing rewards to only be used once over all the quests (i.e., a 1:1) or else MAYBE not burning up the reward (e.g., "Well, you can hold onto that, it might come in handy!" in a fetch quest)
@p
-- some rewards are useless (no quests use them) and some are free (not produced by any quest, but readily available). Other rewards are given in multiple quantities, this is particularily sensible for cargo type rewards (e.g., to get 20.4 kg of plutonium for a given task, you my have to complete two quests for 10.2 kg each; the current system allows this)
2004-01-20