A Plaintiff might sue you for $50K in circumstances where you admit that you owe $20K, but no more. If you are a Defendant in these circumstances, you might dig your heels in and "refuse to pay a cent" until proceedings are finished. Unfortunately, at the end of the case, the judge might order you to pay the twenty thousand dollars, PLUS another $20K in costs. It was very expensive to defend that case. To reduce the risk of orders for COSTS, you can an offer to pay the $20K, in an offer that is confidential until the end of proceedings. If the Plaintiff gets less than your settlement offer, you can then tender your offer and say:
The Plaintiff should have accepted my offer. By refusing my offer, the Plaintiff wasted the Court's time, and incurred unnecessary legal costs, and inflicted costs upon me for no good reason. The Plaintiff should pay ALL MY COSTS, since the date of my offer'.
This sort of offer is known as a 'Calderbank Offer'. In Berrigan Shire Council v Ballerini (No 2)  VSCA 65 the Victorian Court of Appeal judge Callaway JA said: "The correct approach is to treat the rejection of a Calderbank offer as a matter to which the Court of Appeal should have regard when considering whether to order indemnity costs. In the end the question is whether the offeree's failure to accept the offer, in all the circumstances, warrants departure from the ordinary rules as to costs. The test to be applied is whether the rejection of the offer was unreasonable in the circumstances." Make your offer 'reasonable' - a generous compromise. It doesn't hurt to add some explanation as to why the Plaintiff should take the money and run, before costs escalate further. Here is a template which you might adapt to your own proceedings.
Defendant's Offer to Settle - 'Calderbank Offer' to reduce the risk of orders for COSTS.