graphics_creatures_portrait_goblin

[OBJECT:GRAPHICS]

[CREATURE_GRAPHICS:GOBLIN]
	[LAYER_SET:BABY:PORTRAIT]

	[LS_PALETTE:BODY]
		[LS_PALETTE_FILE:images/portraits/goblin_portrait_body_palette.png]
		[LS_PALETTE_DEFAULT:0]

	baby
		[LAYER_GROUP]
		[LG_CONDITION_BP:BY_TOKEN:UB]
			[BP_PRESENT]
		[LAYER:BABY_Z_BODY:PORTRAIT_GOBLIN_BABY:0:0]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[USE_PALETTE:BODY:5]
		[LAYER:BABY_N_BODY:PORTRAIT_GOBLIN_BABY:0:0]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[USE_PALETTE:BODY:6]
		[LAYER:BABY_V_BODY:PORTRAIT_GOBLIN_BABY:0:0]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[USE_PALETTE:BODY:7]
		[LAYER:BABY_U_BODY:PORTRAIT_GOBLIN_BABY:0:0]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[USE_PALETTE:BODY:8]
		[LAYER:BABY_G_BODY:PORTRAIT_GOBLIN_BABY:0:0]
			[CONDITION_GHOST]
			[USE_PALETTE:BODY:9]
		[LAYER:BABY_M_BODY:PORTRAIT_GOBLIN_BABY:0:0]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[USE_PALETTE:BODY:10]
		[LAYER:BABY_GL_BODY:PORTRAIT_GOBLIN_BABY:0:0]
			[CONDITION_SYN_CLASS:GHOUL]
			[USE_PALETTE:BODY:11]
		[LAYER:BABY_BODY1:PORTRAIT_GOBLIN_BABY:0:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[USE_PALETTE:BODY:0]
		[LAYER:BABY_BODY2:PORTRAIT_GOBLIN_BABY:0:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[USE_PALETTE:BODY:1]
		[LAYER:BABY_BODY3:PORTRAIT_GOBLIN_BABY:0:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[USE_PALETTE:BODY:2]
		[LAYER:BABY_BODY4:PORTRAIT_GOBLIN_BABY:0:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[USE_PALETTE:BODY:3]
		[END_LAYER_GROUP]

	[LAYER_SET:CHILD:PORTRAIT]

	[LS_PALETTE:BODY]
		[LS_PALETTE_FILE:images/portraits/goblin_portrait_body_palette.png]
		[LS_PALETTE_DEFAULT:0]

	torso
		[LAYER_GROUP]
		[LG_CONDITION_BP:BY_TOKEN:UB]
			[BP_PRESENT]
		[LAYER:Z_BODY:PORTRAIT_GOBLIN_CHILD_BODY:0:0]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[USE_PALETTE:BODY:5]
		[LAYER:N_BODY:PORTRAIT_GOBLIN_CHILD_BODY:0:0]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[USE_PALETTE:BODY:6]
		[LAYER:V_BODY:PORTRAIT_GOBLIN_CHILD_BODY:0:0]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[USE_PALETTE:BODY:7]
		[LAYER:U_BODY:PORTRAIT_GOBLIN_CHILD_BODY:0:0]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[USE_PALETTE:BODY:8]
		[LAYER:G_BODY:PORTRAIT_GOBLIN_CHILD_BODY:0:0]
			[CONDITION_GHOST]
			[USE_PALETTE:BODY:9]
		[LAYER:M_BODY:PORTRAIT_GOBLIN_CHILD_BODY:0:0]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_BODY:PORTRAIT_GOBLIN_CHILD_BODY:0:0]
			[CONDITION_SYN_CLASS:GHOUL]
			[USE_PALETTE:BODY:11]
		[LAYER:BODY1:PORTRAIT_GOBLIN_CHILD_BODY:0:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[USE_PALETTE:BODY:0]
		[LAYER:BODY2:PORTRAIT_GOBLIN_CHILD_BODY:0:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[USE_PALETTE:BODY:1]
		[LAYER:BODY3:PORTRAIT_GOBLIN_CHILD_BODY:0:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[USE_PALETTE:BODY:2]
		[LAYER:BODY4:PORTRAIT_GOBLIN_CHILD_BODY:0:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[USE_PALETTE:BODY:3]
		[END_LAYER_GROUP]

	left arm
		[LAYER_GROUP]
		[LG_CONDITION_BP:BY_TOKEN:LUA]
			[BP_PRESENT]
		[LAYER:Z_LARM:PORTRAIT_GOBLIN_CHILD_BODY:1:0]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[USE_PALETTE:BODY:5]
		[LAYER:N_LARM:PORTRAIT_GOBLIN_CHILD_BODY:1:0]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[USE_PALETTE:BODY:6]
		[LAYER:V_LARM:PORTRAIT_GOBLIN_CHILD_BODY:1:0]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[USE_PALETTE:BODY:7]
		[LAYER:U_LARM:PORTRAIT_GOBLIN_CHILD_BODY:1:0]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[USE_PALETTE:BODY:8]
		[LAYER:G_LARM:PORTRAIT_GOBLIN_CHILD_BODY:1:0]
			[CONDITION_GHOST]
			[USE_PALETTE:BODY:9]
		[LAYER:M_LARM:PORTRAIT_GOBLIN_CHILD_BODY:1:0]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_LARM:PORTRAIT_GOBLIN_CHILD_BODY:1:0]
			[CONDITION_SYN_CLASS:GHOUL]
			[USE_PALETTE:BODY:11]
		[LAYER:LARM1:PORTRAIT_GOBLIN_CHILD_BODY:1:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[USE_PALETTE:BODY:0]
		[LAYER:LARM2:PORTRAIT_GOBLIN_CHILD_BODY:1:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[USE_PALETTE:BODY:1]
		[LAYER:LARM3:PORTRAIT_GOBLIN_CHILD_BODY:1:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[USE_PALETTE:BODY:2]
		[LAYER:LARM4:PORTRAIT_GOBLIN_CHILD_BODY:1:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[USE_PALETTE:BODY:3]
		[END_LAYER_GROUP]

	right arm
		[LAYER_GROUP]
		[LG_CONDITION_BP:BY_TOKEN:RUA]
			[BP_PRESENT]
		[LAYER:Z_RARM:PORTRAIT_GOBLIN_CHILD_BODY:2:0]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[USE_PALETTE:BODY:5]
		[LAYER:N_RARM:PORTRAIT_GOBLIN_CHILD_BODY:2:0]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[USE_PALETTE:BODY:6]
		[LAYER:V_RARM:PORTRAIT_GOBLIN_CHILD_BODY:2:0]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[USE_PALETTE:BODY:7]
		[LAYER:U_RARM:PORTRAIT_GOBLIN_CHILD_BODY:2:0]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[USE_PALETTE:BODY:8]
		[LAYER:G_RARM:PORTRAIT_GOBLIN_CHILD_BODY:2:0]
			[CONDITION_GHOST]
			[USE_PALETTE:BODY:9]
		[LAYER:M_RARM:PORTRAIT_GOBLIN_CHILD_BODY:2:0]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_RARM:PORTRAIT_GOBLIN_CHILD_BODY:2:0]
			[CONDITION_SYN_CLASS:GHOUL]
			[USE_PALETTE:BODY:11]
		[LAYER:RARM1:PORTRAIT_GOBLIN_CHILD_BODY:2:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[USE_PALETTE:BODY:0]
		[LAYER:RARM2:PORTRAIT_GOBLIN_CHILD_BODY:2:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[USE_PALETTE:BODY:1]
		[LAYER:RARM3:PORTRAIT_GOBLIN_CHILD_BODY:2:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[USE_PALETTE:BODY:2]
		[LAYER:RARM4:PORTRAIT_GOBLIN_CHILD_BODY:2:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[USE_PALETTE:BODY:3]
		[END_LAYER_GROUP]

	shirt
		[LAYER_GROUP]
		[LAYER:CLOTHING_SHIRT:PORTRAIT_GOBLIN_CHILD_CLOTHING:0:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_SHIRT:ITEM_ARMOR_DRESS]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]

		[LAYER_GROUP]
		[LAYER:CLOTHING_VEST:PORTRAIT_GOBLIN_CHILD_CLOTHING:0:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_VEST:ITEM_ARMOR_TUNIC]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]

		[LAYER_GROUP]
		[LAYER:CLOTHING_COAT:PORTRAIT_GOBLIN_CHILD_CLOTHING:0:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_COAT:ITEM_ARMOR_ROBE]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]

		[LAYER_GROUP]
		[LAYER:CLOTHING_TOGA:PORTRAIT_GOBLIN_CHILD_CLOTHING:0:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_TOGA]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]

		[LAYER_GROUP]
		[LAYER:CLOTHING_CLOAK:PORTRAIT_GOBLIN_CHILD_CLOTHING:1:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]

		[LAYER_GROUP]
		[LAYER:CLOTHING_CAPE:PORTRAIT_GOBLIN_CHILD_CLOTHING:1:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CAPE]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]

	head
		[LAYER_GROUP]
		[LG_CONDITION_BP:BY_TOKEN:HD]
			[BP_PRESENT]
		[LAYER:Z_HEAD:PORTRAIT_GOBLIN_CHILD_BODY:3:0]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[USE_PALETTE:BODY:5]
		[LAYER:N_HEAD:PORTRAIT_GOBLIN_CHILD_BODY:3:0]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[USE_PALETTE:BODY:6]
		[LAYER:V_HEAD:PORTRAIT_GOBLIN_CHILD_BODY:3:0]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[USE_PALETTE:BODY:7]
		[LAYER:U_HEAD:PORTRAIT_GOBLIN_CHILD_BODY:3:0]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[USE_PALETTE:BODY:8]
		[LAYER:G_HEAD:PORTRAIT_GOBLIN_CHILD_BODY:3:0]
			[CONDITION_GHOST]
			[USE_PALETTE:BODY:9]
		[LAYER:M_HEAD:PORTRAIT_GOBLIN_CHILD_BODY:3:0]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_HEAD:PORTRAIT_GOBLIN_CHILD_BODY:3:0]
			[CONDITION_SYN_CLASS:GHOUL]
			[USE_PALETTE:BODY:11]
		[LAYER:HEAD1:PORTRAIT_GOBLIN_CHILD_BODY:3:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[USE_PALETTE:BODY:0]
		[LAYER:HEAD2:PORTRAIT_GOBLIN_CHILD_BODY:3:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[USE_PALETTE:BODY:1]
		[LAYER:HEAD3:PORTRAIT_GOBLIN_CHILD_BODY:3:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[USE_PALETTE:BODY:2]
		[LAYER:HEAD4:PORTRAIT_GOBLIN_CHILD_BODY:3:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[USE_PALETTE:BODY:3]
		[END_LAYER_GROUP]

	l ear
		[LAYER_GROUP]
		[LG_CONDITION_BP:BY_TOKEN:L_EAR]
			[BP_PRESENT]
		[LAYER:Z_L_EAR1:PORTRAIT_GOBLIN_CHILD_BODY:4:0]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:5]
		[LAYER:N_L_EAR1:PORTRAIT_GOBLIN_CHILD_BODY:4:0]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:6]
		[LAYER:V_L_EAR1:PORTRAIT_GOBLIN_CHILD_BODY:4:0]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:7]
		[LAYER:U_L_EAR1:PORTRAIT_GOBLIN_CHILD_BODY:4:0]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:8]
		[LAYER:G_L_EAR1:PORTRAIT_GOBLIN_CHILD_BODY:4:0]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:9]
		[LAYER:M_L_EAR1:PORTRAIT_GOBLIN_CHILD_BODY:4:0]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_L_EAR1:PORTRAIT_GOBLIN_CHILD_BODY:4:0]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:11]
		[LAYER:L_EAR11:PORTRAIT_GOBLIN_CHILD_BODY:4:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:0]
		[LAYER:L_EAR12:PORTRAIT_GOBLIN_CHILD_BODY:4:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:1]
		[LAYER:L_EAR13:PORTRAIT_GOBLIN_CHILD_BODY:4:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:2]
		[LAYER:L_EAR14:PORTRAIT_GOBLIN_CHILD_BODY:4:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:3]

		[LAYER:Z_L_EAR2:PORTRAIT_GOBLIN_CHILD_BODY:4:1]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:5]
		[LAYER:N_L_EAR2:PORTRAIT_GOBLIN_CHILD_BODY:4:1]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:6]
		[LAYER:V_L_EAR2:PORTRAIT_GOBLIN_CHILD_BODY:4:1]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:7]
		[LAYER:U_L_EAR2:PORTRAIT_GOBLIN_CHILD_BODY:4:1]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:8]
		[LAYER:G_L_EAR2:PORTRAIT_GOBLIN_CHILD_BODY:4:1]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:9]
		[LAYER:M_L_EAR2:PORTRAIT_GOBLIN_CHILD_BODY:4:1]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_L_EAR2:PORTRAIT_GOBLIN_CHILD_BODY:4:1]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:11]
		[LAYER:L_EAR21:PORTRAIT_GOBLIN_CHILD_BODY:4:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:0]
		[LAYER:L_EAR22:PORTRAIT_GOBLIN_CHILD_BODY:4:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:1]
		[LAYER:L_EAR23:PORTRAIT_GOBLIN_CHILD_BODY:4:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:2]
		[LAYER:L_EAR24:PORTRAIT_GOBLIN_CHILD_BODY:4:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:3]
		[END_LAYER_GROUP]

	r ear
		[LAYER_GROUP]
		[LG_CONDITION_BP:BY_TOKEN:R_EAR]
			[BP_PRESENT]
		[LAYER:Z_R_EAR1:PORTRAIT_GOBLIN_CHILD_BODY:5:0]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:5]
		[LAYER:N_R_EAR1:PORTRAIT_GOBLIN_CHILD_BODY:5:0]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:6]
		[LAYER:V_R_EAR1:PORTRAIT_GOBLIN_CHILD_BODY:5:0]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:7]
		[LAYER:U_R_EAR1:PORTRAIT_GOBLIN_CHILD_BODY:5:0]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:8]
		[LAYER:G_R_EAR1:PORTRAIT_GOBLIN_CHILD_BODY:5:0]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:9]
		[LAYER:M_R_EAR1:PORTRAIT_GOBLIN_CHILD_BODY:5:0]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_R_EAR1:PORTRAIT_GOBLIN_CHILD_BODY:5:0]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:11]
		[LAYER:R_EAR11:PORTRAIT_GOBLIN_CHILD_BODY:5:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:0]
		[LAYER:R_EAR12:PORTRAIT_GOBLIN_CHILD_BODY:5:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:1]
		[LAYER:R_EAR13:PORTRAIT_GOBLIN_CHILD_BODY:5:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:2]
		[LAYER:R_EAR14:PORTRAIT_GOBLIN_CHILD_BODY:5:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:3]

		[LAYER:Z_R_EAR2:PORTRAIT_GOBLIN_CHILD_BODY:5:1]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:5]
		[LAYER:N_R_EAR2:PORTRAIT_GOBLIN_CHILD_BODY:5:1]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:6]
		[LAYER:V_R_EAR2:PORTRAIT_GOBLIN_CHILD_BODY:5:1]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:7]
		[LAYER:U_R_EAR2:PORTRAIT_GOBLIN_CHILD_BODY:5:1]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:8]
		[LAYER:G_R_EAR2:PORTRAIT_GOBLIN_CHILD_BODY:5:1]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:9]
		[LAYER:M_R_EAR2:PORTRAIT_GOBLIN_CHILD_BODY:5:1]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_R_EAR2:PORTRAIT_GOBLIN_CHILD_BODY:5:1]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:11]
		[LAYER:R_EAR21:PORTRAIT_GOBLIN_CHILD_BODY:5:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:0]
		[LAYER:R_EAR22:PORTRAIT_GOBLIN_CHILD_BODY:5:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:1]
		[LAYER:R_EAR23:PORTRAIT_GOBLIN_CHILD_BODY:5:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:2]
		[LAYER:R_EAR24:PORTRAIT_GOBLIN_CHILD_BODY:5:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:3]
		[END_LAYER_GROUP]

	mouth
		[LAYER_GROUP]
		[LG_CONDITION_BP:BY_TOKEN:L_LIP]
			[BP_PRESENT]
		[LAYER:Z_MOUTH1:PORTRAIT_GOBLIN_CHILD_BODY:6:0]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:1:3]
			[USE_PALETTE:BODY:5]
		[LAYER:N_MOUTH1:PORTRAIT_GOBLIN_CHILD_BODY:6:0]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:1:3]
			[USE_PALETTE:BODY:6]
		[LAYER:V_MOUTH1:PORTRAIT_GOBLIN_CHILD_BODY:6:0]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:1:3]
			[USE_PALETTE:BODY:7]
		[LAYER:U_MOUTH1:PORTRAIT_GOBLIN_CHILD_BODY:6:0]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:1:3]
			[USE_PALETTE:BODY:8]
		[LAYER:G_MOUTH1:PORTRAIT_GOBLIN_CHILD_BODY:6:0]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:1:3]
			[USE_PALETTE:BODY:9]
		[LAYER:M_MOUTH1:PORTRAIT_GOBLIN_CHILD_BODY:6:0]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:1:3]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_MOUTH1:PORTRAIT_GOBLIN_CHILD_BODY:6:0]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:1:3]
			[USE_PALETTE:BODY:11]
		[LAYER:MOUTH11:PORTRAIT_GOBLIN_CHILD_BODY:6:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:1:3]
			[USE_PALETTE:BODY:0]
		[LAYER:MOUTH12:PORTRAIT_GOBLIN_CHILD_BODY:6:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:1:3]
			[USE_PALETTE:BODY:1]
		[LAYER:MOUTH13:PORTRAIT_GOBLIN_CHILD_BODY:6:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:1:3]
			[USE_PALETTE:BODY:2]
		[LAYER:MOUTH14:PORTRAIT_GOBLIN_CHILD_BODY:6:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:1:3]
			[USE_PALETTE:BODY:3]

		[LAYER:Z_MOUTH2:PORTRAIT_GOBLIN_CHILD_BODY:6:1]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:2:3]
			[USE_PALETTE:BODY:5]
		[LAYER:N_MOUTH2:PORTRAIT_GOBLIN_CHILD_BODY:6:1]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:2:3]
			[USE_PALETTE:BODY:6]
		[LAYER:V_MOUTH2:PORTRAIT_GOBLIN_CHILD_BODY:6:1]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:2:3]
			[USE_PALETTE:BODY:7]
		[LAYER:U_MOUTH2:PORTRAIT_GOBLIN_CHILD_BODY:6:1]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:2:3]
			[USE_PALETTE:BODY:8]
		[LAYER:G_MOUTH2:PORTRAIT_GOBLIN_CHILD_BODY:6:1]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:2:3]
			[USE_PALETTE:BODY:9]
		[LAYER:M_MOUTH2:PORTRAIT_GOBLIN_CHILD_BODY:6:1]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:2:3]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_MOUTH2:PORTRAIT_GOBLIN_CHILD_BODY:6:1]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:2:3]
			[USE_PALETTE:BODY:11]
		[LAYER:MOUTH21:PORTRAIT_GOBLIN_CHILD_BODY:6:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:2:3]
			[USE_PALETTE:BODY:0]
		[LAYER:MOUTH22:PORTRAIT_GOBLIN_CHILD_BODY:6:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:2:3]
			[USE_PALETTE:BODY:1]
		[LAYER:MOUTH23:PORTRAIT_GOBLIN_CHILD_BODY:6:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:2:3]
			[USE_PALETTE:BODY:2]
		[LAYER:MOUTH24:PORTRAIT_GOBLIN_CHILD_BODY:6:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:2:3]
			[USE_PALETTE:BODY:3]

		[LAYER:Z_MOUTH3:PORTRAIT_GOBLIN_CHILD_BODY:6:2]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:3:3]
			[USE_PALETTE:BODY:5]
		[LAYER:N_MOUTH3:PORTRAIT_GOBLIN_CHILD_BODY:6:2]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:3:3]
			[USE_PALETTE:BODY:6]
		[LAYER:V_MOUTH3:PORTRAIT_GOBLIN_CHILD_BODY:6:2]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:3:3]
			[USE_PALETTE:BODY:7]
		[LAYER:U_MOUTH3:PORTRAIT_GOBLIN_CHILD_BODY:6:2]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:3:3]
			[USE_PALETTE:BODY:8]
		[LAYER:G_MOUTH3:PORTRAIT_GOBLIN_CHILD_BODY:6:2]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:3:3]
			[USE_PALETTE:BODY:9]
		[LAYER:M_MOUTH3:PORTRAIT_GOBLIN_CHILD_BODY:6:2]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:3:3]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_MOUTH3:PORTRAIT_GOBLIN_CHILD_BODY:6:2]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:3:3]
			[USE_PALETTE:BODY:11]
		[LAYER:MOUTH31:PORTRAIT_GOBLIN_CHILD_BODY:6:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:3:3]
			[USE_PALETTE:BODY:0]
		[LAYER:MOUTH32:PORTRAIT_GOBLIN_CHILD_BODY:6:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:3:3]
			[USE_PALETTE:BODY:1]
		[LAYER:MOUTH33:PORTRAIT_GOBLIN_CHILD_BODY:6:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:3:3]
			[USE_PALETTE:BODY:2]
		[LAYER:MOUTH34:PORTRAIT_GOBLIN_CHILD_BODY:6:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:3:3]
			[USE_PALETTE:BODY:3]
		[END_LAYER_GROUP]

	eyes
		[LAYER_GROUP]
		[LG_CONDITION_BP:BY_TOKEN:HD]
			[BP_PRESENT]
		[LAYER:Z_EYES1:PORTRAIT_GOBLIN_CHILD_BODY:7:0]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:EYES:1:3]
			[USE_PALETTE:BODY:5]
		[LAYER:N_EYES1:PORTRAIT_GOBLIN_CHILD_BODY:7:0]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:EYES:1:3]
			[USE_PALETTE:BODY:6]
		[LAYER:V_EYES1:PORTRAIT_GOBLIN_CHILD_BODY:7:0]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:EYES:1:3]
			[USE_PALETTE:BODY:7]
		[LAYER:U_EYES1:PORTRAIT_GOBLIN_CHILD_BODY:7:0]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:EYES:1:3]
			[USE_PALETTE:BODY:8]
		[LAYER:G_EYES1:PORTRAIT_GOBLIN_CHILD_BODY:7:0]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:EYES:1:3]
			[USE_PALETTE:BODY:9]
		[LAYER:M_EYES1:PORTRAIT_GOBLIN_CHILD_BODY:7:0]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:EYES:1:3]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_EYES1:PORTRAIT_GOBLIN_CHILD_BODY:7:0]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:EYES:1:3]
			[USE_PALETTE:BODY:11]
		[LAYER:EYES11:PORTRAIT_GOBLIN_CHILD_BODY:7:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EYES:1:3]
			[USE_PALETTE:BODY:0]
		[LAYER:EYES12:PORTRAIT_GOBLIN_CHILD_BODY:7:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EYES:1:3]
			[USE_PALETTE:BODY:1]
		[LAYER:EYES13:PORTRAIT_GOBLIN_CHILD_BODY:7:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EYES:1:3]
			[USE_PALETTE:BODY:2]
		[LAYER:EYES14:PORTRAIT_GOBLIN_CHILD_BODY:7:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:EYES:1:3]
			[USE_PALETTE:BODY:3]

		[LAYER:Z_EYES2:PORTRAIT_GOBLIN_CHILD_BODY:7:1]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:EYES:2:3]
			[USE_PALETTE:BODY:5]
		[LAYER:N_EYES2:PORTRAIT_GOBLIN_CHILD_BODY:7:1]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:EYES:2:3]
			[USE_PALETTE:BODY:6]
		[LAYER:V_EYES2:PORTRAIT_GOBLIN_CHILD_BODY:7:1]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:EYES:2:3]
			[USE_PALETTE:BODY:7]
		[LAYER:U_EYES2:PORTRAIT_GOBLIN_CHILD_BODY:7:1]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:EYES:2:3]
			[USE_PALETTE:BODY:8]
		[LAYER:G_EYES2:PORTRAIT_GOBLIN_CHILD_BODY:7:1]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:EYES:2:3]
			[USE_PALETTE:BODY:9]
		[LAYER:M_EYES2:PORTRAIT_GOBLIN_CHILD_BODY:7:1]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:EYES:2:3]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_EYES2:PORTRAIT_GOBLIN_CHILD_BODY:7:1]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:EYES:2:3]
			[USE_PALETTE:BODY:11]
		[LAYER:EYES21:PORTRAIT_GOBLIN_CHILD_BODY:7:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EYES:2:3]
			[USE_PALETTE:BODY:0]
		[LAYER:EYES22:PORTRAIT_GOBLIN_CHILD_BODY:7:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EYES:2:3]
			[USE_PALETTE:BODY:1]
		[LAYER:EYES23:PORTRAIT_GOBLIN_CHILD_BODY:7:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EYES:2:3]
			[USE_PALETTE:BODY:2]
		[LAYER:EYES24:PORTRAIT_GOBLIN_CHILD_BODY:7:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:EYES:2:3]
			[USE_PALETTE:BODY:3]

		[LAYER:Z_EYES3:PORTRAIT_GOBLIN_CHILD_BODY:7:2]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:EYES:3:3]
			[USE_PALETTE:BODY:5]
		[LAYER:N_EYES3:PORTRAIT_GOBLIN_CHILD_BODY:7:2]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:EYES:3:3]
			[USE_PALETTE:BODY:6]
		[LAYER:V_EYES3:PORTRAIT_GOBLIN_CHILD_BODY:7:2]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:EYES:3:3]
			[USE_PALETTE:BODY:7]
		[LAYER:U_EYES3:PORTRAIT_GOBLIN_CHILD_BODY:7:2]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:EYES:3:3]
			[USE_PALETTE:BODY:8]
		[LAYER:G_EYES3:PORTRAIT_GOBLIN_CHILD_BODY:7:2]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:EYES:3:3]
			[USE_PALETTE:BODY:9]
		[LAYER:M_EYES3:PORTRAIT_GOBLIN_CHILD_BODY:7:2]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:EYES:3:3]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_EYES3:PORTRAIT_GOBLIN_CHILD_BODY:7:2]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:EYES:3:3]
			[USE_PALETTE:BODY:11]
		[LAYER:EYES31:PORTRAIT_GOBLIN_CHILD_BODY:7:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EYES:3:3]
			[USE_PALETTE:BODY:0]
		[LAYER:EYES32:PORTRAIT_GOBLIN_CHILD_BODY:7:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EYES:3:3]
			[USE_PALETTE:BODY:1]
		[LAYER:EYES33:PORTRAIT_GOBLIN_CHILD_BODY:7:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EYES:3:3]
			[USE_PALETTE:BODY:2]
		[LAYER:EYES34:PORTRAIT_GOBLIN_CHILD_BODY:7:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:EYES:3:3]
			[USE_PALETTE:BODY:3]
		[END_LAYER_GROUP]

	wound
		[LAYER_GROUP]
		[LAYER:EYE_L_MISSING:PORTRAIT_GOBLIN_CHILD_BODY:9:0]
			[CONDITION_BP:BY_TOKEN:HD]
				[BP_PRESENT]
			[CONDITION_BP:BY_TOKEN:LEYE]
				[BP_MISSING]
		[LAYER:EYE_R_MISSING:PORTRAIT_GOBLIN_CHILD_BODY:9:0]
			[CONDITION_BP:BY_TOKEN:HD]
				[BP_PRESENT]
			[CONDITION_BP:BY_TOKEN:REYE]
				[BP_MISSING]
		[LAYER:NOSE_MISSING:PORTRAIT_GOBLIN_CHILD_BODY:9:0]
			[CONDITION_BP:BY_TOKEN:HD]
				[BP_PRESENT]
			[CONDITION_BP:BY_TOKEN:NOSE]
				[BP_MISSING]
		[END_LAYER_GROUP]

	nose
		[LAYER_GROUP]
		[LG_CONDITION_BP:BY_TOKEN:NOSE]
			[BP_PRESENT]
		[LAYER:Z_NOSE1:PORTRAIT_GOBLIN_CHILD_BODY:8:0]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:1:6]
			[USE_PALETTE:BODY:5]
		[LAYER:N_NOSE1:PORTRAIT_GOBLIN_CHILD_BODY:8:0]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:NOSE:1:6]
			[USE_PALETTE:BODY:6]
		[LAYER:V_NOSE1:PORTRAIT_GOBLIN_CHILD_BODY:8:0]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:1:6]
			[USE_PALETTE:BODY:7]
		[LAYER:U_NOSE1:PORTRAIT_GOBLIN_CHILD_BODY:8:0]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:1:6]
			[USE_PALETTE:BODY:8]
		[LAYER:G_NOSE1:PORTRAIT_GOBLIN_CHILD_BODY:8:0]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:NOSE:1:6]
			[USE_PALETTE:BODY:9]
		[LAYER:M_NOSE1:PORTRAIT_GOBLIN_CHILD_BODY:8:0]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:1:6]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_NOSE1:PORTRAIT_GOBLIN_CHILD_BODY:8:0]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:NOSE:1:6]
			[USE_PALETTE:BODY:11]
		[LAYER:NOSE11:PORTRAIT_GOBLIN_CHILD_BODY:8:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:1:6]
			[USE_PALETTE:BODY:0]
		[LAYER:NOSE12:PORTRAIT_GOBLIN_CHILD_BODY:8:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:1:6]
			[USE_PALETTE:BODY:1]
		[LAYER:NOSE13:PORTRAIT_GOBLIN_CHILD_BODY:8:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:1:6]
			[USE_PALETTE:BODY:2]
		[LAYER:NOSE14:PORTRAIT_GOBLIN_CHILD_BODY:8:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:NOSE:1:6]
			[USE_PALETTE:BODY:3]

		[LAYER:Z_NOSE2:PORTRAIT_GOBLIN_CHILD_BODY:8:1]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:2:6]
			[USE_PALETTE:BODY:5]
		[LAYER:N_NOSE2:PORTRAIT_GOBLIN_CHILD_BODY:8:1]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:NOSE:2:6]
			[USE_PALETTE:BODY:6]
		[LAYER:V_NOSE2:PORTRAIT_GOBLIN_CHILD_BODY:8:1]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:2:6]
			[USE_PALETTE:BODY:7]
		[LAYER:U_NOSE2:PORTRAIT_GOBLIN_CHILD_BODY:8:1]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:2:6]
			[USE_PALETTE:BODY:8]
		[LAYER:G_NOSE2:PORTRAIT_GOBLIN_CHILD_BODY:8:1]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:NOSE:2:6]
			[USE_PALETTE:BODY:9]
		[LAYER:M_NOSE2:PORTRAIT_GOBLIN_CHILD_BODY:8:1]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:2:6]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_NOSE2:PORTRAIT_GOBLIN_CHILD_BODY:8:1]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:NOSE:2:6]
			[USE_PALETTE:BODY:11]
		[LAYER:NOSE21:PORTRAIT_GOBLIN_CHILD_BODY:8:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:2:6]
			[USE_PALETTE:BODY:0]
		[LAYER:NOSE22:PORTRAIT_GOBLIN_CHILD_BODY:8:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:2:6]
			[USE_PALETTE:BODY:1]
		[LAYER:NOSE23:PORTRAIT_GOBLIN_CHILD_BODY:8:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:2:6]
			[USE_PALETTE:BODY:2]
		[LAYER:NOSE24:PORTRAIT_GOBLIN_CHILD_BODY:8:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:NOSE:2:6]
			[USE_PALETTE:BODY:3]

		[LAYER:Z_NOSE3:PORTRAIT_GOBLIN_CHILD_BODY:8:2]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:3:6]
			[USE_PALETTE:BODY:5]
		[LAYER:N_NOSE3:PORTRAIT_GOBLIN_CHILD_BODY:8:2]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:NOSE:3:6]
			[USE_PALETTE:BODY:6]
		[LAYER:V_NOSE3:PORTRAIT_GOBLIN_CHILD_BODY:8:2]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:3:6]
			[USE_PALETTE:BODY:7]
		[LAYER:U_NOSE3:PORTRAIT_GOBLIN_CHILD_BODY:8:2]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:3:6]
			[USE_PALETTE:BODY:8]
		[LAYER:G_NOSE3:PORTRAIT_GOBLIN_CHILD_BODY:8:2]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:NOSE:3:6]
			[USE_PALETTE:BODY:9]
		[LAYER:M_NOSE3:PORTRAIT_GOBLIN_CHILD_BODY:8:2]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:3:6]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_NOSE3:PORTRAIT_GOBLIN_CHILD_BODY:8:2]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:NOSE:3:6]
			[USE_PALETTE:BODY:11]
		[LAYER:NOSE31:PORTRAIT_GOBLIN_CHILD_BODY:8:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:3:6]
			[USE_PALETTE:BODY:0]
		[LAYER:NOSE32:PORTRAIT_GOBLIN_CHILD_BODY:8:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:3:6]
			[USE_PALETTE:BODY:1]
		[LAYER:NOSE33:PORTRAIT_GOBLIN_CHILD_BODY:8:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:3:6]
			[USE_PALETTE:BODY:2]
		[LAYER:NOSE34:PORTRAIT_GOBLIN_CHILD_BODY:8:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:NOSE:3:6]
			[USE_PALETTE:BODY:3]

		[LAYER:Z_NOSE4:PORTRAIT_GOBLIN_CHILD_BODY:8:3]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:4:6]
			[USE_PALETTE:BODY:5]
		[LAYER:N_NOSE4:PORTRAIT_GOBLIN_CHILD_BODY:8:3]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:NOSE:4:6]
			[USE_PALETTE:BODY:6]
		[LAYER:V_NOSE4:PORTRAIT_GOBLIN_CHILD_BODY:8:3]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:4:6]
			[USE_PALETTE:BODY:7]
		[LAYER:U_NOSE4:PORTRAIT_GOBLIN_CHILD_BODY:8:3]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:4:6]
			[USE_PALETTE:BODY:8]
		[LAYER:G_NOSE4:PORTRAIT_GOBLIN_CHILD_BODY:8:3]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:NOSE:4:6]
			[USE_PALETTE:BODY:9]
		[LAYER:M_NOSE4:PORTRAIT_GOBLIN_CHILD_BODY:8:3]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:4:6]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_NOSE4:PORTRAIT_GOBLIN_CHILD_BODY:8:3]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:NOSE:4:6]
			[USE_PALETTE:BODY:11]
		[LAYER:NOSE41:PORTRAIT_GOBLIN_CHILD_BODY:8:3]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:4:6]
			[USE_PALETTE:BODY:0]
		[LAYER:NOSE42:PORTRAIT_GOBLIN_CHILD_BODY:8:3]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:4:6]
			[USE_PALETTE:BODY:1]
		[LAYER:NOSE43:PORTRAIT_GOBLIN_CHILD_BODY:8:3]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:4:6]
			[USE_PALETTE:BODY:2]
		[LAYER:NOSE44:PORTRAIT_GOBLIN_CHILD_BODY:8:3]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:NOSE:4:6]
			[USE_PALETTE:BODY:3]

		[LAYER:Z_NOSE5:PORTRAIT_GOBLIN_CHILD_BODY:8:4]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:5:6]
			[USE_PALETTE:BODY:5]
		[LAYER:N_NOSE5:PORTRAIT_GOBLIN_CHILD_BODY:8:4]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:NOSE:5:6]
			[USE_PALETTE:BODY:6]
		[LAYER:V_NOSE5:PORTRAIT_GOBLIN_CHILD_BODY:8:4]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:5:6]
			[USE_PALETTE:BODY:7]
		[LAYER:U_NOSE5:PORTRAIT_GOBLIN_CHILD_BODY:8:4]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:5:6]
			[USE_PALETTE:BODY:8]
		[LAYER:G_NOSE5:PORTRAIT_GOBLIN_CHILD_BODY:8:4]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:NOSE:5:6]
			[USE_PALETTE:BODY:9]
		[LAYER:M_NOSE5:PORTRAIT_GOBLIN_CHILD_BODY:8:4]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:5:6]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_NOSE5:PORTRAIT_GOBLIN_CHILD_BODY:8:4]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:NOSE:5:6]
			[USE_PALETTE:BODY:11]
		[LAYER:NOSE51:PORTRAIT_GOBLIN_CHILD_BODY:8:4]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:5:6]
			[USE_PALETTE:BODY:0]
		[LAYER:NOSE52:PORTRAIT_GOBLIN_CHILD_BODY:8:4]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:5:6]
			[USE_PALETTE:BODY:1]
		[LAYER:NOSE53:PORTRAIT_GOBLIN_CHILD_BODY:8:4]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:5:6]
			[USE_PALETTE:BODY:2]
		[LAYER:NOSE54:PORTRAIT_GOBLIN_CHILD_BODY:8:4]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:NOSE:5:6]
			[USE_PALETTE:BODY:3]

		[LAYER:Z_NOSE6:PORTRAIT_GOBLIN_CHILD_BODY:8:5]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:6:6]
			[USE_PALETTE:BODY:5]
		[LAYER:N_NOSE6:PORTRAIT_GOBLIN_CHILD_BODY:8:5]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:NOSE:6:6]
			[USE_PALETTE:BODY:6]
		[LAYER:V_NOSE6:PORTRAIT_GOBLIN_CHILD_BODY:8:5]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:6:6]
			[USE_PALETTE:BODY:7]
		[LAYER:U_NOSE6:PORTRAIT_GOBLIN_CHILD_BODY:8:5]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:6:6]
			[USE_PALETTE:BODY:8]
		[LAYER:G_NOSE6:PORTRAIT_GOBLIN_CHILD_BODY:8:5]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:NOSE:6:6]
			[USE_PALETTE:BODY:9]
		[LAYER:M_NOSE6:PORTRAIT_GOBLIN_CHILD_BODY:8:5]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:6:6]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_NOSE6:PORTRAIT_GOBLIN_CHILD_BODY:8:5]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:NOSE:6:6]
			[USE_PALETTE:BODY:11]
		[LAYER:NOSE61:PORTRAIT_GOBLIN_CHILD_BODY:8:5]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:6:6]
			[USE_PALETTE:BODY:0]
		[LAYER:NOSE62:PORTRAIT_GOBLIN_CHILD_BODY:8:5]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:6:6]
			[USE_PALETTE:BODY:1]
		[LAYER:NOSE63:PORTRAIT_GOBLIN_CHILD_BODY:8:5]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:6:6]
			[USE_PALETTE:BODY:2]
		[LAYER:NOSE64:PORTRAIT_GOBLIN_CHILD_BODY:8:5]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:NOSE:6:6]
			[USE_PALETTE:BODY:3]

		[END_LAYER_GROUP]

	veil
		[LAYER_GROUP]
		[LAYER:CLOTHING_MASK:PORTRAIT_GOBLIN_CHILD_CLOTHING:2:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_MASK]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]

		[LAYER_GROUP]
		[LAYER:CLOTHING_VEIL_FACE:PORTRAIT_GOBLIN_CHILD_CLOTHING:2:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_FACE]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]

	hat
		[LAYER_GROUP]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CHILD_CLOTHING:3:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_TURBAN:PORTRAIT_GOBLIN_CHILD_CLOTHING:3:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_TURBAN]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEIL_HEAD:PORTRAIT_GOBLIN_CHILD_CLOTHING:3:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_HEAD]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SCARF_HEAD:PORTRAIT_GOBLIN_CHILD_CLOTHING:3:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_SCARF_HEAD]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_HOOD:PORTRAIT_GOBLIN_CHILD_CLOTHING:3:4]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HOOD]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]

	[LAYER_SET:PORTRAIT]

	[LS_PALETTE:BODY]
		[LS_PALETTE_FILE:images/portraits/goblin_portrait_body_palette.png]
		[LS_PALETTE_DEFAULT:0]

	shadows
		[LAYER_GROUP]
		[LAYER:CAPE_SHADOW:PORTRAIT_GOBLIN_CLOTHING_CAPE:0:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CAPE]
			[CONDITION_RANDOM_PART_INDEX:CAPE:1:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CAPE_SHADOW:PORTRAIT_GOBLIN_CLOTHING_CAPE:0:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CAPE]
			[CONDITION_RANDOM_PART_INDEX:CAPE:2:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]

		[LAYER_GROUP]
		[LAYER:VEIL_HEAD_SHADOW:PORTRAIT_GOBLIN_CLOTHING_VEIL_HEAD:0:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_HEAD]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:HOOD_SHADOW:PORTRAIT_GOBLIN_CLOTHING_HOOD:0:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HOOD]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]

	torso
		[LAYER_GROUP]
		[LG_CONDITION_BP:BY_TOKEN:UB]
			[BP_PRESENT]
		[LAYER:Z_BODY:PORTRAIT_GOBLIN_BODY:0:0]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[USE_PALETTE:BODY:5]
		[LAYER:N_BODY:PORTRAIT_GOBLIN_BODY:0:0]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[USE_PALETTE:BODY:6]
		[LAYER:V_BODY:PORTRAIT_GOBLIN_BODY:0:0]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[USE_PALETTE:BODY:7]
		[LAYER:U_BODY:PORTRAIT_GOBLIN_BODY:0:0]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[USE_PALETTE:BODY:8]
		[LAYER:G_BODY:PORTRAIT_GOBLIN_BODY:0:0]
			[CONDITION_GHOST]
			[USE_PALETTE:BODY:9]
		[LAYER:M_BODY:PORTRAIT_GOBLIN_BODY:0:0]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_BODY:PORTRAIT_GOBLIN_BODY:0:0]
			[CONDITION_SYN_CLASS:GHOUL]
			[USE_PALETTE:BODY:11]
		[LAYER:BODY1:PORTRAIT_GOBLIN_BODY:0:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[USE_PALETTE:BODY:0]
		[LAYER:BODY2:PORTRAIT_GOBLIN_BODY:0:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[USE_PALETTE:BODY:1]
		[LAYER:BODY3:PORTRAIT_GOBLIN_BODY:0:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[USE_PALETTE:BODY:2]
		[LAYER:BODY4:PORTRAIT_GOBLIN_BODY:0:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[USE_PALETTE:BODY:3]
		[END_LAYER_GROUP]

	left arm
		[LAYER_GROUP]
		[LG_CONDITION_BP:BY_TOKEN:LUA]
			[BP_PRESENT]
		[LAYER:Z_LARM:PORTRAIT_GOBLIN_BODY:1:0]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[USE_PALETTE:BODY:5]
		[LAYER:N_LARM:PORTRAIT_GOBLIN_BODY:1:0]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[USE_PALETTE:BODY:6]
		[LAYER:V_LARM:PORTRAIT_GOBLIN_BODY:1:0]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[USE_PALETTE:BODY:7]
		[LAYER:U_LARM:PORTRAIT_GOBLIN_BODY:1:0]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[USE_PALETTE:BODY:8]
		[LAYER:G_LARM:PORTRAIT_GOBLIN_BODY:1:0]
			[CONDITION_GHOST]
			[USE_PALETTE:BODY:9]
		[LAYER:M_LARM:PORTRAIT_GOBLIN_BODY:1:0]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_LARM:PORTRAIT_GOBLIN_BODY:1:0]
			[CONDITION_SYN_CLASS:GHOUL]
			[USE_PALETTE:BODY:11]
		[LAYER:LARM1:PORTRAIT_GOBLIN_BODY:1:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[USE_PALETTE:BODY:0]
		[LAYER:LARM2:PORTRAIT_GOBLIN_BODY:1:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[USE_PALETTE:BODY:1]
		[LAYER:LARM3:PORTRAIT_GOBLIN_BODY:1:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[USE_PALETTE:BODY:2]
		[LAYER:LARM4:PORTRAIT_GOBLIN_BODY:1:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[USE_PALETTE:BODY:3]
		[END_LAYER_GROUP]

	right arm
		[LAYER_GROUP]
		[LG_CONDITION_BP:BY_TOKEN:RUA]
			[BP_PRESENT]
		[LAYER:Z_RARM:PORTRAIT_GOBLIN_BODY:2:0]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[USE_PALETTE:BODY:5]
		[LAYER:N_RARM:PORTRAIT_GOBLIN_BODY:2:0]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[USE_PALETTE:BODY:6]
		[LAYER:V_RARM:PORTRAIT_GOBLIN_BODY:2:0]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[USE_PALETTE:BODY:7]
		[LAYER:U_RARM:PORTRAIT_GOBLIN_BODY:2:0]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[USE_PALETTE:BODY:8]
		[LAYER:G_RARM:PORTRAIT_GOBLIN_BODY:2:0]
			[CONDITION_GHOST]
			[USE_PALETTE:BODY:9]
		[LAYER:M_RARM:PORTRAIT_GOBLIN_BODY:2:0]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_RARM:PORTRAIT_GOBLIN_BODY:2:0]
			[CONDITION_SYN_CLASS:GHOUL]
			[USE_PALETTE:BODY:11]
		[LAYER:RARM1:PORTRAIT_GOBLIN_BODY:2:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[USE_PALETTE:BODY:0]
		[LAYER:RARM2:PORTRAIT_GOBLIN_BODY:2:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[USE_PALETTE:BODY:1]
		[LAYER:RARM3:PORTRAIT_GOBLIN_BODY:2:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[USE_PALETTE:BODY:2]
		[LAYER:RARM4:PORTRAIT_GOBLIN_BODY:2:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[USE_PALETTE:BODY:3]
		[END_LAYER_GROUP]

	underclothes
		[LAYER_GROUP]
		[LG_CONDITION_BP:BY_TOKEN:UB]
			[BP_PRESENT]
		[LAYER:UNDERCLOTHES:PORTRAIT_GOBLIN_CLOTHING_UNDER:0:0]
			[CONDITION_CASTE:FEMALE]
		[END_LAYER_GROUP]

	shirt
		[LAYER_GROUP]
		[LAYER:CLOTHING_SHIRT:PORTRAIT_GOBLIN_CLOTHING_SHIRT:6:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_SHIRT:ITEM_ARMOR_DRESS]
			[CONDITION_MATERIAL_FLAG:IS_CRAFTED_ARTIFACT]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SHIRT:PORTRAIT_GOBLIN_CLOTHING_SHIRT:5:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_SHIRT:ITEM_ARMOR_DRESS]
			[ITEM_QUALITY:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SHIRT:PORTRAIT_GOBLIN_CLOTHING_SHIRT:4:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_SHIRT:ITEM_ARMOR_DRESS]
			[ITEM_QUALITY:4]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SHIRT:PORTRAIT_GOBLIN_CLOTHING_SHIRT:3:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_SHIRT:ITEM_ARMOR_DRESS]
			[ITEM_QUALITY:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SHIRT:PORTRAIT_GOBLIN_CLOTHING_SHIRT:2:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_SHIRT:ITEM_ARMOR_DRESS]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:SHIRT:1:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SHIRT:PORTRAIT_GOBLIN_CLOTHING_SHIRT:1:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_SHIRT:ITEM_ARMOR_DRESS]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:SHIRT:1:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SHIRT:PORTRAIT_GOBLIN_CLOTHING_SHIRT:0:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_SHIRT:ITEM_ARMOR_DRESS]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:SHIRT:1:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SHIRT:PORTRAIT_GOBLIN_CLOTHING_SHIRT:2:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_SHIRT:ITEM_ARMOR_DRESS]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:SHIRT:2:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SHIRT:PORTRAIT_GOBLIN_CLOTHING_SHIRT:1:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_SHIRT:ITEM_ARMOR_DRESS]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:SHIRT:2:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SHIRT:PORTRAIT_GOBLIN_CLOTHING_SHIRT:0:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_SHIRT:ITEM_ARMOR_DRESS]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:SHIRT:2:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SHIRT:PORTRAIT_GOBLIN_CLOTHING_SHIRT:2:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_SHIRT:ITEM_ARMOR_DRESS]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:SHIRT:3:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SHIRT:PORTRAIT_GOBLIN_CLOTHING_SHIRT:1:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_SHIRT:ITEM_ARMOR_DRESS]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:SHIRT:3:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SHIRT:PORTRAIT_GOBLIN_CLOTHING_SHIRT:0:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_SHIRT:ITEM_ARMOR_DRESS]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:SHIRT:3:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SHIRT:PORTRAIT_GOBLIN_CLOTHING_SHIRT:2:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_SHIRT:ITEM_ARMOR_DRESS]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:SHIRT:4:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SHIRT:PORTRAIT_GOBLIN_CLOTHING_SHIRT:1:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_SHIRT:ITEM_ARMOR_DRESS]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:SHIRT:4:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SHIRT:PORTRAIT_GOBLIN_CLOTHING_SHIRT:0:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_SHIRT:ITEM_ARMOR_DRESS]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:SHIRT:4:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SHIRT:PORTRAIT_GOBLIN_CLOTHING_SHIRT:2:4]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_SHIRT:ITEM_ARMOR_DRESS]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:SHIRT:5:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SHIRT:PORTRAIT_GOBLIN_CLOTHING_SHIRT:1:4]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_SHIRT:ITEM_ARMOR_DRESS]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:SHIRT:5:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SHIRT:PORTRAIT_GOBLIN_CLOTHING_SHIRT:0:4]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_SHIRT:ITEM_ARMOR_DRESS]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:SHIRT:5:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]

		[LAYER_GROUP]
		[LAYER:CLOTHING_VEST:PORTRAIT_GOBLIN_CLOTHING_VEST:6:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_VEST:ITEM_ARMOR_TUNIC]
			[CONDITION_MATERIAL_FLAG:IS_CRAFTED_ARTIFACT]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEST:PORTRAIT_GOBLIN_CLOTHING_VEST:5:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_VEST:ITEM_ARMOR_TUNIC]
			[ITEM_QUALITY:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEST:PORTRAIT_GOBLIN_CLOTHING_VEST:4:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_VEST:ITEM_ARMOR_TUNIC]
			[ITEM_QUALITY:4]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEST:PORTRAIT_GOBLIN_CLOTHING_VEST:3:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_VEST:ITEM_ARMOR_TUNIC]
			[ITEM_QUALITY:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEST:PORTRAIT_GOBLIN_CLOTHING_VEST:2:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_VEST:ITEM_ARMOR_TUNIC]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:VEST:1:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEST:PORTRAIT_GOBLIN_CLOTHING_VEST:1:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_VEST:ITEM_ARMOR_TUNIC]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:VEST:1:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEST:PORTRAIT_GOBLIN_CLOTHING_VEST:0:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_VEST:ITEM_ARMOR_TUNIC]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:VEST:1:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEST:PORTRAIT_GOBLIN_CLOTHING_VEST:2:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_VEST:ITEM_ARMOR_TUNIC]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:VEST:2:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEST:PORTRAIT_GOBLIN_CLOTHING_VEST:1:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_VEST:ITEM_ARMOR_TUNIC]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:VEST:2:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEST:PORTRAIT_GOBLIN_CLOTHING_VEST:0:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_VEST:ITEM_ARMOR_TUNIC]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:VEST:2:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEST:PORTRAIT_GOBLIN_CLOTHING_VEST:2:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_VEST:ITEM_ARMOR_TUNIC]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:VEST:3:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEST:PORTRAIT_GOBLIN_CLOTHING_VEST:1:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_VEST:ITEM_ARMOR_TUNIC]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:VEST:3:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEST:PORTRAIT_GOBLIN_CLOTHING_VEST:0:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_VEST:ITEM_ARMOR_TUNIC]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:VEST:3:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEST:PORTRAIT_GOBLIN_CLOTHING_VEST:2:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_VEST:ITEM_ARMOR_TUNIC]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:VEST:4:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEST:PORTRAIT_GOBLIN_CLOTHING_VEST:1:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_VEST:ITEM_ARMOR_TUNIC]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:VEST:4:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEST:PORTRAIT_GOBLIN_CLOTHING_VEST:0:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_VEST:ITEM_ARMOR_TUNIC]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:VEST:4:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEST:PORTRAIT_GOBLIN_CLOTHING_VEST:2:4]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_VEST:ITEM_ARMOR_TUNIC]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:VEST:5:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEST:PORTRAIT_GOBLIN_CLOTHING_VEST:1:4]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_VEST:ITEM_ARMOR_TUNIC]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:VEST:5:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEST:PORTRAIT_GOBLIN_CLOTHING_VEST:0:4]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_VEST:ITEM_ARMOR_TUNIC]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:VEST:5:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]

		[LAYER_GROUP]
		[LAYER:CLOTHING_COAT:PORTRAIT_GOBLIN_CLOTHING_COAT:6:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_COAT:ITEM_ARMOR_ROBE]
			[CONDITION_MATERIAL_FLAG:IS_CRAFTED_ARTIFACT]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_COAT:PORTRAIT_GOBLIN_CLOTHING_COAT:5:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_COAT:ITEM_ARMOR_ROBE]
			[ITEM_QUALITY:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_COAT:PORTRAIT_GOBLIN_CLOTHING_COAT:4:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_COAT:ITEM_ARMOR_ROBE]
			[ITEM_QUALITY:4]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_COAT:PORTRAIT_GOBLIN_CLOTHING_COAT:3:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_COAT:ITEM_ARMOR_ROBE]
			[ITEM_QUALITY:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_COAT:PORTRAIT_GOBLIN_CLOTHING_COAT:2:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_COAT:ITEM_ARMOR_ROBE]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:COAT:1:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_COAT:PORTRAIT_GOBLIN_CLOTHING_COAT:1:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_COAT:ITEM_ARMOR_ROBE]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:COAT:1:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_COAT:PORTRAIT_GOBLIN_CLOTHING_COAT:0:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_COAT:ITEM_ARMOR_ROBE]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:COAT:1:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_COAT:PORTRAIT_GOBLIN_CLOTHING_COAT:2:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_COAT:ITEM_ARMOR_ROBE]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:COAT:2:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_COAT:PORTRAIT_GOBLIN_CLOTHING_COAT:1:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_COAT:ITEM_ARMOR_ROBE]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:COAT:2:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_COAT:PORTRAIT_GOBLIN_CLOTHING_COAT:0:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_COAT:ITEM_ARMOR_ROBE]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:COAT:2:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_COAT:PORTRAIT_GOBLIN_CLOTHING_COAT:2:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_COAT:ITEM_ARMOR_ROBE]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:COAT:3:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_COAT:PORTRAIT_GOBLIN_CLOTHING_COAT:1:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_COAT:ITEM_ARMOR_ROBE]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:COAT:3:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_COAT:PORTRAIT_GOBLIN_CLOTHING_COAT:0:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_COAT:ITEM_ARMOR_ROBE]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:COAT:3:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_COAT:PORTRAIT_GOBLIN_CLOTHING_COAT:2:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_COAT:ITEM_ARMOR_ROBE]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:COAT:4:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_COAT:PORTRAIT_GOBLIN_CLOTHING_COAT:1:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_COAT:ITEM_ARMOR_ROBE]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:COAT:4:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_COAT:PORTRAIT_GOBLIN_CLOTHING_COAT:0:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_COAT:ITEM_ARMOR_ROBE]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:COAT:4:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_COAT:PORTRAIT_GOBLIN_CLOTHING_COAT:2:4]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_COAT:ITEM_ARMOR_ROBE]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:COAT:5:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_COAT:PORTRAIT_GOBLIN_CLOTHING_COAT:1:4]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_COAT:ITEM_ARMOR_ROBE]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:COAT:5:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_COAT:PORTRAIT_GOBLIN_CLOTHING_COAT:0:4]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_COAT:ITEM_ARMOR_ROBE]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:COAT:5:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]

		[LAYER_GROUP]
		[LAYER:CLOTHING_TOGA:PORTRAIT_GOBLIN_CLOTHING_TOGA:6:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_TOGA]
			[CONDITION_MATERIAL_FLAG:IS_CRAFTED_ARTIFACT]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_TOGA:PORTRAIT_GOBLIN_CLOTHING_TOGA:5:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_TOGA]
			[ITEM_QUALITY:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_TOGA:PORTRAIT_GOBLIN_CLOTHING_TOGA:4:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_TOGA]
			[ITEM_QUALITY:4]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_TOGA:PORTRAIT_GOBLIN_CLOTHING_TOGA:3:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_TOGA]
			[ITEM_QUALITY:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_TOGA:PORTRAIT_GOBLIN_CLOTHING_TOGA:2:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_TOGA]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:TOGA:1:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_TOGA:PORTRAIT_GOBLIN_CLOTHING_TOGA:1:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_TOGA]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:TOGA:1:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_TOGA:PORTRAIT_GOBLIN_CLOTHING_TOGA:0:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_TOGA]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:TOGA:1:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_TOGA:PORTRAIT_GOBLIN_CLOTHING_TOGA:2:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_TOGA]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:TOGA:2:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_TOGA:PORTRAIT_GOBLIN_CLOTHING_TOGA:1:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_TOGA]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:TOGA:2:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_TOGA:PORTRAIT_GOBLIN_CLOTHING_TOGA:0:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_TOGA]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:TOGA:2:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]

		[LAYER_GROUP]
		[LAYER:CLOTHING_MAIL_SHIRT:PORTRAIT_GOBLIN_CLOTHING_MAIL_SHIRT:6:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_MAIL_SHIRT]
			[CONDITION_MATERIAL_FLAG:IS_CRAFTED_ARTIFACT]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MAIL_SHIRT:PORTRAIT_GOBLIN_CLOTHING_MAIL_SHIRT:5:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_MAIL_SHIRT]
			[ITEM_QUALITY:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MAIL_SHIRT:PORTRAIT_GOBLIN_CLOTHING_MAIL_SHIRT:4:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_MAIL_SHIRT]
			[ITEM_QUALITY:4]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MAIL_SHIRT:PORTRAIT_GOBLIN_CLOTHING_MAIL_SHIRT:3:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_MAIL_SHIRT]
			[ITEM_QUALITY:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MAIL_SHIRT:PORTRAIT_GOBLIN_CLOTHING_MAIL_SHIRT:2:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_MAIL_SHIRT]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:MAIL_SHIRT:1:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MAIL_SHIRT:PORTRAIT_GOBLIN_CLOTHING_MAIL_SHIRT:1:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_MAIL_SHIRT]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:MAIL_SHIRT:1:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MAIL_SHIRT:PORTRAIT_GOBLIN_CLOTHING_MAIL_SHIRT:0:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_MAIL_SHIRT]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:MAIL_SHIRT:1:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MAIL_SHIRT:PORTRAIT_GOBLIN_CLOTHING_MAIL_SHIRT:2:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_MAIL_SHIRT]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:MAIL_SHIRT:2:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MAIL_SHIRT:PORTRAIT_GOBLIN_CLOTHING_MAIL_SHIRT:1:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_MAIL_SHIRT]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:MAIL_SHIRT:2:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MAIL_SHIRT:PORTRAIT_GOBLIN_CLOTHING_MAIL_SHIRT:0:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_MAIL_SHIRT]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:MAIL_SHIRT:2:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MAIL_SHIRT:PORTRAIT_GOBLIN_CLOTHING_MAIL_SHIRT:2:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_MAIL_SHIRT]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:MAIL_SHIRT:3:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MAIL_SHIRT:PORTRAIT_GOBLIN_CLOTHING_MAIL_SHIRT:1:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_MAIL_SHIRT]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:MAIL_SHIRT:3:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MAIL_SHIRT:PORTRAIT_GOBLIN_CLOTHING_MAIL_SHIRT:0:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_MAIL_SHIRT]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:MAIL_SHIRT:3:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]

		[LAYER_GROUP]
		[LAYER:CLOTHING_LEATHER:PORTRAIT_GOBLIN_CLOTHING_LEATHER:6:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_LEATHER]
			[CONDITION_MATERIAL_FLAG:IS_CRAFTED_ARTIFACT]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_LEATHER:PORTRAIT_GOBLIN_CLOTHING_LEATHER:5:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_LEATHER]
			[ITEM_QUALITY:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_LEATHER:PORTRAIT_GOBLIN_CLOTHING_LEATHER:4:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_LEATHER]
			[ITEM_QUALITY:4]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_LEATHER:PORTRAIT_GOBLIN_CLOTHING_LEATHER:3:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_LEATHER]
			[ITEM_QUALITY:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_LEATHER:PORTRAIT_GOBLIN_CLOTHING_LEATHER:2:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_LEATHER]
			[ITEM_QUALITY:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_LEATHER:PORTRAIT_GOBLIN_CLOTHING_LEATHER:1:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_LEATHER]
			[ITEM_QUALITY:1]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_LEATHER:PORTRAIT_GOBLIN_CLOTHING_LEATHER:0:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_LEATHER]
			[ITEM_QUALITY:0]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]

		[LAYER_GROUP]
		[LAYER:CLOTHING_BREASTPLATE:PORTRAIT_GOBLIN_CLOTHING_BREASTPLATE:6:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_BREASTPLATE]
			[CONDITION_MATERIAL_FLAG:IS_CRAFTED_ARTIFACT]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_BREASTPLATE:PORTRAIT_GOBLIN_CLOTHING_BREASTPLATE:5:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_BREASTPLATE]
			[ITEM_QUALITY:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_BREASTPLATE:PORTRAIT_GOBLIN_CLOTHING_BREASTPLATE:4:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_BREASTPLATE]
			[ITEM_QUALITY:4]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_BREASTPLATE:PORTRAIT_GOBLIN_CLOTHING_BREASTPLATE:3:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_BREASTPLATE]
			[ITEM_QUALITY:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_BREASTPLATE:PORTRAIT_GOBLIN_CLOTHING_BREASTPLATE:2:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_BREASTPLATE]
			[ITEM_QUALITY:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_BREASTPLATE:PORTRAIT_GOBLIN_CLOTHING_BREASTPLATE:1:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_BREASTPLATE]
			[ITEM_QUALITY:1]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_BREASTPLATE:PORTRAIT_GOBLIN_CLOTHING_BREASTPLATE:0:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_BREASTPLATE]
			[ITEM_QUALITY:0]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]

		[LAYER_GROUP]
		[LAYER:CLOTHING_CLOAK:PORTRAIT_GOBLIN_CLOTHING_CLOAK:6:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[CONDITION_MATERIAL_FLAG:IS_CRAFTED_ARTIFACT]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CLOAK:PORTRAIT_GOBLIN_CLOTHING_CLOAK:5:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[ITEM_QUALITY:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CLOAK:PORTRAIT_GOBLIN_CLOTHING_CLOAK:4:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[ITEM_QUALITY:4]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CLOAK:PORTRAIT_GOBLIN_CLOTHING_CLOAK:3:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[ITEM_QUALITY:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CLOAK:PORTRAIT_GOBLIN_CLOTHING_CLOAK:2:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:CLOAK:1:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CLOAK:PORTRAIT_GOBLIN_CLOTHING_CLOAK:1:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:CLOAK:1:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CLOAK:PORTRAIT_GOBLIN_CLOTHING_CLOAK:0:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:CLOAK:1:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CLOAK:PORTRAIT_GOBLIN_CLOTHING_CLOAK:2:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:CLOAK:2:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CLOAK:PORTRAIT_GOBLIN_CLOTHING_CLOAK:1:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:CLOAK:2:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CLOAK:PORTRAIT_GOBLIN_CLOTHING_CLOAK:0:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:CLOAK:2:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CLOAK:PORTRAIT_GOBLIN_CLOTHING_CLOAK:2:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:CLOAK:3:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CLOAK:PORTRAIT_GOBLIN_CLOTHING_CLOAK:1:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:CLOAK:3:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CLOAK:PORTRAIT_GOBLIN_CLOTHING_CLOAK:0:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:CLOAK:3:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CLOAK:PORTRAIT_GOBLIN_CLOTHING_CLOAK:2:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:CLOAK:4:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CLOAK:PORTRAIT_GOBLIN_CLOTHING_CLOAK:1:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:CLOAK:4:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CLOAK:PORTRAIT_GOBLIN_CLOTHING_CLOAK:0:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:CLOAK:4:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CLOAK:PORTRAIT_GOBLIN_CLOTHING_CLOAK:2:4]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:CLOAK:5:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CLOAK:PORTRAIT_GOBLIN_CLOTHING_CLOAK:1:4]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:CLOAK:5:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CLOAK:PORTRAIT_GOBLIN_CLOTHING_CLOAK:0:4]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:CLOAK:5:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]

		[LAYER_GROUP]
		[LAYER:CLOTHING_CAPE:PORTRAIT_GOBLIN_CLOTHING_CAPE:6:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CAPE]
			[CONDITION_MATERIAL_FLAG:IS_CRAFTED_ARTIFACT]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAPE:PORTRAIT_GOBLIN_CLOTHING_CAPE:5:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CAPE]
			[ITEM_QUALITY:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAPE:PORTRAIT_GOBLIN_CLOTHING_CAPE:4:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CAPE]
			[ITEM_QUALITY:4]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAPE:PORTRAIT_GOBLIN_CLOTHING_CAPE:3:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CAPE]
			[ITEM_QUALITY:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAPE:PORTRAIT_GOBLIN_CLOTHING_CAPE:2:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CAPE]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:CAPE:1:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAPE:PORTRAIT_GOBLIN_CLOTHING_CAPE:1:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CAPE]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:CAPE:1:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAPE:PORTRAIT_GOBLIN_CLOTHING_CAPE:0:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CAPE]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:CAPE:1:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAPE:PORTRAIT_GOBLIN_CLOTHING_CAPE:2:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CAPE]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:CAPE:2:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAPE:PORTRAIT_GOBLIN_CLOTHING_CAPE:1:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CAPE]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:CAPE:2:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAPE:PORTRAIT_GOBLIN_CLOTHING_CAPE:0:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CAPE]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:CAPE:2:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]

	head
		[LAYER_GROUP]
		[LG_CONDITION_BP:BY_TOKEN:HD]
			[BP_PRESENT]
		[LAYER:Z_HEAD:PORTRAIT_GOBLIN_BODY:3:0]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[USE_PALETTE:BODY:5]
		[LAYER:N_HEAD:PORTRAIT_GOBLIN_BODY:3:0]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[USE_PALETTE:BODY:6]
		[LAYER:V_HEAD:PORTRAIT_GOBLIN_BODY:3:0]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[USE_PALETTE:BODY:7]
		[LAYER:U_HEAD:PORTRAIT_GOBLIN_BODY:3:0]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[USE_PALETTE:BODY:8]
		[LAYER:G_HEAD:PORTRAIT_GOBLIN_BODY:3:0]
			[CONDITION_GHOST]
			[USE_PALETTE:BODY:9]
		[LAYER:M_HEAD:PORTRAIT_GOBLIN_BODY:3:0]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_HEAD:PORTRAIT_GOBLIN_BODY:3:0]
			[CONDITION_SYN_CLASS:GHOUL]
			[USE_PALETTE:BODY:11]
		[LAYER:HEAD1:PORTRAIT_GOBLIN_BODY:3:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[USE_PALETTE:BODY:0]
		[LAYER:HEAD2:PORTRAIT_GOBLIN_BODY:3:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[USE_PALETTE:BODY:1]
		[LAYER:HEAD3:PORTRAIT_GOBLIN_BODY:3:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[USE_PALETTE:BODY:2]
		[LAYER:HEAD4:PORTRAIT_GOBLIN_BODY:3:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[USE_PALETTE:BODY:3]
		[END_LAYER_GROUP]

	l ear
		[LAYER_GROUP]
		[LG_CONDITION_BP:BY_TOKEN:L_EAR]
			[BP_PRESENT]
		[LAYER:Z_L_EAR1:PORTRAIT_GOBLIN_BODY:4:0]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:5]
		[LAYER:N_L_EAR1:PORTRAIT_GOBLIN_BODY:4:0]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:6]
		[LAYER:V_L_EAR1:PORTRAIT_GOBLIN_BODY:4:0]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:7]
		[LAYER:U_L_EAR1:PORTRAIT_GOBLIN_BODY:4:0]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:8]
		[LAYER:G_L_EAR1:PORTRAIT_GOBLIN_BODY:4:0]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:9]
		[LAYER:M_L_EAR1:PORTRAIT_GOBLIN_BODY:4:0]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_L_EAR1:PORTRAIT_GOBLIN_BODY:4:0]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:11]
		[LAYER:L_EAR11:PORTRAIT_GOBLIN_BODY:4:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:0]
		[LAYER:L_EAR12:PORTRAIT_GOBLIN_BODY:4:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:1]
		[LAYER:L_EAR13:PORTRAIT_GOBLIN_BODY:4:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:2]
		[LAYER:L_EAR14:PORTRAIT_GOBLIN_BODY:4:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:3]

		[LAYER:Z_L_EAR2:PORTRAIT_GOBLIN_BODY:4:1]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:5]
		[LAYER:N_L_EAR2:PORTRAIT_GOBLIN_BODY:4:1]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:6]
		[LAYER:V_L_EAR2:PORTRAIT_GOBLIN_BODY:4:1]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:7]
		[LAYER:U_L_EAR2:PORTRAIT_GOBLIN_BODY:4:1]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:8]
		[LAYER:G_L_EAR2:PORTRAIT_GOBLIN_BODY:4:1]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:9]
		[LAYER:M_L_EAR2:PORTRAIT_GOBLIN_BODY:4:1]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_L_EAR2:PORTRAIT_GOBLIN_BODY:4:1]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:11]
		[LAYER:L_EAR21:PORTRAIT_GOBLIN_BODY:4:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:0]
		[LAYER:L_EAR22:PORTRAIT_GOBLIN_BODY:4:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:1]
		[LAYER:L_EAR23:PORTRAIT_GOBLIN_BODY:4:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:2]
		[LAYER:L_EAR24:PORTRAIT_GOBLIN_BODY:4:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:3]
		[END_LAYER_GROUP]

	r ear
		[LAYER_GROUP]
		[LG_CONDITION_BP:BY_TOKEN:R_EAR]
			[BP_PRESENT]
		[LAYER:Z_R_EAR1:PORTRAIT_GOBLIN_BODY:5:0]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:5]
		[LAYER:N_R_EAR1:PORTRAIT_GOBLIN_BODY:5:0]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:6]
		[LAYER:V_R_EAR1:PORTRAIT_GOBLIN_BODY:5:0]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:7]
		[LAYER:U_R_EAR1:PORTRAIT_GOBLIN_BODY:5:0]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:8]
		[LAYER:G_R_EAR1:PORTRAIT_GOBLIN_BODY:5:0]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:9]
		[LAYER:M_R_EAR1:PORTRAIT_GOBLIN_BODY:5:0]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_R_EAR1:PORTRAIT_GOBLIN_BODY:5:0]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:11]
		[LAYER:R_EAR11:PORTRAIT_GOBLIN_BODY:5:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:0]
		[LAYER:R_EAR12:PORTRAIT_GOBLIN_BODY:5:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:1]
		[LAYER:R_EAR13:PORTRAIT_GOBLIN_BODY:5:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:2]
		[LAYER:R_EAR14:PORTRAIT_GOBLIN_BODY:5:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:EARS:1:2]
			[USE_PALETTE:BODY:3]

		[LAYER:Z_R_EAR2:PORTRAIT_GOBLIN_BODY:5:1]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:5]
		[LAYER:N_R_EAR2:PORTRAIT_GOBLIN_BODY:5:1]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:6]
		[LAYER:V_R_EAR2:PORTRAIT_GOBLIN_BODY:5:1]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:7]
		[LAYER:U_R_EAR2:PORTRAIT_GOBLIN_BODY:5:1]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:8]
		[LAYER:G_R_EAR2:PORTRAIT_GOBLIN_BODY:5:1]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:9]
		[LAYER:M_R_EAR2:PORTRAIT_GOBLIN_BODY:5:1]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_R_EAR2:PORTRAIT_GOBLIN_BODY:5:1]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:11]
		[LAYER:R_EAR21:PORTRAIT_GOBLIN_BODY:5:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:0]
		[LAYER:R_EAR22:PORTRAIT_GOBLIN_BODY:5:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:1]
		[LAYER:R_EAR23:PORTRAIT_GOBLIN_BODY:5:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:2]
		[LAYER:R_EAR24:PORTRAIT_GOBLIN_BODY:5:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:EARS:2:2]
			[USE_PALETTE:BODY:3]
		[END_LAYER_GROUP]

	mouth
		[LAYER_GROUP]
		[LG_CONDITION_BP:BY_TOKEN:L_LIP]
			[BP_PRESENT]
		[LAYER:Z_MOUTH1:PORTRAIT_GOBLIN_BODY:6:0]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:1:3]
			[USE_PALETTE:BODY:5]
		[LAYER:N_MOUTH1:PORTRAIT_GOBLIN_BODY:6:0]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:1:3]
			[USE_PALETTE:BODY:6]
		[LAYER:V_MOUTH1:PORTRAIT_GOBLIN_BODY:6:0]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:1:3]
			[USE_PALETTE:BODY:7]
		[LAYER:U_MOUTH1:PORTRAIT_GOBLIN_BODY:6:0]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:1:3]
			[USE_PALETTE:BODY:8]
		[LAYER:G_MOUTH1:PORTRAIT_GOBLIN_BODY:6:0]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:1:3]
			[USE_PALETTE:BODY:9]
		[LAYER:M_MOUTH1:PORTRAIT_GOBLIN_BODY:6:0]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:1:3]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_MOUTH1:PORTRAIT_GOBLIN_BODY:6:0]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:1:3]
			[USE_PALETTE:BODY:11]
		[LAYER:MOUTH11:PORTRAIT_GOBLIN_BODY:6:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:1:3]
			[USE_PALETTE:BODY:0]
		[LAYER:MOUTH12:PORTRAIT_GOBLIN_BODY:6:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:1:3]
			[USE_PALETTE:BODY:1]
		[LAYER:MOUTH13:PORTRAIT_GOBLIN_BODY:6:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:1:3]
			[USE_PALETTE:BODY:2]
		[LAYER:MOUTH14:PORTRAIT_GOBLIN_BODY:6:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:1:3]
			[USE_PALETTE:BODY:3]

		[LAYER:Z_MOUTH2:PORTRAIT_GOBLIN_BODY:6:1]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:2:3]
			[USE_PALETTE:BODY:5]
		[LAYER:N_MOUTH2:PORTRAIT_GOBLIN_BODY:6:1]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:2:3]
			[USE_PALETTE:BODY:6]
		[LAYER:V_MOUTH2:PORTRAIT_GOBLIN_BODY:6:1]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:2:3]
			[USE_PALETTE:BODY:7]
		[LAYER:U_MOUTH2:PORTRAIT_GOBLIN_BODY:6:1]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:2:3]
			[USE_PALETTE:BODY:8]
		[LAYER:G_MOUTH2:PORTRAIT_GOBLIN_BODY:6:1]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:2:3]
			[USE_PALETTE:BODY:9]
		[LAYER:M_MOUTH2:PORTRAIT_GOBLIN_BODY:6:1]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:2:3]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_MOUTH2:PORTRAIT_GOBLIN_BODY:6:1]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:2:3]
			[USE_PALETTE:BODY:11]
		[LAYER:MOUTH21:PORTRAIT_GOBLIN_BODY:6:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:2:3]
			[USE_PALETTE:BODY:0]
		[LAYER:MOUTH22:PORTRAIT_GOBLIN_BODY:6:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:2:3]
			[USE_PALETTE:BODY:1]
		[LAYER:MOUTH23:PORTRAIT_GOBLIN_BODY:6:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:2:3]
			[USE_PALETTE:BODY:2]
		[LAYER:MOUTH24:PORTRAIT_GOBLIN_BODY:6:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:2:3]
			[USE_PALETTE:BODY:3]

		[LAYER:Z_MOUTH3:PORTRAIT_GOBLIN_BODY:6:2]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:3:3]
			[USE_PALETTE:BODY:5]
		[LAYER:N_MOUTH3:PORTRAIT_GOBLIN_BODY:6:2]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:3:3]
			[USE_PALETTE:BODY:6]
		[LAYER:V_MOUTH3:PORTRAIT_GOBLIN_BODY:6:2]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:3:3]
			[USE_PALETTE:BODY:7]
		[LAYER:U_MOUTH3:PORTRAIT_GOBLIN_BODY:6:2]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:3:3]
			[USE_PALETTE:BODY:8]
		[LAYER:G_MOUTH3:PORTRAIT_GOBLIN_BODY:6:2]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:3:3]
			[USE_PALETTE:BODY:9]
		[LAYER:M_MOUTH3:PORTRAIT_GOBLIN_BODY:6:2]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:3:3]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_MOUTH3:PORTRAIT_GOBLIN_BODY:6:2]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:3:3]
			[USE_PALETTE:BODY:11]
		[LAYER:MOUTH31:PORTRAIT_GOBLIN_BODY:6:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:3:3]
			[USE_PALETTE:BODY:0]
		[LAYER:MOUTH32:PORTRAIT_GOBLIN_BODY:6:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:3:3]
			[USE_PALETTE:BODY:1]
		[LAYER:MOUTH33:PORTRAIT_GOBLIN_BODY:6:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:3:3]
			[USE_PALETTE:BODY:2]
		[LAYER:MOUTH34:PORTRAIT_GOBLIN_BODY:6:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:MOUTH:3:3]
			[USE_PALETTE:BODY:3]
		[END_LAYER_GROUP]

	mouth missing
		[LAYER:MOUTH_MISSING:PORTRAIT_GOBLIN_BODY:7:0]
			[CONDITION_BP:BY_TOKEN:HD]
				[BP_PRESENT]
			[CONDITION_BP:BY_TOKEN:L_LIP]
				[BP_MISSING]

	eyes
		[LAYER_GROUP]
		[LG_CONDITION_BP:BY_TOKEN:HD]
			[BP_PRESENT]
		[LAYER:Z_EYES1:PORTRAIT_GOBLIN_BODY:8:0]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:EYES:1:3]
			[USE_PALETTE:BODY:5]
		[LAYER:N_EYES1:PORTRAIT_GOBLIN_BODY:8:0]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:EYES:1:3]
			[USE_PALETTE:BODY:6]
		[LAYER:V_EYES1:PORTRAIT_GOBLIN_BODY:8:0]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:EYES:1:3]
			[USE_PALETTE:BODY:7]
		[LAYER:U_EYES1:PORTRAIT_GOBLIN_BODY:8:0]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:EYES:1:3]
			[USE_PALETTE:BODY:8]
		[LAYER:G_EYES1:PORTRAIT_GOBLIN_BODY:8:0]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:EYES:1:3]
			[USE_PALETTE:BODY:9]
		[LAYER:M_EYES1:PORTRAIT_GOBLIN_BODY:8:0]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:EYES:1:3]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_EYES1:PORTRAIT_GOBLIN_BODY:8:0]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:EYES:1:3]
			[USE_PALETTE:BODY:11]
		[LAYER:EYES11:PORTRAIT_GOBLIN_BODY:8:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EYES:1:3]
			[USE_PALETTE:BODY:0]
		[LAYER:EYES12:PORTRAIT_GOBLIN_BODY:8:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EYES:1:3]
			[USE_PALETTE:BODY:1]
		[LAYER:EYES13:PORTRAIT_GOBLIN_BODY:8:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EYES:1:3]
			[USE_PALETTE:BODY:2]
		[LAYER:EYES14:PORTRAIT_GOBLIN_BODY:8:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:EYES:1:3]
			[USE_PALETTE:BODY:3]

		[LAYER:Z_EYES2:PORTRAIT_GOBLIN_BODY:8:1]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:EYES:2:3]
			[USE_PALETTE:BODY:5]
		[LAYER:N_EYES2:PORTRAIT_GOBLIN_BODY:8:1]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:EYES:2:3]
			[USE_PALETTE:BODY:6]
		[LAYER:V_EYES2:PORTRAIT_GOBLIN_BODY:8:1]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:EYES:2:3]
			[USE_PALETTE:BODY:7]
		[LAYER:U_EYES2:PORTRAIT_GOBLIN_BODY:8:1]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:EYES:2:3]
			[USE_PALETTE:BODY:8]
		[LAYER:G_EYES2:PORTRAIT_GOBLIN_BODY:8:1]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:EYES:2:3]
			[USE_PALETTE:BODY:9]
		[LAYER:M_EYES2:PORTRAIT_GOBLIN_BODY:8:1]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:EYES:2:3]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_EYES2:PORTRAIT_GOBLIN_BODY:8:1]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:EYES:2:3]
			[USE_PALETTE:BODY:11]
		[LAYER:EYES21:PORTRAIT_GOBLIN_BODY:8:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EYES:2:3]
			[USE_PALETTE:BODY:0]
		[LAYER:EYES22:PORTRAIT_GOBLIN_BODY:8:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EYES:2:3]
			[USE_PALETTE:BODY:1]
		[LAYER:EYES23:PORTRAIT_GOBLIN_BODY:8:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EYES:2:3]
			[USE_PALETTE:BODY:2]
		[LAYER:EYES24:PORTRAIT_GOBLIN_BODY:8:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:EYES:2:3]
			[USE_PALETTE:BODY:3]

		[LAYER:Z_EYES3:PORTRAIT_GOBLIN_BODY:8:2]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:EYES:3:3]
			[USE_PALETTE:BODY:5]
		[LAYER:N_EYES3:PORTRAIT_GOBLIN_BODY:8:2]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:EYES:3:3]
			[USE_PALETTE:BODY:6]
		[LAYER:V_EYES3:PORTRAIT_GOBLIN_BODY:8:2]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:EYES:3:3]
			[USE_PALETTE:BODY:7]
		[LAYER:U_EYES3:PORTRAIT_GOBLIN_BODY:8:2]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:EYES:3:3]
			[USE_PALETTE:BODY:8]
		[LAYER:G_EYES3:PORTRAIT_GOBLIN_BODY:8:2]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:EYES:3:3]
			[USE_PALETTE:BODY:9]
		[LAYER:M_EYES3:PORTRAIT_GOBLIN_BODY:8:2]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:EYES:3:3]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_EYES3:PORTRAIT_GOBLIN_BODY:8:2]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:EYES:3:3]
			[USE_PALETTE:BODY:11]
		[LAYER:EYES31:PORTRAIT_GOBLIN_BODY:8:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EYES:3:3]
			[USE_PALETTE:BODY:0]
		[LAYER:EYES32:PORTRAIT_GOBLIN_BODY:8:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EYES:3:3]
			[USE_PALETTE:BODY:1]
		[LAYER:EYES33:PORTRAIT_GOBLIN_BODY:8:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:EYES:3:3]
			[USE_PALETTE:BODY:2]
		[LAYER:EYES34:PORTRAIT_GOBLIN_BODY:8:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:EYES:3:3]
			[USE_PALETTE:BODY:3]
		[END_LAYER_GROUP]

	eye scar left
		[LAYER:EYE_SCAR_L:PORTRAIT_GOBLIN_BODY:9:0]
			[CONDITION_BP:BY_TOKEN:HD]
				[BP_PRESENT]
				[BP_SCARRED]
			[CONDITION_RANDOM_PART_INDEX:HEAD_SCAR:1:2]

	eye scar right
		[LAYER:EYE_SCAR_R:PORTRAIT_GOBLIN_BODY:10:0]
			[CONDITION_BP:BY_TOKEN:HD]
				[BP_PRESENT]
				[BP_SCARRED]
			[CONDITION_RANDOM_PART_INDEX:HEAD_SCAR:2:2]

	eye missing left
		[LAYER:EYE_L_MISSING:PORTRAIT_GOBLIN_BODY:11:0]
			[CONDITION_BP:BY_TOKEN:HD]
				[BP_PRESENT]
			[CONDITION_BP:BY_TOKEN:LEYE]
				[BP_MISSING]

	eye missing right
		[LAYER:EYE_R_MISSING:PORTRAIT_GOBLIN_BODY:12:0]
			[CONDITION_BP:BY_TOKEN:HD]
				[BP_PRESENT]
			[CONDITION_BP:BY_TOKEN:REYE]
				[BP_MISSING]

	cheek scar
		[LAYER:CHEEK_SCAR:PORTRAIT_GOBLIN_BODY:14:0]
			[CONDITION_BP:BY_TOKEN:R_CHEEK]
				[BP_PRESENT]
				[BP_SCARRED]

	nose missing
		[LAYER:NOSE_MISSING:PORTRAIT_GOBLIN_BODY:13:0]
			[CONDITION_BP:BY_TOKEN:HD]
				[BP_PRESENT]
			[CONDITION_BP:BY_TOKEN:NOSE]
				[BP_MISSING]

	nose
		[LAYER_GROUP]
		[LG_CONDITION_BP:BY_TOKEN:NOSE]
			[BP_PRESENT]
		[LAYER:Z_NOSE1:PORTRAIT_GOBLIN_BODY:15:0]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:1:6]
			[USE_PALETTE:BODY:5]
		[LAYER:N_NOSE1:PORTRAIT_GOBLIN_BODY:15:0]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:NOSE:1:6]
			[USE_PALETTE:BODY:6]
		[LAYER:V_NOSE1:PORTRAIT_GOBLIN_BODY:15:0]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:1:6]
			[USE_PALETTE:BODY:7]
		[LAYER:U_NOSE1:PORTRAIT_GOBLIN_BODY:15:0]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:1:6]
			[USE_PALETTE:BODY:8]
		[LAYER:G_NOSE1:PORTRAIT_GOBLIN_BODY:15:0]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:NOSE:1:6]
			[USE_PALETTE:BODY:9]
		[LAYER:M_NOSE1:PORTRAIT_GOBLIN_BODY:15:0]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:1:6]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_NOSE1:PORTRAIT_GOBLIN_BODY:15:0]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:NOSE:1:6]
			[USE_PALETTE:BODY:11]
		[LAYER:NOSE11:PORTRAIT_GOBLIN_BODY:15:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:1:6]
			[USE_PALETTE:BODY:0]
		[LAYER:NOSE12:PORTRAIT_GOBLIN_BODY:15:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:1:6]
			[USE_PALETTE:BODY:1]
		[LAYER:NOSE13:PORTRAIT_GOBLIN_BODY:15:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:1:6]
			[USE_PALETTE:BODY:2]
		[LAYER:NOSE14:PORTRAIT_GOBLIN_BODY:15:0]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:NOSE:1:6]
			[USE_PALETTE:BODY:3]

		[LAYER:Z_NOSE2:PORTRAIT_GOBLIN_BODY:15:1]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:2:6]
			[USE_PALETTE:BODY:5]
		[LAYER:N_NOSE2:PORTRAIT_GOBLIN_BODY:15:1]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:NOSE:2:6]
			[USE_PALETTE:BODY:6]
		[LAYER:V_NOSE2:PORTRAIT_GOBLIN_BODY:15:1]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:2:6]
			[USE_PALETTE:BODY:7]
		[LAYER:U_NOSE2:PORTRAIT_GOBLIN_BODY:15:1]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:2:6]
			[USE_PALETTE:BODY:8]
		[LAYER:G_NOSE2:PORTRAIT_GOBLIN_BODY:15:1]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:NOSE:2:6]
			[USE_PALETTE:BODY:9]
		[LAYER:M_NOSE2:PORTRAIT_GOBLIN_BODY:15:1]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:2:6]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_NOSE2:PORTRAIT_GOBLIN_BODY:15:1]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:NOSE:2:6]
			[USE_PALETTE:BODY:11]
		[LAYER:NOSE21:PORTRAIT_GOBLIN_BODY:15:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:2:6]
			[USE_PALETTE:BODY:0]
		[LAYER:NOSE22:PORTRAIT_GOBLIN_BODY:15:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:2:6]
			[USE_PALETTE:BODY:1]
		[LAYER:NOSE23:PORTRAIT_GOBLIN_BODY:15:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:2:6]
			[USE_PALETTE:BODY:2]
		[LAYER:NOSE24:PORTRAIT_GOBLIN_BODY:15:1]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:NOSE:2:6]
			[USE_PALETTE:BODY:3]

		[LAYER:Z_NOSE3:PORTRAIT_GOBLIN_BODY:15:2]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:3:6]
			[USE_PALETTE:BODY:5]
		[LAYER:N_NOSE3:PORTRAIT_GOBLIN_BODY:15:2]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:NOSE:3:6]
			[USE_PALETTE:BODY:6]
		[LAYER:V_NOSE3:PORTRAIT_GOBLIN_BODY:15:2]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:3:6]
			[USE_PALETTE:BODY:7]
		[LAYER:U_NOSE3:PORTRAIT_GOBLIN_BODY:15:2]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:3:6]
			[USE_PALETTE:BODY:8]
		[LAYER:G_NOSE3:PORTRAIT_GOBLIN_BODY:15:2]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:NOSE:3:6]
			[USE_PALETTE:BODY:9]
		[LAYER:M_NOSE3:PORTRAIT_GOBLIN_BODY:15:2]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:3:6]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_NOSE3:PORTRAIT_GOBLIN_BODY:15:2]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:NOSE:3:6]
			[USE_PALETTE:BODY:11]
		[LAYER:NOSE31:PORTRAIT_GOBLIN_BODY:15:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:3:6]
			[USE_PALETTE:BODY:0]
		[LAYER:NOSE32:PORTRAIT_GOBLIN_BODY:15:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:3:6]
			[USE_PALETTE:BODY:1]
		[LAYER:NOSE33:PORTRAIT_GOBLIN_BODY:15:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:3:6]
			[USE_PALETTE:BODY:2]
		[LAYER:NOSE34:PORTRAIT_GOBLIN_BODY:15:2]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:NOSE:3:6]
			[USE_PALETTE:BODY:3]

		[LAYER:Z_NOSE4:PORTRAIT_GOBLIN_BODY:15:3]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:4:6]
			[USE_PALETTE:BODY:5]
		[LAYER:N_NOSE4:PORTRAIT_GOBLIN_BODY:15:3]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:NOSE:4:6]
			[USE_PALETTE:BODY:6]
		[LAYER:V_NOSE4:PORTRAIT_GOBLIN_BODY:15:3]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:4:6]
			[USE_PALETTE:BODY:7]
		[LAYER:U_NOSE4:PORTRAIT_GOBLIN_BODY:15:3]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:4:6]
			[USE_PALETTE:BODY:8]
		[LAYER:G_NOSE4:PORTRAIT_GOBLIN_BODY:15:3]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:NOSE:4:6]
			[USE_PALETTE:BODY:9]
		[LAYER:M_NOSE4:PORTRAIT_GOBLIN_BODY:15:3]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:4:6]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_NOSE4:PORTRAIT_GOBLIN_BODY:15:3]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:NOSE:4:6]
			[USE_PALETTE:BODY:11]
		[LAYER:NOSE41:PORTRAIT_GOBLIN_BODY:15:3]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:4:6]
			[USE_PALETTE:BODY:0]
		[LAYER:NOSE42:PORTRAIT_GOBLIN_BODY:15:3]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:4:6]
			[USE_PALETTE:BODY:1]
		[LAYER:NOSE43:PORTRAIT_GOBLIN_BODY:15:3]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:4:6]
			[USE_PALETTE:BODY:2]
		[LAYER:NOSE44:PORTRAIT_GOBLIN_BODY:15:3]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:NOSE:4:6]
			[USE_PALETTE:BODY:3]

		[LAYER:Z_NOSE5:PORTRAIT_GOBLIN_BODY:15:4]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:5:6]
			[USE_PALETTE:BODY:5]
		[LAYER:N_NOSE5:PORTRAIT_GOBLIN_BODY:15:4]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:NOSE:5:6]
			[USE_PALETTE:BODY:6]
		[LAYER:V_NOSE5:PORTRAIT_GOBLIN_BODY:15:4]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:5:6]
			[USE_PALETTE:BODY:7]
		[LAYER:U_NOSE5:PORTRAIT_GOBLIN_BODY:15:4]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:5:6]
			[USE_PALETTE:BODY:8]
		[LAYER:G_NOSE5:PORTRAIT_GOBLIN_BODY:15:4]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:NOSE:5:6]
			[USE_PALETTE:BODY:9]
		[LAYER:M_NOSE5:PORTRAIT_GOBLIN_BODY:15:4]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:5:6]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_NOSE5:PORTRAIT_GOBLIN_BODY:15:4]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:NOSE:5:6]
			[USE_PALETTE:BODY:11]
		[LAYER:NOSE51:PORTRAIT_GOBLIN_BODY:15:4]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:5:6]
			[USE_PALETTE:BODY:0]
		[LAYER:NOSE52:PORTRAIT_GOBLIN_BODY:15:4]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:5:6]
			[USE_PALETTE:BODY:1]
		[LAYER:NOSE53:PORTRAIT_GOBLIN_BODY:15:4]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:5:6]
			[USE_PALETTE:BODY:2]
		[LAYER:NOSE54:PORTRAIT_GOBLIN_BODY:15:4]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:NOSE:5:6]
			[USE_PALETTE:BODY:3]

		[LAYER:Z_NOSE6:PORTRAIT_GOBLIN_BODY:15:5]
			[CONDITION_SYN_CLASS:ZOMBIE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:6:6]
			[USE_PALETTE:BODY:5]
		[LAYER:N_NOSE6:PORTRAIT_GOBLIN_BODY:15:5]
			[CONDITION_SYN_CLASS:NECROMANCER]
			[CONDITION_RANDOM_PART_INDEX:NOSE:6:6]
			[USE_PALETTE:BODY:6]
		[LAYER:V_NOSE6:PORTRAIT_GOBLIN_BODY:15:5]
			[CONDITION_SYN_CLASS:VAMPCURSE]
			[CONDITION_RANDOM_PART_INDEX:NOSE:6:6]
			[USE_PALETTE:BODY:7]
		[LAYER:U_NOSE6:PORTRAIT_GOBLIN_BODY:15:5]
			[CONDITION_SYN_CLASS:RAISED_UNDEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:6:6]
			[USE_PALETTE:BODY:8]
		[LAYER:G_NOSE6:PORTRAIT_GOBLIN_BODY:15:5]
			[CONDITION_GHOST]
			[CONDITION_RANDOM_PART_INDEX:NOSE:6:6]
			[USE_PALETTE:BODY:9]
		[LAYER:M_NOSE6:PORTRAIT_GOBLIN_BODY:15:5]
			[CONDITION_SYN_CLASS:DISTURBED_DEAD]
			[CONDITION_RANDOM_PART_INDEX:NOSE:6:6]
			[USE_PALETTE:BODY:10]
		[LAYER:GL_NOSE6:PORTRAIT_GOBLIN_BODY:15:5]
			[CONDITION_SYN_CLASS:GHOUL]
			[CONDITION_RANDOM_PART_INDEX:NOSE:6:6]
			[USE_PALETTE:BODY:11]
		[LAYER:NOSE61:PORTRAIT_GOBLIN_BODY:15:5]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:EMERALD:GREEN:JADE:MINT_GREEN:SPRING_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:6:6]
			[USE_PALETTE:BODY:0]
		[LAYER:NOSE62:PORTRAIT_GOBLIN_BODY:15:5]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:FERN_GREEN:LIME:MOSS_GREEN:OLIVE:SEA_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:6:6]
			[USE_PALETTE:BODY:1]
		[LAYER:NOSE63:PORTRAIT_GOBLIN_BODY:15:5]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:DARK_GREEN:DARK_OLIVE:PINE_GREEN]
			[CONDITION_RANDOM_PART_INDEX:NOSE:6:6]
			[USE_PALETTE:BODY:2]
		[LAYER:NOSE64:PORTRAIT_GOBLIN_BODY:15:5]
			[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
				[TISSUE_MAY_HAVE_COLOR:ASH_GRAY:GRAY:SLATE_GRAY]
			[CONDITION_RANDOM_PART_INDEX:NOSE:6:6]
			[USE_PALETTE:BODY:3]

		[END_LAYER_GROUP]

	nose scar
		[LAYER:NOSE_SCAR:PORTRAIT_GOBLIN_BODY:16:0]
			[CONDITION_BP:BY_TOKEN:NOSE]
				[BP_PRESENT]
				[BP_SCARRED]

	veil
		[LAYER_GROUP]
		[LAYER:CLOTHING_MASK:PORTRAIT_GOBLIN_CLOTHING_MASK:6:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_MASK]
			[CONDITION_MATERIAL_FLAG:IS_CRAFTED_ARTIFACT]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MASK:PORTRAIT_GOBLIN_CLOTHING_MASK:5:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_MASK]
			[ITEM_QUALITY:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MASK:PORTRAIT_GOBLIN_CLOTHING_MASK:4:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_MASK]
			[ITEM_QUALITY:4]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MASK:PORTRAIT_GOBLIN_CLOTHING_MASK:3:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_MASK]
			[ITEM_QUALITY:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MASK:PORTRAIT_GOBLIN_CLOTHING_MASK:2:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_MASK]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:MASK:1:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MASK:PORTRAIT_GOBLIN_CLOTHING_MASK:1:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_MASK]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:MASK:1:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MASK:PORTRAIT_GOBLIN_CLOTHING_MASK:0:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_MASK]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:MASK:1:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MASK:PORTRAIT_GOBLIN_CLOTHING_MASK:2:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_MASK]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:MASK:2:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MASK:PORTRAIT_GOBLIN_CLOTHING_MASK:1:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_MASK]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:MASK:2:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MASK:PORTRAIT_GOBLIN_CLOTHING_MASK:0:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_MASK]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:MASK:2:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MASK:PORTRAIT_GOBLIN_CLOTHING_MASK:2:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_MASK]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:MASK:3:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MASK:PORTRAIT_GOBLIN_CLOTHING_MASK:1:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_MASK]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:MASK:3:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MASK:PORTRAIT_GOBLIN_CLOTHING_MASK:0:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_MASK]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:MASK:3:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MASK:PORTRAIT_GOBLIN_CLOTHING_MASK:2:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_MASK]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:MASK:4:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MASK:PORTRAIT_GOBLIN_CLOTHING_MASK:1:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_MASK]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:MASK:4:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MASK:PORTRAIT_GOBLIN_CLOTHING_MASK:0:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_MASK]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:MASK:4:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MASK:PORTRAIT_GOBLIN_CLOTHING_MASK:2:4]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_MASK]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:MASK:5:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MASK:PORTRAIT_GOBLIN_CLOTHING_MASK:1:4]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_MASK]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:MASK:5:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_MASK:PORTRAIT_GOBLIN_CLOTHING_MASK:0:4]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_MASK]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:MASK:5:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]

		[LAYER_GROUP]
		[LAYER:CLOTHING_VEIL_FACE:PORTRAIT_GOBLIN_CLOTHING_VEIL_FACE:6:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_FACE]
			[CONDITION_MATERIAL_FLAG:IS_CRAFTED_ARTIFACT]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEIL_FACE:PORTRAIT_GOBLIN_CLOTHING_VEIL_FACE:5:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_FACE]
			[ITEM_QUALITY:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEIL_FACE:PORTRAIT_GOBLIN_CLOTHING_VEIL_FACE:4:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_FACE]
			[ITEM_QUALITY:4]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEIL_FACE:PORTRAIT_GOBLIN_CLOTHING_VEIL_FACE:3:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_FACE]
			[ITEM_QUALITY:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEIL_FACE:PORTRAIT_GOBLIN_CLOTHING_VEIL_FACE:2:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_FACE]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:VEIL_FACE:1:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEIL_FACE:PORTRAIT_GOBLIN_CLOTHING_VEIL_FACE:1:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_FACE]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:VEIL_FACE:1:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEIL_FACE:PORTRAIT_GOBLIN_CLOTHING_VEIL_FACE:0:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_FACE]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:VEIL_FACE:1:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEIL_FACE:PORTRAIT_GOBLIN_CLOTHING_VEIL_FACE:2:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_FACE]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:VEIL_FACE:2:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEIL_FACE:PORTRAIT_GOBLIN_CLOTHING_VEIL_FACE:1:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_FACE]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:VEIL_FACE:2:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEIL_FACE:PORTRAIT_GOBLIN_CLOTHING_VEIL_FACE:0:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_FACE]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:VEIL_FACE:2:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]

	hat
		[LAYER_GROUP]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:6:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:IS_CRAFTED_ARTIFACT]
			[CONDITION_MATERIAL_TYPE:INORGANIC]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:5:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_TYPE:INORGANIC]
			[ITEM_QUALITY:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:4:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_TYPE:INORGANIC]
			[ITEM_QUALITY:4]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:3:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_TYPE:INORGANIC]
			[ITEM_QUALITY:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:2:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_TYPE:INORGANIC]
			[ITEM_QUALITY:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:1:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_TYPE:INORGANIC]
			[ITEM_QUALITY:1]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:0:3]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_TYPE:INORGANIC]
			[ITEM_QUALITY:0]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:6:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_WOOD_MATERIAL:IS_CRAFTED_ARTIFACT]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:5:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_WOOD_MATERIAL]
			[ITEM_QUALITY:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:4:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_WOOD_MATERIAL]
			[ITEM_QUALITY:4]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:3:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_WOOD_MATERIAL]
			[ITEM_QUALITY:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:2:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_WOOD_MATERIAL]
			[ITEM_QUALITY:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:1:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_WOOD_MATERIAL]
			[ITEM_QUALITY:1]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:0:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_WOOD_MATERIAL]
			[ITEM_QUALITY:0]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:6:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_BONE_MATERIAL:IS_CRAFTED_ARTIFACT]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:5:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_BONE_MATERIAL]
			[ITEM_QUALITY:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:4:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_BONE_MATERIAL]
			[ITEM_QUALITY:4]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:3:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_BONE_MATERIAL]
			[ITEM_QUALITY:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:2:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_BONE_MATERIAL]
			[ITEM_QUALITY:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:1:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_BONE_MATERIAL]
			[ITEM_QUALITY:1]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:0:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_BONE_MATERIAL]
			[ITEM_QUALITY:0]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:6:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_SHELL_MATERIAL:IS_CRAFTED_ARTIFACT]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:5:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_SHELL_MATERIAL]
			[ITEM_QUALITY:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:4:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_SHELL_MATERIAL]
			[ITEM_QUALITY:4]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:3:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_SHELL_MATERIAL]
			[ITEM_QUALITY:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:2:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_SHELL_MATERIAL]
			[ITEM_QUALITY:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:1:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_SHELL_MATERIAL]
			[ITEM_QUALITY:1]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:0:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_SHELL_MATERIAL]
			[ITEM_QUALITY:0]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:6:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_LEATHER_MATERIAL:IS_CRAFTED_ARTIFACT]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:5:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_LEATHER_MATERIAL]
			[ITEM_QUALITY:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:4:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_LEATHER_MATERIAL]
			[ITEM_QUALITY:4]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:3:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_LEATHER_MATERIAL]
			[ITEM_QUALITY:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:2:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_LEATHER_MATERIAL]
			[ITEM_QUALITY:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:1:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_LEATHER_MATERIAL]
			[ITEM_QUALITY:1]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:0:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:ANY_LEATHER_MATERIAL]
			[ITEM_QUALITY:0]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:6:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[CONDITION_MATERIAL_FLAG:IS_CRAFTED_ARTIFACT]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:5:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[ITEM_QUALITY:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:4:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[ITEM_QUALITY:4]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:3:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[ITEM_QUALITY:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:2:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:CAP:1:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:1:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:CAP:1:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:0:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:CAP:1:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:2:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:CAP:2:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:1:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:CAP:2:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_CAP:PORTRAIT_GOBLIN_CLOTHING_CAP:0:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_CAP]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:CAP:2:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]

		[LAYER:CLOTHING_TURBAN:PORTRAIT_GOBLIN_CLOTHING_TURBAN:6:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_TURBAN]
			[CONDITION_MATERIAL_FLAG:IS_CRAFTED_ARTIFACT]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_TURBAN:PORTRAIT_GOBLIN_CLOTHING_TURBAN:5:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_TURBAN]
			[ITEM_QUALITY:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_TURBAN:PORTRAIT_GOBLIN_CLOTHING_TURBAN:4:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_TURBAN]
			[ITEM_QUALITY:4]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_TURBAN:PORTRAIT_GOBLIN_CLOTHING_TURBAN:3:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_TURBAN]
			[ITEM_QUALITY:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_TURBAN:PORTRAIT_GOBLIN_CLOTHING_TURBAN:2:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_TURBAN]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:TURBAN:1:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_TURBAN:PORTRAIT_GOBLIN_CLOTHING_TURBAN:1:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_TURBAN]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:TURBAN:1:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_TURBAN:PORTRAIT_GOBLIN_CLOTHING_TURBAN:0:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_TURBAN]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:TURBAN:1:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_TURBAN:PORTRAIT_GOBLIN_CLOTHING_TURBAN:2:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_TURBAN]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:TURBAN:2:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_TURBAN:PORTRAIT_GOBLIN_CLOTHING_TURBAN:1:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_TURBAN]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:TURBAN:2:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_TURBAN:PORTRAIT_GOBLIN_CLOTHING_TURBAN:0:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_TURBAN]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:TURBAN:2:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_TURBAN:PORTRAIT_GOBLIN_CLOTHING_TURBAN:2:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_TURBAN]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:TURBAN:3:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_TURBAN:PORTRAIT_GOBLIN_CLOTHING_TURBAN:1:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_TURBAN]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:TURBAN:3:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_TURBAN:PORTRAIT_GOBLIN_CLOTHING_TURBAN:0:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_TURBAN]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:TURBAN:3:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]

		[LAYER:CLOTHING_VEIL_HEAD:PORTRAIT_GOBLIN_CLOTHING_VEIL_HEAD:6:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_HEAD]
			[CONDITION_MATERIAL_FLAG:IS_CRAFTED_ARTIFACT]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEIL_HEAD:PORTRAIT_GOBLIN_CLOTHING_VEIL_HEAD:5:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_HEAD]
			[ITEM_QUALITY:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEIL_HEAD:PORTRAIT_GOBLIN_CLOTHING_VEIL_HEAD:4:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_HEAD]
			[ITEM_QUALITY:4]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEIL_HEAD:PORTRAIT_GOBLIN_CLOTHING_VEIL_HEAD:3:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_HEAD]
			[ITEM_QUALITY:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEIL_HEAD:PORTRAIT_GOBLIN_CLOTHING_VEIL_HEAD:2:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_HEAD]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:VEIL_HEAD:1:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEIL_HEAD:PORTRAIT_GOBLIN_CLOTHING_VEIL_HEAD:1:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_HEAD]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:VEIL_HEAD:1:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEIL_HEAD:PORTRAIT_GOBLIN_CLOTHING_VEIL_HEAD:0:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_HEAD]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:VEIL_HEAD:1:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEIL_HEAD:PORTRAIT_GOBLIN_CLOTHING_VEIL_HEAD:2:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_HEAD]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:VEIL_HEAD:2:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEIL_HEAD:PORTRAIT_GOBLIN_CLOTHING_VEIL_HEAD:1:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_HEAD]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:VEIL_HEAD:2:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_VEIL_HEAD:PORTRAIT_GOBLIN_CLOTHING_VEIL_HEAD:0:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_VEIL_HEAD]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:VEIL_HEAD:2:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]

		[LAYER:CLOTHING_SCARF_HEAD:PORTRAIT_GOBLIN_CLOTHING_SCARF_HEAD:6:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_SCARF_HEAD]
			[CONDITION_MATERIAL_FLAG:IS_CRAFTED_ARTIFACT]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SCARF_HEAD:PORTRAIT_GOBLIN_CLOTHING_SCARF_HEAD:5:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_SCARF_HEAD]
			[ITEM_QUALITY:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SCARF_HEAD:PORTRAIT_GOBLIN_CLOTHING_SCARF_HEAD:4:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_SCARF_HEAD]
			[ITEM_QUALITY:4]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SCARF_HEAD:PORTRAIT_GOBLIN_CLOTHING_SCARF_HEAD:3:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_SCARF_HEAD]
			[ITEM_QUALITY:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SCARF_HEAD:PORTRAIT_GOBLIN_CLOTHING_SCARF_HEAD:2:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_SCARF_HEAD]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:SCARF_HEAD:1:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SCARF_HEAD:PORTRAIT_GOBLIN_CLOTHING_SCARF_HEAD:1:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_SCARF_HEAD]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:SCARF_HEAD:1:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SCARF_HEAD:PORTRAIT_GOBLIN_CLOTHING_SCARF_HEAD:0:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_SCARF_HEAD]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:SCARF_HEAD:1:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SCARF_HEAD:PORTRAIT_GOBLIN_CLOTHING_SCARF_HEAD:2:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_SCARF_HEAD]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:SCARF_HEAD:2:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SCARF_HEAD:PORTRAIT_GOBLIN_CLOTHING_SCARF_HEAD:1:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_SCARF_HEAD]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:SCARF_HEAD:2:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SCARF_HEAD:PORTRAIT_GOBLIN_CLOTHING_SCARF_HEAD:0:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_SCARF_HEAD]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:SCARF_HEAD:2:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SCARF_HEAD:PORTRAIT_GOBLIN_CLOTHING_SCARF_HEAD:2:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_SCARF_HEAD]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:SCARF_HEAD:3:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SCARF_HEAD:PORTRAIT_GOBLIN_CLOTHING_SCARF_HEAD:1:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_SCARF_HEAD]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:SCARF_HEAD:3:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_SCARF_HEAD:PORTRAIT_GOBLIN_CLOTHING_SCARF_HEAD:0:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_SCARF_HEAD]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:SCARF_HEAD:3:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]

		[LAYER:CLOTHING_HELM:PORTRAIT_GOBLIN_CLOTHING_HELM:6:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HELM]
			[CONDITION_MATERIAL_FLAG:IS_CRAFTED_ARTIFACT]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_HELM:PORTRAIT_GOBLIN_CLOTHING_HELM:5:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HELM]
			[ITEM_QUALITY:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_HELM:PORTRAIT_GOBLIN_CLOTHING_HELM:4:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HELM]
			[ITEM_QUALITY:4]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_HELM:PORTRAIT_GOBLIN_CLOTHING_HELM:3:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HELM]
			[ITEM_QUALITY:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_HELM:PORTRAIT_GOBLIN_CLOTHING_HELM:2:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HELM]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:HELM:1:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_HELM:PORTRAIT_GOBLIN_CLOTHING_HELM:1:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HELM]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:HELM:1:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_HELM:PORTRAIT_GOBLIN_CLOTHING_HELM:0:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HELM]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:HELM:1:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_HELM:PORTRAIT_GOBLIN_CLOTHING_HELM:2:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HELM]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:HELM:2:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_HELM:PORTRAIT_GOBLIN_CLOTHING_HELM:1:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HELM]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:HELM:2:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_HELM:PORTRAIT_GOBLIN_CLOTHING_HELM:0:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HELM]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:HELM:2:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_HELM:PORTRAIT_GOBLIN_CLOTHING_HELM:2:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HELM]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:HELM:3:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_HELM:PORTRAIT_GOBLIN_CLOTHING_HELM:1:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HELM]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:HELM:3:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_HELM:PORTRAIT_GOBLIN_CLOTHING_HELM:0:2]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HELM]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:HELM:3:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]

		[LAYER:CLOTHING_HOOD:PORTRAIT_GOBLIN_CLOTHING_HOOD:6:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HOOD]
			[CONDITION_MATERIAL_FLAG:IS_CRAFTED_ARTIFACT]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_HOOD:PORTRAIT_GOBLIN_CLOTHING_HOOD:5:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HOOD]
			[ITEM_QUALITY:5]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_HOOD:PORTRAIT_GOBLIN_CLOTHING_HOOD:4:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HOOD]
			[ITEM_QUALITY:4]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_HOOD:PORTRAIT_GOBLIN_CLOTHING_HOOD:3:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HOOD]
			[ITEM_QUALITY:3]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_HOOD:PORTRAIT_GOBLIN_CLOTHING_HOOD:2:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HOOD]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:HOOD:1:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_HOOD:PORTRAIT_GOBLIN_CLOTHING_HOOD:1:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HOOD]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:HOOD:1:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_HOOD:PORTRAIT_GOBLIN_CLOTHING_HOOD:0:0]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HOOD]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:HOOD:1:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_HOOD:PORTRAIT_GOBLIN_CLOTHING_HOOD:2:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HOOD]
			[ITEM_QUALITY:2]
			[CONDITION_RANDOM_PART_INDEX:HOOD:2:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_HOOD:PORTRAIT_GOBLIN_CLOTHING_HOOD:1:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HOOD]
			[ITEM_QUALITY:1]
			[CONDITION_RANDOM_PART_INDEX:HOOD:2:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[LAYER:CLOTHING_HOOD:PORTRAIT_GOBLIN_CLOTHING_HOOD:0:1]
			[CONDITION_ITEM_WORN:BY_CATEGORY:BODY_UPPER:ARMOR:ITEM_ARMOR_CLOAK]
			[CONDITION_ITEM_WORN:BY_CATEGORY:HEAD:HELM:ITEM_HELM_HOOD]
			[ITEM_QUALITY:0]
			[CONDITION_RANDOM_PART_INDEX:HOOD:2:2]
			[USE_STANDARD_PALETTE_FROM_ITEM]
		[END_LAYER_GROUP]
