The following is something I wrote up a while ago, inspired by OD&D's rules for castle inhabitants and by Arthurian legend. It only applies to castles run by Chaotic Fighters and even this could be developed a bit more. Maybe you want to write up a table for Lawful Magic-Users or Chaotic Clerics?
Unless the party can show evidence they are allied with his allies or are too powerful to risk attacking, or can appeal to his self-interest, a Chaotic lord will exact a heavy toll (which may be more than the party has; this should probably vary by campaign, but 500-1000 gp per level sounds about right in my silver standard game) and if they will not (or cannot) pay will attack with the aim to capture the party and hold them for ransom in the lord’s dungeon (forces should probably be determined during setting creation). The lord will send a messenger to one character (NPC or other, un-captured PC) per captured party member, designated by each party member, asking for a ransom (the original toll multiplied by 2d4). The party will be stripped of all possessions (which will only be returned if 150% of the normal ransom amount is paid), separated from each other 75% of the time and imprisoned in poor conditions. Every month each PC must roll under their Con score or lose a point of Con; any character that loses all Con points dies. Once freed, Con damage is healed at a rate of 1d4 per week of rest in good conditions. If the party is captured:
- 01-50: imprisons them for 2d4 months and then sells them to another chaotic party unless ransom is raised first
- 51-71: imprisons them indefinitely until a ransom is paid.
- 71-85: imprisons indefinitely, but will allow one PC to leave to raise ransom for the rest if the party suggests it
- 86-90: imprisons for ransom indefinitely but will allow all the party, except for one hostage, to leave to raise ransom, if they suggest this
- 91-95: after first ransom is paid, breaks word and holds for second ransom - reroll to determine new terms (which are not told to players)
- 96-00: waits until ransom is paid and then sells the party to another chaotic party.
Other Chaotic party:
- Magic-User, to be used for experiments
- Cult, for sacrifice
- Chaotic military force, to serve as slave-soldiers
- Slave-master, to be used as gladiators
- Slave-driver of engineering project as manual labor - roll under Con each week or lose one Con until freed or Con hits 0 and PC dies
- Slave-trader who takes them to a city with a slave-market and sells each slave separately, splitting the party (roll 1d6)
- Fighters as (1-3) gladiators, (4-5) soldiers, (6) manual labor
- Thieves as (1-3) domestics, (4-5) manual labor, (6) gladiators
- Wizards as (1-3) tutors, (4-5) domestics, (6) manual labor
- Clerics as (1-3) tutors, (4-5) scribes, (6) domestics
Each class has a chance to be bought and freed by some friendly party, increased by membership in organizations like thieves guilds, magic academies, churches, etc. This part is especially sketchy and probably setting-dependent.
Using this will have a few implications for your game. For one, this could seriously change the direction of a campaign. It's hard to imagine a villain the players will hate more than a Chaotic Lord that messes with their plans, likely kills a few of their characters, separates them from their gold and quite likely goes back on his promises as well. The players will want to kill him dead and, if run correctly, will have to do a lot of work to get there. They very well may scrap the rest of their goals for the sake of revenge.
Additionally, a lot of this ransom stuff depends on the PCs having contacts that they can ask to ransom (or rescue; that should definitely be on the table for PCs, but I'd be hesitant to have NPCs rescue the party) them. This means either generating PCs with contacts (like Magic-User masters or church hierarchies), running the game so that PCs form relationships with NPCs that are both able and willing to ransom them, or using a "stable" system where players have multiple PCs that they use for different sessions (or two or three of these options). It won't make a lot of sense if the Chaotic Lord locks them in the dungeon and then asks who he should send the ransom demands to and is met with blank stares because the PCs don't actually know the names of anyone they haven't killed. Unless you want to let them make up contacts. That works too, actually, though I'd prefer the other three options.
Thoughts? Suggestions? Improvements? Your own set of tables for other types of castle lords?