| ## Public API Reference

- Main Page
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# iQuestManager Struct Reference

This is the quest manager. More...

`#include <tools/questmanager.h>`

List of all members.

## Public Member Functions
virtual iChangePropertyQuestRewardFactory * | AddChangePropertyReward (iQuestTriggerResponseFactory *response, const char *entity_par, const char *prop_par)=0
| Convenience method to add a 'changeproperty' reward factory to a response factory.
virtual iQuestRewardFactory * | AddDebugPrintReward (iQuestTriggerResponseFactory *response, const char *msg_par)=0
| Convenience method to add a 'debugprint' reward factory to a response factory.
virtual iQuestRewardFactory * | AddInventoryReward (iQuestTriggerResponseFactory *response, const char *entity_par, const char *child_entity_par)=0
| Convenience method to add an 'inventory' reward factory to a response factory.
virtual iQuestRewardFactory * | AddNewStateReward (iQuestTriggerResponseFactory *response, const char *entity_par, const char *state_par)=0
| Convenience method to add a 'newstate' reward factory to a response factory.
virtual iQuestRewardFactory * | AddSequenceFinishReward (iQuestTriggerResponseFactory *response, const char *entity_par, const char *sequence_par)=0
| Convenience method to add an 'sequencefinish' reward factory to a response factory.
virtual iQuestRewardFactory * | AddSequenceReward (iQuestTriggerResponseFactory *response, const char *entity_par, const char *sequence_par, const char *delay_par)=0
| Convenience method to add an 'sequence' reward factory to a response factory.
virtual iQuestFactory * | CreateQuestFactory (const char *name)=0
| Create an empty quest factory.
virtual iQuestFactory * | GetQuestFactory (const char *name)=0
| Get a quest factory by name.
virtual iQuestRewardType * | GetRewardType (const char *name)=0
| Get a reward type from the quest manager.
virtual iQuestSeqOpType * | GetSeqOpType (const char *name)=0
| Get a seqop type from the quest manager.
virtual iQuestTriggerType * | GetTriggerType (const char *name)=0
| Get a trigger type from the quest manager.
virtual bool | Load (iDocumentNode *node)=0
| Load a bunch of quest factories.
virtual bool | RegisterRewardType (iQuestRewardType *trigger)=0
| Register a quest reward type.
virtual bool | RegisterSeqOpType (iQuestSeqOpType *seqop)=0
| Register a seqop reward type.
virtual bool | RegisterTriggerType (iQuestTriggerType *trigger)=0
| Register a quest trigger type.
virtual const char * | ResolveParameter (const celQuestParams &params, const char *param)=0
| This is a convenience function to resolve a quest parameter during creation of rewards, triggers, and sequence operations.
virtual iQuestTriggerFactory * | SetEnterSectorTrigger (iQuestTriggerResponseFactory *response, const char *entity_par, const char *sector_par)=0
| Convenience method to set an 'entersector' trigger factory to a response factory.
virtual iQuestTriggerFactory * | SetMeshEnterSectorTrigger (iQuestTriggerResponseFactory *response, const char *entity_par, const char *sector_par)=0
| Convenience method to set a 'meshentersector' trigger factory to a response factory.
virtual iQuestTriggerFactory * | SetPropertyChangeTrigger (iQuestTriggerResponseFactory *response, const char *entity_par, const char *prop_par, const char *value_par)=0
| Convenience method to set a 'propertychange' trigger factory to a response factory.
virtual iQuestTriggerFactory * | SetSequenceFinishTrigger (iQuestTriggerResponseFactory *response, const char *entity_par, const char *sequence_par)=0
| Convenience method to set a 'sequencefinish' trigger factory to a response factory.
virtual iQuestTriggerFactory * | SetTimeoutTrigger (iQuestTriggerResponseFactory *response, const char *timeout_par)=0
| Convenience method to set a 'timeout' trigger factory to a response factory.
virtual iQuestTriggerFactory * | SetTriggerTrigger (iQuestTriggerResponseFactory *response, const char *entity_par, bool do_leave=false)=0
| Convenience method to set a 'trigger' trigger factory to a response factory.
virtual iQuestTriggerFactory * | SetWatchTrigger (iQuestTriggerResponseFactory *response, const char *entity_par, const char *target_entity_par, const char *checktime_par, const char *radius_par)=0
| Convenience method to set a 'watch' trigger factory to a response factory.

## Detailed Description

This is the quest manager.

This manager can be used to handle quests. A quest is basically a state machine which can advance from state to state when a trigger activates. It can also hand out 'rewards'.

Definition at line 624 of file questmanager.h.

## Member Function Documentation

