Diferencia entre revisiones de «Módulo:LootChest»
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...» |
Sin resumen de edición |
||
| (No se muestran 14 ediciones intermedias del mismo usuario) | |||
| Línea 24: | Línea 24: | ||
end, | end, | ||
dev = ' | 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'> | ["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'> | ["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'> | ["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 = "[[ | header = "[[Aldea]]", | ||
link = "[[ | 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 = "[[ | superheader = "[[Fortaleza]]", | ||
link = "[[ | link = "[[Fortaleza]]", | ||
pools = { | pools = { | ||
{ | { | ||
| Línea 188: | Línea 188: | ||
}, | }, | ||
["stronghold-library"] = { -- stronghold_library.json | ["stronghold-library"] = { -- stronghold_library.json | ||
header = " | header = "Biblioteca", | ||
superheader = "[[ | superheader = "[[Fortaleza]]", | ||
link = "[[ | link = "[[Fortaleza]]", | ||
pools = { | pools = { | ||
{ | { | ||
| Línea 217: | Línea 217: | ||
}, | }, | ||
["stronghold-storeroom"] = { -- stronghold_crossing.json | ["stronghold-storeroom"] = { -- stronghold_crossing.json | ||
header = " | header = "Despensa", | ||
superheader = "[[ | superheader = "[[Fortaleza]]", | ||
link = "[[ | link = "[[Fortaleza]]", | ||
pools = { | pools = { | ||
{ | { | ||
| Línea 291: | Línea 291: | ||
}, | }, | ||
["dungeon"] = { -- simple_dungeon.json | ["dungeon"] = { -- simple_dungeon.json | ||
header = "[[ | header = "[[Mazmorra]]", | ||
link = "[[ | link = "[[Mazmorra]]", | ||
pools = { | pools = { | ||
{ | { | ||
| Línea 359: | Línea 359: | ||
}, | }, | ||
["mineshaft"] = { -- abandoned_mineshaft.json | ["mineshaft"] = { -- abandoned_mineshaft.json | ||
header = "[[ | header = "[[Minas abandonadas|Mina]]", | ||
link = "[[ | 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}, | |||
["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 = "[[ | header = "[[Fortaleza del Inframundo|Fortaleza del]]<br>[[Fortaleza del Inframundo|Inframundo]]", | ||
link = "[[ | link = "[[Fortaleza del Inframundo]]", | ||
pools = { | pools = { | ||
{ | { | ||
| Línea 464: | Línea 464: | ||
}, | }, | ||
["desert-temple"] = { -- desert_pyramid.json | ["desert-temple"] = { -- desert_pyramid.json | ||
header = "[[ | header = "[[Templo del desierto|Templo del]]<br>[[Templo del desierto|desierto]]", | ||
link = "[[ | link = "[[Templo del desierto]]", | ||
pools = { | pools = { | ||
{ | { | ||
| Línea 518: | Línea 518: | ||
}, | }, | ||
["jungle-temple"] = { -- jungle-temple.json | ["jungle-temple"] = { -- jungle-temple.json | ||
header = "[[ | header = "[[Templo de la selva|Templo de]]<br>[[Templo de la selva|la selva]]", | ||
link = "[[ | 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}, | |||
["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 = "[[ | header = "[[Ciudad del Fin|Ciudad]]<br>[[Ciudad del Fin|del Fin]]", | ||
link = "[[ | link = "[[Ciudad del Fin]]", | ||
poolsDev = { | poolsDev = { | ||
{ | { | ||
| Línea 574: | Línea 574: | ||
}, | }, | ||
["igloo"] = { | ["igloo"] = { | ||
header = "[[ | header = "[[Iglú]]", | ||
link = "[[ | link = "[[Iglú]]", | ||
poolsDev = { | poolsDev = { | ||
{ | { | ||
| Línea 625: | Línea 625: | ||
display_names = { | display_names = { | ||
["nether-fortress"] = " | ["nether-fortress"] = "fortaleza del inframundo", | ||
["nether"] = " | ["nether"] = "fortaleza del inframundo", | ||
["fortress"] = " | ["fortress"] = "fortaleza del inframundo", | ||
["desert"] = " | ["desert"] = "templo del desierto", | ||
["jungle"] = " | ["jungle"] = "templo de la selva", | ||
["desert-temple"] = " | ["desert-temple"] = "templo del desierto", | ||
["jungle-temple"] = " | ["jungle-temple"] = "templo de la selva" | ||
}, | }, | ||
| Línea 639: | Línea 639: | ||
columns = { | columns = { | ||
["stacksize"] = ' | ["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"] = ' | ["weight"] = 'la cantidad de este objeto en relación con otros objetos en el cofre.', | ||
["items"] = ' | ["items"] = 'el número de objetos esperados por cada cofre, como promedio sobre un gran número de cofres.', | ||
["chance"] = ' | ["chance"] = 'las probabilidades de conseguir cualquiera de este material en un solo cofre.', | ||
["chests"] = ' | ["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, ' | 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 = { ' | 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, ' | 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, "% | table.insert( html_per_stack, "% de " ) | ||
if chest.chest_name == 'mineshaft' then | if chest.chest_name == 'mineshaft' then | ||
table.insert( html_per_stack, ' [[ | 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, ' | 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, ' | table.insert( html_per_stack, 'todo ' ) | ||
end | end | ||
table.insert( html_per_stack, ' | 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, ' | table.insert( html_per_stack, 'grupos de ' ) | ||
else | else | ||
table.insert( html_per_stack, ' | 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, ' | 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, " | 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, " | table.insert( html, "Cada " ) | ||
table.insert( html, display_name or chest_name ) | table.insert( html, display_name or chest_name ) | ||
table.insert( html, " | 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, ' | 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, ' | table.insert( html, 'y ' ) | ||
table.insert( html, allRolls[#allRolls] ) | table.insert( html, allRolls[#allRolls] ) | ||
end | end | ||
table.insert( html, " | table.insert( html, " pilas de objetos, con la siguiente distribución: \n" ) | ||
end | end | ||