-
Notifications
You must be signed in to change notification settings - Fork 103
Proposal for Triggers
Triggers are actions that take place when a certain condition is met. There may be player triggers (when a player completes a quest in a given time, when a player reaches a certain level), or game triggers (when a quest ends, when a certain day in a game is reached). A trigger is made of two components: a condition and an action. Triggers are the basis for gaining skills and achievements, though they may be used for other items as well.
Triggers are quite to similar to effects. Triggers are the mapping of an effect to a specific situation. One may consider the casting of a spell to be a trigger. Any running of an effect is cause by a trigger.
A trigger is implemented in a certain area of code such that, when that area is reached, provided the trigger is active, its effect will be applied. The condition/code placing of the trigger is predefined in the implementation; it is identified by an identifier string. Initially there is no effect attached to it: the trigger is disabled.
In Control Panel the privileged user may enable a trigger by providing an effect to it. One may provide multiple effects to a trigger by enabling the trigger multiple times. For example, if the user wishes to enable a trigger that delivers gold to all users in a given day, one would:
- select the on day each player trigger
- fill the trigger expression with the day
- select the effect give gold and fill its expression
At the beginning the trigger implemented in game would be inspected. If that particular day is reached gold is delivered to all players.
Triggers may be enabled on a per-game basis, for example one could add specific triggers only for the quest game, or only for the challenge game.
This is an initial list of triggers that may be implemented inside wouso. Other triggers may be implemented as well. These are only conditions, effects are to be defined elsewhere.
-
on-level-any-player
- Description: Run effect on player when reaching a given level.
- Data to be filled: On what level will the effect take place: may be any, or may be specific level.
- Effect: What is the effect when trigger is run (e.g. give resource, give artifact, give badge)
-
on-level-any-player-of-group
- Description: Run effect on any player of a selected group when reaching a given level.
- Data to be filled: On what level will the effect take place; what group must the player be part of in order for the effect to take place.
- Effect: What is the effect when trigger is run (e.g. give resource, give artifact, give badge).
-
on-resource-type-any-player
- Description: Run effect on any player when reaching a given resource amount.
- Data to be filled: What type of resource and what amount of that resource.
- Effect: What is the effect when trigger is run (e.g. give resource, give artifact, give badge).
-
on-any-day-any-player
- Description: Run effect at the beginning of every day on each player.
- Data to be filled: None
- Effect: What is the effect when trigger is run (e.g. give resource, give artifact, give badge).
-
on-day-any-player
- Description: Run effect at a specific day on each player.
- Data to be filled: What day will the effect take place?
- Effect: What is the effect when trigger is run (e.g. give resource, give artifact, give badge).
-
on-quest-end-players-complete
- Description: Run effect when quest ends on players who completed the test.
- Data to be filled: None
- Effect: What is the effect when trigger is run (e.g. give resource, give artifact, give badge).
-
on-quest-end-players-quest-level
- Description: Run effect when quest ends on players who reached a given level inside the game.
- Data to be filled: What level in the quest should players have reached?
- Effect: What is the effect when trigger is run (e.g. give resource, give artifact, give badge).
-
on-quest-start-any-player
- Description: Run effect on any player who starts the quest.
- Data to be filled: None
- Effect: What is the effect when trigger is run (e.g. give resource, give artifact, give badge).
-
on-quest-start-player-of-group
- Description: Run effect on any player of a given group who starts the quest.
- Data to be filled: What group must the player be part of in order for the effect to take place.
- Effect: What is the effect when trigger is run (e.g. give resource, give artifact, give badge).
-
on-challenge-run-players
- Description: Run effect on players at the running of a challenge.
- Data to be filled: None
- Effect: What is the effect when trigger is run (e.g. give resource, give artifact, give badge).
-
on-challenge-end-winning-player
- Description: Run effect on winning player of a challenge.
- Data to be filled: None
- Effect: What is the effect when trigger is run (e.g. give resource, give artifact, give badge).
-
on-challenge-end-losing-player
- Description: Run effect on losing player of a challenge.
- Data to be filled: None
- Effect: What is the effect when trigger is run (e.g. give resource, give artifact, give badge).
-
on-challenge-end-draw
- Description: Run effect on both players when challenge ends in a draw.
- Data to be filled: None
- Effect: What is the effect when trigger is run (e.g. give resource, give artifact, give badge).
-
on-number-of-challenges-run-any-player
- Description: Run effect on player after running number of challenges.
- Data to be filled: Number of challenges to be run in order to trigger the effect.
- Effect: What is the effect when trigger is run (e.g. give resource, give artifact, give badge).
-
on-number-of-challenges-run-in-a-day-any-player
- Description: Run effect on player after running number of challenges.
- Data to be filled: Number of challenges to be run in order to trigger the effect.
- Effect: What is the effect when trigger is run (e.g. give resource, give artifact, give badge).
-
on-number-of-challenges-won-any-player
- Description: Run effect on player after winning number of challenges.
- Data to be filled: Number of challenges to be won in order to trigger the effect.
- Effect: What is the effect when trigger is run (e.g. give resource, give artifact, give badge).
-
on-number-of-challenges-won-streak-player
- Description: Run effect on player after winning number of challenges in a streak (continuously).
- Data to be filled: Number of challenges to be won in a streak in order to trigger the effect.
- Effect: What is the effect when trigger is run (e.g. give resource, give artifact, give badge).
-
on-number-of-qotd-answered-any-player
- Description: Run effect on player after answering number of questions of the day.
- Data to be filled: Number of qotd answers required in order to trigger the effect.
- Effect: What is the effect when trigger is run (e.g. give resource, give artifact, give badge).
-
on-number-of-qotd-answered-streak-any-player
- Description: Run effect on player after answering number of questions of the day in a streak (continuously).
- Data to be filled: Number of qotd answers in a streak required in order to trigger the effect.
- Effect: What is the effect when trigger is run (e.g. give resource, give artifact, give badge).
-
on-number-of-qotd-correctly-answered-any-player
- Description: Run effect on player after answering number of questions of the day correctly.
- Data to be filled: Number of correct qotd answers required in order to trigger the effect.
- Effect: What is the effect when trigger is run (e.g. give resource, give artifact, give badge).
-
on-number-of-qotd-correctly-answered-streak-any-player
- Description: Run effect on player after answering number of questions of the day correctly in a streak (continuously).
- Data to be filled: Number of correct qotd answers in a streak required in order to trigger the effect.
- Effect: What is the effect when trigger is run (e.g. give resource, give artifact, give badge).