﻿;This is a wizard script for use with BAIN.

;Declare variables here
ancientredwoods 	= int('0')
ancientyews 		= int('0')
arriuscreek 		= int('0')
cheydinhalfalls 	= int('0')
chorrolhinter 		= int('0')
cloudtopmount		= int('0')
colovianhigh		= int('0')
entiusgorge		= int('0')
fallenleaf 		= int('0')
imperialisle 		= int('0')
lostcoast 		= int('0')
lushwoodlands 		= int('0')
riverethe 		= int('0')
rollinghills 		= int('0')
stendarrvalley 		= int('0')
darkforest 		= int('0')
heath 			= int('0')
panther 		= int('0')
barrowfields 		= int('0')
brenarivravine 		= int('0')
blackwoodforest 	= int('0')
aspenwood 		= int('0')
skingradout 		= int('0')
snowdale 		= int('0')
cliffsofanvil       	= int('0')
silverfish       	= int('0')
jerallglacier		= int('0')

seaview			= int('0')
ocr			= int('0')

;Full installation?  Yes No
SelectOne "Wähle die gewünschte Installationsart aus.", "Komplett", "Installiert alle Unique Landscapes-Teile.", "image", "Benutzerdefiniert", "Du kannst die gewünschten UL-Teile aus einer Liste auswählen.", "image"
Case "Komplett"
	;Clear any previous selection data
	DeSelectAll
	
	;Select all default packages
	SelectSubPackage "00 Ancient Redwoods"
	SelectSubPackage "01 Ancient Yews"
	SelectSubPackage "02 Arrius Creek"
	SelectSubPackage "03 Aspen Wood"
	SelectSubPackage "04 Blackwood Forest"
	SelectSubPackage "05 Bravil Barrowfields"
	SelectSubPackage "06 Brena River Ravine"
	SelectSubPackage "07 Cheydinhal Falls"
	SelectSubPackage "08 Chorrol Hinterlands"
	SelectSubPackage "09 Cloudtop Mountains"
	SelectSubPackage "10 Colovian Highlands"
	SelectSubPackage "11 Dark Forest"
	SelectSubPackage "12 Entius Gorge"
	SelectSubPackage "13 Fallenleaf Everglade"
	SelectSubPackage "14 Imperial Isle"
	SelectSubPackage "15 Lost Coast"
	SelectSubPackage "16 Lush Woodland"
	SelectSubPackage "17 Panther River"
	SelectSubPackage "18 River Ethe"
	SelectSubPackage "19 Rolling Hills Main"
	SelectSubPackage "20 Skingrad Outskirts"
	SelectSubPackage "21 Snowdale"
	SelectSubPackage "22 Stendarr Valley"
	SelectSubPackage "23 The Heath"
	SelectSubPackage "24 Cliffs of Anvil"
	SelectSubPackage "25 Silverfish River Valley"
	SelectSubPackage "26 Jerall Glacier"
	
	;Re-declare variables to acknowledge that we're installing everything
	ancientredwoods 	= int('1')
	ancientyews 		= int('1')
	arriuscreek 		= int('1')
	cheydinhalfalls 	= int('1')
	chorrolhinter 		= int('1')
	cloudtopmount		= int('1')
	colovianhigh		= int('1')
	entiusgorge		= int('1')
	fallenleaf 		= int('1')
	imperialisle 		= int('1')
	lostcoast 		= int('1')
	lushwoodlands 		= int('1')
	riverethe 		= int('1')
	rollinghills 		= int('1')
	stendarrvalley 		= int('1')
	darkforest 		= int('1')
	heath 			= int('1')
	panther 		= int('1')
	barrowfields 		= int('1')
	brenarivravine 		= int('1')
	blackwoodforest 	= int('1')
	aspenwood 		= int('1')
	skingradout 		= int('1')
	snowdale 		= int('1')
	cliffsofanvil       	= int('1')
	silverfish       	= int('1')
	jerallglacier		= int('1')
Break

