Theory of Magic

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

The Theory of Magic (Current state of affairs)

The Gorilla of Destiny


E-mail: gorillaofdestinytiktok@gmail.com

Abstract. Magic in Fifth edition follows no apparent scientific basis. That is to say there is
no underlying internally consistent theory which can describe the effects. It is the goal of this
project to try and form a scientific understanding that can be used to further the implications
of a scientifically treated magic system. Whether or not such a theory exists or is possible is yet
to be seen however it is a fun community minded science communication project to attempt

1. Foundational Magic Theory


Previous attempts at producing a theory of magic have so far been unsuccessful. After various
experiments and attempts at modelling magic as perturbations in a Gygax field a lot has been
learned about 5e spells and what differentiates them. The main recurring error was that models
were incapable of producing each spell uniquely. Thus we have decided to take yet another step
back and take an even more fundamental approach. For simplicity this approach will primarily
focus on damage spells in order to reduce the project into a more manageable scope.
Using a database created by chiyo#1432 we were able to determine that in order to uniquely
identify every damage spell in 5e (not including Unearthed Arcana) we only need the following
parameters: level, range, n,s,m, area type, Somatic Component, and damage type
where n,s,m are the number of dice, sides of dice and modifier’s respectivley and Somatic
Component is a simple yes/no (or 0,1 in a scalar space)
We can then re-frame the search for a theory of magic as the following “Black Box” problem
where we are searching for a function or model that allows us to transform an as of yet unknown
input from the caster (i.e. force on previously theorized Gygax Fields, energy, spell slots etc.)
that uniquely maps to a coordinate in the parameter space (Level, Range, n, s, m, area type,
Somatic Component).
This problem will become more manageable if we can reduce these dimensions. This could
perhaps be with a simple relationship (e.g. how Level relates to n, s, m for example). Solutions to
the black box problem and any potential dimension reductions must be mathematical in nature
such that they can be tested and hard predictions be made. There exists every possibility that
the model and function used might change depending on some attributes but this is yet to be
demonstrated.

1.1. Crawford’s Rule (Revised)


1.1.1. Basic Theory
One proposed solution to include the identifiers specified in Section 1 is a revised version of
Crawford’s Rule. This states that magic occurs due to perturbations into an all encompassing
field known as the Gygax-Field with perturbation’s being Gaussian in nature to match the
general form of the damage distribution. The direction of the perturbation describes the damage-
type that will be dealt by the spell which has an effect on the efficiency energy is converted
to damage (i.e. a level 3 necrotic spell may be more damaging than a level 3 fire spell). This
perturbation then travels through the Gygax-Field until eventually reaching it’s target where the
energy is released back into the caster’s plane through an “aperture” which can be manipulated
by the caster. The shape of this “aperture” can then determine the shape the spell will take in
the caster’s plane dealing damage as a random measurement of the damage distribution.
One analogy for this is that we are using energy to fill a balloon with gas, holding the balloon
at the opening underneath and then choosing when and where to release the stored gas where
we can manipulate the hole through which the gas escapes. As we will see in Section 1.1.2 it is
more complicated than this and unlike a balloon we may release through 3D, 2D, or even 1D
apertures to get shapes such as spheres or cones.
There are several interesting consequences of this theory that I can see as of writing. Firstly
it explains that when we see spells (such as a fireball moving before hitting it’s target and
exploding) we are actually seeing magical energy ”leaking” from the Gygax Field. This ”leaking”
is not significant enough to be contained within our maths later but perhaps it will be added
in another revision. Secondly it suggests that the shapes and areas that spells take in DnD is
not intrinsic to the spell but instead a cultural phenomenon, in theory there is nothing stopping
someone from casting fireball in another shape but perhaps in teaching this is not known and
to change the shape requires long forgotten knowledge and skills. Finally this gives us a basis
to invent new spells. Since the model works from scalars we should be able to create new spells
and accurately predict how much damage they do (for example what is fireball was cast in the
necrotic damage direction and not fire)

