Rarity error

I noticed that on most occasions, this template returns Common rarity, even though a different parameter is entered. Example: Bujingi Pavo. Code - {{Card table set|LVAL-EN083|Legacy of the Valiant|Super Rare}}, page - Common. Final Cannon Dyskusja 18:02, June 30, 2014 (UTC)

Fixed. And sorry about that, it was my fault to begin with. =C ディノ千?!? · ☎ Dinoguy1000 21:42, June 30, 2014 (UTC)

Store the information on the set list pages

I think we might be going about this backwards.

What we're currently doing is storing semantic information on all sets a card appears in on the card's page. Which makes it possible for us to automatically generate a list of every card in a set, including their rarity and number for that set.

What if we do this the other way around? On a set list page, use SMW to store all the cards in the set. Then the card includes a query for all set lists listing it and as a card and grabs the set details from that list? I think it would be far easier to update and keep track of things if it's just the set pages that need to be edited. A card will only need to make one SMW query to get all the set information for a given language, not one to two queries for each print of the card.

This is the data we'd need to store on set list pages:

Set Card Lists:Legend of Blue Eyes White Dragon (OCG-KR)

[[Set::Legend of Blue Eyes White Dragon]]
[[Local name::푸른 눈의 백룡의 전설]]
[[Release date::December 9, 2003]]
[[Set cards::{ number: "LOB-K000", card: "Tri-Horned Dragon", rarity: "Secret Rare"}]]
[[Set cards::{ number: "LOB-K001", card: "Blue-Eyes White Dragon", rarity: "Ultra Rare"}]]

This is the query we'll need to run on the card template:

{{ #ask: [[Language::Korean]][[Set cards::~*card: "{{ #replace: {{PAGENAME}} | " | \" }}"*]] 
|?Local name
|?Release date
|?Set cards
|template=some template to format the data retrieved

?Set cards will unfortunately return all cards in the set, not just the one requested. We can pick out the right one(s) with string functions, but I wonder if pulling that big long list of cards each time will make a dent in performance.

-- Deltaneos (talk) 23:20, December 11, 2015 (UTC)

Unless we mean to do away with the distinction on a broad level, we need a "Region" property either in place of or in addition to the "Language" property. Other than that, the general properties are ones we probably should already be setting on spoiler lists (and galleries/ratio pages); the only reason we don't yet is because I've been dragging my feet about writing a header template for them (imagine that >.> ).
I've thought a little about a system like this (but only a very little); one thing I'm worried about is when SMW goes down. Having that information suddenly disappear from card pages if that happens doesn't feel very nice. But then, we've had similar problems since we started using SMW, just perhaps not normally this visible (and at any rate, we'll have the same problem in the opposite direction if we keep moving towards auto-generated spoiler lists instead of switching to this proposal, and I'm not sure which would be less preferable from the perspective of our readers).
Performance is definitely something we'll have to keep an eye on if we try this out. I'm not sure which would be a bigger hit to it, though: querying a set with hundreds of cards, or querying dozens of sets (though for cases where both are happening, I'm not feeling optimistic at all). One thing we have to keep in mind, though, is that string functions have limits on the length of the input they'll operate on; IIRC the default limit for most of them is 1000 characters. So this might be something we'll have to use Lua for, instead, in which case we'll have to figure out how - or if - we can make Lua and SMW properly interact. ディノ千?!? · ☎ Dinoguy1000 13:36, December 12, 2015 (UTC)
Community content is available under CC-BY-SA unless otherwise noted.