Alright people, this fight is going to be rather ridiculous. By now you are a Stronghold veteran of many battles, and if anyone ever asked you if under any circumstances The Rat is EVER a dangerous threat you would probably laugh and ask if they're a noob. Well it turns out the Rat CAN be dangerous...if there are five of him, but if you can survive the first twenty minutes without incident this quest is not too hard after all.
You start out on a rectangle of desert, with valuable stone and iron to the north and east, with tempting but dangerous grassland down below. With only 2000 gold, 20 archers and a handful of swords and knights, you need to work fast to avoid being murdered immediately. I recommend turning game speed down to 20 until you defeat a couple waves and get some gold going.
There are four or five ways for the Rat horde to come at you, and we need to cover almost all of them.There are two ways from the west, one northern and one more central. To my knowledge the Rats never came from the northwest most entrance so it can (maybe) be ignored, the more central western pathway the yellow Rat will use frequently. If you look to the southeast, you will see a narrow pathway that a second Rat will use frequently. If you look to the southwest corner of your rectangle-island, you will see two more pathways. Sadly, three Rats use these pathways, and it is through those two little bridges that hell will descend upon your butthole.
Place your Trading Post and Granary (set to 1/2 rations for now) and expand the Stockpile for a bit. Buy 25 stone from the market and place three gatehouses at these locations:
The first will go to the southwest, right before the land starts to slope. Rush all but 5-8 of your starting archers onto the gatehouse. the second will be placed east of the first, to answer the southeasternmost entrance. Place your remaining archers there (this number will be insufficient but the southeastern gatehouse can provide some cover). The third will be placed to the west, roughly equidistant to both western entrances, but favor the one more southward. Place your Armory and Barracks, buy in ten bows and recruit the lot, to be placed on the third western gatehouse. Place your starting swords and knights behind your southwestern gatehouse, set to aggressive stance.
You will likely have time before the first attacks to plan your economy (but you won't have much; the Rat may not be a strong rusher alone, but he is among the fastest and their numbers will overwhelm you if you're not careful). Your instinct will be to place farms of your choice along the southern rim of your land, but I promise you will not be able to defend it, yet. Buy in enough wood to place four quarries, two ox tethers apiece, six-ten woodcutters, and hovels to support this population. I would advise waiting on iron mines until your woodcutters start to produce, stone being faster money in general.
As far as food is concerned, you will simply HAVE to buy in food until you have the resources to push back against the tide of spearmen and archers sent to ruin your day. You have three options. The first option is to buy in small amounts of all four food groups. As long as you keep no taxes and sell stone as it comes, this will equal out your popularity and you can remain at half rations. The second option requires investment but is theoretically cheaper overall (I took this option). Buying any food costs 40/5 or 8gp apiece. Buying wheat costs 115/5 or 23 apiece - which will turn into 40 bread if sent through a mill and bakeries. After it is processed this costs roughly one third as much as the final product. The drawback is that it will cost a lot of wood to make the mill, bakeries and hovels to support the operation; these extra workers will also be eating some of the food they produce. The third option (that I thought of just now) is to buy in hops, building breweries and inns to offset your low rations. You will likely have to keep buying in small amounts of food unless you get full inn coverage, but this might be easier overall.
Hopefully you'll have a couple hundred gold left. It will be a risky investment but I suggest to place a fletcher, perhaps two to save you money on the bows you're going to need soon. Try to hold onto a bit of gold in case of emergency and place a mercenary post.
In my playthrough, the first wave of attacks happened roughly all at once, and it was a doozy. Many spearmen in the southwest horde walked past my archers, my swordsmen and knights just keeping them at bay. I feared there were too many enemy archers and perhaps too many spearmen, so I recruited a dozen slingers to back up the southwest gate and repel the attack. Slingers, even with elevation don't have the range of archers, but I decided to reinforce each gatehouse with a handful to assist in case spearmen got too close. The end of the first attack saw my southern gatehouse nearly wiped out (the last archers would die in the second wave) but other than that, so far so good.
Sell off excess stone to buy food or anything else needed. I ended up placing a pair of sentry towers touching all three gatehouses for a little extra range in the initial volleys. You might want to recruit a small force of spearmen or slaves to dig a moat around your lands - the only things we want that are outside are grassland and wood, neither of which we can defend yet. I decided not to but if the going gets tough I recommend it. If you have extra gold, I suggest either a church/cathedral for the instant popularity bump to offset your food costs, and/or placing more fletchers so you have to buy in less bows.
For me it was touch and go for a bit with the southern and western gatehouses - obviously they weren't as well fortified but even with only one Rat apiece it took me a while before they could be properly manned and stopped dying as fast to Rat arrows. Whenever I had extra money I kept placing fletchers, but I found that as time went on the Rat attacks were increasing in power and frequency; whatever they were doing they were making good money from it. I knew I had to take the fight to them if I was going to make progress - and I was tired of wasting money to buying in wheat, wanting farms of my own. I assembled a spare force of 20 archers and camped them on the southern grassland. I bought in five spears to destroy the nearby farms (you should use slaves instead - I had placed my hovels out of the way near those farms and didn't want them to burn) and placed wheat farms - you should use the farms of your preference.
On two separate occasions the Rats retaliated with enough force I had to retreat my little band of annoyance archers back to the safety of a gatehouse. But as long as you keep placing fletchers and producing archers you should be able to outpace the Rats until you can start to outnumber his strike forces. I recommend building blacksmiths and armorers as well, both to start producing melee units of your choice, as well as selling it, since metal weapons sell for more than raw iron.
I placed an engineer's guild and got some fire ballista going above the southeastern Rat., burning his farms. Meanwhile, as my archer force grew I moved west, destroying all the farms on that belt and placing my own. the Rat horde sent a lot of guys to try to stop me, but once I had sixty archers on the field there was little he could do against me.
How you finish each Rat is up to you. The Rat has never been a very difficult enemy, just note that he can and will produce a lot of units very quickly if he senses danger, so maybe bring more than you think you'll need. I sent a force of archers to cover the building of a handful of trebuchets that blasted down the southeastern Rat's gatehouse before sending in macemen to finish him (I'd been selling excess maces to buy in leather). Now that I had some breathing room, I took control of the late Rat's iron and stone, built up my forces, and repeated. On a few occasions one Rat or another sent giant waves of spears and archers at me; just be wary of surprises and you should win the day handily.