1.1.2. Mathematical Detail


A key aspect of this theory is the discovery of strong correlations between damage variables
and spell level if spell’s are separated by damage type. Since the Gaussian factors Amplitude,
Average Damage and Standard Deviation (A, D0 , σ) derive from n,s,m we can use these instead
and still accurately identify every damage spell. In order to encode these differences by Damage
Type it is theorised that the perturbation occurs in a direction dˆ where the factors m and c
which describe the linear relationship between Level and A, D0 , and σ. Thus we define the
damage function:
(D−D0 )2
f (D) = Ae− 2σ2 dˆ (1)
or:
(D−mD L−cD)2

f (L, D) = (mA L + cA )e 2(mσL−cσ)2 dˆ (2)
where D is the damage and L is the spell slot level used to cast the spell. We can then describe
the motion simply by applying a Gaussian function in the ‘x’ direction in which the spell travels
connecting the spell caster and the target. We can define this as:
(x0 −vt)2

g(x, t) = e 2λ(t)2 (3)
with λ the function of variance of the pulse in the x direction with respect to time, ‘x0 ’ is the
initial position (generally we set x0 = 0 as the caster, hence at t = 0, g = 1) and ‘v’ the speed
of the spell. Finally we can encode range ‘R’ by defining λ with:
vλ0
λ(t) = − t + λ0 (4)
R
We then restrict g(x,t) s.t. it is only equal to Equation 3 when Equation 4 gives λ ≥ 0. This
causses the gaussian to decay in the x-direction as it travels giving us a range for the spell. λ0
2
describes the initial variance of the spell and I think this could be explained as how large the
spell appears in the caster’s plane where the decay described by Equation 4 is caused by the
leaking of energy from the Gygax-Field to the plane similar to how some air might escape a
baloon no matter how tightly held. This gives us the current form of Crawfor’s Revised Rule:

FCR (D, L, x, t) = f (L, D)g(x, t) (5)

In full:
(D−mD L−cD )2 (x0 −vt)2
− −
2(mσ L−cσ )2 2(−
vλ0
t+λ0 )2
FCR (D, L, x, t) = (mA L + cA )e R (6)
with B the severity of the step function’s effect where we expect high B as range is definite.
While encoding much of the information we need to encode spells it is missing two key factors:
• The effect of a Somatic component.
• The derivation of different area types.
When the spell hits a target the energy stored in the Gygax-Field is released again through
an ”aperture” which can be controlled by the caster. When the spell hit’s a value of damage
is chosen according to the probability distribution. We can then think of this chosen value of
damage like a light shining from the Gygax-Field to the caster’s plane. Since the Gygax-Field
is n-dimensional we can say that the spell can pass through the aperture to form 3 dimensional
shapes (similair to how a 3D object casts a 2D shadow and how a 4D object casts a 3D shadow).
Thus if we have a damage ‘D’ we can say that the spell’s output profile will be given by:

output = D V (x, y, z) (7)

where V (x, y, z) is a characteristic equation to describe the area or volume of the spell cast.

1.1.3. Flaws with Revised Crawford’s Rule


The somatic component is not taken into account in this model despite being a key element of
casting, this may just be a quirk of code as so far it doesn’t seem necessary as there is no known
trend between somatic components and other aspects of a spell. It may be the case however
that spell components are simply a manifestation of how a caster provides energy to the Gygax
Field and are hence unimportant when considering the broader theory of damage spells
Another fault is the lack of explanation as to why range behaves with a ‘S(x)’ function. One
suggestion has been that if we can incorporate the ‘A’ factor elsewhere we could give the pulse
a decay function that hits 0 at a given range.
It also falls to a previous error in Crawford’s rule which is assuming all distributions are
Gaussian in nature. While generally true there also exist box function distributions (for single
die distributions) and triangular ones (well approximated by Gaussian’s but not exactly). These
effects are not too severe however if there is a way of incorporating these different distributions
while still accounting for spell Level then we could substitute f (L, D) to more accurately reflect
this.
In spite of these considerations Crawford’s revised rule allows us to accurately predict the
damage and movement of a spell and has significant potential in the exploration of a magic
theory.

