I've done a simple script to transfer a certain region to a certain faction on certain conditions.
Honestly, I have no idea what to do with it (besides being a moddable cheating script)
I won't release it as it is, but anyone who knows something about scripting is able to reproduce it simply by using
scripting.game_interface:transfer_region_to_faction("xxregion", "xxfaction")
If someone has some ideas regarding how to do something interesting with this, I'm all ears