Case "Benutzerdefiniert"
	;Clear any previous selection data
	DeSelectAll
	
	;Create a list of all available landscapes for the user to choose from
	SelectMany "Wähle welche Unique Landscapes-Teile du installieren möchtest.", "Ancient Redwoods", "Installiert Ancient Redwoods.", "image", "Ancient Yews", "Installiert Ancient Yews.", "image", "Arrius Creek", "Installiert Arrius Creek.", "image", "Aspen Wood", "Installiert Aspen Wood.", "image", "Blackwood Forest", "Installiert Blackwood Forest.", "image", "Bravil Barrowfields", "Installiert Bravil Barrowfields.", "image", "Brena River Ravine", "Installiert Brena River Ravine.", "image", "Cheydinhal Falls", "Installiert Cheydinhal Falls.", "image", "Chorrol Hinterland", "Installiert Chorrol Hinterland.", "image", "Cliffs of Anvil", "Installiert Cliffs of Anvil.", "image", "Cloudtop Mountains", "Installiert Cloudtop Mountains.", "image", "Colovian Highlands", "Installiert Colovian Highlands.", "image", "Entius Gorge", "Installiert Entius Gorge.", "image", "Fallenleaf Everglade", "Installiert Fallenleaf Everglade.", "image", "Imperial Isle", "Installiert Imperial Isle.", "image", "Jerall Glacier", "Installiert Jerall Glacier.", "image", "Lost Coast", "Installiert Lost Coast.", "image", "Lush Woodland", "Installiert Lush Woodland.", "image", "Panther River", "Installiert Panther River.", "image", "River Ethe", "Installiert River Ethe.", "image", "Rolling Hills", "Installiert Rolling Hills.", "image", "Silverfish River Valley", "Installiert Silverfish River Valley.", "image", "Skingrad Outskirts", "Installiert Skingrad Outskirts.", "image", "Stendarr Valley", "Installiert Stendarr Valley.", "image", "Snowdale", "Installiert Snowdale.", "image", "The Dark Forest", "Installiert the Dark Forest.", "image", "The Heath", "Installiert The Heath.", "image"
	Case "Ancient Redwoods"
		SelectSubPackage "00 Ancient Redwoods"
		ancientredwoods 	= int('1')
	Break
	Case "Ancient Yews"
		SelectSubPackage "01 Ancient Yews"
		ancientyews 		= int('1')
	Break
	Case "Arrius Creek"
		SelectSubPackage "02 Arrius Creek"
		arriuscreek 		= int('1')
	Break
	Case "Aspen Wood"
		SelectSubPackage "03 Aspen Wood"
		aspenwood 		= int('1')
	Break
	Case "Blackwood Forest"
		SelectSubPackage "04 Blackwood Forest"
		blackwoodforest 	= int('1')
	Break
	Case "Bravil Barrowfields"
		SelectSubPackage "05 Bravil Barrowfields"
		barrowfields 		= int('1')
	Break
	Case "Brena River Ravine"
		SelectSubPackage "06 Brena River Ravine"
		brenarivravine 		= int('1')
	Break
	Case "Cheydinhal Falls"
		SelectSubPackage "07 Cheydinhal Falls"
		cheydinhalfalls 	= int('1')
	Break
	Case "Chorrol Hinterland"
		SelectSubPackage "08 Chorrol Hinterlands"
		chorrolhinter 		= int('1')
	Break
	Case "Cliffs of Anvil"
		SelectSubPackage "24 Cliffs of Anvil"
		cliffsofanvil       	= int('1')
	Break
	Case "Cloudtop Mountains"
		SelectSubPackage "09 Cloudtop Mountains"
		cloudtopmount		= int('1')
	Break
	Case "Colovian Highlands"
		SelectSubPackage "10 Colovian Highlands"
		colovianhigh		= int('1')
	Break
	Case "Entius Gorge"
		SelectSubPackage "12 Entius Gorge"
		entiusgorge		= int('1')
	Break
	Case "Fallenleaf Everglade"
		SelectSubPackage "13 Fallenleaf Everglade"
		fallenleaf 		= int('1')
	Break
	Case "Imperial Isle"
		SelectSubPackage "14 Imperial Isle"
		imperialisle 		= int('1')
	Break
	Case "Jerall Glacier"
		SelectSubPackage "26 Jerall Glacier"
		jerallglacier		= int('1')
	Break
	Case "Lost Coast"
		SelectSubPackage "15 Lost Coast"
		lostcoast 		= int('1')
	Break
	Case "Lush Woodland"
		SelectSubPackage "16 Lush Woodland"
		lushwoodlands 		= int('1')
	Break
	Case "Panther River"
		SelectSubPackage "17 Panther River"
		panther 		= int('1')
	Break
	Case "River Ethe"
		SelectSubPackage "18 River Ethe"
		riverethe 		= int('1')
	Break
	Case "Rolling Hills"
		SelectSubPackage "19 Rolling Hills Main"
		rollinghills 		= int('1')
	Break
	Case "Silverfish River Valley"
		SelectSubPackage "25 Silverfish River Valley"
		silverfish       	= int('1')
	Break
	Case "Skingrad Outskirts"
		SelectSubPackage "20 Skingrad Outskirts"
		skingradout 		= int('1')
	Break
	Case "Snowdale"
		SelectSubPackage "21 Snowdale"
		snowdale 			= int('1')
	Break
	Case "Stendarr Valley"
		SelectSubPackage "22 Stendarr Valley"
		stendarrvalley 		= int('1')
	Break
	Case "The Dark Forest"
		SelectSubPackage "11 Dark Forest"
		darkforest 			= int('1')
	Break
	Case "The Heath"
		SelectSubPackage "23 The Heath"
		heath 				= int('1')
	Break
	
	EndSelect
