That would be a very nice mod idea. I wonder if theirs any scripting people here that can do something like that?
Main issue is dealing with all the dialogue in Solitude that presupposes the execution. Still, the way I would have set it up if I were programming it from the beginning - not as a mod (although a modder could theoretically do it, but they'd have to be very good and there would be all sorts of voice issues to work with).
Preamble
- Upon approaching Solitude for the first time, the guard at the gate forces a dialogue (much like the Whiterun and Falkreath guards).
Guard: "Watch yourself in Solitude, or you'll end up like Roggvir" (or whatever it is he actually says)
Player: (only option) "Who's Roggvir?"
Guard: "The traitor who let Ulfric Stormcloak escape the city after he murdered High King Torygg."
Player A (Stormcloak option): "I thought it was a fair challenge." (or something like that)
Player B (Imperial option): "Indeed. He deserves to die." (or something like that)
Player C (Neutral option): "I see. I'd best be going." (or something like that)
Guard A (Stormcloak response): "Think he was right, do you? You're lucky I'm in a good mood today, or I'd haul you up there with him." (or something like that)
Guard B (Imperial response): "That's right. He does." (or something like that)
Guard C (Neutral response): "All right then." (or something like that)
Whatever the response is, a miscellaneous quest objective will pop up on-screen: "Prevent Roggvir's execution or allow it to continue".
The execution:
A priestess from the Temple is added to give last rites, which lets the execution last a bit longer. She says the same things the one at the Helgen execution does, though in the singular - "As we commend your soul to Aetherius, blessings of the eight divines blah blah blah" but it is actually allowed to be carried to completion provided the player doesn't interfere.
Allowing the execution to continue can be done simply by waiting for Roggvir's head to be chopped off, or by leaving the "Solitude world" (i.e. exiting the city or leaving a building).
Preventing the execution is done by causing some sort of distraction to the executors, meaning attack Aldis, the headsman, or any Solitude guard. So doing will cause the execution staff to attack you if you are not sneaking or detected, and look for you then attack you if you are hidden. Roggvir will run away in the distraction. If you are not under stealth, you will incur a 2,500-septim bounty in Haafingar.
The aftermath:
If you
prevent the execution, Solitude NPC dialogue should be changed to account for this, when appropriate. Roggvir moves to the Windhelm barracks and is clad in Windhelm guards' attire + amulet of Talos. He is non-essential but flagged as a Windhelm guard. If you
allow the execution, everything is as in the game as written.
Preventing the execution causes "Joining the Legion" (CW01A) to automatically fail, and counts as the Stormcloak initiation quest if it hasn't been done already, functioning as follows:
(1) If "Joining the Stormcloaks" (CW01B) is an active quest and you haven't killed the Ice Wraith, it is automatically updated to stage 100 (journal entry "Return to Galmar", which I would change to "Report to Galmar") or a new stage with the appropriate contingencies, with Galmar's dialogue being changed to match.
(2) If you haven't yet started "Joining the Stormcloaks," upon talking with Ulfric and expressing your intent to join the Stormcloaks, you will have the option to tell Galmar that you saved Roggvir from execution in Solitude. He says something along the lines of that he'd heard about that, and immediately advances you to the "Take the oath" stage, no Ice Wraith required.
You can still defect to the Legion after saving Roggvir by giving the Jagged Crown to Tullius. If you do this, Roggvir will be removed from the game after the Battle of Windhelm.