code:
setup.colours = {
	// Canvas renderer filters applied to different sprite palettes
	sprite_prefilters: {
		grayscale: { // For grayscale sprites with #808080 base
			desaturate: false,
			brightness: 0.0,
			contrast: 1.0,
		},
		hair: {
			desaturate: true,
			brightness: 0.0,
			contrast: 1.0
		},
		brows: {
			desaturate: true,
			brightness: 0.0,
			contrast: 1.0
		},
		pbhair: {
			desaturate: true,
			brightness: 0.0,
			contrast: 1.0
		},
		eyes: {
			desaturate: true,
			brightness: 0.0,
			contrast: 1.0
		},
		clothes: { // For red-base clothes
			desaturate: true,
			brightness: 0.4,
			contrast: 1.0
		},
		clothes_bright: { // For red-base clothes with brighter, hair-like palette
			desaturate: true,
			brightness: 0.0,
			contrast: 1.0
		},
		mascara: {
			desaturate: true,
			brightness: 0.4,
			contrast: 1.0
		},
		lipstick: {
			desaturate: true,
			brightness: 0.4,
			contrast: 1.0
		},
		eyeshadow: {
			desaturate: true,
			brightness: 0.4,
			contrast: 1.0
		}
	},

	// Empty collections are populated later in this file
	hair: [],
	hair_map: {}, // Maps are auto-generated in the end of file
	hair_default: { // Default canvas filter options
		blendMode: 'hard-light',
	},
	eyes: [],
	eyes_map: {},
	eyes_default: {
		blendMode: 'hard-light',
	},
	clothes: [],
	clothes_map: {},
	clothes_default: {
		blendMode: "hard-light"
	},
	mascara: [],
	mascara_map: {},
	mascara_default: {
		blendMode: "hard-light"
	},
	lipstick: [],
	lipstick_map: {},
	lipstick_default: {
		blendMode: "hard-light"
	},
	eyeshadow: [],
	eyeshadow_map: {},
	eyeshadow_default: {
		blendMode: "hard-light"
	},

	skin_gradients: {
		light:     ['#ffffff', '#ffd2ac'],
		medium:    ['#ffd2ac', '#8a614d'],
		dark:      ['#8a614d', '#39241a'],
		gyaru:     ['#ffffff', '#ffd2ac', '#8a614d', '#39241a'],
		ylight:    ['#f0ffe6', '#f0e4bc'],
		ymedium:   ['#f0e4bc', '#8e7f68'],
		ydark:     ['#8e7f68', '#483f35'],
		ygyaru:    ['#f0ffe6', '#f0e4bc', '#8e7f68', '#483f35']
	},
	/**
	 * Get canvas filter for skin of given type and tan progression (0..1)
	 */
	getSkinFilter(type, tan) {
		return {
			blend: setup.colours.getSkinRgb(type, tan),
			blendMode: "multiply"
		}
	},
	getSkinRgb(type, tan) {
		tan = Math.clamp(0, tan, 1);
		let gradient = setup.colours.skin_gradients[type];
		if (!gradient) {
			Errors.report("Unknown skin gradient "+type);
			return '#ffffff';
		}
		return Renderer.lintRgbStaged(tan, gradient).toHexString();
	}
};

/**
 * Hair colour record:
 * - variable:string - Value of variables
 * - name:string - Display name
 * - name_cap:string - Display name, capitalised
 * - csstext:string - CSS class added to text
 * - natural:boolean - Is option for natural hair
 * - dye:boolean - Is option for hair dyes
 * - canvasfilter:object - Canvas model filter
 */
setup.colours.hair = [{
	"variable": "random",//Only used at the start for a randomised colour
	"name": "random",
	"name_cap": "Random",
	"csstext": "Random",
	"natural": true,
	"dye": false,
	"canvasfilter": {
		"blend": "#f53d43"
	}
}, {
	"variable": "red",
	"name": "red",
	"name_cap": "Red",
	"csstext": "red",
	"natural": true,
	"dye": true,
	"canvasfilter": {
		"blend": "#f53d43"
	}
}, {
	"variable": "jetblack",
	"name": "jet black",
	"name_cap": "Jet Black",
	"csstext": "black",
	"natural": true,
	"dye": true,
	"canvasfilter": {
		"blend": "#454545",
		"brightness": -0.3
	}
}, {
	"variable": "black",
	"name": "black",
	"name_cap": "Black",
	"csstext": "black",
	"natural": true,
	"dye": true,
	"canvasfilter": {
		"blend": "#504949",
		"brightness": -0.3
	}
}, {
	"variable": "blond",
	"name": "blond",
	"name_cap": "Blond",
	"csstext": "gold",
	"natural": true,
	"dye": true,
	"canvasfilter": {
		"blend": "#d5b43f"
	}
}, {
	"variable": "softblond",
	"name": "soft blond",
	"name_cap": "Soft Blond",
	"csstext": "softblond",
	"natural": true,
	"dye": true,
	"canvasfilter": {
		"blend": "#d1b761"
	}
}, {
	"variable": "platinumblond",
	"name": "platinum blond",
	"name_cap": "Platinum Blond",
	"csstext": "platinum",
	"natural": true,
	"dye": true,
	"canvasfilter": {
		"blend": "#ead27b"
	}
}, {
	"variable": "golden",
	"name": "golden",
	"name_cap": "Golden",
	"csstext": "gold",
	"natural": false,
	"dye": true,
	"canvasfilter": {
		"blend": "#ffc800"
	}
}, {
	"variable": "ashyblond",
	"name": "ashy blond",
	"name_cap": "Ashy Blond",
	"csstext": "ashy",
	"natural": true,
	"dye": true,
	"canvasfilter": {
		"blend": "#b19981"
	}
}, {
	"variable": "strawberryblond",
	"name": "strawberry blond",
	"name_cap": "Strawberry Blond",
	"csstext": "strawberry",
	"natural": true,
	"dye": true,
	"canvasfilter": {
		"blend": "#eb9e47"
	}
}, {
	"variable": "darkbrown",
	"name": "dark brown",
	"name_cap": "Dark Brown",
	"csstext": "brown",
	"natural": false,
	"dye": true,
	"canvasfilter": {
		"blend": "#784a3a",
		"brightness": -0.3
	}
}, {
	"variable": "brown",
	"name": "brown",
	"name_cap": "Brown",
	"csstext": "brown",
	"natural": true,
	"dye": true,
	"canvasfilter": {
		"blend": "#8f6e56",
		"brightness": -0.3
	}
}, {
	"variable": "softbrown",
	"name": "soft brown",
	"name_cap": "Soft Brown",
	"csstext": "softbrown",
	"natural": true,
	"dye": true,
	"canvasfilter": {
		"blend": "#bf7540",
		"brightness": -0.3
	}
}, {
	"variable": "lightbrown",
	"name": "light brown",
	"name_cap": "Light Brown",
	"csstext": "lightbrown",
	"natural": true,
	"dye": true,
	"canvasfilter": {
		"blend": "#e49b67",
		"brightness": -0.3
	}
}, {
	"variable": "burntorange",
	"name": "burnt orange",
	"name_cap": "Burnt Orange",
	"csstext": "burntorange",
	"natural": true,
	"dye": true,
	"canvasfilter": {
		"blend": "#e08d52",
		"brightness": -0.3
	}
}, {
	"variable": "ginger",
	"name": "ginger",
	"name_cap": "Ginger",
	"csstext": "tangerine",
	"natural": true,
	"dye": true,
	"canvasfilter": {
		"blend": "#ff6a00"
	}
}, {
	"variable": "bloodorange",
	"name": "blood orange",
	"name_cap": "Blood Orange",
	"csstext": "",
	"natural": false,
	"dye": true,
	"canvasfilter": {
		"blend": "#ff4000"
	}
}, {
	"variable": "blue",
	"name": "blue",
	"name_cap": "Blue",
	"csstext": "",
	"natural": false,
	"dye": true,
	"canvasfilter": {
		"blend": "#3973ac",
		"brightness": -0.3
	}
}, {
	"variable": "deepblue",
	"name": "deep blue",
	"name_cap": "Deep Blue",
	"csstext": "",
	"natural": false,
	"dye": true,
	"canvasfilter": {
		"blend": "#0d2f73",
		"brightness": -0.3
	}
}, {
	"variable": "neonblue",
	"name": "neon blue",
	"name_cap": "Neon Blue",
	"csstext": "",
	"natural": false,
	"dye": true,
	"canvasfilter": {
		"blend": "#00d5ff"
	}
}, {
	"variable": "green",
	"name": "green",
	"name_cap": "Green",
	"csstext": "",
	"natural": false,
	"dye": true,
	"canvasfilter": {
		"blend": "#005c00"
	}
}, {
	"variable": "darklime",
	"name": "dark lime",
	"name_cap": "Dark Lime",
	"csstext": "",
	"natural": false,
	"dye": true,
	"canvasfilter": {
		"blend": "#4a8000"
	}
}, {
	"variable": "toxicgreen",
	"name": "toxic green",
	"name_cap": "Toxic Green",
	"csstext": "",
	"natural": false,
	"dye": true,
	"canvasfilter": {
		"blend": "#99e600"
	}
}, {
	"variable": "teal",
	"name": "teal",
	"name_cap": "Teal",
	"csstext": "",
	"natural": false,
	"dye": true,
	"canvasfilter": {
		"blend": "#008040"
	}
}, {
	"variable": "pink",
	"name": "pink",
	"name_cap": "Pink",
	"csstext": "",
	"natural": false,
	"dye": true,
	"canvasfilter": {
		"blend": "#e05281"
	}
}, {
	"variable": "brightpink",
	"name": "bright pink",
	"name_cap": "Bright Pink",
	"csstext": "",
	"natural": false,
	"dye": true,
	"canvasfilter": {
		"blend": "#ff80aa"
	}
}, {
	"variable": "hotpink",
	"name": "hot pink",
	"name_cap": "Hot Pink",
	"csstext": "",
	"natural": false,
	"dye": true,
	"canvasfilter": {
		"blend": "#ff4dc4"
	}
}, {
	"variable": "softpink",
	"name": "soft pink",
	"name_cap": "Soft Pink",
	"csstext": "",
	"natural": false,
	"dye": true,
	"canvasfilter": {
		"blend": "#d6855c",
		"brightness": 0.2
	}
}, {
	"variable": "crimson",
	"name": "crimson",
	"name_cap": "Crimson",
	"csstext": "",
	"natural": false,
	"dye": true,
	"canvasfilter": {
		"blend": "#b30000"
	}
}, {
	"variable": "purple",
	"name": "purple",
	"name_cap": "Purple",
	"csstext": "",
	"natural": false,
	"dye": true,
	"canvasfilter": {
		"blend": "#48095d"
	}
}, {
	"variable": "mediumpurple",
	"name": "medium purple",
	"name_cap": "Medium Purple",
	"csstext": "",
	"natural": false,
	"dye": true,
	"canvasfilter": {
		"blend": "#3600b2"
	}
}, {
	"variable": "brightpurple",
	"name": "bright purple",
	"name_cap": "Bright Purple",
	"csstext": "",
	"natural": false,
	"dye": true,
	"canvasfilter": {
		"blend": "#ab66ff"
	}
}, {
	"variable": "white",
	"name": "white",
	"name_cap": "White",
	"csstext": "",
	"natural": false,
	"dye": true,
	"canvasfilter": {
		"blend": "#808080",
		"brightness": 0.3
	}
}, {
	"variable": "snowwhite",
	"name": "snow white",
	"name_cap": "Snow White",
	"csstext": "",
	"natural": false,
	"dye": true,
	"canvasfilter": {
		"blend": "#FFFFFF"
	}
}
];

/**
 * Eyes colour record:
 * - variable:string - Value of variables
 * - name:string - Display name
 * - name_cap:string - Display name, capitalised
 * - csstext:string - CSS class added to text
 * - natural:boolean - Is option for natural eyes
 * - lens:boolean - Is option for contact lenses
 * - canvasfilter:object - Canvas model filter
 */