Break

EndSelect

;Handle compatibility
If ancientyews == 1 & arriuscreek == 1
	SelectSubPackage "02.1 Ancient Yews Arrius Creek Patch"
EndIf

;Display extra options
If rollinghills == 1
	SelectOne "Möchtest du die Rolling Hills Version mit oder ohne Weizen installieren?", "mit Weizen", "Bessere Optik.", "image", "ohne Weizen", "Bessere Leistung.", "image"
	Case "mit Weizen"
		SelectSubPackage "19.1 Rolling Hills Wheat"
	Break
	Case "ohne Weizen"
		SelectSubPackage "19.2 Rolling Hills No Wheat"
	Break

	EndSelect
	
EndIf

If darkforest == 1
	SelectOne "Möchtest du den Low Poly Grass Patch für The Dark Forest installieren?", "Standard Gras", "Verwendet das Standard Gras, bessere Optik.", "image", "Low Poly Grass", "Verwendet ein spezielles Low Poly-Gras, bessere Leistung.", "image"
	Case "Standard Gras"
		;Do nothing
	Break
	Case "Low Poly Grass"
		SelectSubPackage "11.1 Dark Forest LowPoly Grass"
	Break
	
	EndSelect
	
EndIf

;Does the user want Landscape LODs to be configured for them?
SelectOne "Möchtest du kompatible LandscapeLOD Dateien installieren?", "Ja", "Die korrekten LandscapeLOD Dateien werden automatisch konfiguriert und zur Installation hinzugefügt.", "image", "Nein", "Installiert keine zusätzlichen LandscapeLOD Dateien.", "image"
	Case "Ja"
	
;;Landscape LOD installation process
SelectMany "Hast du eine dieser Mods installiert?", "Castle Seaview", "Installiert kompatible LandscapeLOD Dateien für Castle Seaview.", "image", "Open Cities Reborn", "Installiert kompatible LandscapeLOD Dateien für Open Cities Reborn.", "image"
	Case "Castle Seaview"
		seaview 			= int('1')
	Break
	Case "Open Cities Reborn"
		ocr				= int('1')
	Break
	
EndSelect


;;BASE LOD INSTALLATION
If arriuscreek == 1
	SelectSubPackage "02.2 Arrius Creek LandscapeLOD"
EndIf
If cheydinhalfalls == 1
	SelectSubPackage "07.1 Cheydinhal Falls LandscapeLOD"
EndIf
If entiusgorge == 1
	SelectSubPackage "12.1 Entius Gorge LandscapeLOD"
EndIf
If rollinghills == 1
	SelectSubPackage "19.3 Rolling Hills LandscapeLOD"
EndIf
If brenarivravine == 1
	SelectSubPackage "06.1 Brena River Ravine LandscapeLOD"
EndIf
If cliffsofanvil == 1
	SelectSubPackage "24.1 Cliffs of Anvil LandscapeLOD"
EndIf
If blackwoodforest == 1
	SelectSubPackage "04.1 Blackwood Forest LandscapeLOD"
EndIf
If fallenleaf == 1
	SelectSubPackage "13.1 Fallenleaf Everglade LandscapeLOD"
EndIf
If snowdale == 1
	SelectSubPackage "21.1 Snowdale LandscapeLOD"
EndIf


;;ADVANCED LOD INSTALLATION
;;SECTION [00]
;;1. AC_CF_EG_RH
If arriuscreek == 1 & cheydinhalfalls == 1 & entiusgorge == 1 & rollinghills == 1
	SelectSubPackage "[00] Arrius Creek + Cheydinhal Falls + Entius Gorge + Rolling Hills"
EndIf

;;2. AC_CF_EG
If arriuscreek == 1 & cheydinhalfalls == 1 & entiusgorge == 1 & rollinghills == 0
	SelectSubPackage "[00] Arrius Creek + Cheydinhal Falls + Entius Gorge"
EndIf

;;3. AC_CF_RH
If arriuscreek == 1 & cheydinhalfalls == 1 & entiusgorge == 0 & rollinghills == 1
	SelectSubPackage "[00] Arrius Creek + Cheydinhal Falls + Rolling Hills"
EndIf

