So by running with a few assumptions made by looking at the DMG we see some interesting results in the details of NPCs with levels (linked above). For example, in a fantasy kingdom of three-quarters of a million people the highest level NPC wizard who isn't specifically placed by the DM should be no higher than about, oh, 7th level, 8th on the outside. That may seem low to many and it certainly is low, especially compared with, oh, Forgotten Realms!
On the other hand the total number of magic-users and illusionists in that same kingdom is about 150! Sure, half of them are 1st level, but that is still a lot of spell casters. If you look at the numbers I crunched on armies (also linked above) it means that you might very well have more arcane spellcasters than you do heavy cavalry.
We should assume that these arcane spellcasters are overwhelmingly in larger urban centers; the need for an education, access to esoteric ingredients, proximity to everything from libraries to bookbinders, and the fact that their training doesn't lend itself to tilling the soil may start the impetus, but the fact that most wealthy clients are also in cities and large towns probably cements the deal. I would personally assume that about 80% of all arcane spellcasters are in urban centers. The rest will be retainers to nobles or researchers, eccentrics, and villains off on their own.
But what do they do? Less than 10 of these arcane spellcasters will be capable of casting a spell of 3rd level or above, so we can probably rule out 'wizards as weapons of war' as an income stream - it simply isn't an option for most of them. We read in the DMG that it is certainly possible to pay spellcasters to cast spells (but not in combat!) so that is probably what they do. So while a player character might be desperate to get a starting spell such as Magic Missile or Burning Hands an NPC is probably just as eager for Comprehend Languages or Magic Aura because the latter spells are money makers. Among those NPC arcane casters capable of 2nd level spells Illusionary Trap and Wizard's Lock are probably much better for building a non-adventuring career than Ray of Enfeeblement. After all, there are probably plenty of wealthy merchants willing to pay for the former and substantially fewer interested in paying for the latter.
Magic-users are educated and literate; they may also earn a living as relatively prestigious scribes, tutors, and copyists. Roles as translators, researchers and even just (because of a relatively high intelligence) advisor may also be seen. These low level mages will almost certainly never be rich (which is probably what separates PCs from NPCs: ambition vs. risk avoidance ratios) but they have a good shot at a comfortable life as (essentially) a skilled artisan.
If you noticed the level maximums assumed, above, none of these NPCs will be high enough level to craft permanent magic items and only a very few for them (1 to 4) will be able to make potions or scrolls. This means that unless you have a large number of existing magic items changing hands there is no place for a shop that buys and sells just magic items in such a kingdom - the volume of trade would simply be far too low to support such a business.
On the other hand, the idea of merchants that cater to arcane spellcasters might very well make sense, especially in larger urban areas. This could range from a bookbinder who makes sure to have such things as blank codexes usable as spell books and rare inks on hand all the way up to a 'magical supply shop' that stocks blank standard and travelling spell books, arcane inks, rare feather quills, the most common spell components for low level spells, specialized equipment (such as portable writing desks and black candles), and even trinkets for familiars.
On the other hand, the concentration of clerics in urban areas, while existing, will be much less extreme mainly because the role of the cleric is to be spiritual leaders of all people. Thus while the large basilicas and cathedrals of larger urban centers will have more clerics the majority will be in villages. Druids will probably be 100% rural! In the same fantasy kingdom mentioned throughout there will almost certainly be an 8th level cleric and their may be one as high as 10th level. There will be somewhere between 135 and 140 clerics (or about 1 cleric per 5,800 people). About a dozen of these clerics will be able to cast Cure Disease or Remove Curse and there may be one who can cast Raise Dead.
Clerics have much less of a need for valuable components, inks, etc. than a magic-user and their other needs (ritual clothing, even a place to live) might be provided by their church, so their impact on the economy will not be as consumers. Instead, clerics will use their skills (literacy, influence) and charity to help the poor and downtrodden. While not as money-direct as arcane casters spending hundreds of gold pennies on ink or charging similar prices to cast Illusionary Trap on a rich merchant's payroll chest a dynamic cleric can reduce crime (via charity, leadership, and such) and invigorate the economy in the poorest quarters of a city by helping others focus on positive growth (those higher wisdom scores in action!) thus increasing tax revenue, decreasing expenses (less need for town watch and jails, etc.) and even reducing the need for those Illusionary Trap spells.
[note: this might cause unscrupulous mages to oppose clerical charity].
In this same vein, let's look at fighters, rangers, and paladins largely as a group. In the same fantasy kingdom there will be about 340 total leveled righters, paladins, and rangers (with over 80% being fighters), which is a pretty serious number. Why? Because if we accept the numbers for a standing army (from that article linked to waaaaay above) then the number of NPC fighter classes with levels is equal to about 1/2 the standing armies of the kingdom. So if there is a major war and there is a full levy at least a large fraction of these leveled NPCs will be available as combat troops.
Look at it this way - assume that the standard formula for orcish forces is, oh,
'for every 30 orcs there are 4 tougher orcs (meaner, tougher, etc.) and for every 120 orcs there is a leader of 2 HD' etc.'If were were to write up the army of this kingdom the same way it would read something like this,
'For every 14 members of the levy there is a veteran soldier (better trained, equipped, etc.) and for every 60 there is a 1st level fighter, ranger, or paladin. Additionally, there is an a fighter, paladin, or ranger of 2nd level or higher for every 120 levy troops. These are in addition to a core leadership of 8 5th to 7th level fighters.'Huh. When you look at it that way the leader ratios, combat abilities, etc. of human armies are actually not too bad, are they?
But all of these professional soldiers/adventurers aren't sitting around farming or doing calligraphy [note: no jokes about knees and arrows, please]. We should assume that they are earning their living fighting, guarding, patrolling, and exploring.
Suddenly we know where at least some of those high-level patrol leaders come from!
These soldiers are going to be spending money on armor, weapons, and horses. Heck, that many leveled NPC fighter types could keep 8 or 9 armorers employed full time! Toss in the standing army and noble troops and you realize soldiers alone could support about 30 armorers, 10 blacksmiths, 12 weapon smiths, 8 bowyer-fletchers, and 6 tailors full time. Add adventurers, distance between groups, DM allocated NPCs, and the desire to make a buck and there are probably no less than 100 skilled artisans employed in the creation and maintenance of the armor and weapons of the various soldiers in the kingdom. This will cascade into the need to provide these artisans themselves with everything from processed iron ingots to bird feathers.
Paladins are a quiet bunch who aren't big consumers of luxury goods. Rangers are typically rural and also focus on their mission. Fighters, though, will be spending their pay. Leveled fighters are going to be paid more than the standing army.
Since Gary tells us that 90% of these 'excess NPCs' are happy with their existing position. While these jobs probably range from being mercenary officers to bodyguards for the rich to caravan security and private watchmen let's assume that they are making roughly what they would make as a mercenary. That is about 124 sergeants, 92 lieutenants, and 9 captains [interestingly enough, there is no place in a band of mercenaries for a 4th level fighter. Are they all trapped in Decks of Many Things?]. Now, I know that PCs are expected to pay mercenaries in hard coin but these NPCs are almost certainly getting the majority of their pay in kind - room, board, clothing, maintenance, etc. This will probably be up to 90% of their compensation with just 10% of the value in actual pay.
This means all of these NPC fighters will be spending "only" 2,000 g.p. a month on ale, gambling, ale, trinkets for pretty girls, ale, lucky charms, and ale.
Hey, I was in the army myself. I know how pay is spent.
So as we can see the NPC warriors are going to have a huge impact on the kingdom's economy being directly responsible for the livelihoods of hundreds of artisans, publicans, servants, and such. They are also a key security element for private individuals and the kingdom as a whole.
There are about 100 thieves among the 'excess' NPCs' (I count these in addition to any thief followers or guild members, remember) with one of them 7th level and maybe one as high as 10th. While many of the 1st and second level thieves are going to be 'freelance' (i.e., not in a guild) pickpockets, petty thieves, and such I personally assume a fair number are in those areas of thievery we don't see often performed by PCs - forgery, smuggling, con games, money laundering, and fencing stolen goods. Money launderers, forgers, and fences in particular can operate with a thieves guild without a) being in the guild or b) angering the guild. Smuggling happens 'in-between' where guilds control and con games are too varied to be more than a nuisance to organized crime/the guilds.
These thieves are going to have an outsize impact on any economy; smugglers often make people happy (cheaper goods) and governments angry (lower tax revenues); forgers make documents suspect; money laundering really upsets governments; fences really upset merchants. The collective impact of all this non-violent crime (more patrols, more private guards, experts to check the veracity of documents, etc.) is going to add just a bit to the costs of everything - taxes are a hair higher to cover smuggling, etc. At least some of the ale I mentioned earlier will be bought by soldiers hired to deal with crime, etc.
There are also about 20 assassins 'freelancing' in the kingdom. With their unique combination of skills they can be anywhere we see thieves or fighters and even some places we see magic-users; bodyguards, smugglers, mercenary lieutenants, even scribes and translators. With at least one 5th level assassin and a possibility of one as high as 10th level there is a surprisingly large amount of professional hit men lurking about. Their economic impact is going to mainly be from their 'day job' although the fees associated with assassination and spying will probably make them quietly rich (at least the successful ones).
The needs of thieves and assassins is going to drive a gray market in things like special equipment (small boats for smugglers, jeweler's tools for forgers, fenced goods, etc.) and a black market (thief tools, poison, stolen goods, blackmail evidence, etc.). There will also be an entire community and communications system hidden within the world of these rogues that may be able to learn things about or get message to people and places no one else can - for a fee.
As you can see, these NPCs 'floating around' in any campaign world are going to have a profound impact on the size and shape of the economy, as well as a host of other things.
I look forward to you comments.