virtual iChangePropertyQuestRewardFactory* iQuestManager::AddChangePropertyReward | ( | iQuestTriggerResponseFactory * | response,
|  | const char * | entity_par,
|  | const char * | prop_par |
| ) |  |  | `[pure virtual]`

Convenience method to add a 'changeproperty' reward factory to a response factory.

You need to specify exactly which value should be modified after calling this.

virtual iQuestRewardFactory* iQuestManager::AddDebugPrintReward | ( | iQuestTriggerResponseFactory * | response,
|  | const char * | msg_par |
| ) |  |  | `[pure virtual]`

Convenience method to add a 'debugprint' reward factory to a response factory.

virtual iQuestRewardFactory* iQuestManager::AddInventoryReward | ( | iQuestTriggerResponseFactory * | response,
|  | const char * | entity_par,
|  | const char * | child_entity_par |
| ) |  |  | `[pure virtual]`

Convenience method to add an 'inventory' reward factory to a response factory.

virtual iQuestRewardFactory* iQuestManager::AddNewStateReward | ( | iQuestTriggerResponseFactory * | response,
|  | const char * | entity_par,
|  | const char * | state_par |
| ) |  |  | `[pure virtual]`

Convenience method to add a 'newstate' reward factory to a response factory.

virtual iQuestRewardFactory* iQuestManager::AddSequenceFinishReward | ( | iQuestTriggerResponseFactory * | response,
|  | const char * | entity_par,
|  | const char * | sequence_par |
| ) |  |  | `[pure virtual]`

Convenience method to add an 'sequencefinish' reward factory to a response factory.

virtual iQuestRewardFactory* iQuestManager::AddSequenceReward | ( | iQuestTriggerResponseFactory * | response,
|  | const char * | entity_par,
|  | const char * | sequence_par,
|  | const char * | delay_par |
| ) |  |  | `[pure virtual]`

Convenience method to add an 'sequence' reward factory to a response factory.

virtual iQuestFactory* iQuestManager::CreateQuestFactory | ( | const char * | name | ) | `[pure virtual]`

Create an empty quest factory.

Returns 0 on failure (quest factory with that name already exists).

virtual iQuestFactory* iQuestManager::GetQuestFactory | ( | const char * | name | ) | `[pure virtual]`

Get a quest factory by name.

virtual iQuestRewardType* iQuestManager::GetRewardType | ( | const char * | name | ) | `[pure virtual]`

Get a reward type from the quest manager.

Returns 0 if no such reward type exists.

virtual iQuestSeqOpType* iQuestManager::GetSeqOpType | ( | const char * | name | ) | `[pure virtual]`

Get a seqop type from the quest manager.

Returns 0 if no such seqop type exists.

virtual iQuestTriggerType* iQuestManager::GetTriggerType | ( | const char * | name | ) | `[pure virtual]`

Get a trigger type from the quest manager.

Returns 0 if no such trigger type exists.

virtual bool iQuestManager::Load | ( | iDocumentNode * | node | ) | `[pure virtual]`

Load a bunch of quest factories.

Parameters:

  | node | is a node containing <quest> children.

Returns:
  false on error (reporter is used to report).

virtual bool iQuestManager::RegisterRewardType | ( | iQuestRewardType * | trigger | ) | `[pure virtual]`

Register a quest reward type.

Quest rewards can be used by quests to give out some kind of reward to the game. Returns false on failure (reward type with that name already exists).

The following predefined reward types are automatically registered in the quest manager:

- cel.questreward.debugprint: print a debug message on stdout. See iDebugPrintQuestRewardFactory.
- cel.questreward.newstate: switch to a new state. See iNewStateQuestRewardFactory.
- cel.questreward.changeproperty: change a property. See iChangePropertyQuestRewardFactory.
- cel.questreward.inventory: manipulate inventory. See iInventoryQuestRewardFactory.
- cel.questreward.sequence: fire sequence. See iSequenceQuestRewardFactory.
- cel.questreward.sequencefinish: finish sequence. See iSequenceFinishQuestRewardFactory.
- cel.questreward.message: send a message to some entity. See iMessageQuestRewardFactory.
- cel.questreward.action: send an action to some property class on an entity. See iActionQuestRewardFactory.
- cel.questreward.destroyentity: remove an entity from the physical. layer. See iDestroyEntityQuestRewardFactory.

virtual bool iQuestManager::RegisterSeqOpType | ( | iQuestSeqOpType * | seqop | ) | `[pure virtual]`

Register a seqop reward type.

Seqop rewards can be used by quest sequences to define operations in the sequence. Returns false on failure (swqop type with that name already exists).

The following predefined sequence operation types are automatically registered in the quest manager:

