Diferencia entre revisiones de «Módulo:LootChest»

Leynaf (discusión | contribs.)
Página creada con «local p = { calc_average_amount_this_item_per_pool = function( min_stacksize, max_stacksize, min_pool_rolls, max_pool_rolls, item_weight, pool_total_item_weigh...»
 
Leynaf (discusión | contribs.)
Sin resumen de edición
 
(No se muestran 14 ediciones intermedias del mismo usuario)
Línea 24: Línea 24:
end,
end,
dev = 'In {{1.9}},{{upcoming}} ',
dev = 'En la {{1.9}}, ',
-- these define which sprite, label and link to use, in the table,
-- these define which sprite, label and link to use, in the table,
Línea 117: Línea 117:


notes = {
notes = {
["level-book"] = "<ref group='note' name='level-book'>Enchanted books in the same chest will have the same enchantments (not in {{1.9}}{{upcoming}}). Enchantment probabilities are the same as a level-30 enchantment on an [[enchantment table]], but the chance of multiple enchantments is not reduced.</ref>",
["level-book"] = "<ref group='note' name='level-book'>Los libros encantados que se encuentren en el mismo cofre tendrán los mismos encantos (no en la {{1.9}}. Las probabilidades de encantamiento son las mismas que un hechizo de nivel 30 en una [[mesa de encantamientos]], pero la posibilidad de múltiples encantos no se reduce.</ref>",
["end-ench-equipment"] = "<ref group='note' name='end-city-enchantment'>Enchanted items of the same type in the same chest will have the same enchantments. Enchantment probabilities are the same as a level-20 to level-39 <!-- Yes, really 39 even though the table normally only goes to 30 --> enchantment on an [[enchantment table]].</ref>",
["end-ench-equipment"] = "<ref group='note' name='end-city-enchantment'>Los objetos encantados del mismo tipo en el mismo cofre tendrán los mismos encantos. Las probabilidades de encanto son las mismas que de un nivel 20 a un nivel 39<!-- Sí, realmente 39 a pesar de que la mesa normalmente sólo va hasta 30 --> de encanto en una [[mesa de encantamientos]].</ref>",
["random-book"] = "<ref group='note' name='random-book'>All enchantments are equally probable, and any level of the enchantment is equally probable.</ref>",
["random-book"] = "<ref group='note' name='random-book'>Todos los encantamientos son igualmente probables, y cualquier nivel de encantamiento es igualmente probable.</ref>",
},
},
Línea 129: Línea 129:
chests = {
chests = {
["village-blacksmith"] = { -- village_blacksmith.json
["village-blacksmith"] = { -- village_blacksmith.json
header = "[[Village]]",
header = "[[Aldea]]",
link  = "[[village]] blacksmith",
link  = "[[Aldea]]",
pools = {
pools = {
{
{
Línea 158: Línea 158:
["stronghold-altar"] = { -- stronghold_corridor.json
["stronghold-altar"] = { -- stronghold_corridor.json
header      = "Altar",
header      = "Altar",
superheader = "[[Stronghold]]",
superheader = "[[Fortaleza]]",
link        = "[[stronghold]] altar",
link        = "[[Fortaleza]]",
pools = {
pools = {
{
{
Línea 188: Línea 188:
},
},
["stronghold-library"] = { -- stronghold_library.json
["stronghold-library"] = { -- stronghold_library.json
header      = "Library",
header      = "Biblioteca",
superheader = "[[Stronghold]]",
superheader = "[[Fortaleza]]",
link        = "[[stronghold]] library",
link        = "[[Fortaleza]]",
pools = {
pools = {
{
{
Línea 217: Línea 217:
},
},
["stronghold-storeroom"] = { -- stronghold_crossing.json
["stronghold-storeroom"] = { -- stronghold_crossing.json
header      = "Storeroom",
header      = "Despensa",
superheader = "[[Stronghold]]",
superheader = "[[Fortaleza]]",
link        = "[[stronghold]] storeroom",
link        = "[[Fortaleza]]",
pools = {
pools = {
{
{
Línea 291: Línea 291:
},
},
["dungeon"] = { -- simple_dungeon.json
["dungeon"] = { -- simple_dungeon.json
header = "[[Dungeon]]",
header = "[[Mazmorra]]",
link  = "[[dungeon]]",
link  = "[[Mazmorra]]",
pools = {
pools = {
{
{
Línea 359: Línea 359:
},
},
["mineshaft"] = { -- abandoned_mineshaft.json
["mineshaft"] = { -- abandoned_mineshaft.json
header = "[[Mineshaft]]",
header = "[[Minas abandonadas|Mina]]",
link  = "[[abandoned mine shaft]]s",
link  = "[[Minas abandonadas]]",
pools = {
pools = {
{
{
Línea 415: Línea 415:
["powered-rail"]        = {1,4,5},
["powered-rail"]        = {1,4,5},
["detector-rail"]      = {1,4,5},
["detector-rail"]      = {1,4,5},
["activator-rail"]      = {1,4,5},
["activator-rail"]      = {1,4,5},
["torch"]              = {1,16,15},
["torch"]              = {1,16,15},
}
}
Línea 422: Línea 422:
},
},
["nether-fortress"] = { -- nether_bridge.json
["nether-fortress"] = { -- nether_bridge.json
header = "[[Nether fortress|Nether]]<br>[[Nether fortress|fortress]]",
header = "[[Fortaleza del Inframundo|Fortaleza del]]<br>[[Fortaleza del Inframundo|Inframundo]]",
link  = "[[nether fortress]]",
link  = "[[Fortaleza del Inframundo]]",
pools = {
pools = {
{
{
Línea 464: Línea 464:
},
},
["desert-temple"] = { -- desert_pyramid.json
["desert-temple"] = { -- desert_pyramid.json
header = "[[Desert temple]]",
header = "[[Templo del desierto|Templo del]]<br>[[Templo del desierto|desierto]]",
link  = "[[desert temple]]",
link  = "[[Templo del desierto]]",
pools = {
pools = {
{
{
Línea 518: Línea 518:
},
},
["jungle-temple"] = { -- jungle-temple.json
["jungle-temple"] = { -- jungle-temple.json
header = "[[Jungle temple]]",
header = "[[Templo de la selva|Templo de]]<br>[[Templo de la selva|la selva]]",
link  = "[[jungle temple]]",
link  = "[[Templo de la selva]]",
pools = {
pools = {
{
{
Línea 525: Línea 525:
items = {
items = {
["diamond"]            = {1,3,3},
["diamond"]            = {1,3,3},
["iron-ingot"]          = {1,5,10},
["iron-ingot"]          = {1,5,10},
["gold-ingot"]          = {2,7,15},
["gold-ingot"]          = {2,7,15},
["emerald"]            = {1,3,2},
["emerald"]            = {1,3,2},
Línea 540: Línea 540:
},
},
["end-city"] = { -- end_city_treasure.json
["end-city"] = { -- end_city_treasure.json
header = "[[End city]]",
header = "[[Ciudad del Fin|Ciudad]]<br>[[Ciudad del Fin|del Fin]]",
link  = "[[End city]]",
link  = "[[Ciudad del Fin]]",
poolsDev = {
poolsDev = {
{
{
Línea 574: Línea 574:
},
},
["igloo"] = {
["igloo"] = {
header = "[[Igloo]]",
header = "[[Iglú]]",
link  = "[[igloo]]",
link  = "[[Iglú]]",
poolsDev = {
poolsDev = {
{
{
Línea 625: Línea 625:
display_names = {
display_names = {
["nether-fortress"] = "Nether fortress",
["nether-fortress"] = "fortaleza del inframundo",
["nether"] = "Nether fortress",
["nether"] = "fortaleza del inframundo",
["fortress"] = "Nether fortress",
["fortress"] = "fortaleza del inframundo",
["desert"] = "desert temple",
["desert"] = "templo del desierto",
["jungle"] = "jungle temple",
["jungle"] = "templo de la selva",
["desert-temple"] = "desert temple",
["desert-temple"] = "templo del desierto",
["jungle-temple"] = "jungle temple"
["jungle-temple"] = "templo de la selva"
},
},
Línea 639: Línea 639:
columns = {
columns = {
["stacksize"] = 'the size of stacks (or for unstackable items, number) of this item found in this chest.',
["stacksize"] = 'el tamaño de las pilas (o por número de objetos no apilables) de este objeto que se encuentran en este cofre.',
["weight"] = 'the weight of this item relative to other items in the chest.',
["weight"] = 'la cantidad de este objeto en relación con otros objetos en el cofre.',
["items"] = 'the number of items expected per chest, averaged over a large number of chests.',
["items"] = 'el número de objetos esperados por cada cofre, como promedio sobre un gran número de cofres.',
["chance"] = 'the odds of getting any of this item in a single chest.',
["chance"] = 'las probabilidades de conseguir cualquiera de este material en un solo cofre.',
["chests"] = 'the number of chests expected to search, to find any of this item.'
["chests"] = 'el número de cofres esperados que buscar, para encontrar algo de este objeto.'
},
},
Línea 795: Línea 795:
table.insert( html, item_display_name )
table.insert( html, item_display_name )
table.insert( html, ' can be found ' )
table.insert( html, ' se pueden encontrar ' )


local html_stacks = {}
local html_stacks = {}
Línea 805: Línea 805:
s = s + 1
s = s + 1
local html_per_stack = { 'in ' }
local html_per_stack = { 'en ' }
local c = 0
local c = 0
local nc = q.tablelength( chest_details )
local nc = q.tablelength( chest_details )
Línea 815: Línea 815:
c = c + 1
c = c + 1
if c == nc and nc > 1 then
if c == nc and nc > 1 then
table.insert( html_per_stack, 'and ' )
table.insert( html_per_stack, 'y ' )
end
end
table.insert( html_per_stack, string.format("%.1f", chest.chance*100) )
table.insert( html_per_stack, string.format("%.1f", chest.chance*100) )
table.insert( html_per_stack, "% of " )
table.insert( html_per_stack, "% de " )
if chest.chest_name == 'mineshaft' then
if chest.chest_name == 'mineshaft' then
table.insert( html_per_stack, ' [[Minecart with Chest|chest minecarts]] in ' )
table.insert( html_per_stack, ' [[Vagoneta con cofre|vagonetas con cofre]] en ' )
table.insert( html_per_stack, p.chests[chest.chest_name].link )
table.insert( html_per_stack, p.chests[chest.chest_name].link )
else
else
table.insert( html_per_stack, p.chests[chest.chest_name].link )
table.insert( html_per_stack, p.chests[chest.chest_name].link )
table.insert( html_per_stack, ' chests' )
table.insert( html_per_stack, ' cofres' )
end
end
table.insert( html_per_stack, sep )
table.insert( html_per_stack, sep )
end
end
if nc > 2 then
if nc > 2 then
table.insert( html_per_stack, 'all ' )
table.insert( html_per_stack, 'todo ' )
end
end
table.insert( html_per_stack, 'in ' )
table.insert( html_per_stack, 'en ' )
if p.items[itemname].cannot_stack ~= nil then
if p.items[itemname].cannot_stack ~= nil then
table.insert( html_per_stack, 'groups of ' )
table.insert( html_per_stack, 'grupos de ' )
else
else
table.insert( html_per_stack, 'stacks of ' )
table.insert( html_per_stack, 'pilas de ' )
end
end
table.insert( html_per_stack, stacksize )
table.insert( html_per_stack, stacksize )
Línea 850: Línea 850:
table.insert( html, stack_sep )  
table.insert( html, stack_sep )  
end
end
table.insert( html, 'and ' )
table.insert( html, 'y ' )
table.insert( html, html_stacks[#html_stacks] )
table.insert( html, html_stacks[#html_stacks] )
end
end
Línea 1227: Línea 1227:
if q.tablelength(columns) == 1 then
if q.tablelength(columns) == 1 then
for column_name, v in pairs(columns) do
for column_name, v in pairs(columns) do
table.insert( html, "Values represent " )
table.insert( html, "Los valores representan " )
table.insert( html, p.columns[column_name] )
table.insert( html, p.columns[column_name] )
table.insert( html, "\n" )
table.insert( html, "\n" )
Línea 1246: Línea 1246:
chest_name = chest_name:gsub( "-", " " )
chest_name = chest_name:gsub( "-", " " )
table.insert( html, "Each " )
table.insert( html, "Cada " )
table.insert( html, display_name or chest_name )
table.insert( html, display_name or chest_name )
table.insert( html, " chest contains " )
table.insert( html, " cofre contiene " )
if #allRolls == 1 then
if #allRolls == 1 then
table.insert( html, allRolls[1] )
table.insert( html, allRolls[1] )
else
else
table.insert( html, #allRolls )
table.insert( html, #allRolls )
table.insert( html, ' groups of ' )
table.insert( html, ' grupos de ' )
local s = q.tern( #allRolls > 2, ', ', ' ' )
local s = q.tern( #allRolls > 2, ', ', ' ' )
for i = 1, #allRolls-1 do
for i = 1, #allRolls-1 do
Línea 1259: Línea 1259:
table.insert( html, s )
table.insert( html, s )
end
end
table.insert( html, 'and ' )
table.insert( html, 'y ' )
table.insert( html, allRolls[#allRolls] )
table.insert( html, allRolls[#allRolls] )
end
end
table.insert( html, " item stacks, with the following distribution: \n" )
table.insert( html, " pilas de objetos, con la siguiente distribución: \n" )
end
end