setup.colours.eyes = [{
	variable: "random",//Only used at the start for a randomised colour
	name: "random",
	name_cap: "Random",
	csstext: "Random",
	natural: true,
	lens: false,
	canvasfilter: {
		blend: "#b016d8"
	}
},
	{
	variable: "purple",
	name: "purple",
	name_cap: "Purple",
	csstext: "purple",
	natural: true,
	lens: true,
	canvasfilter: {
		blend: "#b016d8"
	}
}, {
	variable: "dark blue",
	name: "dark blue",
	name_cap: "Dark Blue",
	csstext: "blue",
	natural: true,
	lens: true,
	canvasfilter: {
		blend: "#3b6ba4"
	}
}, {
	variable: "light blue",
	name: "light blue",
	name_cap: "Light Blue",
	csstext: "lblue",
	natural: true,
	lens: true,
	canvasfilter: {
		blend: "#00D9F7",
		brightness: +0.2
	}
}, {
	variable: "amber",
	name: "amber",
	name_cap: "Amber",
	csstext: "tangerine",
	natural: true,
	lens: true,
	canvasfilter: {
		blend: "#f6ca70"
	}
}, {
	variable: "hazel",
	name: "hazel",
	name_cap: "Hazel",
	csstext: "brown",
	natural: true,
	lens: true,
	canvasfilter: {
		blend: "#917742"
	}
}, {
	variable: "green",
	name: "green",
	name_cap: "Green",
	csstext: "green",
	natural: true,
	lens: true,
	canvasfilter: {
		blend: "#95b521"
	}
}, {
	variable: "light green",
	name: "light green",
	name_cap: "Light Green",
	csstext: "green",
	natural: true,
	lens: true,
	canvasfilter: {
		blend: "#D5F075"
	}
}, {
	variable: "red",
	name: "red",
	name_cap: "Red",
	csstext: "red",
	natural: true,
	lens: true,
	canvasfilter: {
		blend: "#f45b08"
	}
}, {
	variable: "pink",
	name: "pink",
	name_cap: "Pink",
	csstext: "pink",
	natural: true,
	lens: true,
	canvasfilter: {
		blend: "#F76EF7",
		brightness: +0.2
	}
}, {
	variable: "grey",
	name: "grey",
	name_cap: "Grey",
	csstext: "grey",
	natural: true,
	lens: true,
	canvasfilter: {
		blend: "#a9a9a9"
	}
}, {
	variable: "red possessed",
	name: "red possessed",
	name_cap: "Red Possessed",
	csstext: "redPossessed",
	natural: false,
	lens: false,
	canvasfilter: {
		blend: "#f40101",
		brightness: +0.2,
		}
}, {
	variable: "blue possessed",
	name: "blue possessed",
	name_cap: "Blue Possessed",
	csstext: "bluePossessed",
	natural: false,
	lens: false,
	canvasfilter: {
		blend: "#0F52BA",
		brightness: +0.4,
		}
}];

/**
 * Clothes colour record:
 * - variable:string - Value of variables
 * - name:string - Display name
 * - name_cap:string - Display name, capitalised
 * - csstext:string - CSS class added to text
 * - canvasfilter:object - Canvas model filter
 */
setup.colours.clothes = [{
	"variable": "blue",
	"name": "blue",
	"name_cap": "Blue",
	"csstext": "blue",
	"canvasfilter": {"blend": "#0132ff"}
}, {
	"variable": "light blue",
	"name": "light blue",
	"name_cap": "Light Blue",
	"csstext": "light-blue",
	"canvasfilter": {"blend": "#559BC0"}
}, {
	"variable": "white",
	"name": "white",
	"name_cap": "White",
	"csstext": "white",
	"canvasfilter": {"blend": "#ffffff"}
}, {
	"variable": "pale white",
	"name": "pale white",
	"name_cap": "Pale White",
	"csstext": "white",
	"canvasfilter": {"blend": "#949494"}
}, {
	"variable": "red",
	"name": "red",
	"name_cap": "Red",
	"csstext": "red",
	"canvasfilter": {"blend": "#ff0000"}
}, {
	"variable": "green",
	"name": "green",
	"name_cap": "Green",
	"csstext": "green",
	"canvasfilter": {"blend": "#00aa00"}
}, {
	"variable": "light green",
	"name": "light green",
	"name_cap": "Light Green",
	"csstext": "green",
	"canvasfilter": {"blend": "#72AC72"}
}, {
	"variable": "black",
	"name": "black",
	"name_cap": "Black",
	"csstext": "black",
	"canvasfilter": {"blend": "#353535"}
}, {
	"variable": "pink",
	"name": "pink",
	"name_cap": "Pink",
	"csstext": "pink",
	"canvasfilter": {"blend": "#fe3288"}
}, {
	"variable": "light pink",
	"name": "light pink",
	"name_cap": "Light Pink",
	"csstext": "light-pink",
	"canvasfilter": {"blend": "#d67caf"}
}, {
	"variable": "purple",
	"name": "purple",
	"name_cap": "Purple",
	"csstext": "purple",
	"canvasfilter": {"blend": "#8f09f3"}
}, {
	"variable": "tangerine",
	"name": "tangerine",
	"name_cap": "Tangerine",
	"csstext": "tangerine",
	"canvasfilter": {"blend": "#ff6f00"}
}, {
	"variable": "pale tangerine",
	"name": "pale tangerine",
	"name_cap": "Pale Tangerine",
	"csstext": "pale-tangerine",
	"canvasfilter": {"blend": "#ff3300"}
}, {
	"variable": "teal",
	"name": "teal",
	"name_cap": "Teal",
	"csstext": "teal",
	"canvasfilter": {"blend": "#2bcece"}
}, {
	"variable": "yellow",
	"name": "yellow",
	"name_cap": "Yellow",
	"csstext": "yellow",
	"canvasfilter": {"blend": "#ffdd33", "brightness": 0.2 }
}, {
	"variable": "pale yellow",
	"name": "pale yellow",
	"name_cap": "Pale Yellow",
	"csstext": "pale-yellow",
	"canvasfilter": {"blend": "#ffaa00"}
}, {
	"variable": "brown",
	"name": "brown",
	"name_cap": "Brown",
	"csstext": "brown",
	"canvasfilter": {"blend": "#703000"}
}, {
	"variable": "tan",
	"name": "tan",
	"name_cap": "Tan",
	"csstext": "tan",
	"canvasfilter": {"blend": "#c3ad91"}
}, {
	"variable": "grey",
	"name": "grey",
	"name_cap": "Grey",
	"csstext": "grey",
	"canvasfilter": {"blend": "#b5aea6"}
}, {
	"variable": "sand",
	"name": "sand",
	"name_cap": "Sand",
	"csstext": "sand",
	"canvasfilter": {"blend": "#ebd1ad"}
}, {
	"variable": "off-white",
	"name": "off-white",
	"name_cap": "Off-white",
	"csstext": "off-white",
	"canvasfilter": {"blend": "#ecece8"}
}, {
	"variable": "navy",
	"name": "navy",
	"name_cap": "Navy",
	"csstext": "navy",
	"canvasfilter": {"blend": "#292934"}
}, {
	"variable": "olive",
	"name": "olive",
	"name_cap": "Olive",
	"csstext": "olive",
	"canvasfilter": {"blend": "#5f5a44"}
}, {
	"variable": "wine",
	"name": "wine",
	"name_cap": "Wine",
	"csstext": "wine",
	"canvasfilter": {"blend": "#65252d"}
}, {
	"variable": "steel",
	"name": "steel",
	"name_cap": "Steel",
	"csstext": "steel",
	"canvasfilter": {"blend": "#999999"}
}, {
	"variable": "blue steel",
	"name": "blue steel",
	"name_cap": "Blue Steel",
	"csstext": "blue-steel",
	"canvasfilter": {"blend": "#646e82"}
}, {
	"variable": "bronze",
	"name": "bronze",
	"name_cap": "Bronze",
	"csstext": "bronze",
	"canvasfilter": {"blend": "#cd9932"}
}, {
	"variable": "gold",
	"name": "gold",
	"name_cap": "Gold",
	"csstext": "gold",
	"canvasfilter": {"blend": "#ffbf00", "brightness": 0.1}
}, {
	"variable": "silver",
	"name": "silver",
	"name_cap": "Silver",
	"csstext": "silver",
	"canvasfilter": {"blend": "#C0C0C0"}
}];
/**
 * Makeup colour records:
 * - variable:string - Value of variables
 * - name:string - Display name
 * - name_cap:string - Display name, capitalised
 * - csstext:string - CSS class added to text
 * - canvasfilter:object - Canvas model filter
 */
setup.colours.lipstick = [
	{
		variable: "red",
		name: "red",
		name_cap: "Red",
		csstext: "red",
		canvasfilter: {
			blend: "#EC3535"
		}
	}, {
		variable: "blue",
		name: "blue",
		name_cap: "Blue",
		csstext: "blue",
		canvasfilter: {
			blend: "#4372FF"
		}
	}, {
		variable: "green",
		name: "green",
		name_cap: "Green",
		csstext: "green",
		canvasfilter: {
			blend: "#195205"
		}
	}, {
		variable: "purple",
		name: "purple",
		name_cap: "Purple",
		csstext: "purple",
		canvasfilter: {
			blend: "#AA4BC8"
		}
	}, {
		variable: "orange",
		name: "orange",
		name_cap: "Orange",
		csstext: "orange",
		canvasfilter: {
			blend: "#f28500"
		}
	}, {
		variable: "lime",
		name: "lime",
		name_cap: "Lime",
		csstext: "lime",
		canvasfilter: {
			blend: "#38B20A"
		}
	}, {
		variable: "pink",
		name: "pink",
		name_cap: "Pink",
		csstext: "pink",
		canvasfilter: {
			blend: "#E40081"
		}
	}, {
		variable: "light pink",
		name: "light pink",
		name_cap: "Light Pink",
		csstext: "light-pink",
		canvasfilter: {
			blend: "#d67caf"
		}
	}, {
		variable: "dark red",
		name: "dark red",
		name_cap: "Dark Red",
		csstext: "red",
		canvasfilter: {
			blend: "#BD0000"
		}
	}, {
		variable: "black",
		name: "black",
		name_cap: "Black",
		csstext: "black",
		canvasfilter: {
			blend: "#292929"
		}
	}
];
setup.colours.eyeshadow = [
	{
		variable: "red",
		name: "red",
		name_cap: "Red",
		csstext: "red",
		canvasfilter: {
			blend: "#EC3535"
		}
	}, {
		variable: "pink",
		name: "pink",
		name_cap: "Pink",
		csstext: "pink",
		canvasfilter: {
			blend: "#E40081"
		}
	}, {
		variable: "light pink",
		name: "light pink",
		name_cap: "Light Pink",
		csstext: "light-pink",
		canvasfilter: {
			blend: "#d67caf"
		}
	}, {
		variable: "green",
		name: "green",
		name_cap: "Green",
		csstext: "green",
		canvasfilter: {
			blend: "#38B20A"
		}
	}, {
		variable: "light green",
		name: "light green",
		name_cap: "Light green",
		csstext: "green",
		canvasfilter: {
			blend: "#7caf7c"
		}
	}, {
		variable: "blue",
		name: "blue",
		name_cap: "Blue",
		csstext: "blue",
		canvasfilter: {
			blend: "#4372FF"
		}
	}, {
		variable: "light blue",
		name: "light blue",
		name_cap: "Light Blue",
		csstext: "light-blue",
		canvasfilter: {
			blend: "#559BC0"
		}
	}, {
		variable: "purple",
		name: "purple",
		name_cap: "Purple",
		csstext: "purple",
		canvasfilter: {
			blend: "#AA4BC8"
		}
	}, {
		variable: "orange",
		name: "orange",
		name_cap: "Orange",
		csstext: "orange",
		canvasfilter: {
			blend: "#f28500"
		}
	}, {
		variable: "yellow",
		name: "yellow",
		name_cap: "Yellow",
		csstext: "yellow",
		canvasfilter: {
			blend: "#FFD700"
		}
	}, {
		variable: "brown",
		name: "brown",
		name_cap: "Brown",
		csstext: "brown",
		canvasfilter: {
			blend: "#4C2217"
		}
	}, {
		variable: "light brown",
		name: "light brown",
		name_cap: "Light Brown",
		csstext: "lightbrown",
		canvasfilter: {
			blend: "#C5793A"
		}
	}, {
		variable: "dark brown",
		name: "dark brown",
		name_cap: "Dark Brown",
		csstext: "brown",
		canvasfilter: {
			blend: "#4C2217"
		}
	}, {
		variable: "black",
		name: "black",
		name_cap: "Black",
		csstext: "black",
		canvasfilter: {
			blend: "#292929"
		}
	}, {
		variable: "white",
		name: "white",
		name_cap: "White",
		csstext: "",
		canvasfilter: {
			blend: "#EEEEEE"
		}
	}, {
		variable: "silver",
		name: "silver",
		name_cap: "Silver",
		csstext: "silver",
		canvasfilter: {
			blend: "#C0C0C0"
		}
	}
];
setup.colours.mascara = [
	{
		variable: "black",
		name: "black",
		name_cap: "Black",
		csstext: "black",
		canvasfilter: {
			blend: "#292929"
		}
	}
];

/*
 * Maps to easily access colour record by its variable code, ex. setup.colours.hair_map[$haircolour]
 */

function buildColourMap(name) {
	let array = setup.colours[name];
	let map = setup.colours[name+"_map"];
	let defaultFilter = setup.colours[name+"_default"];
	for (let item of array) {
		if (defaultFilter) Renderer.mergeLayerData(item.canvasfilter, defaultFilter);
		let key = item.variable;
		if (key in map) {
			console.error("Duplicate "+name+" '"+key+"'");
		}
		map[key] = item;
	}
	return map;
}

