If my partner behaves badly or “messes around”, this will affect the outcome of our divorce.
Let's get the wording safely understood, first! A "divorce", in law, means just the ending of the marriage legally and does not include any issues of money, house, or financial settlement.
The bad behaviour might be part of the grounds for divorce mentioned, by way of "unreasonable behaviour". But in terms of the finances, it is very unlikely that the behaviour will affect the outcome.
Fault in the breakdown of a relationship is not a factor that the court will make any ruling on in the financial settlement aspects of the case and will play no part in it exercising its discretion. Although the court can take very extreme behaviour (or maybe behaviour linked directly to money such as hiding large sums) into account, it is the exception rather than the rule.
Bear in mind that divorce courts hear of all sorts of "bad behaviour" every day, so it has to be really extreme for them to think it so bad as to change a financial entitlement.