Interesting! I'll brainstorm as many possible answers to your questions as I can come up with, in the hopes that among the many poor ones some of them end up being helpful.
Question 1: (looking at your edit stating that units enter pool with prereq tech) I worry about following this approach in the fall from heaven universe. The reason being that one of the major strategic constraints in FFH vs normal civ iv is supposed to be some choice about which tech paths to pursue, say focussing on combat instead of magic, and then if you can turn around and pick up state of the art units of the other lines when someone else gets their prereq, even at a cost, it seems to blunt the implications and tradeoffs of such decisions. (I tend to pursue a generalist path myself, but I gather from the intro video's constant message of "which path do you choose" and some comments online that a lot of people specialize). Of course at the same time some ability to make up for your weaknesses is desired, so it shouldn't just be player tech tier, but it shouldn't be absolute equal tier to top opponents.
To address this difference between civ iv and FFH tech options, perhaps (assuming from your edit that you have already seperated out the cavalry/infantry/recon/divine/mage lines, each with their own qualifying techs) and then take highest player or ai tier and subtract 1 to determine the random unit pool. So if someone in the world has the tech for mages, others can get random mercenary adepts, and if someone has archmage tech, then the random pool has mercenary mages (the top tier archmages never appearing but when another player offers them). Add some basic units, horsemen, axemen, hunters, that always appear.That should keep the pool useful for supplementing your weaknesses at high cost, but not allow you access to absolute state-of-the-art units in fields you haven't been pursuing (unless offered by a player as the hippus or with the trait)
On unit types: I'd say one interesting thing should be to give access to other races. So the random units should have some chance of coming with any racial trait appropriate (ie any race that isn't entirely supplanted by unique units at that tier). Unique units should be available, but at a much lower chance to appear, making the renegades particularly interesting and unique hires.
So I'd say standard units for every tier but the top one, coming one tier later than the most advanced player, but with the basic infantry/recon/cavalry line coming right at the start with trade. UUs at much lower chance, but following same tier rules. All mercs should start with randomized low levels, maybe 1-3, making them work for higher levels through contracts.
Also, shouldn't forget to block mercenaries from automatically getting racial traits of the civ (ie, mercenaries hired by scions shouldn't become undead instantly)
Question 2: The only thought I have here is, as much as it seems counterintuitive, it would be best to have available unit rosters change in large clumps every many turns rather than continously every few turns. The reason is some players (me and my wife at least) hate having incentives to frequently check a menu screen every couple of turns, as it pulls the player out of the main action on the world view (this is why we play without tech trading on, among other reasons, the constant checking of a separate screen to look for deals).
So taking your suggested rate of 1 every 2 turns, I would change it to mechanically be 5 new units in a clump every 10 turns, preferably calculated to occur on the date multiple itself rather than from when trade was discovered (so whenever a 0 appears at the date end, time to look for new random contracts). Also, an option to display a message when an ai hippus player posts a new unit or a unit returns from a contract would be nice (just saying "The ______ have offered a unit of ______ as a new mercenary contract" or "a company of ________s has ended its contract and returned for hire" or some such), so if some generous ai decides to sell a druid I will know to check and immediately jump on the deal. Would have to make sure the ai isn't offering so often that it becomes spam, but shouldn't be much of a problem if just the hippus and a few others with the trait are doing this.
As for the raw rate itself ignoring possible clumping, your suggestion of 1 every 2 turns as a general rate seems right for normal map size normal speed. I'd increase the rate for changes in map size, in direct proportion to number of land squares (for this, may I suggest you borrow the idea for the scions awakening spawn in customfunctions.py, it uses a formula with a function to get the total number of land squares and then figure how much large or smaller it is than a standard map:
iTotalLand = int(CyMap().getLandPlots())
iTPopLmt = (iTotalLand / 40) + 6
Land squares in the map being a better proxy than map size, to even out high sea level maps and the like.
Then for game speed you'll want to use 100 divided by the unitbuilding multiplier <iTrainPercent>, rather than the tech/growth one (ie, marathon should be 1/2 as many mercs added, not 1/3).
Then, on top of that I'd add a modifier for the current size of the pool, making a great many mercs be added if the pool is almost empty, trying to represent the incentives that wars and working mercs place for more farmers to take up the sword.
Question 3: For the size of the random pool, are we counting currently contracted out units or just ones waiting to be hired? I'd say limit of 15 units in the waiting to be hired pool, modified to world size by the same scion borrowed landplot factor discussed above, but not modified by game speed. No limit to the ones currently hired, if there are a bunch of people hiring mercenaries in the world, then there is every economic incentive for more bands of mercenaries to form, but if there is a backlog of mercenaries unable to find work, then some will return home and take up farming.
I would say the size of the random pool should be entirely separate from the ai and player provided hippus pool, which should be uncapped and not displace the randoms.
Question 4: I think the goal should be to allow for the creation of persistent mercenary companies that exist through time and become veterans, while still allowing for room to be made for new units.
From units currently waiting to be hired, if the pool reaches the cap from units ending their contracts, then it should be whittled down to the cap by kicking off the lowest level units currently present in the pool.
When new random mercenary units are added, the currently available in the pool units of the lowest level are then kicked out (retire) to make room for new ones that arrive (so new ones keep arriving and are guranteed a spot, potentially at low level, but the most grizzled veterans aren't displaced).
However, to avoid too much stagnation, whenever a random mercenary unit is defeated in battle (going to 10% health), there is a random chance (maybe around 20%) of the unit retiring from too many casaulties and not returning to the pool.
Perhaps not having the same death chance for player and ai offered units (them not having the retiring choice logically), but if the mechanic was too easy an unlimitied money machine for the hippus, then some chance of death could be given even for player units to help balance.
Also, on second thought, maybe having a reduced to 10% health death monetary penalty does make sense, to account for a contractual obligation to provide for the now crippled soldiers and provide some reason to dismiss a mercenary instead of just hurling him against your enemies. Perhaps not paid to the hippus if they rent the unit, instead it represents casaulty pay directly to the injured members of the unit itself.
Finally, very high level random mercenary units (10?) should be eligible to be automatically upgraded to unit of equal tier to the top tech level of any player upon their return to the pool, bypassing the minus 1 restriction normally in place. Mercenary units could also be eligible for upgrade through the player that currently controlls them, meaning some unique units might even make it into the random mercenary pool representing their long exposure to that civs tactics?
Question 5: I'd favor backloading much of the mercenary costs onto higher maintence rather than high initial hiring cost. The reason being that mercenaries should be hired for a purpose, a limited war, and then dismissed when the purpose is over, granting fluidity to the mercenary pool with many nations able to hire the same units and also keeping the feeling that the initial investment isn't keeping you from hiring, firing, and rehiring in response to cycles of war and peace. However, if this were done, I think a death penalty is needed again (operating alongside the 10% health rule), to keep them from being shock troops and make you value their use (ie, a cycle of hiring at start of war and firing at peace, rather than hiring at start and then suicide attacking with them)
So I'd say the commerce cost for hiring should be 50% of the unit build cost (should already be calibrated to speed), but there should be an additional death penalty of say 50% unit cost if it is driven to 10% health, while the maintenance would be much more dramatic, say 5% the unit build cost per turn. So if you hire a merc and use it for 20 turns in battle, then get it killed, you would end up having paid 200% its hammer cost in money, which seems right. Also probably best to have a limit of hiring 1 mercenary per turn for any player, to prevent someone driven to their capital from suddenly hiring a full army, or someone going earlier in turns exhausting the new arrivals to the mercenary pool.
Alternatively, the maintence cost could be halved and there be a new reverse bounty hunter kind of trait added to mercenary units, where each time they particpate in battle you have to pay an additional cost. Though I'd favor just doing the maintence as simpler.
I'd also say there should be the following multipliers for special units types, to both maintenance and cost:
x2 or x3 If Magic or disciple (strategic value already discussed, if you want to pay someone to terraform your land or enchant the blades of your armies they should charge an arm and a leg per turn, but note also magic units would also never be subject to death penalties or loss of unit and need to rehire under normal circumstances, as they don't directly fight, which also justifies additional cost)
(1+(Level-1)/5) as a multiplier. So a 6th level troop would cost twice as much. It makes 6th level troops much more cost effective, but I think that is how it should be--making you treasure your high level mercs.
x1.5 if current state of the art (rather than -1, as normal for the random). So if the AI or player hippus develops tech for mages and then immediately offers them for sale, they should get a premium representing scarcity beyond just the cost difference between them and adepts.
x2 if a national unit limited unit (since you stated it will count against the offering civs limit, but not the renter)
Other things:
I'd have the player/ai/hippus recall cost for cancelling a contract always be equal to the contract cost, rather than go down over time. Otherwise there are incentives to recall and then put the mercenaries back out there for another lump sum payment after some times has passed (better to incentivize the player/ai/hippus to want to keep their mercenaries employed at all times). Also I think giving up some control over the unit is a needed counterbalance--perhaps recall should have a 10 turn delay, providing some warning for the player about to lose the unit and some need for the hippus to not rent out their entire army and rely on recalls for defense. The recall sum should of course be based on the initial contract price, not increased by any new levels or upgrades or such the unit has earned.
Random mercenary company names (wrote this before seeing your note about the mercenary modcomp, which seems to have its own system, so the below probably is not useful, just leaving in case): I suggest going with an A and a B list of names that make sense together, A being adjectives or verbs and B being nouns. IE:
A) western, northern, southern, eastern, black, white, gray, merciless, reckless, wandering, heroic, stoic, fearless, errant, iron-willed, golden, etc
B) freebooters, brothers, band, wardens, devils, champions, slayers, companions, adventurers, free-spirits, travelers, squires, blades, warriors, dragons, etc
So then you'd get the western wardens, golden blades, gray slayers, reckless brothers, etc.
Some goofy names will inevitably come up, but that's part of the fun.
From referencing mercenary modcomp:you mentioned mercenary units disappearing when hired out by the hippus, from looking over mercenary modcomp changelog I see they added an option to require that any civ wanting to hire a unit out as a mercenary currently have that unit in a city (presumably to fix an exploit involving "my unit is about to die from nearby threats, I'll just send it off to be a mercenary"). Probably best to implement similar restriction if you haven't already, otherwise the implications when combined with the hippus raider trait are quite scary.
Ok, that is everything I could think of. Hopefully some parts of it provide some useful reference. Please don't feel the need to do your usual, very diligent point by point response (unless useful for your own purposes or because you want input on follow-up thoughts), I was just throwing out everything I can think of and I'm sure a good part of it won't make much sense.
EDIT player or ai hippus shouldn't get the additional magic using unit profit, lest the hippus turn into a nation that primarilly builds mages as their mercs as their most profitable option.
EDIT2 did some minor grammer corrections, no changes in any content above
EDIT3: on further reflection, the maintence cost I proposed above would probably be too harsh given both battlefield healing rates and possible transit time to the campaign. Maybe closer to 3 percent of unit build cost in maintenance seems right. Assuming the mechanic will allow you to hire mercs in any city, if not and you are forced to have them appear at the capital, then even lower might be in order, coupled perhaps with the per battle gold deduction to even out unit costs facing long transport times vs smaller civs fighting near their capital.
I also think a delay for arrival after hiring mercs makes sense, both to represent travel time and to keep you from being able to hire them for emergency city defense. Maybe 5 turns?
I also found an interesting paper on mercenaries in western military history:
http://www.personal.psu.edu/~dxl31/research/presentations/mercenary.html
The main points of the article seem to be (not sure of any of these will give you useful ideas, just summarizing):
1) mercenaries tended to be significantly more skilled than common soldiers, and were often hired to get veteran troops (perhaps counseling higher starting levels)
2) mercenaries tended to be paid from monthly or annual payments and looting rights. The second is probably not something that could be easily implemented of course.
3) states tended to purchase mercenaries to cover deficiencies in their own troops (example given was alexander hiring light infantry while darius hired heavy infantry, the opposites of what the greeks and persians themselves had among their own troops)
4) mercenaries tended to be dismissed at the end of wars
5) there was no system of paying compensation for the deaths of soldiers, and rulers often did try to use mercenaries in a reckless manner (so maybe the death payment idea is a bad idea, and there is no reason to disincentivize somewhat risky behavior).
6) However mercenaries would often take independant action to protect themselves, delaying campaigns and prolonging battles.
7) mercenaries sometimes were quite unreliable abandoning armies in the middle of a siege if they didn't agree to double wages and such (perhaps an event triggered by having mercenaries?)
8) mercenaries often earned bonuses for victories in battle
Not sure if any of that historical summary is useful inspiration for gameplay, just since I had read the article anyway (seemed interesting) I thought I might as well share a summary.