Dynamics of relational goods with heterogeneous individuals