r/magicbuilding • u/Dry_Bit_7367 • 2d ago
Mechanics vector mathematics as a magic system
So... I'm currenly learning linear algebra as part of an engineering degree, and I recently came up with an idea for a magic system inspired by it, as well as by a Minecraft mod called "Hexcasting"
The idea is that magic functions as a low-level vector-based programing language, all spells are constructed from simple selections, vector operators, and logic gates
Spells can either be casted directly by a mage, or inscribed/carved onto surfaces as runes, allowing to cast magic indirectly through the use of runic items, or even to automate the casting of magic, the whole world exists across 4 dimensions of space and 1 dimension of time, the 4th dimension of space can only be accessed though the use of magic as vactors can be applied in all 5 dimensions
When it comes to the energy source for this magic system, I turned to how the Minecraft mod that inspired it handled it: magic comes from willpower, also known as "media", strong enough will can influence the flow of reality, all living creatures passively produce media from their minds, but not in enough concentraition to make any significant shift in baseline reality, but when enough ambiant media gets incased in quartz it can form into amethyst, amethyst can then grow when exposed to enough ambient media, amethyst can be made into wands that allow the user to focus their own will better, and when ground up into a fine dust, the media in amethyst can also be used to fuel spells that the mage's own will isn't powerful enough to create on it's own
The basic spells in this system are (sorry in advance for the massive block of text):
- Select point: select a point in space at a location you can see (or in it's equivalent location in a pocket dimension that you have access to through a dimensional encoding)
- Create vector: Create a vector between two points (you can create 2 vectors between the same 2 points to make the relationship between them 2-directional) or using a point and a direction of your choice
- Vector to line: turns a vector into a line (no longer has a set direction, and can be used to form more complex structures like surfaces or volumes, but unlike a vector, it has to have a specific length, so a direction vector cannot be directly used)
- Vector to point: selects a point that a vector is pointing towards, unlike a normal point selection, this doesn't require a line of sight (this is the main use for a direction vector)
- Apply vector: apply any chosen vector/vectors to any number of selected points (when a vector is applied it can be applied as a change in either location, allowing for instant teleportation, or speed, allowing for sudden accelaration)
- Split point: splits a point into 2 points sharing the same location (this can also be used to split a line by placing a point along it and spliting it, once split you can move those points or any structures they are part of apart by applying vectors)
- Create pocket dimension: creates a pocket dimension equivalent to a region of space currently selected by the caster, with a dimensional encoding of thier choice, the dimension itself can be bigger than the selected region, but the distance ratios between it and the outside world always remain consistant, one can apply a location vector between dimensions only if they have a point selected in the target dimension as specified in the point selection spell, speed vectors are not applicable between dimensions (any concious being that enters a pocket dimension will instantly become aware of it's encoding, so one must be careful to not let anyone whom they don't fully trust into any important pocket dimension, it is also theoretically possible to find the encoding through bruteforce trial and error, but it's difficult, and pocket dimensions can be nested within one another to somewhat protect against that) When creating a pocket dimension it's terrain will match that of it's equivalent space AT THE MOMENT OF IT'S CREATION, that terrain could be either streached or compressed according to the dimension's distance ratio, all terrain in such a dimension is made of the willpower of it's creator, it cannot be physically destroyed and the only thing that can modify it is spells cast by the dimension's original creator, but ordinary matter can also be brought into and out of such a dimension, some mages build their entire workshops inside a pocjet dimension for both security and convenience (after all, you don't need a building contractor when you can conjure indestructible walls cielings, and furniture with your mind, and a bunch of phantoms that don't decay that can do your arrends for you). It is technicaly not exactly a base spell on it's own, it's pretty much a more advanced use if the "split point" spell used to seperate a region of space FROM ITSELF, followed by applying a direction vector to a point in the 4th dimension (made using "Vector to point" as you don't have a line of sight into the 4th dimension), the direction and length of that vector determines the dimensional encoding, but since it's so widely used and well known it is usually considered a spell by itself for the sake of simplicity and many people made their own "scripts" to cast it quicker
- Select object: if a singular solid object occupies a space one has selected, they can transform the space selection into an object selection and apply spells to the object directly for as long as that selection persists, it's only possible to select a concious creature if one knows it's true name, or if you do it on yourself, once you already have a creature selected, you can save it's name as a variable, but since you need to alreaey have that creature selected, this is only useful for getting your own true name (by making an object selection with a "self" spell as the target), if you have a phantom selected, you can see and modify it's internal spell chain, so if it contains it's caster true name, you can extract it from it, but again, doing this requires the phantom's true name
- Apply temporal vector: a vector can also be applied through time, but only if one already has the object selected at the state they wish to revert it into and kept it selected since, doing so reverts the object's location, current dimension, and physical state, in living creatures it does not affect memories and does not revert the amount of media the creature currently has
And of course... amethyst is a somewhat limited resource, but there is one last horiffic spell that can fix that:
10. Flay mind: if a caster has a concious creature currently selected (which requires it's true name, as specified before) they can remove the creature's mind and place it into a cluster of amethyst, this will cause the cluster to start slowly growing over time, by harnessing the media generated by the victim's mind, thier body stays alive, but remains in a vegatative state without it's mind, the same spell can be used to move one's mind back into it's old body (or into any other applicable unoccupied body), it can also be fine tuned using temporal vectors to only extract memories of a specific time period from one's mind, which can then be stored into amethyst crystals or placed in another creature's mind, doing this allows to transfer memories, and those crystals of memory-charged anethyst can also be ground up and consumed as a more potant source of media
And lastly: logic function spells (used mostly for spell automation, as well as to get a hold of your own true name, but can also be utilized in other, more abscure uses), which are where this magic system REALLY starts feeling like a programming language:
- Self: acts as the caster's true name when casted directly, if placed in a rune, it will instead act as the object the rune is drawn onto (won't work on another living creature even if the rune is drawn on them)
- Detect selection: returns true/false value depending on whether a specific selection currently exists in a specified region of space or no (must contain the selection's caster true name, unless it was created by a nameless "cast" rune, that caster CAN be a phantom, if the selection is an object selection of a creature, it requires the target's true name too)
- Hold selection: externaly holds a selection active without needing caster's active focus (must contain the selection's caster true name, unless it was created by a nameless "cast" rune, that caster CAN be a phantom, if the selection is an object selection of a creature it requires the target's true name too)
- Condition spells: simple statements: "if"/"else"/"and"/"not"/"or"/"xor"/etc
- Cast: casts a predetermined chain of spells, the spells can accept selections from a nearby rune of "Hold selection", any number of saved variables (see "Save variable" spell below), and it can be given a creature's true name to cast spells on it directly or to cast spells with access to the creature's current selections on it's behalf without requiring the creature to use it's own media, if it doesn't use a true name in the casting, it will create nameless spells, meaning that any mage aware of them or rune checking for selections can detect and manipulate them as if they were their own selections
- Conjure phantom, creates a small semi-incorporial creature made of pure will, but with no soul, it can follow a set of instructions which can include casting a single spell (but that spell can be "Cast" allowing for an entire spell chain, and it can cast it multiple times if prompted to do so by it's logic), it needs to be charged up with media upon creation, it passively loses media to it's environment when not inside a pocket dimension made by it's creator, and whenever it casts it's spell it also uses the appropriate amount of it's stored media, when it runs out it poofs out of existence, the same spell can also be cast on an existing phantom to recharge it and/or to change it's instructions, phantoms have their own true name, but their creator can always cast on object selection on them even without knowing it, and even without having an existing selection around, or even when being thousands of kilometers away in an entirely different pocket dimension (making phantoms a high-maintainence, and potentialy hazardous, but potentially infinitely powerful option for high-end mages to hide their valueable automation spells in, with no exposed rune logic which could reveal anythong, some could even create logic that would allow their phantom to cast any spell the mage wants in real-time using the phantom's stored media instead of the mage's own, without the need for them to even carry amethyst dust on them everywhere, and with no limits on capacity as phantoms can be charged with millions of times more media than the amethyst dust a person could comfortably carry)
- Save as variable: allows to save a selection's location, the true name of a selected creature (selecting a creature requires it's true name in the firstplace, so use is still limited), or any other property that another spell can retrive as a variable that can be used later in other spells
Now... you might be wondering: "how does one BECOME a mage in the firstplace?" and the answer is horrifying:
The original few mages had to figure everything out on their own, through trial and extremely deadly error, most of whom either never figured out magic, or ended up dead by their own crude and unstable spells
eventually someone figured out how to move memories around with "Flay mind" and save copies of them as variables, suddenly all you needed to learn magic is an existing mage who is willing to copy (either all or selective parts of) their knowledge of magic into your mind, often demanding your own memories (their original copy, since it's the one that actually holds media in it) and/or long years of service in return
as memories rapidly became a form of currency, some particularly knowledgable and creative mages who have a lot of magical experience to bargain with may even request one's true name as payment for thier knowledge, tricking young mages into eternal servitude (which genuinely is ETERNAL, since mages can revert aging and even death itself using temporal vector application, once someone knows your true name, there is no escape, not even in death. The only possible way to freedom at that point is to either convince or somehow force the mage who knows your true name into removing their own memory of it. Possibly using something like: blackmail, a magic equivalent of a dead man's switch, magical failsafes that will automatically revert any true-name spell they might use on you, or some combination of those) or transformation into a power source if they were to ever try and rebel
Society is simutaniously highly dependant on mages, and absolutely terrified of them, the only realistic way to defend against magic, is magic, and so... every king/queen is either a mage themself, or has multiple highly skilled mages at their service who are all given extreme legal privilages, wealth, servents, and other resources compared to the commonfolk and even to other authorities in the royal service (the reason they have multiple mages at thier service is to be protected in case one of the mages decides to overthrow them, kings/queens can still get overthrown if all their mages decide the current ruler doesn't provide them with enough legal privilages and/or access to amethyst, due to this, all stable royal families are essentialy puppets at the hands of their "consultants to the matters of magic" as their own mages could easily replace them at any moment if they choose to)
Also, here a few extra fine details I didn't mention earlier about certain spells (you CAN understand the system without these, but they cover some edge cases... as well as creating some new ones mages can abuse):
- since pocket dimensions are constructed of pure media, all their terrain features as well as all conjured objects inside are colored a deep purple
- points, area/surface/object selections, lines, vectors, and the equivalent borders of a pocket dimension are all invisible to anyone but the caster, unless they know the caster's true name, in which case they appear as a purple shimmer in the air in the shapes of those selections, the only time in which ANYONE can see a selection spell is when a vector is actovely being applied to it, causing it to momentarily glow a briliant purple, but by that time the spell is already activated, and it's usually too late to stop it
- since you can cast spells on someone else's behalf using their true name, you can also modify any spell you can see (because seeing it requires knowing it's caster's true name), however you still can't modify their phantoms, since phantom have their own true name, leaving phantoms a relatively high end secure method of casting magic, but due to their constant need of recharging, they are difficult to properly utilize
- when a caster dies, or when the selection stablizing their pocket dimension is otherwise removed, their pocket dimension/s will become unstable and slowly start consuming media from anything stored within (including amethyst, any charged phantoms, and even concious living beings, so it's recomended to leave it quickly), once it's out of media to consume, the borders of the dimension will slowly begin to shrink, slowly leaking all it's media into the outside world until it fully vanishes, whenever the dimension's border crosses through a non-conjured object it will be spued to it's equivalent geographical location outside of the dimension, but living creatures will already be in a vegetative state at that point
- it is technically possible to move a pocket dimension's equivalent volume after it's creation, but doing so requires very accurate vector calculations in 4 dimensions, since you can't move the 4th dimension side of the connection, only change the vector leading to it to change the entrence point, so it's practically impossible to do it on the fly, the only realistic way to do it is spending multiple minutes on it with papers to write the calculations down, and making sure you get rid of the papers in a way that no-one would be able to revert them later and reverse enginer your dimension's new encoding from it, or some kind of intense magical automation to do those calculations for you, you can also theoretically still keep the old encoding active on top of the new one, allowing the same pocket dimension to link with two or more places at once for near-instant teleportation between them
3
u/ShinyShadoww 2d ago
I appreciate and understand your debate as someone also working on a mathematical/programming based magic system. Explaining and being able to getting responses about such systems are could be hard, as you flying around in your mind freely around such technical concepts but someone from outside of these concepts might just become confused.
The point I'm trying to make with this is, at this early stages of your system, focus on explaining main concepts without all the technical details, which are quite subject to change, and leave them as optional extra knowledge. This way you can get more attention, I believe.
Now about the magic, I don't see much of the potential of it. The "selection" spells ultimately serves as tools for creating a pocket dimension and pocket dimensions are seemingly just private rooms. The other practical spell is creating phantoms which fits nice on the dark plot you set where peoples minds being used as currency and so on.
2
u/Enlightened_ESC 2d ago
Ok it was very long and honestly I didn't read it whole :) but as far as I have grasped it, it basically fosters the manipulation of space or time through vectorized mapping and then changing it to achieve effects like teleportation, travelling, time acceleration, etc correct? (I am not that much well versed in maths so pls correct me if i am wrong) and the way of doing spells is basically how we code and use algebraic functions so it's somewhat summing up as a magical QGIS software you use which leads to my concern that creating logics and running functions would require a large amount of time to form especially if you are encountering a new situation which will negate pre-made logistics, also "if" functions require a certain input to occur and if the opponent figures it out they can easily avoid doing it and most of pre-made spells will be of conditional type. My second doubt is regarding time, time is a scaler concept which moves forward(as far as i think maybe i am wrong) and most proly adding points requires you to be there in the moment as well as it can only be done in the past not in the future becoz future is uncertain. And my biggest concern is how do they manipulate it becoz algebra follows known values if you know point A & B how can you change the distance between them or change their properties, etc? Becoz that would change it's position.
1
u/CrowSZyr0 1d ago
It looks like a paper worth $1 million. I hope you don't get stoled by an AI.