- cel.questseqop.debugprint: print a debug message on stdout. See iDebugPrintQuestSeqOpFactory.
- cel.questseqop.transform: transform a mesh. See iTransformQuestSeqOpFactory.
- cel.questseqop.movepath: move a mesh along a path. See iMovePathQuestSeqOpFactory.
- cel.questseqop.light: animate a light color. See iLightQuestSeqOpFactory.

virtual bool iQuestManager::RegisterTriggerType | ( | iQuestTriggerType * | trigger | ) | `[pure virtual]`

Register a quest trigger type.

Quest triggers can be used by quests to decide when to go to another state or when to activate a reward. Returns false on failure (trigger type with that name already exists).

The following predefined trigger types are automatically registered in the quest manager:

- cel.questtrigger.entersector: triggers when a camera (from entity) enters a sector. See iEnterSectorQuestTriggerFactory.
- cel.questtrigger.meshentersector: triggers when a mesh (from entity) enters a sector. See iEnterSectorQuestTriggerFactory.
- cel.questtrigger.timeout: triggers after a specified time. See iTimeoutQuestTriggerFactory.
- cel.questtrigger.propertychange: triggers when a property changes. See iPropertyChangeQuestTriggerFactory.
- cel.questtrigger.sequencefinish: triggers when a sequence finishes. See iSequenceFinishQuestTriggerFactory.
- cel.questtrigger.trigger: triggers when a pctrigger fires. See iTriggerQuestTriggerFactory.
- cel.questtrigger.inventory: triggers when an object enters inventory. See iInventoryQuestTriggerFactory.
- cel.questtrigger.meshselect: triggers when a mesh is selected. See iMeshSelectQuestTriggerFactory.
- cel.questtrigger.watch: triggers when a mesh becomes visible. See iWatchQuestTriggerFactory.

virtual const char* iQuestManager::ResolveParameter | ( | const celQuestParams & | params,
|  | const char * | param |
| ) |  |  | `[pure virtual]`

This is a convenience function to resolve a quest parameter during creation of rewards, triggers, and sequence operations.

This routine knows how to recognize parameter usage (starting with '$') and will in that case try to resolve the parameter by finding it in 'params'. Otherwise it will just return the unmodified string.

virtual iQuestTriggerFactory* iQuestManager::SetEnterSectorTrigger | ( | iQuestTriggerResponseFactory * | response,
|  | const char * | entity_par,
|  | const char * | sector_par |
| ) |  |  | `[pure virtual]`

Convenience method to set an 'entersector' trigger factory to a response factory.

virtual iQuestTriggerFactory* iQuestManager::SetMeshEnterSectorTrigger | ( | iQuestTriggerResponseFactory * | response,
|  | const char * | entity_par,
|  | const char * | sector_par |
| ) |  |  | `[pure virtual]`

Convenience method to set a 'meshentersector' trigger factory to a response factory.

virtual iQuestTriggerFactory* iQuestManager::SetPropertyChangeTrigger | ( | iQuestTriggerResponseFactory * | response,
|  | const char * | entity_par,
|  | const char * | prop_par,
|  | const char * | value_par |
| ) |  |  | `[pure virtual]`

Convenience method to set a 'propertychange' trigger factory to a response factory.

virtual iQuestTriggerFactory* iQuestManager::SetSequenceFinishTrigger | ( | iQuestTriggerResponseFactory * | response,
|  | const char * | entity_par,
|  | const char * | sequence_par |
| ) |  |  | `[pure virtual]`

Convenience method to set a 'sequencefinish' trigger factory to a response factory.

virtual iQuestTriggerFactory* iQuestManager::SetTimeoutTrigger | ( | iQuestTriggerResponseFactory * | response,
|  | const char * | timeout_par |
| ) |  |  | `[pure virtual]`

Convenience method to set a 'timeout' trigger factory to a response factory.

virtual iQuestTriggerFactory* iQuestManager::SetTriggerTrigger | ( | iQuestTriggerResponseFactory * | response,
|  | const char * | entity_par,
|  | bool | do_leave = `false` |
| ) |  |  | `[pure virtual]`

Convenience method to set a 'trigger' trigger factory to a response factory.

virtual iQuestTriggerFactory* iQuestManager::SetWatchTrigger | ( | iQuestTriggerResponseFactory * | response,
|  | const char * | entity_par,
|  | const char * | target_entity_par,
|  | const char * | checktime_par,
|  | const char * | radius_par |
| ) |  |  | `[pure virtual]`

Convenience method to set a 'watch' trigger factory to a response factory.

The documentation for this struct was generated from the following file:

- tools/questmanager.h