Bath House

Bribes

Every town with a bathhouse has 4 councillors which can be bribed.

Attendance

Between 0 and 4 bribable councillors attend the bath house. The bath house panel has an array of attendance selection timestamps at offset 0xd4, whose entries denote when the attendance in a given town will be updated. These timestamps are updated to now + 0x100 when

  • the bath house window is closed.
  • fast forward is activated.
  • the options screen is opened.
  • any window is opened after the bath house window has just been closed.

The pool of attending councillors is updated when the bath house window is opened and the selection timestamp is smaller than now. Therefore, continuously opening an individual bath house locks the current attendance.

Attendance is decided as follows:

def will_attend(rand: int):
    return rand % 100 < 7

so each councillor has a 7% chance to attend.

Price Formula

The town_calculate_expected_bribe function at 0x00529E20 determines the amount of money the merchant needs to offer for the bribe to be successful.

It defines the following bribe base factors for each rank:

RankBribe Base Factor
Shopkeeper0
Trader1
Merchant2
Travelling Merchant3
Councillor5
Patrician7
Mayor10
Alderman15

The bribe result is calculated as follows:

BRIBE_BASE_FACTORS = [0, 1, 2, 3, 5, 7, 10, 15]

def calculate_expected_bribe(rank: int, rand: int, already_bribed: bool):
    price = 500 * (rand % 11 + 4 * BRIBE_BASE_FACTORS[rank] + 16)
    if already_bribed:
        price *= 2
    return price

def calculate_bribe_result(amount: int, rank: int, rand: int, already_bribed: bool):
    price = calculcate_expected_bribe(rank, rand, already_bribed)
    if amount < price:
        return BribeResult.OK
    elif amount >= price * 1.5:
        return BribeResult.GOOD
    else:
        return BribeResult.FAILED

For unbribed councillors, this produces the following minimum and maximum bribes:

RankMinMax
Shopkeeper800013000
Trader1000015000
Merchant1200017000
Travelling Merchant1400019000
Councillor1800023000
Patrician2200027000
Mayor2800033000
Alderman3800043000

Result

The result can be identified by the councillor's response:

ResultResponse
Ok"Aha, a bribe eh! But all right, I'll take your gold. We'll see what I can do for you at the appointed time."
Good"Oh, that's a very enticing sum. You can be certain of my loyalty."
Failed"What am I supposed to do with this pittance? You ought to realise yourself, that a man in my position expects a little more from someone of your standing."

Both Ok and Good enqueue a Bath House Bribe Success operation, while Failed enqueues a Bath House Bribe Failure operation. The failure operation is bugged, as discussed in the Known Bugs chapter.

Status

The current status of a councillor can be inferred by his lines:

StatusResponse
Bribed by merchant"So we meet again, John Doe. I can very well remember how pleasant our last meeting was."
Bribed by other merchant"Ah! You're here as well, John Doe? I have only very recently spoken to one of your competitors."
Not bribed by anyone, annoyed"Are you there again?! Let me have my bath in peace, please."

The annoyance of a councillor with a given index is bugged and saved globally, as discussed in the Known Bugs chapter.

Limits

The success operation has a check which probably should prevent a merchant from bribing more than 2 councillors in one town. However, this check is bugged, as discussed in the Known Bugs chapter.