Say a wizard wishes to have his ship able to repair itself mid-combat. Were he to have multiple glyphs of warding storing the fabricate spell cast on the hull of his ship, alongside sufficient spare planks of wood and other materials, and specified the hull as a surface, would the spell break as soon as the ship sets sail?
[RPG] Would a moving ship break glyphs of warding
dnd-5espellsvehicles
Related Solutions
The full description of the Fabricate spell:
You convert raw materials into products of the same material. For example, you can fabricate a wooden bridge from a clump of trees, a rope from a patch of hemp, and clothes from flax or wool.
Choose raw materials that you can see within range. You can fabricate a Large or smaller object (contained within a 10-foot cube, or eight connected 5-foot cubes), given a sufficient quantity of raw material. If you are working with metal, stone, or another mineral substance, however, the fabricated object can be no larger than Medium (contained within a single 5-foot cube). The quality of objects made by the spell is commensurate with the quality of the raw materials.
Creatures or magic items can't be created or transmuted by this spell. You also can't use it to create items that ordinarily require a high degree of craftsmanship, such as jewelry, weapons, glass, or armor, unless you have proficiency with the type of artisan's tools used to craft such objects.
These are all the limitations of the spell.
Walls are objects (like most parts of the environment that aren't creatures), so a part of a wall or a piece of flooring (e.g. a wooden plank) would be considered an object as well. Depending on the size of the chunk of wall, the material it's made out of, and the level of craftsmanship making such a wall piece would require, Fabricate might be able to make it.
In your particular example, it's a stone wall, and thus you would only be able to make a Medium-size piece of wall (that fits within a single 5-foot cube) with one casting of the spell. Your DM would also need to rule that it doesn't require a high degree of craftsmanship to make. And of course you'll need the stone in some form (whether in rubble or from a boulder or something), since that's the raw material that is being magically converted into the new form.
Also, keep in mind that nothing about the Fabricate spell attaches the object you create to anything else. Even if you meet the above conditions, you'd need some way to place the chunk of new wall you've made into the hole in the wall, and to secure it there.
There's no clear guidance, so your DM isn't wrong.
There really isn't anything anywhere specifying what these sorts of effects are "relative" to. There are other questions here about similar issues wondering what exactly counts as a "place" that a spell or magic item's effect happens at, such as "Can a permanent Teleportation Circle be made on a moving vehicle?", "Is Leomund's Tiny Hut stationary relative to the ground or to the surface it's cast on?", and "What happens when an Immovable Rod is activated while in a vehicle?".
If the fantasy world you're playing in is similar to our real-world universe, then there really isn't a concept of "stationery", as everything is moving with respect to something else. Of course, it's possible that the world you're playing in is absolutely stationery, depending on its cosmology.
The rules are intentionally vague and broad on this, allowing for the DM to make whatever ruling makes the most sense for their particular game and setting. I could certainly imagine it making sense in one case to allow for an area-of-effect protection spell to be on a large vehicle in which much of a campaign is taking place, while in another case not making sense to allow for hallowed ground in the place where the small craft you're all on will be moving from that spot in just a moment. (Perhaps it would hallow the original spot, but you'd move from it too quickly for it to do you much good.)
It's all magic, after all. The DM is one who decides what a "point" or "area" might mean for a given spell, and there's a lot of variety in what that could reasonably be.
Best Answer
Fabricate cannot be stored in glyph of warding
So that part of your question will not work from the get-go.
Glyph of warding (spell glyph) says:
However, fabricate is not a valid spell to store with glyph of warding because it targets materials (objects) and not a creature or an area and thus cannot be stored in the glyph.
But assuming you chose a different spell, I'll answer the core of your question.
It depends on how your DM defines your location
Glyph of Warding (as of the post-errata 6th printing)
There are no rules guidance for what is considered a location or not. There is a good discussion of it here, but what it really comes down to is a DM decision.
Case 1: Location relative to planet - Yes, spell is broken
In this case "where you cast the spell" would be the spot that you can see on the ground (or wherever you are casting it). Basically think GPS coordinates.
If the ship moved more than 10 feet from the GPS coordinates of where you cast the spell, the spell will be broken.
This is a very straightforward reading, but could possibly prevent usage of the spell on cloud giants' flying castles and other such large significant moving areas. However,
Case 2: Location relative to ship - No, spell is not broken
This reading means that since the ship is the point of reference it can really never be broken because the hull of the ship, barring some terrible failure, should never be more than 10 feet from the ship itself.
This reading is more generous, but could be prone to hijinks in how small that relative motion is defined.
Experienced-based recommendation
In my games, I generally opt for option #2 in areas that are big enough that PCs normally feel comfortable calling the setting for a scene. So an enormous boat substantial enough for its own map, generally would be considered the frame of reference for the scene whereas a one-person minecart would not.
Just note that there is no reason you have to pick an option and stick with it for every case in every situation. It is a case-by-case, scene-by-scene ruling and the key is to try to go with what feels naturally like the frame of reference for the scene.
I've found that this aligns with players' often subconscious expectations and causes less confusion and friction at the table.