How to survive the transition from tribal to a republic?
Upgrading from tribal settlements is always tricky, whether you are aiming for a republic or feudalism! I don't have much experience with republics at all, so I'll give general advice. These are loosely ordered from easy to complex/historical to gaming the system. (Note: the last 2 bullet points no longer work with the latest patches as you cannot build multiple tribal holdings in one county and get crippling penalties for wrong holding type. I'll leave them in for historical accuracy)
Make allies. Preferably 2 that don't have any conflicts with each other. Allies will help you against external enemies, as well as factions. Notes: they won't come help if they have a war of their own, they won't always come help if the war is from you trying to revoke a title and you have to renegotiate the alliance if a character dies (best marry off your sister to a realm with Gavelkind or Primogeniture and a ready heir)
Gold. If you have enough gold, you can just use mercs whenever needed. You will likely need them anyway, as the first years are crippling, but it's good to have some extra just in case.
Get some pre-upgraded counties OR make sure your core tribes are fully built out. The problem with the upgrade is that you lose the levy bonus from empty slots, that will be later compensated by buildings. If you fully upgrade your tribes first (or capture some upgraded castles or cities and build those out), you won't suffer as much of a hit.
Shed your realm. Tribalism is not meant to be stable in the game (nor was it historically so). If you have blood relatives who don't have claims to lands take up surrounding counties and get independence, they are unlikely to try and assault you (they only band together if you are their liege), nor do you have lots of vassals threatening you. This way you get an upgraded core of several counties + a few loyal vassals (make sure they are content and honest!!!) and later on you can either reconquer, marry or vassalize your former subjects (They aren't too fussy about it, since they share your religion, culture and dynasty. Also they are probably very grateful for the 10+ years of independence and likely are de-jure vassals as well.)
Swear fealty to a feudal lord. This allows you to upgrade to feudalism without the worries of the above (does not allow upgrading to a republic like this, even if you join a republic). This is in a last section, since this is almost always paired with revoking as many counties as possible, dropping your primary title, swearing fealty, upgrading, then taking your new lieges titles (since you likely have more land than him). Not something a real ruler would allow, but AI's are more than happy to get an extremely powerful vassal.
Make a partial upgrade. When you upgrade, all your holdings will upgrade. Some of your vassals will, some won't. Infidels will not have the option at all. Hence, you lower your county count, upgrade, up your crown authority and revoke tribes back to yourself. If your ruler is weak and about to die, you can even try to up the authority to medium, which gives free revocation from infidels. Or, if you have a couple of brothers without sons, you can give them some badly upgraded tribes (so they don't try and convert), then kill them off and inherit the tribes. Or, if there are several small independent tribal counties around you that you have claims to (or de-jure rights to), take them after the upgrade and don't upgrade them. Either way, the goal here is to convert only some tribes, while keeping others intact, for a smoother transition.
This is applicable for raiding tribals or if you have some other magic way to get tens of thousands of prestige, and a capital (original or not) with several free holding slots.
- Build tribal settlements in your capital county. The idea here is to upgrade them all and net the capital county and marshal bonus for the castles. In your typical game, adding a second tribal settlement is going to reduce your total levy in that county (this is because the empty holding bonus on a fully-upgraded tribe is larger than the levy provided by a fresh tribe), fully upgrading it (6k-10k prestige + around 500 gold) is going to increase it a bit, but not as much as a tribal settlement in a different county with empty slots (as you would have more empty slot bonuses than capital county bonus). So you would usually want to expand the number of counties you have to make use of the empty slot bonus rather than capital county & marshal bonuses. The downside is that this bonus that you have been maxing out disappears when upgrading to feudalism. Hence - don't max it out. Get it early to make raiding and warfare viable, and then slowly condense your realm back to your capital. This will make the levy hit from upgrading miniscule - you'll go from ~2k levy from each tribe to ~1-1.5k from each castle (assuming a good marshal training troops - he affects all your castles in the county!). You'll then be able to build Stables in each of those castles pushing your army size back to the original, except now it's heavy infantry + cavalry, rather than light infantry. As a sweet bonus - if you had 8 tribes before upgrading, and they are all now castles with Training Grounds II (you get those via upgrade even if you don't posses the tech for it), and you have Military Organization II, then you'll get 1.4k+ retinue points right there, allowing you to start building up a private standing army right after the upgrade. The best places for such a buildout will have both a good number of slots, rich raiding targets and same faith neighbors to conquer and protect from holy wars. These are the Swedish capital (don't remember the duchy name, essentially where Stockholm is now), Jylland (Danish capital, 2 6-slot counties), Lithuania (5 slot county + 2 4-slot ones), Kiev (7!!! slot county + 5 slot one), Moravia (Praha is 6 slot IIRC + several OKish nearby). If playing in the British Isles with an early start, conquering Essex is also a good way to go, if the opportunity arises.
Yeah, the solution to that is to raise all levies before the conversion, they stay with their strong numbers while your new holdings upgrade, and the AI will look at your 3k raised army, not your 500 "posible" army. The only bad thing about that are: 1- you get less money because the upkeep. 2- You cant declare offensive wars (not that you want to) 3- If the AI STILL declare war on you and they get beaten, its game over.
As a side note, if you are an offensive pagan (meaning Tengri or norse) you can raise your vassal levies for extra punch, since those religions dont have the "raised vassal levy for too long" malus. For these offensive pagans, you can use those raised troops for raiding for money while at it.
With that and the retinues, you should have an easier time. Heck, if you are playing with the horse lords, you can add the event troops you got when you settled, if they survived your tribal age. Boom, like 9k levies, should be enough to hold.