Magic is a feature of some role-playing games or game systems. Game players or characters are able to perform magic in the paranormal sense, as defined by a set of rules. The rules governing magic-users simulate the effects that magic would have within the game context, according to how the game designer intended the magic to be portrayed. The rules can also be designed to balance the game play for the players, so as to not give any one participant an unfair advantage. (Some games also feature objects or beings or with intrinsic magical capabilities, whose control by players, if permitted at all, is strictly limited by other rules of the game.)
Typically magic is portrayed by a set of magic spells, each of which consists of a listing of the game effects and limitations. The game-spells are often grouped into sub-categories by common themes, so as to limit access and to provide context. These spell themes are typically given designations such as Order, College, School, or Domain. They are often characterized by a common effect, such as Fire, Healing, or Protection.
The spells may have a set of prerequisites (usually given a name like "components" or "reagents") that must be satisfied during the course of game play before the spell can be activated. The spell listing will also include restrictions on the time, range, and target location, which are listed in the units of measurement employed within the game. Finally the spell description will list the effects upon the game state. Because the effects of magic upon the game world are systematic, predictable, repeatable and quantifiable (with the exception of a few games like Mage: The Ascension), magic in games can be seen as a form of science.
Magic can also be portrayed within a game through the special capabilities of game-based objects, locations, individuals, and even mythological creatures. Each of these will have their own set of rules describing the game effects of their abilities. Usually these rules will be similar in form and function to the rules for portraying spells.
There are some similarities between the games within the same genre or subgenre, for example there can be a risk of critical failure when casting a spell in a pen-and-paper RPG or a turn-based computer RPG, but in most action RPGs that risk has been eliminated, due to gameplay considerations. There has also been some streamlining within action RPGs to concentrate on damaging elemental effects, like balls of fire, lightning streams, or icicles, while the scope within many other RPGs is usually much broader.
Characters within a game that includes rules for magic are commonly able to acquire the use of spells through some process. Usually this will either be a spell that the character has created; a spell gained from a book or other record; another in-game character that is willing to share the knowledge, or from a mysterious in-game source to whom the character has formed an allegiance. Again, that part has been streamlined in many action RPGs, and the player can pick new skills each time the character gains an experience level.
There are several common approaches for balancing and restricting the use of spells within a game system.
- Memorization — The game character must memorize a fixed number of spells from the list of all spells the character knows. This memorization can only occur once in a specified time period, usually a day, or it may require the character to rest for several hours. This system is sometimes called "Vancian" in the game designer community, since its first use, in Dungeons & Dragons, was inspired by the way magic works in Jack Vance's Dying Earth world.
- Point-based — The character has a limited number of points, often called mana (or spell points in MUDs), that can be spent to activate spells. Each spell the character knows has a point cost. The points are periodically renewed through some means; usually by the passage of time. This is also used in Dungeons & Dragons, but only for Psionic manifesters, and as a variant rule for spellcasters. Warhammer players must expend a number of dice when casting spells, and each die contributes 1-6 points to the spell's activation cost. The points usually represent some kind of magical energy, though they may also represent physical or mental fatigue caused by the exertion required to cast spells; some systems therefore deplete hit points (or the equivalent) rather than having a separate pool of magic points.
- Event-based — The character has a magic ability that can be used with limitations dictated by an event. This can be an event in time, or a situational event. One of the first popular uses of this system was in Dungeons & Dragons 4th edition, where spells are restricted to at-will, encounter, and daily event frames corresponding to 'as many times as desired during an encounter', 'between the start and ending of an encounter', and 'at the beginning of the day until the beginning of the next day' respectively. Event based systems can have a great variety of events which both trigger the possibility of using a magic ability, or limits the instances a magic ability can be used during the course of an event.
- As Powers — The character has a magic ability that can be simply defined as a magic power, or as magical in origin. When a magical ability has no restrictions (no need for a skill, no need to spend power points, no need to memorize, etc.) or when it has a simple mechanic (ex: just roll to attack), it can be defined as a magic power. For example, if a character has the ability to breathe fire with no restrictions this ability can be called a Fire Breathing Power. This approach to magic is closest to comic book characters who don't seem to be restricted as much as classical fantasy characters.
- Skill-based — The character has a skill rating that defines the chance that a spell will be successfully activated. Failure has some type of consequence, such as personal injury or increased fatigue of the in-game character.
- Cost — Single-use reagents may be required, and casting the magic consumes the reagents. The reagents may or may not come in different qualities, and if they do, high-quality reagents will usually result in increased effect, or at least a lowered risk of failure. The reagents for the most powerful spells are usually hard to get, or even strictly limited.
There are also some game systems that provide greater flexibility in the use of magic. These include rules for producing spells that are made up as needed, subject to the game rules and limitations. Examples of such systems include Ars Magica, Mage: The Ascension and Mage: The Awakening.
Some Magics have elemental properties and therefore become opposed to their opposite for example: Fire deals heat damage and therefore is typically opposed ice which deals cooling damage. A typical well known elemental being like Ifrit (from the Final Fantasy series) is a being that gains it strength from fire and expels fire magic, therefore he absorbs fire magic and becomes stronger, however ice magic will drain his health and, owing to the opposition of ice versus fire, deals double damage. Shiva would be Ifrit's opposite.
Many game systems include rules for simulating objects that have intrinsic magical properties. The accumulation and use of such objects can be a significant component of games in the fantasy genre, and they serve a balancing role in long-duration games of escalating difficulty. These objects are carefully balanced by the designer, both by restricting how often they can be put into play and by limiting their capabilities.
There are several common techniques for controlling access to objects used within a game.
- Expendable — Objects such as a potion or a spell scroll can typically only be used once before they are expended.
- Charged — Some objects can possess multiple uses, but each use expends one or more charges. Once the charges are expended the object becomes inert, but a character of great power may be able to recharge it. Other items disintegrate when they run out of charges.
- Periodic — An object can have magical powers that can only be used a fixed number of times within a given period. Typically the period used is a day, a week, or a month in game terms.
- Restricted — An object could work only under certain conditions, such as a particular location or when a certain type of target is chosen. It might work for only certain categories of beings, such as characters with specific skills, moral ethos, or a particular in-game race or gender.
- Random — A specific item may have some magical ability that only works part of the time. This usually applies to weapons as a special attack, similar to a critical hit.
- Slot — Many magical objects must be worn or carried. These take up a "slot" on the body that prevents use of other magic objects that require the same slot.
- Price — The most powerful items are usually very expensive, and in some games where items can break (as in the Diablo computer RPG series), repairs are more expensive, too.
- Faulty — The object might not always work as intended, and it can have unpredictable effects when it malfunctions.
- Skill use — An object can provide a magical benefit that only operates when the owner employs a particular skill successfully.
- Cursed — An object can be cursed, and have a negative impact on the character that acquired it. Typically such objects are disguised as a beneficial item until they are placed into use. Often, a cursed item cannot be easily removed from the owner's possession once it is revealed to be cursed. In some games, cursed weapons/armor are usually much stronger than normal weapons/armor, but have a drawback such as losing health or canceling actions. Some of these may be designed to give a great advantage to a character class while weakening him in a way that is irrelevant to him, for example a certain cursed armor may provide a great boost to protection while causing spells to fail — a negligible penalty to a true fighter character.
An object can have multiple magical properties, each of which can be limited in a different manner. For example, a magical staff could have a fixed number of charges that can be spent to create a "blinding flash of light"; be able to provide "magical illumination" for several hours each day, and possess a permanent ability to "glow in warning" whenever it comes near a poisonous plant or animal. This staff must be held in both hands for the magic to "work", thus using up both hand "slots". It may also only operate for a character that also knows how to produce certain types of spells, for example the "flash" spell may require a wielder who knows the "Lightning" magic school.
A few rare magical objects possess an innate "intelligence" and personality, thus becoming a NPC in the game. This concept is similar in some respects to an intelligent robot in a science fiction game or story, although the entity within the object is usually portrayed as more mystical in nature. The character that wants to employ the object must then interact with the intelligence and find a means to persuade it to cooperate.
Some game systems place a heavy emphasis on giving a magical object a well-developed history and unique characteristics. This is usually done to provide depth to the story being told by the game, and to make the "magic" seem less technological and more mysterious. Another technique for maintaining the mystery is to hide the abilities of the magical object from the characters that find it. The characters must then "identify" the magical abilities, either by putting the object into use (which may or may not be possible – as some RPGs do not let the player equip an unidentified item) or by consulting an expert in magical folklore. Some game system also include spells, scrolls, or other magical devices that can be used to identify the abilities.