For a given roll, it is pretty easy to do this with scriptcards, but the downside is you'd have to create either multiple macros for every type of check, or one mega multi-query on-to-rule-them-all macro. Just depends on how much work you want to put into it weighed against the return, seeing as you already have something that does most of what you want.
Anyway, here's one way to change the roll result using scriptcards. Note I used attributes found in the 5e by Roll20 sheet since that is what my test game is. You can change the "--=result" line appropriately.
NOTE: you may need to get the latest version of scriptcards (v2..1.12 or greater) found here and manually install it for the mouseover tooltips to work properly. I had 2.1.7 when testing this at first and it was wonky, but corrected with the latest. Full documentation of scriptcards can be found here. It's a lot of information at once, so feel free to post on the scriptcards forum thread if/when you have questions if you decide to go down this path.
!script {{
--#title|Fate Sphere Example
--=nat20|20
--=d20|1d20
--?[$d20] -ge 18 -and [$d20] -ne 20|[
--+original roll|[$d20]
--+Fate Sphere intervenes!|[$d20]->[$nat20]!
--=d20|[$nat20]
--]|
--=result|[$d20] +@{selected|pb}[PB] + @{selected|strength_mod}[STR]
--+Result|[$result]
}}
Example output, with tooltips shown for the manipulated roll (18-->20) on the right
