def initiate_limbs(life):
	body = life['body']
	
	for limb in body:
		#Unicode fix:
		_val = body[limb].copy()
		del body[limb]
		body[str(limb)] = _val
		body[limb] = body[str(limb)]
		body[limb]['_flags'] = body[limb]['flags'].split('|')
		body[limb]['flags'] = []
		body[limb]['holding'] = []
		body[limb]['cut'] = 0
		body[limb]['bleeding'] = 0
		body[limb]['bruised'] = False
		body[limb]['broken'] = False
		body[limb]['artery_ruptured'] = False
		body[limb]['pain'] = 0
		body[limb]['wounds'] = []
		
		for flag in body[limb]['_flags']:
			if not '[' in flag:
				body[limb]['flags'].append(flag)
				continue
			
			_flag = flag.rstrip(']')
			_key, _value = _flag.split('[')
			
			try:
				body[limb].update(json.loads(_value))
			except:
				logging.error('Limb %s of life type %s has an error in flag %s' % (limb, life['species'], _key))
		
		if 'thickness' in body[limb]:
			body[limb]['max_thickness'] = body[limb]['thickness']
		
		if not 'parent' in body[limb]:
			continue
		
		if not 'children' in body[body[limb]['parent']]:
			body[body[limb]['parent']]['children'] = [str(limb)]
		else:
			body[body[limb]['parent']]['children'].append(str(limb))
Creates skeleton of a character and all related variables. Returns nothing.
dataset/ETHPy150Open flags/Reactor-3/life.py/initiate_limbs