Module:Season Pass Customizations

From Rise of Cultures Wiki
Jump to navigation Jump to search

Description

Provides a list of the customizations available in the Season Pass reward chests.


Syntax

{{#invoke:Season Pass Rewards| [Function] | [Event_Request] | [Chest_Request] }}


Parameters

Parameter Description Required
[Function]
Provides a list of rewards from either Free or Gold Pass chest.
Options (case-sensitive):
  • Free
  • Gold
Y
[Event_Request]
Options (not case-sensitive):
  • Celtic Event 2022
  • Celtic Event
  • Ancient Greek Event
  • Halloween Event 2021
  • Halloween Event
  • Hercules Event 2022
  • Mali Empire Event 2022
  • Mali Empire Event
  • Mongol Event 2022
  • Mongol Event
  • Persian Event 2022
  • Persian Event
  • Thai Event
  • Winter Event 2021
  • Winter Event
  • World Fair Event
Y
[Chest_Request]
There are 3 different chests.
Options:
  • 1
  • 2
  • 3
Y


Examples

Description Code Output
Celtic Event 2022 customizations in Chest 1 of the Free Pass
{{#invoke:Season Pass Customizations|Free|CELTIC EVENT 2022|1}}
  • 20% Customization.png Tree Home
  • 20% Customization.png Druid Circle
  • 20% Customization.png Fairy Berries
  • 20% Customization.png Goddess of Fertility
  • 20% Customization.png Dolmen Tomb
Celtic Event 2023 customizations in Chest 2 of the Free Pass
{{#invoke:Season Pass Customizations|Free|CELTIC EVENT|2}}
  • 20% Customization.png Hill Home
  • 20% Customization.png Bean Field
  • 20% Customization.png Highland Cattle Farm
  • 20% Customization.png Menhir
  • 20% Customization.png Fairy Ring
Ancient Greek Event 2023 customizations in Chest 3 of the Gold Pass
{{#invoke:Season Pass Customizations|Gold|ANCIENT GREEK EVENT|3}}
  • Customization.png Column Crossing
  • Customization.png Ancient Sanctuary
  • Customization.png Erymathian Boar
  • Customization.png Quaint Trees
  • Customization.png Nestis' Pond

local GenMod = require( 'Module:General' )

List = {} --Create a list to be used in the documentation.
Chest = {}
	
List[#List+1] = 'Celtic Event 2022'
Chest[List[#List]:upper()] = {}
Chest[List[#List]:upper()][1] = {
	[1] = {'20%', "Tree Home"},
	[2] = {'20%', "Druid Circle"},
	[3] = {'20%', "Fairy Berries"},
	[4] = {'20%', "Goddess of Fertility"},
	[5] = {'20%', "Dolmen Tomb"}
}
Chest[List[#List]:upper()][2] = {
	[1] = {'20%', "Rune Hut"},
	[2] = {'20%', "Turnip Hill"},
	[3] = {'20%', "Lowland Sheep Farm"},
	[4] = {'20%', "The Celtic Prince"},
	[5] = {'20%', "Firefly Tree"}
}
Chest[List[#List]:upper()][3] = {
	[1] = {'25%', "Shrine Cottage"},
	[2] = {'25%', "Highland Cattle Farm"},
	[3] = {'25%', "Menhir"},
	[4] = {'25%', "Forest Guardian"}
}

List[#List+1] = 'Celtic Event'
Chest[List[#List]:upper()] = {}
Chest[List[#List]:upper()][1] = {
	[1] = {'20%', "Tree Home"},
	[2] = {'20%', "Shrine Cottage"},
	[3] = {'20%', "Fairy Berries"},
	[4] = {'20%', "Moongate"},
	[5] = {'20%', "Firefly Tree"}
}
Chest[List[#List]:upper()][2] = {
	[1] = {'20%', "Hill Home"},
	[2] = {'20%', "Bean Field"},
	[3] = {'20%', "Highland Cattle Farm"},
	[4] = {'20%', "Menhir"},
	[5] = {'20%', "Fairy Ring"}
}
Chest[List[#List]:upper()][3] = {
	[1] = {'25%', "Druid Circle"},
	[2] = {'25%', "Goose Farm"},
	[3] = {'25%', "Finger Labyrinth"},
	[4] = {'25%', "Cairnbaan Cup"}
}

List[#List+1] = 'Ancient Greek Event'
Chest[List[#List]:upper()] = {}
Chest[List[#List]:upper()][1] = {
	[1] = {'20%', "Shrine of the Helcules"},
	[2] = {'20%', "Hercules' Domicile"},
	[3] = {'20%', "Pagoda of Demeter"},
	[4] = {'20%', "Hercules Statue"},
	[5] = {'20%', "Nemean Lion Statue"}
}
Chest[List[#List]:upper()][2] = {
	[1] = {'20%', "Colonnade"},
	[2] = {'20%', "Garden of the Hesperides"},
	[3] = {'20%', "Stable of Pegasus"},
	[4] = {'20%', "Decorative Vase"},
	[5] = {'20%', "Cerberus Statue"}
}
Chest[List[#List]:upper()][3] = {
	[1] = {'20%', "Column Crossing"},
	[2] = {'20%', "Ancient Sanctuary"},
	[3] = {'20%', "Erymathian Boar"},
	[4] = {'20%', "Quaint Trees"},
	[5] = {'20%', "Nestis' Pond"}
}

List[#List+1] = 'Halloween Event 2021'
Chest[List[#List]:upper()] = {}
Chest[List[#List]:upper()][1] = {
	[1] = {'20%', "Arcane Witch Tower"},
	[2] = {'20%', "Haunted Crypt"},
	[3] = {'20%', "Cursed Farm"},
	[4] = {'20%', "Coffins"},
	[5] = {'20%', "Pumpkin Stack"}
}
Chest[List[#List]:upper()][2] = {
	[1] = {'20%', "Potion Brewer"},
	[2] = {'20%', "Witch Retreat"},
	[3] = {'20%', "Raven Tree"},
	[4] = {'20%', "Captured Specter"},
	[5] = {'20%', "Possessed Tree"}
}
Chest[List[#List]:upper()][3] = {
	[1] = {'25%', "Abandoned Mansion"},
	[2] = {'25%', "Haunted Farm"},
	[3] = {'25%', "Candlestand"},
	[4] = {'25%', "Scarecrow"}
}

List[#List+1] = 'Halloween Event'
Chest[List[#List]:upper()] = {}
Chest[List[#List]:upper()][1] = {
	[1] = {'20%', "Small Tomb"},
	[2] = {'20%', "Haunted Crypt"},
	[3] = {'20%', "Fortune Teller"},
	[4] = {'20%', "Scarecrow"},
	[5] = {'20%', "Pumpkin Stack"}
}
Chest[List[#List]:upper()][2] = {
	[1] = {'20%', "Potion Brewer"},
	[2] = {'20%', "Witch Retreat"},
	[3] = {'20%', "Dracula's Carriage"},
	[4] = {'20%', "Candle Stand"},
	[5] = {'20%', "Possessed Tree"}
}
Chest[List[#List]:upper()][3] = {
	[1] = {'20%', "Burial Vault"},
	[2] = {'20%', "Raven Tree"},
	[3] = {'20%', "Overgrown Tombstone"},
	[4] = {'20%', "Coffins"},
	[5] = {'20%', "Gothic Tomb"}
}

List[#List+1] = 'Hercules Event 2022'
Chest[List[#List]:upper()] = {}
Chest[List[#List]:upper()][1] = {
	[1] = {'20%', "Shrine of Hercules"},
	[2] = {'20%', "Hercules' Domicile"},
	[3] = {'20%', "Garden of the Hesperides"},
	[4] = {'20%', "Nemean Lion Statue"},
	[5] = {'20%', "Cerberus Statue"}
}
Chest[List[#List]:upper()][2] = {
	[1] = {'20%', "Shrine of Hercules"},
	[2] = {'20%', "Garden of the Hesperides"},
	[3] = {'20%', "Stable of Pegasus"},
	[4] = {'20%', "Hercules Statue"},
	[5] = {'20%', "Cerberus Statue"}
}
Chest[List[#List]:upper()][3] = {
	[1] = {'25%', "Hercules' Domicile"},
	[2] = {'25%', "Stable of Pegasus"},
	[3] = {'25%', "Hercules Statue"},
	[4] = {'25%', "Nemean Lion Statue"}
}

List[#List+1] = 'Mali Empire Event 2022'
Chest[List[#List]:upper()] = {}
Chest[List[#List]:upper()][1] = {
	[1] = {'25%', "Granary"},
	[2] = {'25%', "Dogon Cookhouse"},
	[3] = {'25%', "Millet Farm"},
	[4] = {'25%', "Throne"}
}
Chest[List[#List]:upper()][2] = {
	[1] = {'20%', "Dogon Hut"},
	[2] = {'20%', "Baobab Farm"},
	[3] = {'20%', "Bazar"},
	[4] = {'20%', "Mask Sculpture"},
	[5] = {'20%', "Bird Tower"}
}
Chest[List[#List]:upper()][3] = {
	[1] = {'25%', "Dogon Domicile"},
	[2] = {'25%', "Caravan Oasis"},
	[3] = {'25%', "Turtle Sculpture"},
	[4] = {'25%', "Flower Garden"}
}

List[#List+1] = 'Mali Empire Event'
Chest[List[#List]:upper()] = {}
Chest[List[#List]:upper()][1] = {
	[1] = {'20%', "Dogon Hut"},
	[2] = {'20%', "Baobab Farm"},
	[3] = {'20%', "Ceremonial Mask"},
	[4] = {'20%', "Dance Mask"},
	[5] = {'20%', "Throne"}
}
Chest[List[#List]:upper()][2] = {
	[1] = {'20%', "Painted Home"},
	[2] = {'20%', "Dogon Domicile"},
	[3] = {'20%', "Intercropping Farm"},
	[4] = {'20%', "Caravan Oasis"},
	[5] = {'20%', "Flower Garden"}
}
Chest[List[#List]:upper()][3] = {
	[1] = {'25%', "Dogon Cookhouse"},
	[2] = {'25%', "Bazar"},
	[3] = {'25%', "Divination Lines"},
	[4] = {'25%', "Giant Baobab"}
}

List[#List+1] = 'Mongol Event 2022'
Chest[List[#List]:upper()] = {}
Chest[List[#List]:upper()][1] = {
	[1] = {'20%', "Mongol Home"},
	[2] = {'20%', "Gathering Yurt"},
	[3] = {'20%', "Garlic Field"},
	[4] = {'20%', "Horse Megalith"},
	[5] = {'20%', "Silver Tree"}
}
Chest[List[#List]:upper()][2] = {
	[1] = {'20%', "Mongol Cookhouse"},
	[2] = {'20%', "Yak Grassland"},
	[3] = {'20%', "Camel Meadow"},
	[4] = {'20%', "Tug Banner"},
	[5] = {'20%', "Ovoo"}
}
Chest[List[#List]:upper()][3] = {
	[1] = {'25%', "Council Yurt"},
	[2] = {'25%', "Horse Meadow"},
	[3] = {'25%', "Sulde"},
	[4] = {'25%', "Deer Megalith"}
}

List[#List+1] = 'Mongol Event'
Chest[List[#List]:upper()] = {}
Chest[List[#List]:upper()][1] = {
	[1] = {'20%', "Sleeping Yurt"},
	[2] = {'20%', "Gathering Yurt"},
	[3] = {'20%', "Cheese Farm"},
	[4] = {'20%', "Festive Tug"},
	[5] = {'20%', "Silver Tree"}
}
Chest[List[#List]:upper()][2] = {
	[1] = {'20%', "Mongol Cookhouse"},
	[2] = {'20%', "Yak Grassland"},
	[3] = {'20%', "Camel Meadow"},
	[4] = {'20%', "Yak Stone"},
	[5] = {'20%', "Mongolian Throne"}
}
Chest[List[#List]:upper()][3] = {
	[1] = {'25%', "Council Yurt"},
	[2] = {'25%', "Horse Meadow"},
	[3] = {'25%', "Banner of the Khan"},
	[4] = {'25%', "Eagle Stone"}
}

List[#List+1] = 'Persian Event 2022'
Chest[List[#List]:upper()] = {}
Chest[List[#List]:upper()][1] = {
	[1] = {'20%', "Mesopotamian Home"},
	[2] = {'20%', "Placid Estate"},
	[3] = {'20%', "Saffron and Date Farm"},
	[4] = {'20%', "Lamassu Statue"},
	[5] = {'20%', "Mosaic Pavilion"}
}
Chest[List[#List]:upper()][2] = {
	[1] = {'20%', "Parthian Residence"},
	[2] = {'20%', "Pistachio Farm"},
	[3] = {'20%', "Persian Homestead"},
	[4] = {'20%', "Bull Idol"},
	[5] = {'20%', "Windcatcher Tower"}
}
Chest[List[#List]:upper()][3] = {
	[1] = {'25%', "Tea Tent"},
	[2] = {'25%', "Adorned Fish Farm"},
	[3] = {'25%', "Achaemenid Soldier"},
	[4] = {'25%', "Griffin Sculpture"}
}

List[#List+1] = 'Persian Event'
Chest[List[#List]:upper()] = {}
Chest[List[#List]:upper()][1] = {
	[1] = {'20%', "Mesopotamian Home"},
	[2] = {'20%', "Saffron and Date Farm"},
	[3] = {'20%', "Persian Homestead"},
	[4] = {'20%', "Cozy Parasol"},
	[5] = {'20%', "Saffron Bed"}
}
Chest[List[#List]:upper()][2] = {
	[1] = {'20%', "Mesopotamian Home"},
	[2] = {'20%', "Tea Tent"},
	[3] = {'20%', "Pistachio Farm"},
	[4] = {'20%', "Lamassu Statue"},
	[5] = {'20%', "Windcatcher Tower"}
}
Chest[List[#List]:upper()][3] = {
	[1] = {'25%', "Ornamental Manor"},
	[2] = {'25%', "Persian Dairy"},
	[3] = {'25%', "Date Palm"},
	[4] = {'25%', "Pistachio Tree"}
}

List[#List+1] = 'Thai Event'
Chest[List[#List]:upper()] = {}
Chest[List[#List]:upper()][1] = {
	[1] = {'20%', "Prang Wall"},
	[2] = {'20%', "Ceremony Chamber"},
	[3] = {'20%', "Paddy Field"},
	[4] = {'20%', "Guardian Spirit"},
	[5] = {'20%', "Cetiya"}
}
Chest[List[#List]:upper()][2] = {
	[1] = {'20%', "Prang Corner"},
	[2] = {'20%', "Lotus Flower Farm"},
	[3] = {'20%', "Water Pavilion"},
	[4] = {'20%', "Frangipani Bush"},
	[5] = {'20%', "Shrine of Remembrance"}
}
Chest[List[#List]:upper()][3] = {
	[1] = {'20%', "Prang Center"},
	[2] = {'20%', "Floating Market"},
	[3] = {'20%', "Flower Bush Arrangement"},
	[4] = {'20%', "San Phra Phum"},
	[5] = {'20%', "Lotus Tower"}
}

List[#List+1] = 'Winter Event 2021'
Chest[List[#List]:upper()] = {}
Chest[List[#List]:upper()][1] = {
	[1] = {'20%', "Cozy Cabin"},
	[2] = {'20%', "Festive Cottage"},
	[3] = {'20%', "Ice-Fishing Lake"},
	[4] = {'20%', "Halmbock"},
	[5] = {'20%', "Winter Pyramid"}
}
Chest[List[#List]:upper()][2] = {
	[1] = {'20%', "Frosty Igloo"},
	[2] = {'20%', "Hay Farm"},
	[3] = {'20%', "Cookie Bakery"},
	[4] = {'20%', "Snowman"},
	[5] = {'20%', "Adorned Arch"}
}
Chest[List[#List]:upper()][3] = {
	[1] = {'25%', "Sauna Lodge"},
	[2] = {'25%', "Reindeer Farm"},
	[3] = {'25%', "Decorated Fir"},
	[4] = {'25%', "Victorian Sleigh"}
}

List[#List+1] = 'Winter Event'
Chest[List[#List]:upper()] = {}
Chest[List[#List]:upper()][1] = {
	[1] = {'20%', "Snugly Home"},
	[2] = {'20%', "Festive Cottage"},
	[3] = {'20%', "Hay Farm"},
	[4] = {'20%', "Halmbock"},
	[5] = {'20%', "Decorated Well"}
}
Chest[List[#List]:upper()][2] = {
	[1] = {'20%', "Cozy Cabin"},
	[2] = {'20%', "Ice-Fishing Lake"},
	[3] = {'20%', "Winterberry Farm"},
	[4] = {'20%', "Snow Tree"},
	[5] = {'20%', "Winter Pyramid"}
}
Chest[List[#List]:upper()][3] = {
	[1] = {'20%', "Confectionary"},
	[2] = {'20%', "Frozen Lake"},
	[3] = {'20%', "Decorated Fir"},
	[4] = {'20%', "Dala Horse"},
	[5] = {'20%', "Clock Tower"}
}

List[#List+1] = 'World Fair Event'
Chest[List[#List]:upper()] = {}
Chest[List[#List]:upper()][1] = {
	[1] = {'20%', "Mesopotamian Home"},
	[2] = {'20%', "Shrine Cottage"},
	[3] = {'20%', "Fairy Berries"},
	[4] = {'20%', "Water Pavilion"},
	[5] = {'20%', "Cozy Parasol"}
}
Chest[List[#List]:upper()][2] = {
	[1] = {'20%', "Clock Tower"},
	[2] = {'20%', "Ancient Sanctuary"},
	[3] = {'20%', "Pagoda of Demeter"},
	[4] = {'20%', "Victorian Sleigh"},
	[5] = {'20%', "Cetiya"}
}
Chest[List[#List]:upper()][3] = {
	[1] = {'20%', "Gothic Tomb"},
	[2] = {'15%', "Council Yurt"},
	[3] = {'15%', "Bazar"},
	[4] = {'15%', "Divination Lines"},
	[5] = {'20%', "Festive Tug"},
	[6] = {'15%', "Mosaic Pavilion"}
}


local p = {}

function p.main(data,Pass)

	if data.args[1] == nil then return 'Invalid option. Event_Request cannot be empty.' end
	Event_Request = data.args[1]:gsub('^%s+', '') --Strip leading spaces
	Event_Request = Event_Request:gsub('%s+$', '') --Strip trailing spaces
	Event_Request = Event_Request:upper()
	
	if data.args[2] == nil then return 'Invalid option. Chest_Request cannot be empty.' end
	Chest_Request = data.args[2]:gsub('^%s+', '') --Strip leading spaces
	Chest_Request = Chest_Request:gsub('%s+$', '') --Strip trailing spaces
	Chest_Request = tonumber(Chest_Request)
	if type(Chest_Request) ~= 'number' then return 'Invalid option (' .. Chest_Request .. '). Chest_Request has to be a number.' end
	
	Type_Request = ''
	if data.args[3] ~= nil then
		Type_Request = data.args[3]:gsub('^%s+', '') --Strip leading spaces
		Type_Request = Type_Request:gsub('%s+$', '') --Strip trailing spaces
		Type_Request = Type_Request:upper()
	end
	
	if Pass ~= nil then
		if Pass:upper() == 'FREE' then Type_Request = 'FREE' end
	end
	
	--Error handle if Event_Request is invalid
	if Chest[Event_Request] == nil then return 'Invalid Event_Request option: ' .. Event_Request end

	--Error handle if Chest_Request is invalid
	if Chest[Event_Request][Chest_Request] == nil then return 'Invalid Chest_Request option: ' .. Chest_Request end

	local String = '<ul>'
	for i = 1, #Chest[Event_Request][Chest_Request], 1 do
	String = String .. '<li>'
	    if Type_Request == 'FREE' then String = String .. GenMod.Perc(Chest[Event_Request][Chest_Request][i][1]) end
	    String = String .. ' ' .. GenMod.Icon('Customization') .. ' ' .. Chest[Event_Request][Chest_Request][i][2] .. '</li>'
	end
	String = String .. '</ul>'
	
	return String
	
end


function p.Free(data)
	return p.main(data,'Free')
end


function p.Gold(data)
	return p.main(data,'Gold')
end


function p.List()
	
	String = '<ul>'
	
	for i = 1, #List, 1 do
		String = String .. '<li>' .. List[i] .. '</li>'
	end
	
	String = String .. '</ul>'
	
	return String
	
end

return p