buildColourMap("hair");
buildColourMap("eyes");
buildColourMap("clothes");
buildColourMap("lipstick");
buildColourMap("mascara");
buildColourMap("eyeshadow");

/**
 * Tries to guess colour in the map by removing spaces or replacing them with '-' and checking against name.
 * Return colour record if found, and null if no
 */
setup.guessColourInMap = function(map, colour) {
	if (colour in map) return map[colour];

	let testname = colour.replace(/ /g, '');
	if (testname in map) return map[testname];

	testname = colour.replace(/ /g, '-');
	if (testname in map) return map[testname];

	for (let record of Object.values(map)) {
		if (record.name === colour) return record;
	}
	return null;
}
/**
 * Tries to guess readable name of the colour by looking it in all known maps.
 * If not found, return unchanged
 */
setup.colourName = function (colour) {
	for (let map of [
		setup.colours.hair_map,
		setup.colours.eyes_map,
		setup.colours.clothes_map,
		setup.colours.mascara_map,
		setup.colours.lipstick_map,
		setup.colours.eyeshadow_map
	]) {
		if (colour in map) return map[colour].name;
	}
	return colour;
}


code:
:: npcList [widget]
<<widget "npcList">>
/* note: anus, ballssize, buttsize, bottomsize are currently unused. and why is speechXescape even there? */
<<set $baseNPC = {penis: 0, vagina: 0, breastsdesc: 0, chest: 0, lactation: 0, lefthand: 0, righthand: 0, anus: 0, mouth: 0, gender: 0, description: 0, fullDescription: 0, insecurity: 0, pronoun: 0, pronouns: {he: 0, his: 0}, penissize: 0, breastsize: 0, bottomsize: 0, ballssize: 0, penisdesc: 0, breastdesc: 0, health: 0, healthmax: 0, skincolour: 0, teen: 0, adult: 0, intro:0, speechpenisescape: 0, speechvaginaescape: 0, speechanusescape:0, type: 0, stance: 0, monster: 0, active: 0}>>

<<set _n1 to clone($baseNPC)>>
<<set _n2 to clone($baseNPC)>>
<<set _n3 to clone($baseNPC)>>
<<set _n4 to clone($baseNPC)>>
<<set _n5 to clone($baseNPC)>>
<<set _n6 to clone($baseNPC)>>

<<set $NPCList = [_n1, _n2, _n3, _n4, _n5, _n6]>>

<<for _i = 0; _i < $NPCList.length; _i++>>
	<<set $NPCList[_i].lefthand to "none">>
	<<set $NPCList[_i].lefthand to "none">>
	<<set $NPCList[_i].righthand to "none">>
	<<set $NPCList[_i].penis to "none">>
	<<set $NPCList[_i].vagina to "none">>
	<<set $NPCList[_i].mouth to "none">>
	<<set $NPCList[_i].chest to "none">>
	<<set $NPCList[_i].gender to 0>>
	<<set $NPCList[_i].pronoun to 0>>
	<<set $NPCList[_i].description to 0>>
	<<set $NPCList[_i].type to 0>>
	<<set $NPCList[_i].stance to 0>>
	<<set $NPCList[_i].monster to 0>>
<</for>>

<<set $BeastList to ["dog","cat","pig","wolf","dolphin","lizard","bear","boar","creature","horse","fox","hawk", "bunny", "prowler"]>>

<<set $npcListVersion to 1>>
<</widget>>

repo_name: Area/degrees

license: mit


code:
:: npcNamed [widget]
<<widget "npcNamed">>
<!-- To add new Named NPC, add new _nXX variable and tag values to end. Rest of code should automatically scope based on size of list. -->
<!-- NPC descriptions is set as names, and their titles are being established for compatibility with general NPCs -->
<<if $npcNamedVersion is 1>>
<<set _tempNPCName to clone($NPCName)>>
<</if>>
<<set $baseNNPC = {penis : 0, vagina: 0, gender: 0, description: 0, title: 0, insecurity: 0, pronoun: 0, penissize: 0, penisdesc: 0, bottomsize: 0, ballssize: 0, breastsize: 0, breastdesc: 0, breastsdesc: 0, skincolour: 0, teen: 0, adult: 0, init: 0, intro: 0, type: 0, trust: 0, love: 0, dom: 0, lust: 0, rage: 0, state: 0, trauma: 0, eyeColour: 0, hairColour: 0}>>

/*Old: {penis : 0, vagina: 0, gender: 0, description: 0, insecurity: 0, pronoun: 0, penissize: 0, penisdesc: 0, bottomsize: 0, ballssize: 0, breastsize: 0, breastdesc: 0, breastsdesc: 0, skincolour: 0, teen: 0, adult: 0, intro: 0, type: 0}*/

	<<set _n1 to clone($baseNNPC)>>
	<<set _n2 to clone($baseNNPC)>>
	<<set _n3 to clone($baseNNPC)>>
	<<set _n4 to clone($baseNNPC)>>
	<<set _n5 to clone($baseNNPC)>>
	<<set _n6 to clone($baseNNPC)>>
	<<set _n7 to clone($baseNNPC)>>
	<<set _n8 to clone($baseNNPC)>>
	<<set _n9 to clone($baseNNPC)>>
	<<set _n10 to clone($baseNNPC)>>
	<<set _n11 to clone($baseNNPC)>>
	<<set _n12 to clone($baseNNPC)>>
	<<set _n13 to clone($baseNNPC)>>
	<<set _n14 to clone($baseNNPC)>>
	<<set _n15 to clone($baseNNPC)>>
	<<set _n16 to clone($baseNNPC)>>
	<<set _n17 to clone($baseNNPC)>>
	<<set _n18 to clone($baseNNPC)>>
	<<set _n19 to clone($baseNNPC)>>
	<<set _n20 to clone($baseNNPC)>>
	<<set _n21 to clone($baseNNPC)>>
	<<set _n22 to clone($baseNNPC)>>
	<<set _n23 to clone($baseNNPC)>>
	<<set _n24 to clone($baseNNPC)>>
	<<set _n25 to clone($baseNNPC)>>
	<<set _n26 to clone($baseNNPC)>>
	<<set _n27 to clone($baseNNPC)>>
	<<set _n28 to clone($baseNNPC)>>
	<<set _n29 to clone($baseNNPC)>>
	<<set _n30 to clone($baseNNPC)>>
	<<set _n31 to clone($baseNNPC)>>

<<set $NPCName = [_n1, _n2, _n3, _n4, _n5, _n6, _n7, _n8, _n9, _n10, _n11, _n12, _n13, _n14, _n15, _n16, _n17, _n18, _n19, _n20, _n21, _n22, _n23, _n24, _n25, _n26, _n27, _n28, _n29, _n30, _n31]>>

<<set $NPCNameList to ["Avery","Bailey","Briar","Charlie","Darryl","Doren","Eden","Gwylan","Harper","Jordan","Kylar","Landry","Leighton","Mason","Morgan","River","Robin","Sam","Sirris","Whitney","Winter","Black Wolf","Niki","Quinn","Remy","Alex","Great Hawk","Wren","Sydney","Piper", "Raylan",]>>

<!-- Draft default pronoun list. Random selection is part of initNPCgender widget -->
/% <<set _pro to ["m","f","f","m","m","m","m","m","f","f","m","m","f","m","f","m","m","m","f","m","m","m","m","m","f","m","f","m"]>> %/

<<set _tit to ["businessperson", "caretaker", "brothel owner", "dance coach", "club owner","English teacher","hunter", "shopkeeper", "doctor","pious","loner","criminal","headteacher", "swimming teacher","sewer dweller","maths teacher","orphan","cafe owner","science teacher","bully", "history teacher","alpha","photographer","mayor","farmer","farmhand","terror","smuggler","faithful","sacrifice","cult leader"]>>

<<set _ins to ["weak","weak","looks","ethics","ethics","ethics","looks","weak","skill","ethics","weak","skill","skill","ethics","weak","ethics","ethics","ethics","ethics","looks","skill","weak","skill", "looks","looks","weak","looks","ethics","skill","ethics","weak"]>>

<!-- Type needs to conform to beast type: wolf, dog, etc. -->
<<set _tpe to ["human","human","human","human","human","human","human","human","human","human","human","human","human","human","human","human","human","human","human","human","human","wolf","human","human","human","human","hawk","human","human","human","human"]>>

<<set _swi to ["a","a","a","a","a","a","a","t","a","a","t","a","a","a","a","a","t","a","a","t","a","a","a","a","a","t","a","a","t","t","a"]>>

<<for _i to 0; _i lt $NPCName.length; _i++>>

	<<set $NPCName[_i].nam to $NPCNameList[_i]>>
	<<set $NPCName[_i].description to $NPCNameList[_i]>>
	<<set $NPCName[_i].title to _tit[_i]>>
	<<set $NPCName[_i].pronoun to "none">>
	<<set $NPCName[_i].gender to "none">>
	<<set $NPCName[_i].penissize to 0>>
	<<set $NPCName[_i].penisdesc to "none">>
	<<set $NPCName[_i].chastity to {penis:"", vagina:"", anus:""}>>
	<<if $npcNamedVersion isnot 1>>/*Keeps init from resetting for saves made in 0.2.5*/
		<<set $NPCName[_i].init to 0>>
	<</if>>
	<<set $NPCName[_i].insecurity to _ins[_i]>>
	<<if _swi[_i] is "t">>
		<<set $NPCName[_i].adult to 0>>
		<<set $NPCName[_i].teen to 1>>
	<<else>>
		<<set $NPCName[_i].adult to 1>>
		<<set $NPCName[_i].teen to 0>>
	<</if>>
	<<set $NPCName[_i].type to _tpe[_i]>>
	<<set $NPCName[_i].trust to 0>>
	<<set $NPCName[_i].love to 0>>
	<<set $NPCName[_i].dom to 0>>
	<<set $NPCName[_i].lust to 0>>
	<<set $NPCName[_i].rage to 0>>
	<<if $npcNamedVersion isnot 1>>
		<<set $NPCName[_i].state to "">>
	<</if>>
	<<set $NPCName[_i].trauma to 0>>
	<<set $NPCName[_i].purity to 0>>
	<<set $NPCName[_i].corruption to 0>>
<</for>>
<<generateNPCNameHairAndEyeColors true>>
<<npcPregnancyUpdater>>
<</widget>>

<<widget "npcNamedUpdate">>/*Applies new system to old saves, and carries over relevant variables.*/

<<if $npcNamedVersion isnot 2>><!-- Needed for compatibility with V2.5 and prior saves -->
	<<npcNamed>>

	<<for _e to 0; _e lt $NPCNameList.length; _e++>>
		<<set _lowerCaseName to $NPCNameList[_e].toLowerCase()>>
		<<set _upperCaseName to $NPCNameList[_e]>>

		<<if $npcNamedVersion is undefined>>
			/* .init and .pronoun can't be set within an easy loop */
			<<if V['init' + _lowerCaseName] isnot undefined>>
				<<set $NPCName[$NPCNameList.indexOf(_upperCaseName)].init to V['init' + _lowerCaseName]>>
				<<run delete V['init' + _lowerCaseName]>>
			<</if>>
			<<if V[_lowerCaseName + 'gender'] isnot undefined>>
				<<set $NPCName[$NPCNameList.indexOf(_upperCaseName)].pronoun to V[_lowerCaseName + 'gender']>>
				/* do not unset old gender, it is still needed within a loop */
			<</if>>
			/* set new npc attribute vars and remove old ones in a loop */
			<<for _attribute range ["trust", "love", "dom", "lust", "rage", "state", "trauma", "gender", "penissize", "penisdesc", "penis", "vagina"]>>
				<<if V[_lowerCaseName + _attribute] isnot undefined>>
					<<set $NPCName[$NPCNameList.indexOf(_upperCaseName)][_attribute] to V[_lowerCaseName + _attribute]>>
					<<run delete V[_lowerCaseName + _attribute]>>
				<</if>>
			<</for>>

		<<elseif $npcNamedVersion is 1>>
			<<if V[_lowerCaseName + 'gender'] isnot undefined>>
				<<set $NPCName[$NPCNameList.indexOf(_upperCaseName)].pronoun to V[_lowerCaseName + 'gender']>>
				<<run delete V[_lowerCaseName + 'gender']>>
			<</if>>
			<<if V[_lowerCaseName + 'penis'] isnot undefined>>
				<<set $NPCName[$NPCNameList.indexOf(_upperCaseName)].penis to V[_lowerCaseName + 'penis']>>
				<<run delete V[_lowerCaseName + 'penis']>>
			<</if>>
			<<if V[_lowerCaseName + 'vagina'] isnot undefined>>
				<<set $NPCName[$NPCNameList.indexOf(_upperCaseName)].vagina to V[_lowerCaseName + 'vagina']>>
				<<run delete V[_lowerCaseName + 'vagina']>>
			<</if>>
		<</if>>
	<</for>>

	<<set $npcNamedVersion to 2>>
	<<set $NPCName to clone(_tempNPCName)>>

	<<updateNewNamedNpcs>>
