Template talk:Base guild materials

From Guild Wars 2 Wiki
Jump to navigationJump to search

This breaks on Guild Workshop, War Room, and Guild Market, and Guild Arena. Really like this template though. Anzenketh (talk) 21:15, 30 October 2015 (UTC)

If we could get the output of this in a table format we would be able to calculate the total required and put it on the building page like Guild Tavern and Guild Mine. If we can get this to accept a array that would be even better as then we can do a query to the building. Assign it to a array. Then pass it though this to get the total to fully upgrade the building. Anzenketh (talk) 21:29, 30 October 2015 (UTC)
Those are buildings, not upgrades - this is not intended for buildings. For a building, you have to query all of the upgrades that belong to the building, then add up all the materials they list, and I'd assume you don't want to break that down into base materials. —Dr Ishmael User Dr ishmael Diablo the chicken.png 21:51, 30 October 2015 (UTC)
Ya I noticed things were not working how I thought they were later. The description on this template page threw me off. I figured you would have to query all the buildings upgrades then add up all the materials they list. I was trying to do what User:Lacunaria did only though SMW. My Wiki is a little above average but my SMW is weak. Having a hard time figuring out how to do it. Anzenketh (talk) 21:59, 30 October 2015 (UTC)
Well I tried to do what you stated in what I thought would work. But it did not. See User:Anzenketh/Sandbox/Templates for my attempt. Anzenketh (talk)
Helps if you pass #arraymap a comma-separated list so it can be parsed correctly. You probably want to call {{First base guild materials lookup}} on each upgrade so the template only tallies the sum of the ingredients instead of recursing down into the full list. Prevents sticking in the header each time too and duplicating the results. Then do the last call where you parse the complete list of ingredients. The recursive template is really stupid and I don't understand it completely either.--Relyk ~ talk < 00:51, 1 November 2015 (UTC)

Not properly accepting items starting with numerals[edit]

The form is currently having trouble on pages such as Market Restoration 2, which have items like 18 Slot Mithril Box. It's attempting to move the 18 to the quantity side of the form. Not sure it the problem is here, or on {{base ingredients table}}. G R E E N E R 19:52, 10 March 2016 (UTC)

I can't read base ingredients template code anymore, but I can safely say the problem has come from the lookup not the table bit. -81.135.73.149 22:31, 10 March 2016 (UTC)
Even worse, the issue was on the first line. Fixed. -Chieftain AlexUser Chieftain Alex sig.png 18:35, 26 September 2016 (UTC)

Bug report: Further Exploration[edit]

Relyk. This template was breaking in two places on Further Exploration. One at the x10 "18 Slot Equipment Pack", and a second time at Essence of Luck (exotic). It's been a while since I looked at this template but both issues were strongly related to the regular expressions at the top of {{Base guild materials}}.

Actual text being fed into Template:Base ingredients lookup

10; 18; Slot Thick Leather Pack~ 100; Loaf of Saffron Bread~ 100; Jug of Water~ 777; Essence of Luck exotic~ 100; Pile of Crystalline Dust~ 100; Glob of Ectoplasm~ 50; Ley-Line Infused Tool~ 50; Molten Lodestone~ 100; Tome of Knowledge~ 50; Destroyer Lodestone

Text that needs to be fed in (base ingredients lookup + base ingredients table works okay given the right string):

10; 18 Slot Thick Leather Pack~ 100; Loaf of Saffron Bread~ 100; Jug of Water~ 777; Essence of Luck (exotic)~ 100; Pile of Crystalline Dust~ 100; Glob of Ectoplasm~ 50; Ley-Line Infused Tool~ 50; Molten Lodestone~ 100; Tome of Knowledge~ 50; Destroyer Lodestone

tl;dr I fixed the regex. --Chieftain AlexUser Chieftain Alex sig.png 18:34, 26 September 2016 (UTC)