-
Notifications
You must be signed in to change notification settings - Fork 103
Proposal for Modifiers
This is a proposal regarding modifiers in wouso. Modifiers are items that modify game mechanics in our way or the other by affecting players. We call the consequences of using modifiers on players "effect". A modifier has a given effect on one or more players.
Different types of modifiers should be implemented in the wouso engine and then enabled in the configuration of an instance. A new type of modifier may be added to the game by implementing it and the enabling it through the Control Panel.
We call modifier a category of ways to modify game mechanics (e.g. spells, artifacts, skills, achievements) and we call item an instance of a modifier (e.g. a specific spell, a specific artifact, a specific skill). Note that item may not be a "physical" object; for example a skill is a player ability, not something he holds. But we will use the term item for simplicity.
There should be a Modifier top-level class/model that would be inherited by other modifiers. This class should set the generic attributes and methods used by each modifiers.
The modifier name is the name of the class.
Attributes would be:
- name: a unique name/identifier for the item that would be present to the user
- description: a description of the item: what it does, maybe some history/storyline
- icon: an image/graphical representation of the item
- type: a type for the item (for example, if something a player would wear items their type be: armor, ring, amulet, helmet, gloves, boots etc.)
- available: item is available for use
- list of constraints: what constraints should be satisfied in order for the player to use the item (price, level requirement, game history)
- list of effects (most of the time there would be a single one): what effects does the item have on the player it is cast upon (the current player or another)
Methods would be:
- give_to_player: give item to player, player now "holds" the item
- remove_from_player: remove item from player, player no longer "holds" the item
- cast: item should do to its action is and cause effects
- uncast: when item expires or is removed, no action is possible and effects are removed
Depending on the game "master", multiple types of modifiers may be implemented. The basic modifier types in the game are: artifacts, spells, skills, badges, achievements. Some ideas on each are shown below.
-
Artifacts
Artifacts are items of great power that are worn by a player. They are usually given to the player by the game as a reward or they may be bought.
The moment the artifact is given to a player it is immediately active, its effect is enabled. If the artifact is removed from a player its effect perishes. In other words, from an implementation point of view when give_to_player method is called, the cast method is also called; likewise, when remove_from_player is called, the uncast method is also called.
-
Spell scrolls
A spell scroll is an item that may be used by a player cast positive effects on himself or an ally, or to cast negative effects on an enemy for a limited amount of time. Spell scrolls are usually bought.
The cast action is called by the player holding the spell scroll. The uncast action does nothing.
A spell scroll item possesses an additional attribute, duration: the duration of the effect of the spell.
-
Skills
Skills are player abilities; they are not items and cannot be removed from the player. A skill has no price and is gained when a player gets to a new level. Whenever a skills get to a player its effects are instantaneous.
-
Badges
A badge is a reward for doing a specific action: running a quest, buying a spell. It signals the player has at least once done the specific action. The badge has no effect on a player other then being displayed in her player profile. Badges may be considered to be removable in case the player does something unworthy.
-
Achievements
Achievements are a recognition of a rather spectacular action such as winning a streak of 5 challenges, completing the quest in less than quarter of a time or others. Similar to a badge an achievement has no effect on a player than being displayed in her player profile. Achievements are part of that player's history and may not be removed.
Modifiers may be added, removed, changed or used during the game. The actions are listed below.
-
Create a modifier item
A modifier item may only be created by a privileged user. This item may be any type of modifier (spell, artifact, skill, badges, achievements). A user would provide:
- the item name
- the item description
- the item icon
- the item type (if any)
- whether the item is available in game
- list of effects the item would have on the user: select an effect formula and then customize it for the game
- list of constraints for acquiring the item
-
Edit item
Editing the item points the user to a screen that allows him to update any of the above attributes. He may remove or add certain effects or constraints.
-
Remove item
When an item is removed it will no longer be available in the game. All constraints and effects are removed as well.
-
View item
Any type of user may view the item and its characteristics: all attributes from above.
-
Acquire item
A player may acquire an item provided all constraints are satisfied. This is only available for spell scrolls and artifacts.
-
Sell item
A given item possessed by a player may be sold, if the interface allows this.
-
Use item
After acquiring an item, a player may use the item. Specific use for the item is only available for spell scrolls. Artifacts and skills are "used" the moment they are acquired/gained, and badges and achievements have no effects, so there is no use action.