Module:DinoIcon/config

From ARK Wiki
Jump to navigation Jump to search
Template-info.png Documentation

This module configures Module:DinoIcon. Check its documentation as well for information about what the module does. All settings are described with comments in the source code.

Notes for translators

Translate creature names and taxonomic groups. Translate comments as well - they carry the field definitions and therefore the edit instructions. Do not translate CSS class name suffixes (e.g. wyvp, alpha, enraged, etc.). Do not translate file names - your wiki is linked up to the English file repository.


return {
	--- Whether to enable this module.
	Enable = true, -- mw.ext.VariablesLua.var( 'FF_DINO_ICONS' ) == '1',
	--- Whether to check if creature variants have their own icons uploaded. This bypasses other matchers, but
	--- each lookup is expensive.
	AllowIconOverrides = false,
	--- Whether Cargo should be queried when determining if a thing is a creature.
	UseCargo = true,
	--- Whether dynamic icon setup configs should be used if specified in Cargo. If false, the matching will be
	--- reevaluated every time. Leaving this enabled allows for caching at template render time, which cuts down
	--- the processing time by a bit.
	AllowCargoDynIconSetups = true,


	--- Stiff name overrides, to map one creature name into another in the system.
	Aliases = {
		["Angler"] = 'Anglerfish',
		["Broodmother"] = "Broodmother Lysrix",
		["Carno"] = 'Carnotaurus',
		["Dilophosaurus"] = 'Dilophosaur',
		["Onychonycteris"] = 'Onyc',
		["Pachycephalosaurus"] = "Pachy",
		["Paracer"] = 'Paraceratherium',
		["Sarcosuchus"] = 'Sarco',
		["Spinosaurus"] = 'Spino',
		["Therizinosaurus"] = 'Therizinosaur',
		["Titanosaurus"] = 'Titanosaur',
		["Trike"] = 'Triceratops'
	},
	

	--- Static value lookup table, if Cargo is disabled or for a speed-up, or for things that can't be added to
	--- Cargo.
	---
	--- Use `Rigged` for creatures, as this table does not propagate into Cargo.
	LUT = {
		--- Terms,
		["Tamed Dino"] = { '', 'Triceratops' },
		-- If this ended up in an ItemLink, it's probably already renamed.
		["Creatures"] = { '', 'Triceratops' },
	},
	
	---
	--- Stiff overrides per name. This can also be done through the creature infobox with the 'dinoIconSetup' parameter,
	--- but it is kind of odd.
	---
	--- This table won't be used if Cargo is turned off.
	---
	--- Entry format:
	---   { CSS class suffix, base creature name to use icon from }
	---
	Rigged = {
		['Fire Wyvern'] = { 'wyvf', 'Wyvern' },
		['Ice Wyvern'] = { 'wyvi', 'Wyvern' },
		['Lightning Wyvern'] = { 'wyvl', 'Wyvern' },
		['Poison Wyvern'] = { 'wyvp', 'Wyvern' },
		['Blood Crystal Wyvern'] = { 'wyvb', 'Wyvern' },
		['Tropical Crystal Wyvern'] = { 'wyvt', 'Wyvern' },
		['Ember Crystal Wyvern'] = { 'wyve', 'Wyvern' },
		['Reaper King'] = { 'reaperk', 'Reaper' },
		['Reaper Queen'] = { 'reaperq', 'Reaper' },
		['Water Jug Bug'] = { 'jugbugw', 'Jug_Bug' },
		['Oil Jug Bug'] = { 'jugbugo', 'Jug_Bug' },
	},
	
	---
	--- Rules leveraging Lua patterns against a creature's name.
	---
	--- Only the CSS class suffix may be altered this way. Icons will be pulled from Cargo's variant information.
	---
	NamePatterns = {
		[' %(Alpha%)$'] = 'balpha',
		['^Alpha '] = { 'balpha', IfInGroup = 'Bosses' },
		[' %(Beta%)$'] = 'bbeta',
		['^Beta '] = 'bbeta',
		[' %(Gamma%)$'] = 'bgamma',
		['^Gamma '] = 'bgamma',
	},

	---
	--- Rules linking up taxonomic groups to CSS class suffixes. Icons will be pulled from Cargo's variant information.
	---
	--- Entry format:
	---   { group name, CSS class suffix }
	---
	Groups = {
		{ 'Aberrant Creatures', 'aberrant' },
		{ 'Alpha Creatures', 'alpha' },
		{ 'Brute Creatures', 'brute' },
		{ 'Corrupted Creatures', 'corrupt' },
		{ 'Enraged Creatures', 'enraged' },
		{ 'Event Creatures', 'event' },
		{ 'Malfunctioned Tek Creatures', 'mtek' },
		{ 'R-Creatures', 'r' },
		{ 'Tek Creatures', 'tek' },
		{ 'VR Creatures', 'vr' },
		{ 'X-Creatures', 'x' },
	},
}