;;4. AC_EG_RH
If arriuscreek == 1 & cheydinhalfalls == 0 & entiusgorge == 1 & rollinghills == 1
	SelectSubPackage "[00] Arrius Creek + Entius Gorge + Rolling Hills"
EndIf

;;5. CF_EG_RH
If arriuscreek == 0 & cheydinhalfalls == 1 & entiusgorge == 1 & rollinghills == 1
	SelectSubPackage "[00] Cheydinhal Falls + Entius Gorge + Rolling Hills"
EndIf

;;6. AC_CF
If arriuscreek == 1 & cheydinhalfalls == 1 & entiusgorge == 0 & rollinghills == 0
	SelectSubPackage "[00] Arrius Creek + Cheydinhal Falls"
EndIf

;;7. AC_EG
If arriuscreek == 1 & cheydinhalfalls == 0 & entiusgorge == 1 & rollinghills == 0
	SelectSubPackage "[00] Arrius Creek + Entius Gorge"
EndIf

;;8. AC_RH
If arriuscreek == 1 & cheydinhalfalls == 0 & entiusgorge == 0 & rollinghills == 1
	SelectSubPackage "[00] Arrius Creek + Rolling Hills"
EndIf

;;9. CF_EG
If arriuscreek == 0 & cheydinhalfalls == 1 & entiusgorge == 1 & rollinghills == 0
	SelectSubPackage "[00] Cheydinhal Falls + Entius Gorge"
EndIf

;;10. CF_RH
If arriuscreek == 0 & cheydinhalfalls == 1 & entiusgorge == 0 & rollinghills == 1
	SelectSubPackage "[00] Cheydinhal Falls + Rolling Hills"
EndIf

;;11. EG_RH
If arriuscreek == 0 & cheydinhalfalls == 0 & entiusgorge == 1 & rollinghills == 1
	SelectSubPackage "[00] Entius Gorge + Rolling Hills"
EndIf


;;SECTION [01]
;;1. BR_HE_LC
If brenarivravine == 1 & heath == 1 & lostcoast == 1
	SelectSubPackage "[01] Brena River + Heath + Lost Coast"	
EndIf
	
;;2. BR_HE
If brenarivravine == 1 & heath == 1 & lostcoast == 0
	SelectSubPackage "[01] Brena River + Heath"
EndIf
	
;;3. BR_LC
If brenarivravine == 1 & heath == 0 & lostcoast == 1
	SelectSubPackage "[01] Brena River + Lost Coast"
EndIf
	
;;4. HE_LC
If brenarivravine == 0 & heath == 1 & lostcoast == 1
	SelectSubPackage "[01] Heath + Lost Coast"
EndIf


;;SECTION [02]
;;1. CA_LC_OCR_SV
If cliffsofanvil == 1 & lostcoast == 1 & ocr == 1 & seaview == 1
	SelectSubPackage "[02] Cliffs of Anvil + Loast Coast + OCR + Castle Seaview"
EndIf

;;2. CA_LC_SV
If cliffsofanvil == 1 & lostcoast == 1 & ocr == 0 & seaview == 1
	SelectSubPackage "[02] Cliffs of Anvil + Lost Coast + Castle Seaview"
EndIf

;;3. CA_LC_OCR
If cliffsofanvil == 1 & lostcoast == 1 & ocr == 1 & seaview == 0
	SelectSubPackage "[02] Cliffs of Anvil + Lost Coast + OCR"
EndIf

;;4. CA_OCR_SV
If cliffsofanvil == 1 & lostcoast == 0 & ocr == 1 & seaview == 1
	SelectSubPackage "[02] Cliffs of Anvil + OCR + Seaview"
EndIf

;;5. CA_SV
If cliffsofanvil == 1 & lostcoast == 0 & ocr == 0 & seaview == 1
	SelectSubPackage "[02] Cliffs of Anvil + Castle Seaview"
EndIf

;;6. CA_LC
If cliffsofanvil == 1 & lostcoast == 1 & ocr == 0 & seaview == 0
	SelectSubPackage "[02] Cliffs of Anvil + Lost Coast"
EndIf

;;7. CA_OCR
If cliffsofanvil == 1 & lostcoast == 0 & ocr == 1 & seaview == 0
	SelectSubPackage "[02] Cliffs of Anvil + OCR"
EndIf


;;SECTION [03]
;;1. CH_RE
If colovianhigh == 1 & riverethe == 1
	SelectSubPackage "[03] Colovian Highlands + River Ethe"
EndIf

Break

Case "Nein"
	;Do nothing
Break

EndSelect

;Installation is complete
Note "Hier wird nun aufgelistet was alles installiert wird. Aktiviere die unteren Kästchen und klicke auf Finish um die Installation fertigzustellen."
;Return