Module:Sandbox: Difference between revisions

From Path of Exile 2 Wiki
Jump to navigation Jump to search
>OmegaK2
No edit summary
>OmegaK2
No edit summary
Line 1: Line 1:
-- ----------------------------------------------------------------------------
local m_util = require('Module:Util')
-- Imports
-- ----------------------------------------------------------------------------
 
local m_cargo = mw.ext.cargo
local getArgs = require('Module:Arguments').getArgs
local getArgs = require('Module:Arguments').getArgs
local m_util = require('Module:Util')


local p = {}
local data = {  
 
["act"] = 1,
-- ----------------------------------------------------------------------------
["area_level"] = 1,
-- Strings
["boss_monster_ids"] = "Metadata/Monsters/ZombieBoss/ZombieBossHillockNormal",
-- ----------------------------------------------------------------------------
["connection_ids"] = "1_1_town",
 
["flavour_text"] = "Hope was drowned here.",
local i18n = {
["has_waypoint"] = false,
    arg = {
["id"] = "1_1_1",
        monster_resistance_table = 'monster_resistances',
["infobox_html"] = "<div class=\"infocard \"><div class=\"topbar\"><div class=\"left\"></div><div class=\"middle\"><div class=\"header\">The Twilight Strand</div><div class=\"subheader\">area</div></div><div class=\"right\">[[File:No waypoint area icon.png|link=|No Waypoint]]</div></div><div class=\"inner\"><div class=\"block \"><table><tr><th>Id</th><td>[[Module:Area|1_1_1]]</td></tr><tr><th>Act</th><td>1</td></tr><tr><th>Area level</th><td>1</td></tr><tr><th>Tags</th><td>no_tempests, area_with_water</td></tr><tr><th>Connections</th><td>1_1_town</td></tr></table></div><div class=\"block \"><em class=\"tc -flavour\">Hope was drowned here.</em></div><div class=\"block \">[[File:Act1 loading screen.png|250px]]</div><div class=\"block \">[[File:The Twilight Strand area screenshot.jpg|250px]]</div></div></div>",
        id = 'id',
["is_hideout_area"] = false,
        fire = 'fire',
["is_is_master_daily_area"] = false,
        cold = 'cold',
["is_labyrinth_airlock_area"] = false,
        lightning = 'lightning',  
["is_labyrinth_area"] = false,
        chaos = 'chaos',
["is_labyrinth_boss_area"] = false,
       
["is_map_area"] = false,
    },
["is_town_area"] = false,
["is_unique_map_area"] = false,
["is_vaal_area"] = false,
["level_restriction_max"] = 100,
["loading_screen"] = "[[File:Act1 loading screen.png]]",
["main_page"] = "The Twilight Strand (Act 1)",
["mainpage_categories"] = "Category:Areas,Category:Act 1 areas",
["modifier_ids"] = "",
["monster_ids"] = "",
["name"] = "The Twilight Strand",
["parent_area_id"] = "1_1_town",
["screenshot"] = "[[File:The Twilight Strand area screenshot.jpg]]",
["strongbox_max_count"] = 0,
["strongbox_rarity_weight"] = "",
["strongbox_spawn_chance"] = 0,  
["strongbox_weight_magic"] = 0,  
["strongbox_weight_normal"] = 0,  
["strongbox_weight_rare"] = 0,  
["strongbox_weight_unique"] = 0,  
["tags"] = "no_tempests,area_with_water",  
["vaal_area_ids"] = "",
["vaal_area_spawn_chance"] = 0,  
}
}


-- ----------------------------------------------------------------------------
local p = {}
-- Page views
-- ----------------------------------------------------------------------------
 
 
 
--
-- Template:Monster Resistance
--
local monster_resistances = {
    id = {
        field = i18n.arg.id,
        type = 'String',
    },
}
 
 
function p.monster_resistance_table (frame)
    local tpl_args = getArgs(frame, {
        parentFirst = true
    })
    frame = m_util.misc.get_frame(frame)
   
    local args = {}
    args._table = i18n.arg.monster_resistance_table
    for k, data in pairs(monster_resistances) do
        args[data.field] = data.type
    end
   
    frame:callParserFunction('#cargo_declare:', args)
   
