code: def build_dictionary(self):
          
          d = {}
          for t in self.all_tags_of_type(DefinitionTag, recurse_into_sprites = False):
              if t.characterId in d:
                  #print 'redefinition of characterId %d:' % (t.characterId)
                  #print '  was:', d[t.characterId]
                  #print 'redef:', t
                  raise ValueError('illegal redefinition of character')
              d[t.characterId] = t
          return d
docs: Return a dictionary of characterIds to their defining tags.