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)

Scribing unlocks for siege assume mass crafting recipe instead of TP price[edit]

Scribing unlocks for siege weapons seem to pull the first crafting recipe on the respective blueprint page for the base guild materials query, e.g. for arrow carts:


Quantity Material Sell price (each) Material cost
100 Large Fang.pngLarge Fang ... ...
25 Arrow Cart Blueprint.pngArrow Cart Blueprint ... ...
40 Jug of Water.pngJug of Water ... ...
400 Thick Leather Section.pngThick Leather Section ... ...
300 Elder Wood Log.pngElder Wood Log ... ...
200 Mithril Ore.pngMithril Ore ... ...
80 Wool Scrap.pngWool Scrap ... ...
80 Soft Wood Log.pngSoft Wood Log ... ...
Total crafting cost ...

Instead of 25 Arrow Cart Blueprint.pngArrow Cart Blueprint it calculates with 3 Pile of Recycled Siege Equipment.pngPile of Recycled Siege Equipment for the mass recipe which massively inflates the recipe cost over what it actually is.

I was unable to find out what makes the query decide whether to resolve down to a base ingredient recipe. E.g. for Large Fang.pngLarge Fang it does pick the TP price over the T4 -> T5 conversion recipe and the price calculation for the Elder Wood Planks only drills down to T5 logs rather than going through the entire chain of upgrading down to T1. Given the nature of blueprints and their use in crafting they should always behave like raw mats (logs, fangs etc.).

-Endaris (talk) 23:51, 3 September 2025 (UTC)

I've added | base ingredients calculation = n (as per Template:Recipe#Parameters) to the blueprint recipes. (Note that e.g. the Large Fang's recipe doesn't have that parameter due to the template excluding it automatically due to the specified recipe type.) It schould no longer include them now. May still appear to do so on some pages for a while untill the wiki cache has cought up though, but that'll sort itself out with time. 89.247.228.215 18:26, 4 September 2025 (UTC)
Good job, agree with adding calculation = n to those recipes. -Chieftain AlexUser Chieftain Alex sig.png 21:07, 4 September 2025 (UTC)