There's an unofficial supplement from back when I was playing D&D in high school (3.0? 3.5?) that I really enjoyed, called Wild Magic or something (I wasn't the owner). Unfortunately I can't remember the publisher, but the basic idea was that a character fails a spell, he rolls a percentage die that determines a random event. So if you fail to cast fireball, maybe you conjure up confetti. There were around 100 possible outcomes per table, and about 4 different tables based on spell levels (more powerful spells had more powerful results).
My idea is that a GM can generate these events by creating macros, except that instead of providing just a number (where the number has very little value except for looking up the spell itself) they give the result of the event itself. So for example, I can create an event "Magic Backfire". I set the event to roll 1d10 (I'll keep it simple), and based on a spreadsheet it gives me the following results:
1-3: "[character/player] deals 5 fire damage to him/herself and is pushed 10 feet away from his target."
4-6: "[character/player] conjures confetti, party music plays"
7-9: "[character/player] casts a random spell of the 1st level"
10+: "[character/player] casts the spell as normal without expending it, it does not backfire if it fails again."
Obviously, the idea is to have as many possible outcomes as possible, and include ability scores and so on, based on the character rolling for the event.
My idea is that a GM can generate these events by creating macros, except that instead of providing just a number (where the number has very little value except for looking up the spell itself) they give the result of the event itself. So for example, I can create an event "Magic Backfire". I set the event to roll 1d10 (I'll keep it simple), and based on a spreadsheet it gives me the following results:
1-3: "[character/player] deals 5 fire damage to him/herself and is pushed 10 feet away from his target."
4-6: "[character/player] conjures confetti, party music plays"
7-9: "[character/player] casts a random spell of the 1st level"
10+: "[character/player] casts the spell as normal without expending it, it does not backfire if it fails again."
Obviously, the idea is to have as many possible outcomes as possible, and include ability scores and so on, based on the character rolling for the event.