Canonically, a droid's "mind" consists of two main components: its programming, which governs its skills, operating parameters, loyalties, and recorded experiences, and its personality matrix, which is basically everything that gives the droid its distinct persona. Changing its programming does not change its personality matrix, nor vice versa: when K2-SO was reprogrammed to serve the Rebellion, it didn't change his nature, or his skills, just his loyalty. Wiping a droid's memory clears all recorded experiences, but not its skills, parameters, etc. So C3-P0 didn't need to be reprogrammed as a protocol droid every time he got wiped.
It's unclear if a droid's personality matrix can be altered; evidence suggests not, that you would need to replace it if you wanted the droid to have a different personality. For example, if you reprogram a gonk droid to be an assassin droid, it's still going to be pretty dull and uninteresting, and probably more interested in power sources than killing.
When Aphra reprogrammed Triple-Zero and BT-01 to serve her and Darth Vader, it seemed like she was accessing some root directory in their programming to set the parameters for who their "masters" would be. If you have access to that directory (you programmed it yourself, for example), then all you need to do is verbally access the directory. If you're trying to override existing programming, that should have a difficulty based on how secure the original programming was meant to be: reprogramming the loyalty of an average astromech might be Average or Hard, reprogramming an Imperial security or assassin droid should be Daunting or Formidable.
I would make each separate aspect that you wanted to change a separate roll, or if you're trying to do it all together, maybe require additional advantages for each aspect you want to alter. I would not allow the personality matrix to be altered except perhaps with multiple triumphs.
Edited by Direach