Animal Crossing: Pocket Camp Wiki
Explore
Main Page
All Pages
Interactive Maps
Navigation
Community portal
Recent changes
Admin noticeboard
Search
News and Updates
In-Game Notices
Current Events
Log-in Bonus
New Content
Content Archive
Unreleased Content
Version History
Game Info
Player Levels
Villagers
Special Characters
Goals
Crafting
Gardening
Map
Gulliver's Ship
Blathers's Treasure Trek
Scrapbook
Items
Furniture
Clothes
Amenities
Catalog
Locations
Campsite
Cabin
Happy Homeroom
Market Place
OK Motors
Shovelstrike Quarry
Breezy Hollow
Lost Lure Creek
Saltwater Shores
Sunburst Island
More
Basics and Guides
How to Play
Getting Started
System Requirements
Other Tables and Resources
Furniture Villagers Love
Villager Total Materials
Villager Furniture Gifts
Villager Clothing Gifts
Complete Theme List
Happy Homeroom Course Guide
Villager Theme and Material Chart
Gamepedia
Gamepedia support
Report a bad ad
Help Wiki
Contact us
FANDOM
Fan Central
BETA
Games
Anime
Movies
TV
Video
Wikis
Explore Wikis
Community Central
Start a Wiki
Don't have an account?
Register
Sign In
Sign In
Register
Animal Crossing: Pocket Camp Wiki
13,470
pages
Explore
Main Page
All Pages
Interactive Maps
Navigation
Community portal
Recent changes
Admin noticeboard
Search
News and Updates
In-Game Notices
Current Events
Log-in Bonus
New Content
Content Archive
Unreleased Content
Version History
Game Info
Player Levels
Villagers
Special Characters
Goals
Crafting
Gardening
Map
Gulliver's Ship
Blathers's Treasure Trek
Scrapbook
Items
Furniture
Clothes
Amenities
Catalog
Locations
Campsite
Cabin
Happy Homeroom
Market Place
OK Motors
Shovelstrike Quarry
Breezy Hollow
Lost Lure Creek
Saltwater Shores
Sunburst Island
More
Basics and Guides
How to Play
Getting Started
System Requirements
Other Tables and Resources
Furniture Villagers Love
Villager Total Materials
Villager Furniture Gifts
Villager Clothing Gifts
Complete Theme List
Happy Homeroom Course Guide
Villager Theme and Material Chart
Gamepedia
Gamepedia support
Report a bad ad
Help Wiki
Contact us
Editing
Module:GulliverTable
Back to page
Edit source
View history
Talk (0)
Edit Page
Module:GulliverTable
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
local util = require('Module:Util') local p = {} local cargo = mw.ext.cargo function p._gulliverFurnitureTable(direction) -- Cargo Query local themes = getGulliverThemesForQuery(direction) local content = '' for key,theme in util.sortedPairs( themes ) do local tables = 'Furniture' local queryFields = "_pageName,Image,Name,Theme,GulliverPoint,MaterialCost,NumBells,CraftTime,Obtain" local queryArgs = { groupBy = '_pageName', limit = '1000', where = 'GulliverPoint != "N/A" AND Theme="' .. theme .. '"', } local furnitureQueryResult = cargo.query(tables, queryFields, queryArgs) local tables = 'Clothing' local queryFields = "_pageName,Image,Name,Theme,GulliverPoint,MaterialCost,NumBells,CraftTime,Obtain" local queryArgs = { groupBy = '_pageName', limit = '1000', where = 'GulliverPoint != "N/A" AND Theme = "' .. theme .. '"', } local clothingQueryResult = cargo.query(tables, queryFields, queryArgs) -- Check if we got results for the query if furnitureQueryResult == nil then return "(no values)" end if clothingQueryResult == nil then return "(no values)" end content = content .. '<h2>' .. theme .. '</h2>\n' -- Initialize the table local tbl = mw.html.create('table') :addClass('wikitable default sortable') :css('text-align','center') :css('width','100%') -- Table headers tbl:tag('th') :wikitext('Icon') :addClass('unsortable') :css('width', '75px') tbl:tag('th') :wikitext('Name') :css('width', '15%') tbl:tag('th') :wikitext('Theme') :css('width', '15%') tbl:tag('th') :wikitext('Gulliver Point') :css('width', '15%') :attr('data-sort-type', 'number') tbl:tag('th') :wikitext('Material Cost') :css('width', '18%') tbl:tag('th') :wikitext('Bells') :css('width', '9%') tbl:tag('th') :wikitext('Craft Time') :css('width', '10%') tbl:tag('th') :wikitext('Obtain') :css('width', '18%') if type( furnitureQueryResult ) == "table" then -- Go through all the furniturees in the query result for key,furniture in util.sortedPairs( furnitureQueryResult ) do tbl = addGulliverTableRow(tbl, furniture) end end if type( clothingQueryResult ) == "table" then -- Go through all the clothing in the query result for key,clothing in util.sortedPairs( clothingQueryResult ) do tbl = addGulliverTableRow(tbl, clothing) end end content = content .. tostring(tbl) .. '\n' end return tostring(content) end -- Returns the query with the proper themes for the given direction -- @param direction North / South / East / West -- @return table All the themes for given direction function getGulliverThemesForQuery(direction) if direction == "North" then return { [0] = "Natural", [1] = "Hip" } elseif direction == "East" then return { [0] = "Cute", [1] = "Modern", [2] = "Harmonious" } elseif direction == "West" then return { [0] = "Sporty", [1] = "Rustic", [2] = "Civic" } elseif direction == "South" then return { [0] = "Elegant", [1] = "Cool", [2] = "Historical" } end return {} end -- Adds a row to the Gulliver table -- @param tbl The table the row will be added to -- @param item Item and its information that will be added to the table -- @return tbl The table with the row added function addGulliverTableRow(tbl, item) local tr = tbl:tag('tr') -- Icon tr:tag('td') :wikitext( '[[File:' .. item.Image .. '.png|50px|link=]]' ) -- Furniture Name tr:tag('td') :wikitext( '[[' .. item._pageName .. '|' .. item.Name .. ']]' ) -- Theme tr:tag('td') :wikitext( '[[File:' .. item.Theme .. ' Banner.png|144px|link=]]<div style="display:none;">' .. item.Theme .. '</div>' ) -- Gulliver Point tr:tag('td') :wikitext( item.GulliverPoint ) -- Material Cost tr:tag('td') :wikitext( item.MaterialCost ) -- Bells tr:tag('td') :wikitext( item.NumBells ) -- Craft Time tr:tag('td') :wikitext( item.CraftTime ) -- Obtain tr:tag('td') :wikitext( item.Obtain ) return tbl end function p.gulliverFurnitureTable(frame) return p._gulliverFurnitureTable(frame.args[1]) end return p
Summary:
Please note that all contributions to the Animal Crossing: Pocket Camp Wiki are considered to be released under the CC BY-NC-SA
Cancel
Editing help
(opens in new window)
Template used on this page:
Module:GulliverTable/doc
(
edit
)
Follow on IG
TikTok
Join Fan Lab