<</if>>
<</widget>>

<<widget "newNamedNpc">>
<<if $args[0]>>
	<<if !$NPCNameList.includes($args[0].nam)>>
		<<set _values to clone($args[0])>>
		<<set _valueKeys to Object.keys(_values)>>
		<<set _nnpc to clone(setup.baseNNPC)>>
		<<for _i to 0; _i lt _valueKeys.length; _i++>>
			<<set _nnpc[_valueKeys[_i]] to _values[_valueKeys[_i]]>>
		<</for>>
		<<set $NPCName.push(clone(_nnpc))>>
		<<set $NPCNameList.push(clone(_nnpc.nam))>>
	<</if>>
<</if>>
<</widget>>

<<widget "updateNewNamedNpcs">>
<<if $npcListVersion gte 1>>
	<<set _newNNPCs to {
		"blackwolf": {nam : "Black Wolf", penis : 0, vagina: 0, gender: "none", description: "Black Wolf", title: "alpha", insecurity: "weak", pronoun: "none", penissize: 0, penisdesc: "none", bottomsize: 0, ballssize: 0, breastsize: 0, breastdesc: 0, breastsdesc: 0, skincolour: 0, teen: 0, adult: 1, init: 0, intro: 0, type: "wolf", trust: 0, love: 0, dom: 0, lust: 0, rage: 0, state: 0, trauma: 0, purity: 0, corruption: 0},
		"niki": {nam : "Niki", penis : 0, vagina: 0, gender: "none", description: "Niki", title: "photographer", insecurity: "skill", pronoun: "none", penissize: 0, penisdesc: "none", bottomsize: 0, ballssize: 0, breastsize: 0, breastdesc: 0, breastsdesc: 0, skincolour: 0, teen: 0, adult: 1, init: 0, intro: 0, type: "human", trust: 0, love: 0, dom: 0, lust: 0, rage: 0, state: 0, trauma: 0, purity: 0, corruption: 0},
		"quinn": {nam : "Quinn", penis : 0, vagina: 0, gender: "none", description: "Quinn", title: "mayor", insecurity: "looks", pronoun: "none", penissize: 0, penisdesc: "none", bottomsize: 0, ballssize: 0, breastsize: 0, breastdesc: 0, breastsdesc: 0, skincolour: 0, teen: 0, adult: 1, init: 0, intro: 0, type: "human", trust: 0, love: 0, dom: 0, lust: 0, rage: 0, state: 0, trauma: 0, purity: 0, corruption: 0},
		"remy": {nam : "Remy", penis : 0, vagina: 0, gender: "none", description: "Remy", title: "farmer", insecurity: "looks", pronoun: "none", penissize: 0, penisdesc: "none", bottomsize: 0, ballssize: 0, breastsize: 0, breastdesc: 0, breastsdesc: 0, skincolour: 0, teen: 0, adult: 1, init: 0, intro: 0, type: "human", trust: 0, love: 0, dom: 0, lust: 0, rage: 0, state: 0, trauma: 0, purity: 0, corruption: 0},
		"alex": {nam : "Alex", penis : 0, vagina: 0, gender: "none", description: "Alex", title: "farmhand", insecurity: "weak", pronoun: "none", penissize: 0, penisdesc: "none", bottomsize: 0, ballssize: 0, breastsize: 0, breastdesc: 0, breastsdesc: 0, skincolour: 0, teen: 1, adult: 0, init: 0, intro: 0, type: "human", trust: 0, love: 0, dom: 0, lust: 0, rage: 0, state: 0, trauma: 0, purity: 0, corruption: 0},
		"greathawk": {nam : "Great Hawk", penis : 0, vagina: 0, gender: "none", description: "Great Hawk", title: "terror", insecurity: "looks", pronoun: "none", penissize: 0, penisdesc: "none", bottomsize: 0, ballssize: 0, breastsize: 0, breastdesc: 0, breastsdesc: 0, skincolour: 0, teen: 0, adult: 1, init: 0, intro: 0, type: "hawk", trust: 0, love: 0, dom: 100, lust: 0, rage: 0, state: 0, trauma: 0, purity: 0, corruption: 0},
		"wren": {nam : "Wren", penis : 0, vagina: 0, gender: "none", description: "Wren", title: "smuggler", insecurity: "ethics", pronoun: "none", penissize: 0, penisdesc: "none", bottomsize: 0, ballssize: 0, breastsize: 0, breastdesc: 0, breastsdesc: 0, skincolour: 0, teen: 0, adult: 1, init: 0, intro: 0, type: "human", trust: 0, love: 0, dom: 0, lust: 0, rage: 0, state: 0, trauma: 0, purity: 0, corruption: 0},
		"sydney": {nam : "Sydney", penis : 0, vagina: 0, gender: "none", description: "Sydney", title: "faithful", insecurity: "skill", pronoun: "none", penissize: 0, penisdesc: "none", bottomsize: 0, ballssize: 0, breastsize: 0, breastdesc: 0, breastsdesc: 0, skincolour: 0, teen: 1, adult: 0, init: 0, intro: 0, type: "human", trust: 0, love: 0, dom: 0, lust: 0, rage: 0, state: 0, trauma: 0, purity: 0, corruption: 0},
		"piper": {nam : "Piper", penis : 0, vagina: 0, gender: "none", description: "Piper", title: "sacrifice", insecurity: "ethics", pronoun: "none", penissize: 0, penisdesc: "none", bottomsize: 0, ballssize: 0, breastsize: 0, breastdesc: 0, breastsdesc: 0, skincolour: 0, teen: 1, adult: 0, init: 0, intro: 0, type: "human", trust: 0, love: 0, dom: 65, lust: 0, rage: 0, state: 0, trauma: 0, purity: 0, corruption: 0},
		"raylan": {nam : "Raylan", penis : 0, vagina: 0, gender: "none", description: "Raylan", title: "cult leader", insecurity: "Weak", pronoun: "none", penissize: 0, penisdesc: "none", bottomsize: 0, ballssize: 0, breastsize: 0, breastdesc: 0, breastsdesc: 0, skincolour: 0, teen: 0, adult: 1, init: 0, intro: 0, type: "human", trust: 0, love: 0, dom: 0, lust: 0, rage: 0, state: 0, trauma: 0, purity: 0, corruption: 0}
	}>>
	<<set _npcs to Object.keys(_newNNPCs)>>
	<<for _j to 0; _j lt _npcs.length; _j++>>
		<<if _newNNPCs[_npcs[_j]].nam isnot undefined and !$NPCNameList.includes(_newNNPCs[_npcs[_j]].nam)>>
			<<newNamedNpc _newNNPCs[_npcs[_j]]>>
			<<set _npcsAdded to true>>
		<</if>>
	<</for>>
	<<if _npcsAdded is true>>
		<<initnpcgender>>
	<</if>>
<</if>>
<</widget>>

<<widget "generateNPCNameHairAndEyeColors">>
<<for _i to 0; _i lt $NPCName.length; _i++>>
	<<switch $NPCName[_i].nam>>
		<<case "Whitney">>
			<<if $NPCName[_i].eyeColour is 0 or $NPCName[_i].eyeColour is undefined>>
				<<set $NPCName[_i].eyeColour to ["purple","dark blue","light blue","amber","hazel","green","red","pink","grey"].pluck()>>
			<</if>>
			<<if $NPCName[_i].hairColour is 0 or $NPCName[_i].hairColour is undefined or $args[0] is "default">>
				<<set $NPCName[_i].hairColour to "blond">>
			<</if>>
		<<case "Jordan">>
			<<if $NPCName[_i].eyeColour is 0 or $NPCName[_i].eyeColour is undefined or $args[0] is "default">>
				<<set $NPCName[_i].eyeColour to "light blue">>
				<<set $NPCName[_i].hairColour to "blond">>
			<</if>>
		<<case "Leighton">>
			<<if $NPCName[_i].eyeColour is 0 or $NPCName[_i].eyeColour is undefined or $args[0] is "default">>
				<<set $NPCName[_i].eyeColour to "green">>
				<<set $NPCName[_i].hairColour to "black">>
			<</if>>
		<<case "Landry">>
			<<if $NPCName[_i].eyeColour is 0 or $NPCName[_i].eyeColour is undefined>>
				<<set $NPCName[_i].eyeColour to ["purple","dark blue","light blue","amber","hazel","green","red","pink","grey"].pluck()>>
			<</if>>
			<<if $NPCName[_i].hairColour is 0 or $NPCName[_i].hairColour is undefined or $args[0] is "default">>
				<<set $NPCName[_i].hairColour to "black">>
			<</if>>
		<<case "Darryl">>
			<<if $NPCName[_i].eyeColour is 0 or $NPCName[_i].eyeColour is undefined>>
				<<set $NPCName[_i].eyeColour to ["purple","dark blue","light blue","amber","hazel","green","red","pink","grey"].pluck()>>
			<</if>>
			<<if $NPCName[_i].hairColour is 0 or $NPCName[_i].hairColour is undefined or $args[0] is "default">>
				<<set $NPCName[_i].hairColour to "brown">>
			<</if>>
		<<case "River">>
			<<if $NPCName[_i].eyeColour is 0 or $NPCName[_i].eyeColour is undefined or $args[0] is "default">>
				<<set $NPCName[_i].eyeColour to "light blue">>
				<<set $NPCName[_i].hairColour to "brown">>
			<</if>>
		<<case "Kylar" "Bailey">>
			<<if $NPCName[_i].eyeColour is 0 or $NPCName[_i].eyeColour is undefined>>
				<<set $NPCName[_i].eyeColour to ["purple","dark blue","light blue","amber","hazel","green","red","pink","grey"].pluck()>>
			<</if>>
			<<if $NPCName[_i].hairColour is 0 or $NPCName[_i].hairColour is undefined or $args[0] is "default">>
				<<set $NPCName[_i].hairColour to ["black","brown"].pluck()>>
			<</if>>
		<<case "Gwylan">>
			<<if $NPCName[_i].eyeColour is 0 or $NPCName[_i].eyeColour is undefined>>
				<<set $NPCName[_i].eyeColour to ["purple","dark blue","light blue","amber","hazel","green","red","pink","grey"].pluck()>>
			<</if>>
			<<if $NPCName[_i].hairColour is 0 or $NPCName[_i].hairColour is undefined or $args[0] is "default">>
				<<set $NPCName[_i].hairColour to "mousy">>
			<</if>>
		<<case "Doren">>
			<<if $NPCName[_i].eyeColour is 0 or $NPCName[_i].eyeColour is undefined>>
				<<set $NPCName[_i].eyeColour to ["purple","dark blue","light blue","amber","hazel","green","red","pink","grey"].pluck()>>
			<</if>>
			<<if $NPCName[_i].hairColour is 0 or $NPCName[_i].hairColour is undefined or $args[0] is "default">>
				<<set $NPCName[_i].hairColour to "red">>
			<</if>>
		<<case "Charlie" "Morgan">>
			<<if $NPCName[_i].eyeColour is 0 or $NPCName[_i].eyeColour is undefined>>
				<<set $NPCName[_i].eyeColour to ["purple","dark blue","light blue","amber","hazel","green","red","pink","grey"].pluck()>>
			<</if>>
			<<if $NPCName[_i].hairColour is 0 or $NPCName[_i].hairColour is undefined or $args[0] is "default">>
				<<set $NPCName[_i].hairColour to "ginger">>
			<</if>>
		<<case "Black Wolf">>
			<<if $NPCName[_i].eyeColour is 0 or $NPCName[_i].eyeColour is undefined>>
				<<set $NPCName[_i].eyeColour to ["purple","dark blue","light blue","amber","hazel","green","red","pink","grey"].pluck()>>
			<</if>>
			<<if $NPCName[_i].hairColour is 0 or $NPCName[_i].hairColour is undefined or $args[0] is "default">>
				<<set $NPCName[_i].hairColour to "black">>
			<</if>>
		<<case "Remy">>
			<<if $NPCName[_i].eyeColour is 0 or $NPCName[_i].eyeColour is undefined>>
				<<set $NPCName[_i].eyeColour to "green">>
			<</if>>
			<<if $NPCName[_i].hairColour is 0 or $NPCName[_i].hairColour is undefined or $args[0] is "default">>
				<<set $NPCName[_i].hairColour to "brown">>
			<</if>>
		<<case "Alex">>
			<<if $NPCName[_i].eyeColour is 0 or $NPCName[_i].eyeColour is undefined>>
				<<set $NPCName[_i].eyeColour to "green">>
			<</if>>
			<<if $NPCName[_i].hairColour is 0 or $NPCName[_i].hairColour is undefined or $args[0] is "default">>
				<<set $NPCName[_i].hairColour to "red">>
			<</if>>
		<<case "Great Hawk">>
			<<if $NPCName[_i].eyeColour is 0 or $NPCName[_i].eyeColour is undefined>>
				<<set $NPCName[_i].eyeColour to "light blue">>
			<</if>>
			<<if $NPCName[_i].hairColour is 0 or $NPCName[_i].hairColour is undefined or $args[0] is "default">>
				<<set $NPCName[_i].hairColour to "brown">>
			<</if>>
		<<case "Wren">>
			<<if $NPCName[_i].eyeColour is 0 or $NPCName[_i].eyeColour is undefined or $args[0] is "default">>
				<<set $NPCName[_i].eyeColour to "brown">>
				<<set $NPCName[_i].hairColour to "blond">>
			<</if>>
		<<case "Sydney">>
			<<if $NPCName[_i].eyeColour is 0 or $NPCName[_i].eyeColour is undefined>>
				<<set $NPCName[_i].eyeColour to "amber">>
			<</if>>
			<<if $NPCName[_i].hairColour is 0 or $NPCName[_i].hairColour is undefined or $args[0] is "default">>
				<<set $NPCName[_i].hairColour to "strawberryblond">>
			<</if>>
		<<case "Piper">>
			<<if $NPCName[_i].eyeColour is 0 or $NPCName[_i].eyeColour is undefined>>
				<<set $NPCName[_i].eyeColour to ["dark blue","light blue","amber","green","red","pink","grey"].pluck()>>
			<</if>>
			<<if $NPCName[_i].hairColour is 0 or $NPCName[_i].hairColour is undefined or $args[0] is "default">>
				<<set $NPCName[_i].hairColour to ["ginger","black"].pluck()>>
			<</if>>
		<<case "Raylan">>
			<<if $NPCName[_i].eyeColour is 0 or $NPCName[_i].eyeColour is undefined>>
				<<set $NPCName[_i].eyeColour to "grey">>
			<</if>>
			<<if $NPCName[_i].hairColour is 0 or $NPCName[_i].hairColour is undefined or $args[0] is "default">>
				<<set $NPCName[_i].hairColour to "ashyblond">>
			<</if>>
		<<default>>
			<<if $NPCName[_i].eyeColour is 0 or $NPCName[_i].eyeColour is undefined>>
				<<set $NPCName[_i].eyeColour to ["purple","dark blue","light blue","amber","hazel","green","red","pink","grey"].pluck()>>
				<<set $NPCName[_i].hairColour to ["red","black","brown","lightbrown","blond","platinumblond","strawberryblond","ginger"].pluck()>>
			<</if>>
	<</switch>>
