Generalized roughening transition and its effect on the string tension