This would be great for when I take over a country that has taken over an ally. But how will they determine sphere, treasury, dar, leader and form of government. If BG (or a modder) finds a way this would be great
Good question, but lets look at this implementation in Super Powers 2. Seceding non-loyal land should give you the option to install a regime, from monarchy to dictatorship, from democracy to communist. The sphere would naturally be neutral, and the AI would determine its long term allegiance as the game progresses, according to global events such as external influence and of course the actions of leaders of these spheres (Russia, USA) that will determine their eventual alignment, which is the case for non-aligned nations already, or nations that switch sphere.
I think DAR should start at the lowest, and it will build up as events unfold around it as they already do by default.
Secession should cost the host country X amount of money in relation to how big the land being seceded is. The economic size and output of the region will determine this treasury growth or reduction from that point onwards, as they already do.
This shouldnt require a top down rewrite of the game or how the AI works, most of the mechanisms to allow this to happen are already in place.