Do you have the source code?
If you have the source code then you shouldn't need to patch anything, you can just recompile the executable and you're done.
If you don't have the source code then there's nothing for you to compile. You have to patch-in machine code. You don't have any other choice.
you can also disassemble it and reassemble it, but this is likely more work than the editor, both in making the change and getting it to work again after.
Most games use a save file to store and retrieve a game state. Edit the game save and you'll have a patched game you can load and reload from the save point.