1.1.4. Extensions of Crawford’s Rule


Conversion of damage types to create new spells is theoretically possible under Crawford’s rule.
The process for converting spells is simple in principle (though there are difficulties still to be
overcome entirely):
3
First we must calculate the average damage for the original damage type of the spell at
whatever level we are interested in (e.g. fireball cast at 5th level so we find the average A, σ, D0
factors at level 5 according to the correlations) we call these A0 , σ0 , D00 . We then find the
A, σ, D0 values given for the spell in question (A1 , σ1 , D01 ). We then define multiplying factors
fA = A σ0 D00
A1 , fσ = sigma1 , and fD0 = D01 . We then find the average values of A, σ, D0 at the
0

same level in the new damage type direction. We then multiply these values by our previously
calculated ‘f ’ factors to get the factors of the spell in a new damage direction. In theory this
is the spell now translated however to translate this into ‘nds+m’ form (more useful) would be
more useful.
Though I’m sure an exact conversion between A, σ, D0 and n, s, & m must exist it is as
of yet unknown to me. However using a simple matrix of translations we can find the closest
approximation. This is fraught with errors but in principle should work well. This allows us to
create new spells based off of those we have by simply changing the direction of dˆ in Equations
1, 2, and 6.

1.1.5. Explaining other Phenomena


Wild Magic presents an interesting problem with such an exact theory. Current proposals are
that either:
• Sorcerers, who are less exact than wizards misshape the perturbation slightly, these
variations are then reflected when energy is released from the Gygax-Field. Due to the
randomness of these reflections the result will be similarly random.
• The perturbation is given too much energy by the caster and misdirected causing ripples in
the Gygax-Field with random effects.
While these might explain the effect qualitatively it is far from exact. However due to the na-
ture of wild magic an exact explanation might be beyond the scope of any mathematical theory.

Concentration Could be seen as the caster slowly releasing the spell’s energy through the
aperture into the caster’s plane. Such an effort would require concentration explaining the phe-
nomena mechanically. This is still up for debate however

Multiple damage types Fortunately this can be easily explained as a spell being a
perturbation within multiple damage directions. i.e. we can sum FCR for the different damage
types. This does mean that theoretically we might be able to create spells with multiple damage
types of any combination (since they are all perpendicular to each other).

Counter Spell. Due to the mechanics proposed for perturbation we can think of counter-
spell as launching a spell with an equal and exact opposite perturbation. The ability check
associated with higher level countering accounts for the spell-casters ability to recreate the
perturbation correctly. This also explains why the spell must be seen to be cast by the counter-
er since it would be impossible to infer information about the spell without visual cues to suggest
the direction of perturbation.

2. Energy and Magic Relations


Some spells were found to explicitly state the maximum displacement and weight when
telekinetic-ally moving objects. Unlike other attempts this ties the energy of a spell to given
parameters in DnD (We have found that it is often unhelpful to try and relate spells to the
energy they would require in reality as the existence of magic alone is enough cause to doubt 5e
and reality have the same laws of physics). Users toasterstrudel#3641 and AstroPuppy#5445
4
found that by using Energy = M aximumW eight ∗ M aximumDisplacement they could plot
Energy vs Level finding a relationship [1]:

E = 6077e0.4801∗L − 7006 (8)

From this we may be able to find the inefficiency converting between energy and damage
providing a basis for non-damage spells being Incorporated into our theory.

References
[1] AstroPuppy5445 toasterstrudel3641. In: (2022). url: https : / / discordapp . com /
channels/985517836439003166/985873411630825486/988315993300406283.

You might also like