<</for>>
<</widget>>

<<widget "initAllNPCVirginities">>
	<<set $NPCVirginityTypes to {anal:false, oral:false, penile:false, vaginal:false, handholding:false, temple: false, kiss:false}>>
	<<set _allVirginitiesPresent to {anal:true, oral:true, penile:true, vaginal:true, handholding:true, temple: false, kiss:true}>>
	<<for _i to 0; _i lt $NPCNameList.length; _i++>>
		<<InitNPCVirginity _i>>
	<</for>>
<</widget>>

<<widget "InitNPCVirginity">>
	<<set _allVirginitiesPresent to {anal:true, oral:true, penile:true, vaginal:true, handholding:true, temple: false, kiss:true}>>
	<<set $NPCName[$args[0]].purity to 0>>
	<<set $NPCName[$args[0]].corruption to 0>>
	<<set $NPCName[$args[0]].virginity to clone(_allVirginitiesPresent)>>
	<<set $NPCName[$args[0]].chastity to {penis:"", vagina:"", anus:""}>>
	<<switch $NPCNameList[$args[0]]>>
		<<case "Sydney">>
			/* Has all virginities + temple virginity. */
			<<set $NPCName[$args[0]].virginity to {anal:true, oral:true, penile:true, vaginal:true, temple:true, handholding:true, kiss:true}>>
		<<case "Robin" "Kylar" "Great Hawk">>
			/* Has all virginities. */
			<<set $NPCName[$args[0]].virginity to clone(_allVirginitiesPresent)>>
		<<case "Jordan">>
			/* Has anal, oral, penile/vaginal, and kiss virginities. Missing handholding. */
			<<set $NPCName[$args[0]].virginity.handholding to false>>
		<<case "Black Wolf">>
			/* Has anal, oral, kiss, and handholding virginities. Missing penile/vaginal. */
			<<set $NPCName[$args[0]].virginity.penile to false>>
			<<set $NPCName[$args[0]].virginity.vaginal to false>>
		<<case "Gwylan">>
			/* Missing all virginities. */
			<<set $NPCName[$args[0]].virginity.oral to false>>
			<<set $NPCName[$args[0]].virginity.handholding to false>>
			<<set $NPCName[$args[0]].virginity.penile to false>>
			<<set $NPCName[$args[0]].virginity.vaginal to false>>
			<<set $NPCName[$args[0]].virginity.anal to false>>
			<<set $NPCName[$args[0]].virginity.kiss to false>>
		<<case "Charlie" "Piper">>
			/* Has oral, anal, and vaginal/penile virginities. Missing kiss and handholding. */
			<<set $NPCName[$args[0]].virginity.kiss to false>>
			<<set $NPCName[$args[0]].virginity.handholding to false>>
		<<case "Eden">>
			/* Has anal, oral and handholding virginity. Missing penile/vaginal and kiss. */
			<<set $NPCName[$args[0]].virginity.penile to false>>
			<<set $NPCName[$args[0]].virginity.vaginal to false>>
			<<set $NPCName[$args[0]].virginity.kiss to false>>
		<<case "Sam" "Mason">>
			/* Has anal and oral virginity. Missing penile/vaginal, kiss, and handholding. */
			<<set $NPCName[$args[0]].virginity.penile to false>>
			<<set $NPCName[$args[0]].virginity.vaginal to false>>
			<<set $NPCName[$args[0]].virginity.kiss to false>>
			<<set $NPCName[$args[0]].virginity.handholding to false>>
		<<case "Alex" "Darryl" "Sirris" "Briar" "Wren" "Raylan">>
			/* Missing all virginities. */
			<<set $NPCName[$args[0]].virginity to clone($NPCVirginityTypes)>>
		<<default>>
			/* Defaults to only having anal virginity. */
			<<set $NPCName[$args[0]].virginity.oral to false>>
			<<set $NPCName[$args[0]].virginity.penile to false>>
			<<set $NPCName[$args[0]].virginity.vaginal to false>>
			<<set $NPCName[$args[0]].virginity.kiss to false>>
			<<set $NPCName[$args[0]].virginity.handholding to false>>
	<</switch>>
<</widget>>


code:
:: Widgets pregnancyVar [widget]
<<widget "pregnancyVar">>
	<<containersInit>>
	<<if $objectVersion.prenancyObjectRepair isnot 2>>
		<<prenancyObjectRepair>>
		<<set $objectVersion.prenancyObjectRepair to 2>>
	<</if>>
	<<if $pregnancyStats is undefined>>
		<<set $pregnancyStats to {
			playerChildren:0,
			humanChildren:0,
			wolfChildren:0,
			npcChildren:0,
			npcChildrenUnrelatedToPlayer:0,
			npcTotalBirthEvents:0,
			humanToysUnlocked: false,
			wolfToysUnlocked: false,
			mother: 0,
			aftermorningpills: 0,
			pregnancyTestsTaken: 0,
		}>>
	<</if>>
<</widget>>

<<widget "containersInit">>
<<if $container is undefined>>
	<<set $container to {
		"lastLocation": null,
		"list":["home", "lake"],
		"home":{
			"upgrades":{
				"capacity":0,
				"foodStorage":0,
				"luxury":0
			},
			"name": "Tiny Fish Tank",
			"count": 0,
			"maxCount": 1,
			"daysSinceFed": 0,
			"maxDaysWithoutFood": 3,
			"creatures":{
				0: null
			},
			"deadCreatures": 0,
			"visited": false,
			"leaveLink": "Bedroom"
		},
		"portable":{
			"creatures":[],
			"value":0
		},
		"lake":{
			"upgrades":{
				"capacity":0,
				"foodStorage":0,
				"luxury":0
			},
			"name": "pond",
			"count": 0,
			"maxCount": 3,
			"daysSinceFed": 0,
			"maxDaysWithoutFood": 31,
			"creatures":{
				0: null
			},
			"deadCreatures": 0,
			"visited": false,
			"leaveLink": "Lake Waterfall"
		}
	}>>
<</if>>
<<if $container.home.kylarDelay is undefined>>
	<<set $container.home.kylarDelay to 0>>
	<<set $container.home.kylarFed to false>>
	<<set $container.home.kylarHelp to false>>
<</if>>
<<if $container.farm is undefined>>
	<<set $container.farm to {
		"upgrades":{
			"capacity":0,
			"foodStorage":0,
			"luxury":0
		},
		"name": "Parasite Barn",
		"count": 0,
		"maxCount": 5,
		"daysSinceFed": 0,
		"maxDaysWithoutFood": 14,
		"creatures":{
			0: null
		},
		"deadCreatures": 0,
		"visited": false,
		"leaveLink": "Farm Work"
	}>>
	<<set $container.list.pushUnique("farm")>>
<</if>>
<</widget>>

<<widget "prenancyObjectRepair">>
	<<set _pregnancy to $sexStats.anus.pregnancy>>
	<<set _trueCount to 0>>
	<<for _i to 0; _i lt 4; _i++>>
		<<if _pregnancy[_i] isnot null>>
			<<set _trueCount++>>
			<<if _pregnancy[_i].creature is undefined>>
				<<set _pregnancy[_i].creature to either("Tentacle","Spider","Fish","Snake","Eel")>>
			<</if>>
		<</if>>
	<</for>>
	<<if _trueCount isnot _pregnancy.count>>
		<<set _pregnancy.count to clone(_trueCount)>>
	<</if>>
	<<set _list to ["home", "lake", "farm", "portable"]>>
	<<for _i to 0; _i lt _list.length; _i++>>
		<<set _container to $container[_list[_i]]>>
		<<for _j to 0; _j lt _container.maxCount; _j++>>
			<<if _container.creatures[_j] isnot undefined and _container.creatures[_j] isnot null>>
				<<if _container.creatures[_j].creature is undefined>>
					<<set _container.creatures[_j].creature to either("Tentacle","Spider","Fish","Snake","Eel")>>
				<</if>>
			<</if>>
			<<if _container.upgrades.luxury is undefined>>
				<<set _container.upgrades.luxury to 0>>
			<</if>>
		<</for>>
	<</for>>
	<<if _pregnancy.motherStatus is 2 and _pregnancy.seenDoctor is 1>>
		<<set _pregnancy.seenDoctor to 2>>
		<<set _pregnancy.maxCount to 4>>
	<</if>>
<</widget>>


code:
:: PassageFooter

<<print StartConfig.version>> <<print StartConfig.mod>>

<<print StartConfig.version.slice(1)>> <<print StartConfig.mod>>

<<if $passage isnot "Start">>

		You haven't exported your save in a while |
		<<link "Help me export">><<overlayReplace "optionsExportImport">><</link>> |
		<<link "Ignore for now">><<set $saveDetails.exported.days to Math.floor($days - ($saveDetails.exported.frequency * 0.5))>><<addclass #exportWarning "hidden">><</link>>

<</if>>
<<if $replayScene isnot undefined>>
	<<if $replayScene.startPassage is $passage or $passage is "Scene Viewer End">>
	<<elseif !$replayScene.passages.includes($passage)>>
		<<goto "Scene Viewer End">>
	<</if>>
	<<if $replayScene is undefined>>
	<<elseif $replayScene.startPassage>>
		<<run delete $replayScene.startPassage>>
	<</if>>
<</if>>


code:
:: PassageHeader
<<set $passagePrev to $passage ? $passage : "none">>
<<set $passage to passage()>><<set $tags to tags()>>

<<if $passage isnot "Start" and $passage isnot "Start2">>

/* Run stuff on every save load */
	<<if onLoadUpdateCheck>>
		<<set $saveVersion to ($saveVersions ? $saveVersions.last() : "ancient")>> /*update save version */
	<</if>>

/* Run stuff on every page refresh, save load, or version mismatch */
	<<if versionUpdateCheck or onLoadUpdateCheck or !$saveVersions or $saveVersions.last() isnot StartConfig.version>>
		<<set versionUpdateCheck to false>>
		<<set onLoadUpdateCheck to false>>
		<<if saveUpdateCheck>>
			<<set saveUpdateCheck to false>>
			<<run prepareSaveDetails($prepareSaveDetails)>>
		<</if>>

		/* convert game version to numeric value for use in <<backComp>> */
		<<set _version to ($saveVersions ? $saveVersions.last().replace(/[^0-9.]+/g, "").split(".") : 0)>>
		<<set _version to (_version ? _version[0]*1000000 + _version[1]*10000 + _version[2]*100 + _version[3]*1 : 0)>>
		<<backComp>>

		<<updatehistorycontrols>>
		<<set _preventUpdate to true>> /*prevent rewriting autosaves */
		<<if $reducedLineHeight is true>><<addclass "#passages" "reducedLineHeight">><</if>>
		<<if $zoom isnot 100>><<run zoom($zoom)>><</if>>
	<</if>>

