Done some research and apparently Codejunkies (from action replay) managed to apply cheats by changing the save file by using Powersaves. (uploads your save file, de-encrypts, apply's code, re-incrypts, and you download)
Now making Pokegen a program that altered or generates code that alters the save file could be the solution for future editing.
For instance, if I'd click on an event file from gen 6 it could give me the code that when entered in pokegen would alter my savefile.
(basicly how action replay used to work)
But I can imagine it might be pretty hard for extensive editing if there is no consistency in the code.
And I can't find the actually code for the cheats Powersaves currently has to figure out a pattern.
Pls let me know if its possible and if its a good method.