The public no longer responded warmly to the traditional Western hero, complete with a white hat and a sheriff’s badge.