/* Variables that you need to check on every passage */
	<<set $link_table to []>>
	<<set $map.hideLinksCheck to []>>
<</if>>


code:
:: StoryInit
/* This passage runs EVERY time the page is opened or refreshed, not just when a new game is started */
/* This passage ALWAYS runs BEFORE story variables are loaded, meaning EVERY variable is undefined. Checking if they are undefined WILL NOT WORK. */
/* You should ONLY use this passage to define setup variables, NOT $variables. */

<<variablesStatic>>

:: gameStartOnly [widget]
/* The following is only run when the widget is called, which is only on new game start. Add to this if you want something to be run when you start a new game. */
<<widget "gameStartOnly">>

<<if StartConfig.enableImages is true>>
	<<set $images to 1>>
<<else>>
	<<set $images to 0>>
<</if>>

<<if StartConfig.debug is true>>
	<<set $debug to 1>>
<<else>>
	<<set $debug to 0>>
<</if>>

<<if $objectVersion is undefined>>
	<<set $objectVersion to {
		"updateClothes": 28,
		"feats": 1,
		"wardrobes": 2,
		"customColors": 4,
		"uncomfortable": 2,
		"special_clothes": 5,
		"chastity": 3,
		"skinColor": 1,
		"prenancyObjectRepair": 2,
		"museumAntiques": 8
	}>>
<</if>>

<<set $saveVersions to [StartConfig.version]>>

<<set $dev to 0>>
<<set $numberify_enabled to 1>>
<<set $sidebarRenderer to 'canvas'>>
<<set $showDebugRenderer to !!StartConfig.debug>>
<<set $lastWardrobeSlot to "head">>

<<set $gamemode to "normal">>

<<set $intro to 1>>
<<set $tutorial to 0>>
<<set $initnpccompatibility to 1>>
<<set $clothing_update to 1>>
<<set $parasite_update to 1>>
<<set $npcNamedVersion to 2>>
<<set $clothing_number to 13>>

<<set $player = {gender: 0, sex: 0, appearance: 0, penis: 0, vagina: 0, penissize: 0, breastsize: 0, bottomsize: 0, ballssize: 0, pronoun: 0, pronouns: {he: 0, his: 0}, gender_body: 0, condom: false, virginity: {anal: true, oral: true, penile: true, vaginal: true, temple: false, handholding: true, kiss: true}}>>
<<npcList>>
<<npcNamed>>
<<set $controlmax to 1000>>
<<set $control to 1000>>

<<clothinginit>>
<<parasiteinit>>
<<skinColorInit>>
<<init_names>>

<<set $time to 420>>
<<set $days to 0>>
<<set $weekday to 1>>
<<set $money to 500>>
<<set $awareness to 0>>
<<set $awarelevel to 0>>
<<set $purity to 1000>>
<<set $devlevel to 10>>
<<set $hairlength to 200>>
<<set $fringelength to 200>>
<<set $hairtype to "default">>
<<set $fringetype to "default">>
<<set $trauma to 0>>
<<set $traumamax to 5000>>
<<set $stressmax to 10000>>
<<set $tirednessmax to 2000>>
<<set $arousalmax to 10000>>
<<set $physique to 3500>>
<<set $physiquemax to 20000>>
<<set $willpower to 200>>
<<set $willpowermax to 1000>>
<<set $beauty to 100>>
<<set $beautymax to 10000>>
<<set $month to "september">>
<<set $monthday to 4>>
<<set $year to 2020>>
<<set $birthmonth to "september">>
<<set $birthday to 3>>
<<set $npc to []>>
<<set $npcnum to []>>
<<set $npcrow to []>>
<<set $dancestudioanger to 0>>
<<set $dancelocation to 0>>
<<set $alarm to 0>>
<<set $finish to 0>>
<<set $id to 0>>
<<set $forest to 0>>
<<set $forestmod to 1>>
<<set $tipmod to 1>>
/*<<set $worn.genitals.anal_shield to 0>>*/
<<set $blackmoney to 0>>
<<set $crime to 0>>
<<set $crimehistory to 0>>
<<set $worn.neck.collaredpolice to 0>>
<<set $bullytimer to 50>>
<<set $bullytimeroutside to 0>>
<<set $bullyevent to 0>>
<<set $bullyeventoutside to 0>>
<<set $bullygate to 0>>
<<set $masturbationorgasm to 0>>
<<set $malechance to 50>>
<<set $malevictimchance to 50>>
<<set $homochance to 4>>
<<set $beastmalechance to 80>>
<<set $monsterhallucinations to "t">>
<<set $monsterchance to 50>>
<<set $deviancy to 0>>
<<set $baileydefeated to 0>>
<<set $baileydefeatedlewd to 0>>
<<set $baileydefeatedchain to 0>>
<<set $soldCount to 0>>
<<set $robinmoney to 300>>
<<set $alluremod to 1>>
<<set $speechcycle to 0>>
<<set $npcspeechcycle to 0>>
<<set $museuminterest to 0>>
<<set $crimemax to 50000>>
<<set $orphan_hope to 0>>
<<set $orphan_reb to 0>>
<<set $masochism to 0>>
<<set $masochism_level to 0>>
<<set $sadism to 0>>
<<set $sadism_level to 0>>
<<set $lessonmissedtext to 0>>
<<set $lessonmissed to 0>>
<<set $home_event_timer to 3>>
<<set $home_event_count to 0>>
<<set $home_gone to 0>>
<<set $corruption_slime to 0>>
<<set $lactating to 0>>
<<set $lactation_pressure to 0>>
<<set $milk_amount to 30>>
<<set $milk_volume to 30>>
<<set $milk_max to 3000>>
<<set $milk_produced_stat to 0>>
<<set $semen_max to 3000>>
<<set $semen_produced_stat to 0>>
<<set $lube_produced_stat to 0>>
<<set $masturbation_semen to 0>>
<<set $masturbation_milk to 0>>
<<set $bunstat to 0>>
<<set $creamstat to 0>>
<<set $chef_sus to 0>>
<<set $fluid_forced_stat to 0>>
<<set $smuggler_location to "sewer">>
<<set $smuggler_timer to 0>>
<<set $smuggler_stolen_stat to 0>>
<<set $player.gender_body to "a">>
<<set $closinghour to 21>>
<<set $openinghours to 1>>
<<set $dontHide to false>>
<<set $swimnudecounter to 0>>
<<set $swimall to 0>>
<<set $garden_flowers_intro to 1>>
<<set $eden_plot_intro to 1>>
<<set $wolf_plot_intro to 1>>
<<set $asylum_plot_intro to 1>>
<<set $sanct_plot_intro to 1>>
<<set $plots to {}>>
<<set $plants_known to []>>
<<set $plants to {}>>
<<set $stall_rejected to 0>>
<<set $produce_sold to 0>>
<<set $stat_shoot to 0>>
<<set $stat_lurkers_captured to 0>>
<<set $stat_aphrodisiacs_sold to 0>>
<<set $stat_panties_stolen to 0>>
<<set $farm_shift to 0>>
<<set $cattle_milked to 0>>
<<set $masseur_stat to 0>>
<<set $machine_stat to 0>>
<<set $wild_plant_stat to 0>>
<<set $season to "autumn">>
<<set $bird to {}>>
<<set $moonstate to 0>>
<<set $blackjack_played to 0>>
<<set $blackjack_won to 0>>
<<set $blackjack_streak to 0>>
<<set $blackjack_streak_high to 0>>
<<set $cardcover = { style: 0, colour: 'red' }>>
<<set $hoodDown to 0>>
<<set $prof to {}>>
<<set $prof.spray to 0>>
<<set $stat_police to {}>>
<<set $stat_police.pillory to 0>>
<<set $stat_police.community to 0>>
<<set $stat_police.prison to 0>>

<<set $orgasmtrait to 0>>
<<set $ejactrait to 0>>
<<set $molesttrait to 0>>
<<set $rapetrait to 0>>
<<set $bestialitytrait to 0>>
<<set $tentacletrait to 0>>
<<set $voretrait to 0>>
<<set $milkdranktrait to 0>>
<<set $choketrait to 0>>

<<set $physicalTransform to 0>>
<<set $specialTransform to 0>>
<<set $angelbuild to 0>>
<<set $angel to 0>>
<<set $angelforgive to 0>>
<<set $angelBanish to 0>>
<<set $angelBanishMax to 0>>
<<set $demonbuild to 0>>
<<set $demon to 0>>
<<set $demonabsorb to 0>>
<<set $catbuild to 0>>
<<set $cat to 0>>
<<set $cowbuild to 0>>
<<set $cow to 0>>
<<set $birdbuild to 0>>
<<set $harpy to 0>>

<!-- XXXXXXXXX CULTMOD STUFF HERE XXXXXXXXX-->

<<set $bunnybuild to 0>>
<<set $bunny to 0>>
<<set $cultdiscovered to 0>>
<<set $cultrep to 0>>
<<set $cultist to 0>>
<<set $cultistquest to 0>>
<<set $cultnecklace to 0>>
<<set $cultmirror to 0>>
<<set $cultbell to 0>>
<<set $cultlock to 1>>
<<set $summoned to 0>>
<<set $sacrificequest to 0>>
<<set $fate to 0>>
<<set $prowlersleep to 0>>
<<set $cultSetup to 1>>

<!-- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -->

<<set $seductionskill to 0>>
<<set $oralskill to 0>>
<<set $vaginalskill to 0>>
<<set $analskill to 0>>
<<set $handskill to 0>>
<<set $feetskill to 0>>
<<set $bottomskill to 0>>
<<set $thighskill to 0>>
<<set $chestskill to 0>>
<<set $penileskill to 0>>

<<set $skulduggery to 0>>
<<set $skulduggeryday to 0>>
<<set $danceskill to 0>>
<<set $swimmingskill to 0>>
<<set $athletics to 0>>
<<set $tending to 0>>

<<set $hygiene to 0>>
<<set $hunger to 0>>
<<set $thirst to 0>>
<<set $tiredness to 0>>
<<set $arousal to 0>>
<<set $stress to 0>>

<<set $comb to 0>>
<<set $pain to 0>>
<<set $combat to 0>>
<<set $location to 0>>
<<set $breastsize to 0>>
<<set $breastsizeold to 0>>
<<set $breastsizemax to 12>>
<<set $breastsizemin to 0>>
<<set $breastsensitivity to 1>>
<<set $bottomsize to 0>>
<<set $bottomsizeold to 0>>
<<set $bottomsizemax to 8>>
<<set $bottomsizemin to 0>>
<<set $bottomgrowthtimer to 350>>
<<set $workouts to 0>>
<<set $genitalsensitivity to 1>>
<<set $penissize to 2>>
<<set $penissizemax to 4>>
<<set $penissizemin to -2>>
<<set $penisgrowthtimer to 700>>
<<set $ballssize to 2>>
<<set $ballssizemax to 4>>
<<set $ballssizemin to 0>>
<<set $ballsgrowthtimer to 700>>
<<set $physiqueuse to 0>>
<<set $rapeavoid to 1>>
<<set $sexavoid to 1>>
<<set $molestavoid to 1>>
<<set $rescued to 0>>
<<set $baileyhospital to 0>>
<<set $squidcount to 0>>
<<set $no_underwear to 0>>

<<set $upperwet to 0>>
<<set $upperwetstage to 0>>
<<set $lowerwet to 0>>
<<set $lowerwetstage to 0>>
<<set $underlowerwet to 0>>
<<set $underlowerwetstage to 0>>
<<set $underupperwet to 0>>
<<set $underupperwetstage to 0>>
<<set $overlowerwet to 0>>
<<set $overlowerwetstage to 0>>
<<set $overupperwet to 0>>
<<set $overupperwetstage to 0>>

<<set $genderknown to ["Robin", "Bailey"]>>

<<set $vaginause to 0>>
<<set $anususe to 0>>
<<set $mouthuse to 0>>
<<set $leftarm to 0>>
<<set $rightarm to 0>>
<<set $chestuse to 0>>
<<set $penisuse to 0>>
<<set $thighuse to 0>>
<<set $bottomuse to 0>>
<<set $feetuse to 0>>
<<set $vaginastate to 0>>
<<set $anusstate to 0>>
<<set $mouthstate to 0>>
<<set $penisstate to 0>>
<<set $cheststate to 0>>
<<set $head to 0>>
<<set $front to 0>>
<<set $back to 0>>
<<set $chest to 0>>

<<set $carryblock to 0>>

<<set $beastgenderoverride to 0>>

<<set $dgchance to 0>>
<<set $cbchance to 0>>
<<set $straponchance to 0>>
<<set $breast_mod to 0>>
<<set $penis_mod to 0>>

<<set $facebruise to 0>>
<<set $chestbruise to 0>>
<<set $tummybruise to 0>>
<<set $vaginabruise to 0>>
<<set $penisbruise to 0>>
<<set $anusbruise to 0>>
<<set $bottombruise to 0>>
<<set $thighbruise to 0>>
<<set $armbruise to 0>>
<<set $neckbruise to 0>>

