def calc_mod(scores, ability, prof_mod):
    """
    Calculate total modifider. If modifier is positive, add a + before it.
    scores: dictionary of ability scores.
    ability: ability used for roll.
    prof_mod: amount to be added based on proficiency. Always 0 or
        more.
    mod: total modifier to be added to base d20 roll. Can be positive
        or negative.
    pos_neg: "+" if modifier is 0 or greater, empty string if less than 0,
        since a "-" will automatically be used. Typical 5e notation.
    """
    # modifier equation
    mod = int((scores[ability] - 10) / 2 + prof_mod)

    # if modifier is 0 or greater, add a + sign in front.
    if mod >= 0:
        pos_neg = "+"
    else:
        pos_neg = ""

    return pos_neg, mod