Module:Item/ModList: Difference between revisions
From Growtopia
Jump to navigationJump to search
>HashJona mNo edit summary |
>Atheroma No edit summary |
||
| (19 intermediate revisions by one other user not shown) | |||
| Line 38: | Line 38: | ||
return toModObject({ | return toModObject({ | ||
label = 'Skin Color', | label = 'Skin Color', | ||
description = 'change their skin color to ' .. skin | description = 'change their skin color to ' .. skin, | ||
notes = "Changes the player's skin color to " .. skin | |||
}); | }); | ||
end, | end, | ||
| Line 83: | Line 84: | ||
}), | }), | ||
['Ghost Immunity'] = function(args) | ['Ghost Immunity'] = function(args) | ||
local ghost = args['ghost'] or 'all | local ghost = args['ghost'] or 'all [[Ghost|ghosts]] variants' | ||
return toModObject({ | return toModObject({ | ||
label = 'Ghost Immunity', | label = 'Ghost Immunity', | ||
description = 'be immune from ' .. ghost | description = 'be immune from ' .. ghost, | ||
notes = 'Also grants [[Mods/Ghost Immunity|Ghost Immunity]] against ' .. ghost, | |||
hide_mod_category = true | |||
}); | |||
end, | |||
['Morph'] = function(args) | |||
local description = args['morph_custom'] or "switch between its wearable form and its morph form by wrenching oneself and clicking 'Transform'" | |||
return toModObject({ | |||
label = 'Morph', | |||
category = 'Category:Morph', | |||
description = description, | |||
notes = "This item is a ''[[Mods/Morph|Morph]]''", | |||
hide_mod_category = true | |||
}); | }); | ||
end, | end, | ||
| Line 108: | Line 121: | ||
local actions = { | local actions = { | ||
Cooking = 'when successfully [[Guide:Cooking|cooking]] a food item', | |||
Providers = 'when harvesting [[Provider (block category)|providers]]', | |||
Fossil = 'when harvesting a [[Fossil Prep Station]]', | |||
Fishing = 'when [[Guide:Fishing|fishing]]', | |||
Ghost = 'when catching a [[Ghost|ghost]]', | |||
Crime = 'when defeating a [[Guide:Villains|villain]]', | |||
Startopia = 'when successfully completing a [[Guide:Startopia|star voyage]]', | |||
Wolf = 'when successfully completing a [[WOLFWORLD|wolf world]]', | |||
Surgery = 'when successfully completing a [[Guide:Surgery|surgery]]', | |||
Growganoth = 'when consuming a [[Dark Ticket]]', | |||
} | } | ||
if XP ~= '' then | if XP ~= '' then | ||
message = 'an extra ' .. XP .. ' XP' | message = 'an extra ' .. XP .. ' XP' | ||
| Line 124: | Line 138: | ||
message = 'a ' .. XP_chance .. '% chance' | message = 'a ' .. XP_chance .. '% chance' | ||
elseif XP_custom ~= '' then | elseif XP_custom ~= '' then | ||
message = XP_custom | message = XP_custom | ||
else | else | ||
return default_message | return default_message | ||
| Line 139: | Line 153: | ||
return toModObject({ | return toModObject({ | ||
label = 'XP Buff', | label = 'XP Buff', | ||
description = ' | description = 'gain ' .. message .. ' ' .. action, | ||
notes = 'Grants ' .. message .. ' ' .. action | notes = 'Grants ' .. message .. ' ' .. action | ||
}) | }) | ||
| Line 147: | Line 161: | ||
description = 'glide on any surface as if it is [[Slippery Block (block category)|slippery]]', | description = 'glide on any surface as if it is [[Slippery Block (block category)|slippery]]', | ||
}), | }), | ||
[' | ['Tree Harvesting'] = toModObject({ | ||
label = ' | label = 'Tree Harvesting', | ||
description = 'move slower, but allows the player to harvest trees by walking through them', | description = 'move slower, but allows the player to harvest trees by walking through them', | ||
}), | }), | ||
| Line 163: | Line 177: | ||
description = 'move faster in water', | description = 'move faster in water', | ||
}), | }), | ||
['Float on Water'] = toModObject({ | ['Float on Water'] = function(args) | ||
args['float'] = args['float'] or 'surfboard' | |||
if args['float'] == 'forced' then | |||
return toModObject({ | |||
label = 'Float on Water', | |||
description = 'float on [[Water Bucket|water]] permanently with slow ascent', | |||
notes = 'Also grants permanent [[Mods/Float on Water|Float on Water]], causing slow ascent', | |||
hide_mod_category = true, | |||
}) | |||
elseif args['float'] == 'surfboard' then | |||
return toModObject({ | |||
label = 'Float on Water', | |||
description = 'float on [[Water Bucket|water]] for three seconds', | |||
notes = 'Also grants [[Mods/Float on Water|Float on Water]] for 3 seconds on contact', | |||
hide_mod_category = true, | |||
}) | |||
end | |||
return toModObject({ | |||
label = 'Float on Water', | |||
description = 'float on [[Water Bucket|water]]', | |||
}) | |||
end, | |||
['Grow Effect'] = toModObject({ | ['Grow Effect'] = toModObject({ | ||
label = 'Grow Effect', | label = 'Grow Effect', | ||
| Line 202: | Line 234: | ||
return toModObject({ | return toModObject({ | ||
label = 'Extra Gems', | label = 'Extra Gems', | ||
description = 'get extra ' .. chance .. 'gems | description = 'get a ' .. chance .. ' chance to receive extra gems when breaking blocks', | ||
notes = 'Grants a ' .. chance .. 'chance to receive extra gems when breaking blocks', | |||
}); | }); | ||
end, | end, | ||
| Line 212: | Line 245: | ||
return toModObject({ | return toModObject({ | ||
label = 'Extra Blocks', | label = 'Extra Blocks', | ||
description = 'get an extra ' .. chance .. 'chance for a block | description = 'get a ' .. chance .. 'chance for a block to drop an extra of itself when broken', | ||
notes = 'Grants a ' .. chance .. 'chance for a block to drop an extra of itself when broken' | |||
}); | }); | ||
end, | end, | ||
Latest revision as of 13:20, 4 April 2025
Documentation for this module may be created at Module:Item/ModList/doc
function toModObject(options)
options = options or {}
return {
label = options['label'],
category = options['category'] or ('Category:' .. options['label'] .. ' Mod Items'),
mod_category = options['mod_category'] or ('Mods/' .. options['label']),
description = options['description'],
notes = options['notes'] or '',
hide_mod_category = options['hide_mod_category'] or false,
}
end
local mods = {
['Double Jump'] = toModObject({
label = 'Double Jump',
description = 'jump a second time in mid-air'
}),
['Speedy'] = toModObject({
label = 'Speedy',
description = 'move faster on land',
}),
['Punch Damage'] = toModObject({
label = 'Punch Damage',
description = 'break blocks faster',
}),
['Punch Range'] = function(args)
return toModObject({
label = 'Punch Range',
description = args['punch_range_custom'] or 'punch one tile further',
});
end,
['Punch Power'] = toModObject({
label = 'Punch Power',
description = 'knock back other players further',
}),
['Skin Color'] = function(args)
local skin = args['skin'] or 'a specific tone'
return toModObject({
label = 'Skin Color',
description = 'change their skin color to ' .. skin,
notes = "Changes the player's skin color to " .. skin
});
end,
['Miscellaneous'] = function(args)
return toModObject({
label = 'Miscellaneous',
description = args['misc'] or '',
hide_mod_category = true,
});
end,
['Light Source'] = toModObject({
label = 'Light Source',
description = 'emit light in [[Dark Background Block (block category)|dark areas]]',
}),
['Build Range'] = function(args)
return toModObject({
label = 'Build Range',
description = args['build_range_custom'] or 'build one tile further'
});
end,
['Punch Pull'] = toModObject({
label = 'Punch Pull',
description = 'pull other players towards them upon punching them',
}),
['High Jump'] = toModObject({
label = 'High Jump',
description = 'jump one tile higher',
}),
['Slow Fall'] = toModObject({
label = 'Slow Fall',
description = 'glide slowly to the ground when holding the jump button',
}),
['Wall Climbing'] = toModObject({
label = 'Wall Climbing',
description = 'cling onto [[Climbing Wall|Climbing Walls]] by pressing the jump button',
}),
['Fire Hose'] = toModObject({
label = 'Fire Hose',
description = 'extinguish [[Fire|fires]]',
}),
['Fireproof'] = toModObject({
label = 'Fireproof',
description = 'take 50% less damage from [[Lava Pain Block (block category)|lava pain blocks]]',
}),
['Ghost Immunity'] = function(args)
local ghost = args['ghost'] or 'all [[Ghost|ghosts]] variants'
return toModObject({
label = 'Ghost Immunity',
description = 'be immune from ' .. ghost,
notes = 'Also grants [[Mods/Ghost Immunity|Ghost Immunity]] against ' .. ghost,
hide_mod_category = true
});
end,
['Morph'] = function(args)
local description = args['morph_custom'] or "switch between its wearable form and its morph form by wrenching oneself and clicking 'Transform'"
return toModObject({
label = 'Morph',
category = 'Category:Morph',
description = description,
notes = "This item is a ''[[Mods/Morph|Morph]]''",
hide_mod_category = true
});
end,
['Healing'] = toModObject({
label = 'Healing',
description = 'heal faster than usual after receiving damage from hitting a [[Pain Block (block category)|pain block]]',
}),
['XP Buff'] = function(args)
local default_message = toModObject({
label = 'XP Buff',
description = 'gain more [[Leveling|XP]]'
})
local message = ''
local action = args['action'] or ''
local XP = args['XP'] or ''
local XP_chance = args['XP_chance'] or ''
local XP_custom = args['XP_custom'] or ''
local action_custom = args['action_custom'] or ''
local actions = {
Cooking = 'when successfully [[Guide:Cooking|cooking]] a food item',
Providers = 'when harvesting [[Provider (block category)|providers]]',
Fossil = 'when harvesting a [[Fossil Prep Station]]',
Fishing = 'when [[Guide:Fishing|fishing]]',
Ghost = 'when catching a [[Ghost|ghost]]',
Crime = 'when defeating a [[Guide:Villains|villain]]',
Startopia = 'when successfully completing a [[Guide:Startopia|star voyage]]',
Wolf = 'when successfully completing a [[WOLFWORLD|wolf world]]',
Surgery = 'when successfully completing a [[Guide:Surgery|surgery]]',
Growganoth = 'when consuming a [[Dark Ticket]]',
}
if XP ~= '' then
message = 'an extra ' .. XP .. ' XP'
elseif XP_chance ~= '' then
message = 'a ' .. XP_chance .. '% chance'
elseif XP_custom ~= '' then
message = XP_custom
else
return default_message
end
if action ~= '' and actions[action] ~= nil then
action = actions[action]
elseif action_custom ~= '' then
action = action_custom
else
return default_message
end
return toModObject({
label = 'XP Buff',
description = 'gain ' .. message .. ' ' .. action,
notes = 'Grants ' .. message .. ' ' .. action
})
end,
['Slippery'] = toModObject({
label = 'Slippery',
description = 'glide on any surface as if it is [[Slippery Block (block category)|slippery]]',
}),
['Tree Harvesting'] = toModObject({
label = 'Tree Harvesting',
description = 'move slower, but allows the player to harvest trees by walking through them',
}),
['Damage Reduction'] = toModObject({
label = 'Damage Reduction',
description = 'break blocks more slowly',
}),
['Knock Back Reduction'] = toModObject({
label = 'Knock Back Reduction',
description = 'resist a percentage of knockback when [[Punching|punched]] by other players',
}),
['Speedy in Water'] = toModObject({
label = 'Speedy in Water',
description = 'move faster in water',
}),
['Float on Water'] = function(args)
args['float'] = args['float'] or 'surfboard'
if args['float'] == 'forced' then
return toModObject({
label = 'Float on Water',
description = 'float on [[Water Bucket|water]] permanently with slow ascent',
notes = 'Also grants permanent [[Mods/Float on Water|Float on Water]], causing slow ascent',
hide_mod_category = true,
})
elseif args['float'] == 'surfboard' then
return toModObject({
label = 'Float on Water',
description = 'float on [[Water Bucket|water]] for three seconds',
notes = 'Also grants [[Mods/Float on Water|Float on Water]] for 3 seconds on contact',
hide_mod_category = true,
})
end
return toModObject({
label = 'Float on Water',
description = 'float on [[Water Bucket|water]]',
})
end,
['Grow Effect'] = toModObject({
label = 'Grow Effect',
description = 'expand in size',
}),
['Zombie Weapon'] = toModObject({
label = 'Zombie Weapon',
description = 'kill [[G-Virus|zombies]] during a Pandemic',
}),
['Low Jump'] = toModObject({
label = 'Low Jump',
description = 'decrease the player\'s jump height',
}),
['Card Battle Health'] = toModObject({
label = 'Card Battle Health',
description = 'add 2 additional health to the player during card battles against a [[Villains|villain]] or another player',
}),
['Card Battle Strength'] = toModObject({
label = 'Card Battle Strength',
description = 'reduce 2 health from the [[Villains|villain]] or another player',
}),
['Cookie Hunter'] = toModObject({
label = 'Cookie Hunter',
description = 'provides a significant chance of doubling fruit drops from [[Fortune Cookie]] and [[Lucky Fortune Cookie|Lucky Fortune Cookie Trees]]',
}),
['Night Vision'] = toModObject({
label = 'Night Vision',
description = 'eliminate the darkness effect created by [[Dark Background Block (block category)|dark background blocks]]',
}),
['Extra Gems'] = function (args)
local chance = args['gem_chance'] or ''
if chance ~= '' then
chance = chance .. ' '
end
return toModObject({
label = 'Extra Gems',
description = 'get a ' .. chance .. ' chance to receive extra gems when breaking blocks',
notes = 'Grants a ' .. chance .. 'chance to receive extra gems when breaking blocks',
});
end,
['Extra Blocks'] = function (args)
local chance = args['block_chance'] or ''
if chance ~= '' then
chance = chance .. ' '
end
return toModObject({
label = 'Extra Blocks',
description = 'get a ' .. chance .. 'chance for a block to drop an extra of itself when broken',
notes = 'Grants a ' .. chance .. 'chance for a block to drop an extra of itself when broken'
});
end,
}
return mods