From rmr@inferno (Robert Reimann) Sun Jul 9 22:00:23 1989 From: rmr@inferno.wpd.sgi.com (Robert Reimann) Newsgroups: rec.games.frp Subject: Mage-to-Mage Magical Combat System (SDL) Update Message-ID: <37616@sgi.SGI.COM> Date: 8 Jul 89 19:25:04 GMT Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 1458 Keywords: Revised, now includes illusions Here is the latest draft of the Mage-to-Mage Magical Combat System, the first (to my knowledge) system to make use of a comprehensive magical language to tie together all aspects of magic in a gaming environment. Since my last posting of the system, I have made minor syntax changes, added an operator (thanx to Brad Knowles), added a new class of mages, and integrated demonology and illusionism into the system. Still coming are the much sought-after biological and psychic set of effects. If anyone has been using the system, I'd love any feedback you may have. Robert. rmr@sgi.com ----------------------------------------------------------------------- Preface ------- Presented here is the first draft of the Mage-to-Mage Magical Combat System and Spell Description Language, that hopefully addresses the issues raised in recent discussions of spell programming languages and mage-to-mage combat, while remaining more general than previous offerings of this type. Some spell construction systems attempt to provide all the functionality of AD&D spells by enumerating hundreds of specialized primitives. The high number of primitives present in the some systems reflects AD&D's lack of a distinction between *effects*, the actual physical, biological, or psychic manifestations of magical forces, and *operators* which act to shape those forces into useful configurations. Note that what most systems call "effects" are actually combinations of effects and operators, as I've defined them above. AD&D-style spells do not require much distinction between effects and operators-- they seem to work better without it-- but an object-oriented, constructive approach really needs to distinguish between objects (effects) and predicates (operators) to be successful and at the same time remain simple. The system presented here consists of 32 physical effects (an equal numbers of biological and psychic effects are currently being developed) and 26 operators. The effects presented here are part of a rationale for magic that is built into the world; you are welcome to change them to better fit your needs, but they were chosen with consistency in mind. The operators are the real heart of the system, you should modify them only with great care. Too many non-general operators will spoil this system. The Mage-to-Mage Spell Description Language (SDL) uses a straightforward left-to-right, top-to-bottom, multi-line syntax. For the most part, each line of spell description represents one spell (mana) point worth of magical effect. Mage-to-Mage uses a spell point system to determine the spell cost; there is no distinction of "spell levels"; spells may be designed with arbitrary complexity, the limiting factor is the number of spell points a mage has available to expend casting it. Spell points are assigned on the basis of mage level, intelligence, and wisdom. Mage-to-Mage also provides a painless and logical way of producing magical items, while at the same time keeping their power limited to reasonable levels. Demonology illusion, necromancy, alchemy, and magical medicine/healing can all be implemented within the same framework (some of these are still under development). Lastly, Mage-to-Mage has been designed to work within any combat system that makes use of melee rounds as units of combat action. Enjoy, and feel free to write/post comments or suggestions. MAGE-TO-MAGE Magical Combat System and Spell Description Language Version 0.75 Copyright 1989 Robert M. Reimann All rights reserved. I. The Nature of Magic and Spellcasting "Magic" itself is not an energy source in any true sense. It is rather an ability of some entities to alter the fabric of reality in a way that changes the "natural" balance of "elemental forces" in a localized area and channel it in a useful fashion. This ability is inate to some creatures, but others (humans among them) must be trained. "Spell" is the name given to the psycho-physical manipulations a mage or magical creature must perform to produce a magical effect. Spellcasting can, therefore be thought of as a psionic skill, with an important exception. Once a spell is cast, it's semi-physical nature gives it a certain "life of it's own"; it does not *need* to be constantly maintained after it has been cast, although it *may* be altered once it has been cast, by the original caster, or by another mage of sufficient power. The existence of any spell is, however, intimately bound to the existence of the casting entity; if the caster is killed, the spell will cease *unless* spell "ownership" has been transfered to another casting entity before the original caster dies. Spells themselves cannot be written down, but "recipes" for spells may be recorded using the spell description language described below. Spell descriptions have no magical power themselves, they must be interpreted by a spell caster. Of course, true, active spells may be bound to scraps of paper, thus filling the role of AD&D-style magical scrolls. As with any skill, magical ability improves with practice. As mages gain spell casting experience, the number of spells a mage can cast and/or the complexity of his spells will increase. Spell casting is an exhaustive effort requiring intense powers of will. Spell points are an arbitrary method of measuring a spell's complexity. A mage is, in a sense, "rated for" a certain number of spell points per day, based on his experience (level), and his mental prowess. He can't exceed this rating, not because he would do himself harm, but rather, because it is simply beyond his current level of capability. As in AD&D, an appropriate amount of rest will restore a mage's spell point "rating" to full. Spells need not be written or memorized, they may be cast "on the fly". In fact, this is quite common in magical combat. Spells are, in general, non-permanent for reasons outlined above. III. Elemental Forces, Matter, and Effects The structure of all matter is created by the flow of elemental forces through the material plane. Were there no flow of these energies, the material plane would consist of formless chaos. The world in which magic exists is entirely shaped by an intricate flow of elemental energies that yields land, oceans, air, living things, etc. All living things possess the ability to alter the flow of elemental forces to a certain degree by physically interacting with them. Sentient beings further posess the ability to alter the flow of these forces, and hence the world around them, purely by using their mind, i.e., by magic. There are four primary elemental forces, each residing on a separate plane: EARTH AIR FIRE WATER However, each of these planes overlaps, to a certain extent, the other three planes, yielding a total of 16 subplanes. Earthy Earth Airy Air Fiery Fire Watery Water Airy Earth Earthy Air Earthy Fire Earthy Water Fiery Earth Fiery Air Airy Fire Airy Water Watery Earth Watery Air Watery Fire Fiery Water Lastly, there are two states for each of these 16 forces, a high energy state and a low energy state. These two states are called "Light" and "Dark" respectively. Each of the 16 permuted forces above can be manipulated in either the Light or Dark form, yielding a total of 32 different elemental flows. Each type of flow generates a unique set of EFFECTs. There are three manifestations of an effect; physical, biological, and psychic. Each manifestation is separate and independent of the other two. Physical effects are primarily for combat. Biological effects can be used to cure and cause illnesses, and to bestow qualities of living creatures on inanimate objects. Psychic effects can be used to cure and cause mental disorders, to bestow qualities of sentient creatures on non-sentient things, and to deal with spirits, which have no physical characteristics. Biological and psychic effects are more complex, and may not be used until the mage has gained higher levels: Level Manifestations Usable ----- --------------------- 1+ Physical 5+ Physical, Biological 9+ Physical, Biological, Psychic Currently, the system covers only physical effects; biological and psychic effects will be added in future versions. One final characteristic of some importance is that dissimilar effects may not occupy the same physical space in the Material Plane. Thus, when two different effect types come together, one must give way. This quality can be used to a mage's defensive advantage. If he casts a barrier of dissimilar effect in the path of another, oncoming force, and his force is as potent or more so than the oncoming force, it will be blocked. Note that this only works for effects that are manifested in the same way; e.g., a physical effect will not block a psychic effect, for instance. III. Magical Training and Aptitude Unlike AD&D, this system offers mages the opportunity to specialize in areas of expertise, giving them greater control over more limited resources. Initial training of a mage lasts a maximum of 12 years. In that time, the mage may divide his studies among one or more elemental forces, such as Fiery Air. Each force studied includes both Light and Dark effects, as well as all three manifestations (physical, biological, psychic). When a mage learns a force, he generally learns both the Light and Dark versions (exception: Elemental Mages, below). The following table shows how studies may be divided, how much time they take, and what abilities each term of study confers on the mage. Study Time Skill Class Potency Range Know/Use Resist ---------- ----------- ------- ----- -------- ------ 12 years Elemental* d8/lev 80'+8'/lev 40%+4%/lev 20%+2%/lev 10 years Singular** d12/lev 120'+12'/lev 60%+6%/lev 30%+3%/lev 6 years Major d8/lev 80'+8'/lev 40%+4%/lev 20%+2%/lev 4 years Minor d6/lev 60'+6'/lev 30%+3%/lev 15%+2%/lev 2 years Minimal d4/lev 40'+4'/lev 20%+2%/lev 10%+1%/lev * Elemental Mages learn all four Light or Dark effects (not both) of an element; thus a Mage of Light Air would learn Light Airy Air, Light Watery Air, Light Fiery Air, and Light Earthy Air. ** Singular Mages may not learn any other force beyond their singular specialty; their minds are too "coloured" by their magic to permit learning a new kind. So, Medwyn the Mage could spend his 12 years of study becoming an Elemental Mage of Light Water or a Singular Mage in Fiery Air, or he could spend 6 getting a Major in Fiery Air, and 6 more getting another Major in, say, Earthy Water. Or he could get two Minors and and two Minimals, etc. Spending more time learning a particular force allows the mage to use it more effectively; a singular mage gets d12 per level damage from his effects, twice the damage of a mage with a similar Minor. Similarly, his casting range is larger, his ability to recognize (Know) magic of his specialty and make use of it (Use) is better as well. Finally, he is also able to better Resist magic of the type in which he received the training. Spell points are assigned to Mages according to the following formula: Spell Points = (INT+WILL)*level/4 This is the same for all mages regardless of training. All fractional points should be rounded up. As a mage casts spells, his spell points are depleted. They are regained with sleep; 1/10 of a mage's total points are replenished per hour of rest. There is one important exception to this rule: if a spell is still operating, the spell points used to create it *cannot* be replenished until the spell has been stopped. Once it has stopped, the points may be replenished as described above. This effectively limits the number of semi-permanent spells that a mage is able to cast. IV. Physical Effects The following is a complete list of physical effect. EARTH LEE: Crystal/Glass DEE: Stone LAE: Sand DAE: Dust LWE: Loam DWE: Mud/Quicksand LFE: Lava DFE: Metal WATER LWW: Water DWW: Ice LAW: Foam DAW: Erosion LEW: Glue DEW: Liquid [Poison] LFW: Steam DFW: Oil FIRE LFF: Fire DFF: Shadow Fire [Cold] LAF: Plasma DAF: Ash LEF: Heat DEF: Alkali LWF: Electricity DWF: Acid AIR LAA: Air/Wind DFF: Shadow/Darkness LWA: Ambient Light DWA: Fog/Cloud/Mist LEA: Illusion DEA: Gas [Poison] LFA: Radiant Light DFA: Smoke V. Operators Operators are the core of the Mage-to-Mage SDL, providing the syntax for spell description and execution. This section gives a summary of all SDL operators. followed by complete descriptions of the syntax and semantics of each operator. Examples are included. V.1 Operator Summary Basic (Effect) Operators ------------------------ create create a new effect destroy destroy a previously created effect move move an effect to a new location rotate rotate an effect around any axis scale resize a previously created effect shape form an effect into a desired shape Path (Shape) Operators ---------------------- fill fill a closed polygonal (2D) area lineto extrude an effect along a given line surface mold an effect along a given surface volume form an effect to fit a specified volume Flow Operators -------------- halt stop a spell if...then...else conditional determined by input events repeat...until loop until event wait until pause spell until event Event Operators --------------- and | or | boolean operators for combining events not | interrupted signals a spell has been interrupted general format for events Special Operators ----------------- bind bind a spell's range relative to a given object interrupt alter a given spell makeowner reassign ownership of given spell to a new mage power change a spell's power range change a spell's range resume resume an interrupted spell : assign a spell a name V.2 Operator Details This section describes the operators summarized above in detail. In the descriptions below, variables are in angle brackets, and optional arguments are in straight brackets. Each operator is listed followed by a paragraph describing what it does, followed in turn by an example of usage. V.2.1 Basic Operators CREATE create [] Create a point source of the given effect on the tip of the caster's index finger (right or left). This is an initialization operator, creating the link to another plane. For physical effects, the effect must be scaled or otherwise shaped to a physical dimension before any force is actually released (see scale, shape). The effect may optionally be given a name by which other operators may refer to it. Examples: create (p)LAA create Wind create Wind mywind All three of the above perform the same function. The first specifies the physical effect Light Airy Air. The second uses the more colloquial description of Wind. The third gives the effect a name, making it easier to refer to it later in the spell. This is useful if you are using multiple effects that are doing different things. DESTROY destroy [] Removes the last created effect, or the one corresponding to if it is given. When a spell terminates, all effects are automatically destroyed. Any effect which goes outside the spellcaster's range is also destroyed. Example: destroy mywind MOVE move [] to pointdir move [] to lookat move [] to x y z Move the last created effect a specific distance in a direction indicated by a pointing gesture, to a named object specified by looking at the object, or a specific position in space relative to the last position. If the object has been specified in an event, or has been identified previously in the spell, lookat is not necessary. If an effect name is given, that effect is moved rather than the last created effect. An effect may be moved anywhere within the spellcaster's range, unless somehow obstructed. Examples: move mywind to lookat orc move mywind to 10' pointdir move mywind to 5'x 10'y 15'z The first example moves the Wind ball used in an earlier example in a straight line to the surface of an object specified by lookat, in this case, an orc. The second example moves the ball in a straight line 10 feet in the direction the caster points. The third moves the ball 5' to the caster's right, 10' up, and fifteen feet forward, away from wherever it was, with respect to the caster. ROTATE rotate [] x y z [origin pointdir] rotate [] x y z [origin lookat ] rotate [] x y z [origin x y z] Rotate an effect around any axis (x,y,z), relative to the center point of the effect (default) or a named point. Example: rotate firewall 90y origin lookat orc This fragment rotates a wall of fire (previously shaped) ninety degrees around the y (up-down) axis with the body of a given orc as the center of rotation. Note that the point of rotation does not need to be a point inside the effect itself. SCALE scale [] x y z Scale the last created effect to the given size. If the effect was not previously shaped, the scaled object will be a spheroid. Scaling is always performed using the center of the effect as an origin (see create, shape). If a name is given, that effect is scaled rather than the last created effect. An effect may be scaled up to the limit of the spellcaster's range. Example: scale mywind 2'x 2'y 2'z This example takes the Wind created in the create example and enlarges it to a 2' diameter sphere. SHAPE shape [] [] ... [] Shape the last created effect using a path described by a "subspell" consisting of valid Path Operators. If a name is given, that effect is shaped rather than the last created effect. When an effect is shaped, any previous scaling or shaping is forgotten; the newly formed effect will have the same shape and size as the object it was modeled after. Position of the effect is maintained. An effect may be shaped from anything fitting within the mage's spellcasting range. Examples: shape mywind surface 1'thick lookat box shape mywind volume lookat donut shape mywind lineto 2"thick lookat corner1 lineto 2"thick lookat corner2 lineto 2"thick lookat corner3 lineto 2"thick lookat closeit fill The first example shapes the wind into a hollow box (i.e., the wind only blows in the planes that form the sides). The second example forms a solid torus of wind. The third example shapes the effect into a 4-sided filled polygon (like a wall) of uniform two-inch thickness. (See Path Operators, below.) V.2.2 Path Operators FILL fill Fills any closed polygon defined by a list of lineto operators within a shape operator. The fill operator must directly follow the list of lineto operators. The fill operator will use the line thicknesses of each lineto to fill with, interpolating if necessary. The lines must form a closed polygon, or the fill will fail. See SHAPE for example. LINETO lineto thick pointdir [smooth] lineto thick [lookat] [smooth] lineto thick x y z [smooth] lineto thick trace Used only in conjunction with the shape operator. Adds a line of thickness to the shape of the effect. The current postion of the effect (or the endpoint of the last line drawn, if there is been no use of the move operator since the last line was drawn) forms the beginning point of the line, the endpoint may be specified with a distance from the beginning point and a pointing gesture for direction, or by looking at a named endpoint. For the latter, the endpoint must be a physical object. If the object has been previously identified in the spell, lookat is not necessary. If smooth is specified, the endpoint will be smoothed to a curve if another line is drawn from it. The third form of lineto allows the mage to specify precise coordinates in space to draw the line to, relative to the current position of the effect or the endpoint od the last line drawn. The fourth form of lineto allows the mage to trace a path with the tip of his finger. This may only be done with newly created (i.e., unmoved, unscaled, previously unshaped effects). See SHAPE for examples. SURFACE surface thick [lookat] Shapes an effect to match the size and contours of the selected object. The object is selected by looking at it; it must be within spellcasting range, and must fit entirely with the spellcasting range. The surface thickness is determined by . See SHAPE for example. VOLUME volume [lookat] Like the surface path operator, but fills the entire volume with the effect. (See above). See SHAPE for example. V.2.3 Flow Operators HALT halt Halts a spell. A halt is not necessary at the end of a non-looping spell, as it is implied. Example: if (nonhuman and intelligent) 10' then halt else ... This spell fragment halts the spell if an intelligent nonhuman comes within 10' of the caster, or wherever the caster may have bound the spell. IF...THEN...ELSE if [] ... [] then [] ... [] [else [] ... [] ] Conditional that determines spell flow based on the truth value of the event operators (see Event Operators). Example: boltbox: bind to touch box repeat if (orc or kobold) 30' then if orc 30' then create bolt Fire move to orc scale 1'x 1'y 1'z else create bolt Electricity move to kobold scale 1'x 1'y 1'z wait 2 sec destroy bolt until me "off" This spell creates a 5 foot radius bolt lasting 2 seconds when either an orc or a kobold comes within 30 feet of a box the mage touched when he cast the spell. If it is an orc, the bolt is of fire, if it is a kobold, the bolt is of electricity. REPEAT repeat [=] [] ... [] repeat [] ... [] until [] ... [] Repeats part of a spell for a set number of times, or until a specified event becomes true. A loop variable may be used for spell effects that want to keep track of iteration (see Event Operators). Examples: torch: bind to touch endofstick create Fire scale 1"x 1"y 1"z repeat move to endofstick until me "off" This spell creates a torchlight at the end of a staff which will stay lit until the mage says "off" (and is within range). WAIT wait