void main()
{
	// Max Number for Global Flags hotkey
	SetGlobalFlag(GCensorMaxNum , 5);
	SetGlobalFlag(GEffectExtendMaxNum , 0);
	SetGlobalFlag(GAltBGMflowMaxNum , 1);
	SetGlobalFlag(GAltSEflowMaxNum , 1);

	// restore default ADV-MODE setting
	if(GetGlobalFlag(GMOD_SETTING_LOADER) == 0) {
		SetGlobalFlag(GVoiceVolume , 75);
		SetGlobalFlag(GSEVolume , 50);
		SetGlobalFlag(GBGMVolume , 50);
		SetGlobalFlag(GADVMode , 1);
		SetGlobalFlag(GLipSync , 1);
		SetGlobalFlag(GEffectExtend , 0);
		SetGlobalFlag(GAltBGM , 0);
		SetGlobalFlag(GAltSE , 0);
		SetGlobalFlag(GAltVoice , 0);
		SetGlobalFlag(GCensor , 2);
		SetGlobalFlag(GAltBGMflow , 0);
		SetGlobalFlag(GAltSEflow , 0);
		SetGlobalFlag(GAltVoicePriority , 0);
		SetGlobalFlag(GWindowOpacity , 50);
		SetGlobalFlag(GHideButtons , 0);
		SetGlobalFlag(GArtStyle , 0);
		SetGlobalFlag(GMOD_SETTING_LOADER , 3);
	}

	// restore default NVL-MODE setting
	if(GetGlobalFlag(GMOD_SETTING_LOADER) == 1) {
		SetGlobalFlag(GVoiceVolume , 75);
		SetGlobalFlag(GSEVolume , 50);
		SetGlobalFlag(GBGMVolume , 50);
		SetGlobalFlag(GADVMode , 0);
		SetGlobalFlag(GLipSync , 1);
		SetGlobalFlag(GEffectExtend , 0);
		SetGlobalFlag(GAltBGM , 0);
		SetGlobalFlag(GAltSE , 0);
		SetGlobalFlag(GAltVoice , 0);
		SetGlobalFlag(GCensor , 2);
		SetGlobalFlag(GAltBGMflow , 0);
		SetGlobalFlag(GAltSEflow , 0);
		SetGlobalFlag(GAltVoicePriority , 0);
		SetGlobalFlag(GWindowOpacity , 50);
		SetGlobalFlag(GHideButtons , 0);
		SetGlobalFlag(GArtStyle , 0);
		SetGlobalFlag(GMOD_SETTING_LOADER , 3);
	}

	// restore vanilla GFlag settings
	if(GetGlobalFlag(GMOD_SETTING_LOADER) == 2) {
		SetGlobalFlag(GVoiceVolume , 75);
		SetGlobalFlag(GSEVolume , 50);
		SetGlobalFlag(GBGMVolume , 50);
		SetGlobalFlag(GADVMode , 0);
		SetGlobalFlag(GLipSync , 0);
		SetGlobalFlag(GEffectExtend , 0);
		SetGlobalFlag(GAltBGM , 0);
		SetGlobalFlag(GAltSE , 0);
		SetGlobalFlag(GAltVoice , 0);
		SetGlobalFlag(GCensor , 0);
		SetGlobalFlag(GAltBGMflow , 0);
		SetGlobalFlag(GAltSEflow , 0);
		SetGlobalFlag(GAltVoicePriority , 0);
		SetGlobalFlag(GWindowOpacity , 50);
		SetGlobalFlag(GHideButtons , 0);
		SetGlobalFlag(GMOD_SETTING_LOADER , 0);
		SetGlobalFlag(GCensorMaxNum , 0);
		SetGlobalFlag(GEffectExtendMaxNum , 0);
		SetGlobalFlag(GAltBGMflowMaxNum , 0);
		SetGlobalFlag(GAltSEflowMaxNum , 0);
		SetGlobalFlag(GArtStyle , 1);
	}

	ModADVModeSettingLoad(
		"<size=+4>{0}\n</size>", //NameFormat
		-170, //WindowPosX
		-300, //WindowPosY
		1150, //WindowSizeX
		250, //WindowSizeY
		60, //WindowMarginLeft
		30, //WindowMarginTop
		50, //WindowMarginRight
		30, //WindowMarginBottom
		1, //FontID
		0, //CharSpacing
		8, //LineSpacing
		30 //FontSize
	);

	ModNVLModeSettingLoad(
		"", //NameFormat
		-170, //WindowPosX
		-10, //WindowPosY
		1240, //WindowSizeX
		720, //WindowSizeY
		60, //WindowMarginLeft
		30, //WindowMarginTop
		50, //WindowMarginRight
		30, //WindowMarginBottom
		1, //FontID
		0, //CharSpacing
		8, //LineSpacing
		34 //FontSize
	);

	ModNVLADVModeSettingLoad(
		"", //NameFormat
		-170, //WindowPosX
		-10, //WindowPosY
		1240, //WindowSizeX
		720, //WindowSizeY
		60, //WindowMarginLeft
		30, //WindowMarginTop
		50, //WindowMarginRight
		30, //WindowMarginBottom
		1, //FontID
		0, //CharSpacing
		8, //LineSpacing
		34 //FontSize
	);

	SetScreenAspect("0.5625");
	SetGUIPosition(170, 0);
	ModSetConfigFontSize(15);
	ModSetMainFontOutlineWidth(10);

	ModAddArtset("Console", "ゲーム機", "CG");
	ModAddArtset("Remake", "リメーク", "CGAlt:CG");
	ModAddArtset("Original", "オリジナル", "OGBackgrounds:OGSprites:CG");

	// GAltBGM controls which of these are selected
	ModAddBGMset("New Mangagamer", "Placeholder", "April2019BGM:BGM");
	ModAddBGMset("GIN's BGM", "Placeholder", "OGBGM:BGM");
	ModAddBGMset("Hou+ Demo", "Placeholder", "HouPlusDemoBGM:BGM");
	ModAddBGMset("Hou+ BGM", "Placeholder", "HouPlusBGM:BGM");

	// GAltSE controls which of these are selected
	ModAddSEset("New SE", "Placeholder", "SE");
	ModAddSEset("GIN's SE", "Placeholder", "OGSE:SE");

	// Audio presets the user can select, consisting of a combination of the BGM and SE flags
	ModAddAudioset(
		"New Mangagamer (2019)",
		"Use the new Background Music (BGM) and Sound Effects (SE) introduced by MangaGamer in the April 2019 update

		It uses the conversions of nerve's tracks that made their debut in the original Japanese release of Hou Compilation (2014), but all of the AI-D-IA tracks were replaced. Most of the replacements are from the soundtracks of Kai and Rei, but there are also some new tracks whose composer is unknown.",
		"New Mangagamer (2019)",
		"Use the new Background Music (BGM) and Sound Effects (SE) introduced by MangaGamer in the April 2019 update

		It uses the conversions of nerve's tracks that made their debut in the original Japanese release of Hou Compilation (2014), but all of the AI-D-IA tracks were replaced. Most of the replacements are from the soundtracks of Kai and Rei, but there are also some new tracks whose composer is unknown.",
		0, // GAltBGM
		0, // GAltBGMFlow
		0, // GAltSE
		0  // GAltSEFlow
	);

	ModAddAudioset(
		"GIN / Hou BGM (2014)",
		"This option uses GIN's Background Music (BGM) and Sound Effects (SE), which is virtually identical to what was included in the original Japanese release of Hou Compilation (2014) in terms of BGM.

		Please click on the 'Open BGM/SE FAQ' button to view the 07th-mod wiki for more details.

		All of the tracks that make their debut in Onikakushi and the character themes are by AI-D-IA and were taken from the original Japanese release of Himatsubushi. Most of the remaining tracks are based on MIDIs from nerve.

		However, because the original conversions of those were extremely poor, this pack instead uses the same conversions as the New MangaGamer BGM.

		This option uses GIN's SE, which should be similar to the Pre-April Update SE.

		This option was previously known as 'Original BGM/SE' or 'BGM/SE fix'.",
		"GIN / Hou BGM (2014)",
		"This option uses GIN's Background Music (BGM) and Sound Effects (SE), which is virtually identical to what was included in the original Japanese release of Hou Compilation (2014) in terms of BGM.

		Please click on the 'Open BGM/SE FAQ' button to view the 07th-mod wiki for more details.

		All of the tracks that make their debut in Onikakushi and the character themes are by AI-D-IA and were taken from the original Japanese release of Himatsubushi. Most of the remaining tracks are based on MIDIs from nerve.

		However, because the original conversions of those were extremely poor, this pack instead uses the same conversions as the New MangaGamer BGM.

		This option uses GIN's SE, which should be similar to the Pre-April Update SE.

		This option was previously known as 'Original BGM/SE' or 'BGM/SE fix'.",
		1, // GAltBGM
		1, // GAltBGMFlow
		1, // GAltSE
		1  // GAltSEFlow
	);

	ModAddAudioset(
		"Hou+ Demo (2020)",
		"This option replaces 16 BGM with BGM from the Higurashi Hou+ demo (2020). It uses the same conversions of nerve's tracks as the New MangaGamer BGM, but the replacements for the AI-D-IA tracks are different.

		Those by U2 Akiyama have been rearranged (except for one that's virtually unchanged), while the rest were replaced with new compositions by xaki.

		This option is not available for Chapters 5-8 and Rei because most of their music isn't in the Hou+ demo.

		All other tracks will use the New Mangagamer BGM and GIN's/Original SE.

		This option uses GIN's SE, which should be similar to the Pre-April Update SE.

		Credits: Provided by Kilicool64",
		"Hou+ Demo (2020)",
		"This option replaces 16 BGM with BGM from the Higurashi Hou+ demo (2020). It uses the same conversions of nerve's tracks as the New MangaGamer BGM, but the replacements for the AI-D-IA tracks are different.

		Those by U2 Akiyama have been rearranged (except for one that's virtually unchanged), while the rest were replaced with new compositions by xaki.

		This option is not available for Chapters 5-8 and Rei because most of their music isn't in the Hou+ demo.

		All other tracks will use the New Mangagamer BGM and GIN's/Original SE.

		This option uses GIN's SE, which should be similar to the Pre-April Update SE.

		Credits: Provided by Kilicool64",
		2, // GAltBGM
		1, // GAltBGMFlow
		1, // GAltSE
		1  // GAltSEFlow
	);

	ModAddAudioset(
		"Hou+ BGM (2022)",
		"This option uses the BGM found in the full version of the Japanese release of Hou+ (2022).

		Compared to the Hou+ demo (2020), the xaki track MIND THE GAP has been sped up, while the nerve tracks Fascism and Lie lies-lies lie were newly converted. Everything else is unchanged.

		This option uses GIN's SE, which should be similar to the Pre-April Update SE.

		Credits: Provided by Kilicool64",
		"Hou+ BGM (2022)",
		"This option uses the BGM found in the full version of the Japanese release of Hou+ (2022).

		Compared to the Hou+ demo (2020), the xaki track MIND THE GAP has been sped up, while the nerve tracks Fascism and Lie lies-lies lie were newly converted. Everything else is unchanged.

		This option uses GIN's SE, which should be similar to the Pre-April Update SE.

		Credits: Provided by Kilicool64",
		3, // GAltBGM
		1, // GAltBGMFlow
		1, // GAltSE
		1  // GAltSEFlow
	);

	CallScript( "flow" );
}