end
 


function p.monster_resistance (frame)
function p.test(frame)
     local tpl_args = getArgs(frame, {
     local tpl_args = getArgs(frame, {
         parentFirst = true
         parentFirst = true
     })
     })
     frame = m_util.misc.get_frame(frame)
     frame = m_util.misc.get_frame(frame)
    m_util.cargo.store(frame, data)
end
end


return p
return p

Revision as of 13:37, 12 December 2017

Module documentation[view] [edit] [history] [purge]


This page is not an actual Scribunto module. It exists to provide editors a place to create experimental modules.

Naming your modules

To keep things tidy, please use the following format to name your experimental modules:

Module:Sandbox/Your username/Module name

Cleaning up unused modules

Experimental modules may be deleted by admins upon request or after a long period of inactivity.

List of modules in this area

For a list of the experimental modules under Module:Sandbox, see Special:PrefixIndex/Module:Sandbox/.

local m_util = require('Module:Util')
local getArgs = require('Module:Arguments').getArgs

local data = { 
["act"] = 1, 
["area_level"] = 1, 
["boss_monster_ids"] = "Metadata/Monsters/ZombieBoss/ZombieBossHillockNormal", 
["connection_ids"] = "1_1_town", 
["flavour_text"] = "Hope was drowned here.", 
["has_waypoint"] = false, 
["id"] = "1_1_1", 
["infobox_html"] = "<div class=\"infocard \"><div class=\"topbar\"><div class=\"left\"></div><div class=\"middle\"><div class=\"header\">The Twilight Strand</div><div class=\"subheader\">area</div></div><div class=\"right\">[[File:No waypoint area icon.png|link=|No Waypoint]]</div></div><div class=\"inner\"><div class=\"block \"><table><tr><th>Id</th><td>[[Module:Area|1_1_1]]</td></tr><tr><th>Act</th><td>1</td></tr><tr><th>Area level</th><td>1</td></tr><tr><th>Tags</th><td>no_tempests, area_with_water</td></tr><tr><th>Connections</th><td>1_1_town</td></tr></table></div><div class=\"block \"><em class=\"tc -flavour\">Hope was drowned here.</em></div><div class=\"block \">[[File:Act1 loading screen.png|250px]]</div><div class=\"block \">[[File:The Twilight Strand area screenshot.jpg|250px]]</div></div></div>", 
["is_hideout_area"] = false, 
["is_is_master_daily_area"] = false, 
["is_labyrinth_airlock_area"] = false, 
["is_labyrinth_area"] = false, 
["is_labyrinth_boss_area"] = false, 
["is_map_area"] = false, 
["is_town_area"] = false, 
["is_unique_map_area"] = false, 
["is_vaal_area"] = false, 
["level_restriction_max"] = 100, 
["loading_screen"] = "[[File:Act1 loading screen.png]]", 
["main_page"] = "The Twilight Strand (Act 1)", 
["mainpage_categories"] = "Category:Areas,Category:Act 1 areas", 
["modifier_ids"] = "", 
["monster_ids"] = "", 
["name"] = "The Twilight Strand", 
["parent_area_id"] = "1_1_town", 
["screenshot"] = "[[File:The Twilight Strand area screenshot.jpg]]", 
["strongbox_max_count"] = 0, 
["strongbox_rarity_weight"] = "", 
["strongbox_spawn_chance"] = 0, 
["strongbox_weight_magic"] = 0, 
["strongbox_weight_normal"] = 0, 
["strongbox_weight_rare"] = 0, 
["strongbox_weight_unique"] = 0, 
["tags"] = "no_tempests,area_with_water", 
["vaal_area_ids"] = "", 
["vaal_area_spawn_chance"] = 0, 
}

local p = {}

function p.test(frame)
    local tpl_args = getArgs(frame, {
        parentFirst = true
    })
    frame = m_util.misc.get_frame(frame)
    m_util.cargo.store(frame, data)
end

return p