<<set $rapestat to 0>>
<<set $beastrapestat to 0>>
<<set $tentaclerapestat to 0>>
<<set $moleststat to 0>>
<<set $vaginalstat to 0>>
<<set $vaginalejacstat to 0>>
<<set $analstat to 0>>
<<set $analejacstat to 0>>
<<set $oralstat to 0>>
<<set $oralejacstat to 0>>
<<set $handstat to 0>>
<<set $handejacstat to 0>>
<<set $feetstat to 0>>
<<set $feetejacstat to 0>>
<<set $thighstat to 0>>
<<set $thighejacstat to 0>>
<<set $bottomstat to 0>>
<<set $bottomejacstat to 0>>
<<set $penilestat to 0>>
<<set $penileejacstat to 0>>
<<set $clothesstripstat to 0>>
<<set $clothesruinstat to 0>>
<<set $orgasmstat to 0>>
<<set $vaginalentranceejacstat to 0>>
<<set $faceejacstat to 0>>
<<set $cheststat to 0>>
<<set $chestejacstat to 0>>
<<set $hairejacstat to 0>>
<<set $tummyejacstat to 0>>
<<set $neckejacstat to 0>>
<<set $ejacstat to 0>>
<<set $hitstat to 0>>
<<set $attackstat to 0>>
<<set $prostitutionstat to 0>>
<<set $forcedprostitutionstat to 0>>
<<set $tablesservedstat to 0>>
<<set $parasitestat to 0>>
<<set $passoutstat to 0>>
<<set $masturbationstat to 0>>
<<set $masturbationorgasmstat to 0>>
<<set $masturbationtimestat to 0>>
<<set $milk_drank_stat to 0>>
<<set $nectar_drank_stat to 0>>
<<set $nectar_addiction to 0>>
<<set $nectar_timer to 0>>
<<set $gloryholestat to 0>>
<<set $parasite_known to []>>
<<set $chokeorgasm to 0>>

<<set $danceaction to 0>>
<<set $danceactiondefault to 0>>
<<set $dancestat to 0>>
<<set $dancing to 0>>
<<set $pullaway to 0>>
<<set $novaginal to 0>>
<<set $noanal to 0>>
<<set $nopenile to 0>>
<<set $nochoke to 0>>
<<set $vaginalchastity to 0>>
<<set $analchastity to 0>>
<<set $penilechastity to 0>>
<<set $drinksservedstat to 0>>
<<set $dockhours to 0>>

<<if $rng gte 95>>
	<<set $brothel_basement_price to 3000>>
<<elseif $rng gte 85>>
	<<set $brothel_basement_price to 2000>>
<<elseif $rng gte 45>>
	<<set $brothel_basement_price to 1000>>
<<else>>
	<<set $brothel_basement_price to 500>>
<</if>>

<<set $brothelshowdata to { counts:{ agreed:0, done:0 }, type:"none", intro:false, done:false, missed:false }>>

<<set $speechorgasmweakcumcount to 0>>
<<set $speechorgasmnocumcount to 0>>
<<set $speechorgasmcount to 0>>
<<set $speechorgasmrepeat to 0>>
<<set $underwatertime to 0>>
<<set $underwater to 0>>
<<set $walltype to "wall">>
<<set $position to 0>>
<<set $prop to []>>

<<set $submissive to 1000>>
<<set $assertive to 0>>
<<set $assertiveaction to "trauma">>
<<set $uncomfortable to {
	underwear: true,
	nude: true,
	prostituting: true,
	lewd: true
}>>
<<set $rescue to 0>>
<<set $drugged to 0>>
<<set $drunk to 0>>
<<set $exposed to 0>>
<<set $phase to 0>>
<<set $phase2 to 0>>
<<set $orgasmdown to 0>>
<<set $noise to 0>>
<<set $enemywounded to 0>>
<<set $enemyejaculated to 0>>
<<set $enemyno to 0>>
<<set $enemynomax to 0>>
<<set $semenpuddle to 0>>
<<set $eventskip to 0>>
<<set $menu to 0>>
<<set $consensual to 0>>
<<set $attention to 0>>
<<set $seconds to 0>>
<<set $minute to 0>>
<<set $orgasmcount to 0>>
<<set $leftboundcarry to 0>>
<<set $rightboundcarry to 0>>
<<set $orgasmcurrent to 0>>
<<set $hospitalintro to 0>>
<<set $traumafocus to 0>>
<<set $pubwhore to 0>>
<<set $policemolestation to 0>>

<<set $npclovehigh to 10>>
<<set $npclovehighsu to 30>>
<<set $npclovelow to -10>>
<<set $npclovelowsu to -30>>
<<set $npcdomhigh to 10>>
<<set $npcdomlow to -10>>

<<set $schoolevent to 0>>
<<set $schooleventtimer to 10>>
<<set $schoolrep to {}>>
<<set $schoolrep.crossdress to 0>>
<<set $schoolrep.herm to 0>>

<<set $flashbackhome to 0>>
<<set $flashbacktown to 0>>
<<set $flashbackbeach to 0>>
<<set $flashbackunderground to 0>>
<<set $flashbackschool to 0>>
<<set $panicviolence to 0>>
<<set $panicparalysis to 0>>

<<set $colouraction to 0>>
<<set $hungerenabled to 0>>
<<set $thirstenabled to 0>>
<<set $hygieneenabled to 0>>

<<set $exhibitionism to 0>>
<<set $promiscuity to 0>>
<<set $diagnosis to 0>>
<<set $psych to 0>>
<<set $asylum to 0>>
<<set $audience to 0>>
<<set $audienceexcitement to 0>>
<<set $audiencearousal to 0>>
<<set $audiencemod to 1>>
<<set $venuemod to 1>>
<<set $danceevent to 0>>
<<set $dancephysique to 0>>
<<set $hypnosis to 0>>
<<set $hypnotised to 0>>
<<set $pills to 0>>
<<set $medicated to 0>>
<<set $trance to 0>>
<<set $harperexam to 0>>
<<set $schoolterm to 1>>
<<set $schoolday to 0>>
<<set $sciencemissed to 0>>
<<set $mathsmissed to 0>>
<<set $englishmissed to 0>>
<<set $historymissed to 0>>
<<set $swimmingmissed to 0>>

<<set $science_star to 0>>
<<set $maths_star to 0>>
<<set $english_star to 0>>
<<set $history_star to 0>>

<<set $fame to 0>>
<<set $fameexhibitionism to 0>>
<<set $fameprostitution to 0>>
<<set $famebestiality to 0>>
<<set $famesex to 0>>
<<set $famerape to 0>>
<<set $famegood to 0>>
<<set $famebusiness to 0>>
<<set $famescrap to 0>>
<<set $famepimp to 0>>
<<set $famesocial to 0>>
<<set $famemodel to 0>>
<<set $famepark to 0>>
<<set $famepregnancy to 0>>
<<set $park_run_seen_by to []>>

<<set $spray to 0>>
<<set $spraymax to 0>>
<<set $spraystat to 0>>
<<set $infinitespray to 0>>

<<set $mathstrait to 0>>
<<set $englishtrait to 0>>
<<set $sciencetrait to 0>>
<<set $historytrait to 0>>

<<set $wolfgirl to 0>>
<<set $wolfbuild to 0>>

<<set $swarm to {
	"type":0,
	"name":0,
	"move":0,
	"spill":0,
	"steady":0,
	"amount":{},
	"data":{}
}>>

<<set $claws to 1>>
<<set $water to 0>>
<<set $foresthunt to 0>>
<<set $edenforesthunt to 0>>
<<set $blackwolfhunt to 0>>
<<set $wolfpacktrust to 0>>
<<set $wolfpackfear to 0>>
<<set $sea to 0>>

<<set $penilechastityparasite to 0>>
<<set $vaginalchastityparasite to 0>>
<<set $analchastityparasite to 0>>
<<removeparasite penis>>
<<removeparasite clit>>
<<removeparasite nipples>>

<<set $vorestrength to 0>>
<<set $vorestruggle to 0>>
<<set $voretentacles to 0>>
<<set $vorestage to 0>>
<<set $vorecreature to 0>>
<<set $swallowed to 0>>
<<set $swallowedstat to 0>>

	<<set $tentacles to {
		0: null,
		1: null,
		2: null,
		3: null,
		4: null,
		5: null,
		6: null,
		7: null,
		8: null,
		9: null,
		10: null,
		11: null,
		12: null,
		13: null,
		14: null,
		15: null,
		16: null,
		17: null,
		18: null,
		19: null,
		20: null,
		"active": 0,
		"max": 0
	}>>

<<set $leftleg to 0>>
<<set $rightleg to 0>>
<<set $leftnipple to 0>>
<<set $rightnipple to 0>>
<<set $leftarmstate to 0>>
<<set $rightarmstate to 0>>
<<set $feetstate to 0>>

<<set $player.bodyliquid to {}>>
<<for _bodypart range setup.bodyliquid.bodyparts>>
	/* look in variables-static for the list of body parts */
	<<set $player.bodyliquid[_bodypart] to {}>>
	<<set $player.bodyliquid[_bodypart]["goo"] to 0>>
	<<set $player.bodyliquid[_bodypart]["semen"] to 0>>
<</for>>

<<exam_difficulty>>

<<set $detention to 0>>
<<set $delinquency to 10>>
<<set $cool to 120>>
<<set $coolmax to 400>>
<<set $school to 400>>
<<set $maths to 100>>
<<set $science to 100>>
<<set $english to 100>>
<<set $history to 100>>
<<set $science_exam to 0>>
<<set $maths_exam to 0>>
<<set $english_exam to 0>>
<<set $history_exam to 0>>
<<set $sciencetrait to 0>>
<<set $mathstrait to 0>>
<<set $englishtrait to 0>>
<<set $historytrait to 0>>
<<set $scienceprogression to 0>>
<<set $distinction_stat to 0>>

<<set $audienceselector to 0>>
<<set $audiencecamera to 0>>
<<set $audiencecamera1 to 0>>
<<set $audiencecamera2 to 0>>
<<set $audiencecamera3 to 0>>
<<set $audiencecamera4 to 0>>
<<set $audiencecamera5 to 0>>
<<set $audiencecamera6 to 0>>

<<set $audiencemember to 0>>

<<set $leftactioncarry to "leftcoverface">>
<<set $rightactioncarry to "rightcoverface">>
<<set $feetactioncarry to "rest">>
<<set $mouthactioncarry to "plead">>

<<set $leftactioncarrypain to "leftprotect">>
<<set $rightactioncarrypain to "rightprotect">>
<<set $mouthactioncarrypain to "letout">>
<<set $leftactioncarryorgasm to "leftgrip">>
<<set $rightactioncarryorgasm to "rightgrip">>
<<set $mouthactioncarryorgasm to "letoutorgasm">>
<<set $leftactioncarrydissociation to "leftcurl">>
<<set $rightactioncarrydissociation to "rightcurl">>
<<set $mouthactioncarrydissociation to "noises">>

<<set $sleeptrouble to 0>>
<<set $nightmares to 0>>
<<set $anxiety to 0>>
<<set $flashbacks to 0>>
<<set $panicattacks to 0>>
<<set $hallucinations to 0>>
<<set $dissociation to 0>>

<<set $scienceproject to "none">>
<<set $mathsproject to "none">>

<<set $yeardays to 0>>

<<set $oxygenmax to 1200>>
<<set $oxygen to 1200>>
<<set $suffocating to 0>>
<<set $hallucinogen to 0>>
<<set $antiquemoney to 0>>
<<set $antiquemoneyhistory to 0>>
<<set $alluretest to 0>>

<<set $whitneypantiescheck to 0>>

<<set $insecurity_penis_tiny to 0>>
<<set $insecurity_penis_small to 0>>
<<set $insecurity_penis_big to 0>>
<<set $insecurity_breasts_tiny to 0>>
<<set $insecurity_breasts_small to 0>>
<<set $insecurity_breasts_big to 0>>

<<set $acceptance_penis_tiny to 0>>
<<set $acceptance_penis_small to 0>>
<<set $acceptance_penis_big to 0>>
<<set $acceptance_breasts_tiny to 0>>
<<set $acceptance_breasts_small to 0>>
<<set $acceptance_breasts_big to 0>>

<<set $anus_climax to 0>>
<<set $penis_climax to 0>>
<<set $mouth_climax to 0>>

<<set $active_enemy to 0>>

<<set $sewingKit to 0>>

<<bodywriting_init>>

/*pillory related*/
<<if ndef $pillory_tenant>><<setup_pillory>><</if>>
<<set $police_access_card to 0>>
<<set $police_intro to 0>>
<<set $police_hack to 0>>
<<set $pub_hack_job to 0>>
<<set $hacker_tasks to []>>
<<set $framed to 0>>

/*raid related*/
<<set $brothel_raid to 0>>
<<set $brothel_raid_day to 0>>
<<set $brothel_thief to 0>>

/*long hair related*/
<<set $o_long_and_beautiful to 0>>
<<set $hy_sibling to 0>>
<<set $hy_parent to 0>>
<<set $long_hair_meet_day to 99999>>
<<set $misbehaviour_day to 99999>>

/*steal related*/
<<set $stealtarget to "">>
<<set $stealdifficulty to 1>>

<<set $showCaptionText to true>>
<<set $confirmSave to false>>
<<set $confirmLoad to false>>
<<set $confirmDelete to true>>

<<mapLocations>>
<<wetness_init>>
<<updateMuseumAntiques>>

<<set $feats to {
	"locked":false,
	"soft":false,
	"allSaves":{},
	"currentSave":{},
	"filter":"All"
}>>
<<set _passageCheck to "Start">>
<<updateFeats>>
<<unset _passageCheck>>

<<setupFeats>>

<<setupTransformationPiecesObject>>

<<if $facestyle is undefined>>
	<<set $facestyle to "default">>
<</if>>

<<if $makeup is undefined>>
	<<set $makeup = {}>>
	<<set $makeup.owned = {}>>
	<<set $makeup.owned.lipstick = []>>
	<<set $makeup.owned.eyeshadow = []>>
	<<set $makeup.owned.eyelenses = []>>
	<<set $makeup.owned.hairdye = []>>
	<<set $makeup.owned.mascara = []>>
	<<set $makeup.lipstick = 0>>
	<<set $makeup.eyeshadow = 0>>
	<<set $makeup.eyelenses = 0>>
	<<set $makeup.mascara = 0>>
	<<set $makeup.pbcolour = 0>>
	<<set $makeup.browscolour = 0>>
	<<set $makeup.concealer = 0>>
<</if>>

<<set $prepareSaveDetails to true>>

<<if $saveDetails is undefined>>
	<<set $saveDetails to {
		exported:{
			days: clone($days),
			frequency: 15,
			count: 0,
			dayCount: 0,
		},
		auto:{
			count: 0
		},
		slot:{
			count: 0,
			dayCount: 0,
		}
	}>>
	<<unset $lastExported>>
<</if>>
<<if $saveDetails.exported.dayCount is undefined>>
	<<set $saveDetails.exported.dayCount to 0>>
	<<set $saveDetails.slot.dayCount to 0>>
<</if>>

<<set $shopDefaults to {
	"color":"black",
	"colorSet":null,
	"secColor":"black",
	"secColorSet":null,
	"disableReturn": false,
	"alwaysBackToShopButton": false,
	"noHelp": false,
	"noTraits": false,
	"highContrast": false,
	"mannequinGender": "same",
	"mannequinGenderFromClothes": false,
	"colourItems": "random",
	"compactMode": false,
}>>

<<if $NPCVirginityTypes is undefined>>
	<<initAllNPCVirginities>>
<</if>>

<<set $templePromised to "">>

<<if $sleepStat is undefined>>
	<<set $sleepStat to 0>>
<</if>>
<</widget>>


code:
:: Widgets variablesStart2 [widget]
<<widget "variablesStart2">>
/*Variables required at the start of passage 'Start2', please remove if not required"*/
/*This widget should be used to initialize most or all variables that are required when you begin a new game. also check <<gameStartOnly>> for other initializations. */

<<if $hairselect is "random">>
	<<set $hairselect to ["red","jetblack","black","brown","softbrown","lightbrown","burntorange","blond","softblond","platinumblond","ashyblond","strawberryblond","ginger"].random()>>
<</if>>
<<if $eyeselect is "random">>
	<<set $eyeselect to ["purple","dark blue","light blue","amber","hazel","green","red","pink","grey"].random()>>
<</if>>

<<switch $bodysize>>
	<<case 0>><<set $devlevel to 6>>
	<<case 1>><<set $devlevel to 10>>
	<<case 2>><<set $devlevel to 12>>
	<<case 3>><<set $devlevel to 16>>
<</switch>>

<<if $skinColor.tanImgEnabled is null>>
	<<set $skinColor.tanImgEnabled to "f">>
<</if>>

<<clamp>>
<<effects>>
<<initnpcgender>>
<<set $physiquesize to (1000 * $devlevel)>>

<<if $debug is 1>>
	<<set $spraymax += 1>>
	<<set $spray += 1>>
<</if>>

<<set $per_npc to {}>>
<<set $perNPCFix to 3>>

<<set $physique to ($physiquesize / 7) * 3>>
<<set $beauty to ($beautymax / 7)>>

<<set $devstate to 1>>

<<set $breastgrowthtimer to 350>>

<<tryOnInit>>

<<givestartclothing>>

<<set $intro to 0>>
<<set $haircolour to $hairselect>>
<<set $naturalhaircolour to $haircolour>>

<<if $cheatdisable is "f" and !$debug or $rentmod lt 1 and !$debug>>
	<<set $feats.locked to true>>
<</if>>

<<set $eyecolour to $eyeselect>>

<<if $awareselect is "innocent">>
<<elseif $awareselect is "knowledgeable">>
	<<set $awareness += 200>>
	<<set $awarelevel to 1>>
<</if>>

<<set $player.gender_appearance to $player.gender>>
<<set $player.gender_appearance_factors to []>>
<<set $player.femininity to 0>>
<<set $player.gender_appearance_without_overwear to $player.gender>>
<<set $player.gender_appearance_without_overwear_factors to []>>
<<set $player.femininity_without_overwear to 0>>
<<if $player.gender is "f">>
	<<set $vaginause to 0>>
	<<set $vaginastate to 0>>
	<<set $penisuse to "none">>
	<<set $penisstate to "none">>
	<<set $player.sex to "f">>
	<<set $player.vaginaExist to true>>
	<<set $player.penisExist to false>>
	<<set $player.ballsExist to false>>
<<elseif $player.gender is "m">>
	<<set $vaginause to "none">>
	<<set $vaginastate to "none">>
	<<set $penisuse to 0>>
	<<set $penisstate to 0>>
	<<set $player.sex to "m">>
	<<set $player.vaginaExist to false>>
	<<set $player.penisExist to true>>
	<<set $player.ballsExist to true>>
<<elseif $player.gender is "h">>
	<<set $vaginause to 0>>
	<<set $vaginastate to 0>>
	<<set $penisuse to 0>>
	<<set $penisstate to 0>>
	<<set $player.sex to "h">>
	<<set $player.penisExist to true>>
	<<set $player.vaginaExist to true>>
<</if>>
<<physicalAdjustmentsInit>>
<<set $player.perceived_breastsize = $breastsize>>
<<set $player.perceived_bottomsize = $bottomsize>>

<<if $background is "nerd">>
	<<set $science += 100>><<set $maths += 100>><<set $english += 100>><<set $history += 100>><<set $school += 400>><<set $cool to 0>>
	<<set $sciencetrait to 1>><<set $mathstrait to 1>><<set $englishtrait to 1>><<set $historytrait to 1>>
<<elseif $background is "athlete">>
	<<set $physique += ($physiquesize / 4)>><<set $swimmingskill += 200>><<set $athletics += 200>>
	<<set $science to 0>><<set $maths to 0>><<set $english to 0>><<set $history to 0>><<set $school to 0>>
	<<set $sciencetrait to 0>><<set $mathstrait to 0>><<set $englishtrait to 0>><<set $historytrait to 0>>
<<elseif $background is "delinquent">>
	<<set $delinquency += 401>><<set $cool += 200>>
<<elseif $background is "promiscuous">>
	<<set $promiscuity += 35>>
<<elseif $background is "exhibitionist">>
	<<set $exhibitionism += 35>>
<<elseif $background is "deviant">>
	<<set $deviancy += 35>>
<<elseif $background is "beautiful">>
	<<set $beauty += ($beautymax / 2)>>
<<elseif $background is "crossdresser">>
	<<if $player.gender is "f">>
		<<set $player.gender_posture to "m">>
	<<elseif $player.gender is "m">>
		<<set $player.gender_posture to "f">>
	<<else>>
		<<set $player.gender_posture to "n">>
		<<set $background to "waif">>
	<</if>>
<<elseif $background is "greenthumb">>
	/* Leaving this here in case we ever turn Green Thumb back into a background. Can't be set to the background variable in cyrrent state. */
	<<set $tending += 200>>
<<elseif $background is "plantlover">>
	<<set $nectar_addiction to 200>>
	<<set $nectar_timer to 21>>
<</if>>
<<set $backgroundTraits to [$background]>>

<<if $hairlength gte 900>>
	<<set $hairlengthstage to "feet">>
<<elseif $hairlength gte 700>>
	<<set $hairlengthstage to "thighs">>
<<elseif $hairlength gte 600>>
	<<set $hairlengthstage to "navel">>
<<elseif $hairlength gte 400>>
	<<set $hairlengthstage to "chest">>
<<elseif $hairlength gte 200>>
	<<set $hairlengthstage to "shoulder">>
<<else>>
	<<set $hairlengthstage to "short">>
<</if>>

<<if $fringelength gte 900>>
	<<set $fringelengthstage to "feet">>
<<elseif $fringelength gte 700>>
	<<set $fringelengthstage to "thighs">>
<<elseif $fringelength gte 600>>
	<<set $fringelengthstage to "navel">>
<<elseif $fringelength gte 400>>
	<<set $fringelengthstage to "chest">>
<<elseif $fringelength gte 200>>
	<<set $fringelengthstage to "shoulder">>
<<else>>
	<<set $fringelengthstage to "short">>
<</if>>

<<if $saveId is undefined>>
	<<set $saveId to random(10000, 99999)>>
<</if>>

<<if $feats.allSaves.points gt 0>>
	<<applyFeatsBoost>>
<</if>>

<<if $player.penisExist>>
	<<set $semen_amount to 90>>
	<<set $semen_volume to 90>>
<<else>>
	<<set $semen_amount to 0>>
	<<set $semen_volume to 0>>
<</if>>

<<set $bodywritingImages to true>>

<<if $dateCount is undefined>>
	<<set $dateCount to {
		Total: 0,
		Robin: 0,
		Whitney: 0,
		Kylar: 0,
		Eden: 0,
		Avery: 0,
		BlackWolfHunts: 0,
		GreatHawkHunts: 0,
		Alex: 0,
		Sydney: 0,
		Piper: 0
	}>>
<</if>>

<<if $virginTaken is undefined>>
	<<set $virginTaken to {
		kiss: [],
		handholding: [],
		oral: [],
		anal: [],
		vaginal: [],
		penile: []
	}>>
<</if>>

<<set $loveInterest to {
	primary: "None",
	secondary: "None",
	tertiary: "None"
}>>

<<set $attitudesControl to {
	showGoldLink:false,
	unlockExhibitionismUnderwear:false,
	unlockExhibitionismNude:false,
	unlockTransformation:false,
	unlockDemonFlaunt:false,
	unlockProstitution:false,
	unlockLoveInterest1:false,
	unlockLoveInterest2:false,
	unlockLoveInterest3:false,
	unlockDefaultActions:false
}>>

<<set $clothingShop to {
	ban: 0,
	banExtension: false,
	spotted: false,
	stolenClothes: 0,
	totalStolenClothes: 0,
	banCount: 0,
	rng: random(0,1000)
}>>

<<set $cultBoutique to {
	ban: 0,
	banExtension: false,
	spotted: false,
	stolenClothes: 0,
	totalStolenClothes: 0,
	banCount: 0,
	rng: random(0,1000)
}>>

<<set $customColors to {
	presets:{},
	action: "set",
	currentType: "primary",
	color:{primary:0, secondary:0},
	saturation:{primary:1, secondary:1},
	brightness:{primary:1, secondary:1},
	contrast:{primary:1, secondary:1},
	sepia:{primary:1, secondary:1}
}>>

<<set $combatTrain to {
	length: 0,
	generateInit: 1,
	beastTypes: [],
	numberPerTrain: [],
}>>

<<set $kylar to {}>>
<<set $kylar.raped to 0>>
<<set $kylar.riddle to 0>>
<<set $kylar.timer to {halls:0,street:0,home:0,love:0}>>
<<set $kylarSeen to []>>
<<set $kylarDaily to {}>>
<<set $museumAntiqueJournalHints to []>>

<<specialClothesSetup>>
<<pregnancyVar>>
<<specialClothesEffectsSetup>>
<<weather_select>>
<<set $warmth to 0>>
<<temperature_hour>>
<<childrenSetup>>

<<setupTransformationPiecesObject>>

<<if $fertiliser is undefined>>
	<<set $fertiliser to {current:0,used:0}>>
	<<if $backgroundTraits.includes("greenthumb")>>
		<<set $fertiliser.current++>>
	<</if>>
<</if>>

<<set $actionDefaults = DefaultActions.setDefaults()>>

<<set versionUpdateCheck to false>>

<<set $rebuy_failure to []>>
<<set $rebuy_success to []>>

<<pbhairinit>>
<<resetLastOptions>>

<</widget>>