d20+ Strength modifier + standard bonuses (level, escalation die, attack penalties) + melee magic item bonuses.
@wpn.m.diceattribute will be your damage dice per level, such as 5d10 for a 5th level fighter with a heavy greatsword. Similarly,
@str.dmgwill be your strength bonus multiplied per tier, such as
+8for a strength of 18 at 5th level.
@wpn.m.dieattribute that will give you a single die, so you could do this to do your level in a different damage die:
min()to select the lower, or
max()to select the higher. For example: