Currently, the legions are created through the Soissons province reclaimation events. The Byzantine Empire currently has legions in place for the provinces. I'd also like to ask how I can make the province levies unavailable, and then available when the Themata is created. And what would be the causes of the Themata creation, and what would the benefits be? Could it be tied to a special law, that only the Byzantine have, that triggers a Themata's creation, but once it is chosen, there is no coming back. Or are laws hardcoded.
My idea would be that provinces would have a modifier for -100% levies (similar to Recently Conquered and New Administration) until you create the theme system. Laws aren't hardcoded, the GoT mod has some laws that differ from the vanilla game, so you could have it done by laws. Perhaps you could have "Create the Theme System" as a decision only available when the Realm Size is below a certain value so that it gives you benefits, but only when you lose enough territory so that people don't go creating them early on. I would probably have the Legions cost quite a bit of money, so that if you lose enough territory you could enact the theme system so that you don't go 10,000 gold in debt. This would make the Themes a primarily economic choice but it gives the motivation to create them.
About the Legions, I would have them pretty much the same as the Varangian Guard, but you could give them the Usurp CB by editing 00_cb_types. It all looks pretty simple to add a CB just for them. Here's the code for imperial reconquest that allows only the Romans to use it.
Code:
can_use = {
ROOT = {
has_landed_title = e_roman_empire
independent = yes
religion_group = christian
NOT = { same_realm = FROM }
}
FROM = {
NOT = { religion_group = muslim }
}
}
Of course, you could always just let them join factions.
To give the ability to create new legions based on what land you control you would use either an event or decision. If you were going to use decisions you would use
so that if you owned, say, Egypt then you could use an event to create whatever Egyptian legion. Personally I would use events so as to keep from cluttering up the Decisions bar. This would work in a similar manner as the Lost Roman Provinces events, but instead of giving you a bit of prestige it would create a new mercenary company.
You would just need to make sure that there weren't any other mercenary companies until a certain year, because it would be a bit stupid for there to be a Catalan Company and no Catalans. You would also need for there to be quite a large price to hire the Legions and for the game to start with them already being deployed, because it wouldn't really make sense for an emperor to be running around disbanding the legions when there wasn't a war on.