It's likely hard coded, or you'd have seen several mods that do just that already.Look, as i said i don't care about historical accuracy those examples might've been bad i know, it was just to get the point across...
but my main question is can i mod it so that CA laws apply only to territory currently owned by kingdom or empire instead of de jure territory?