Card Queries

r3naissanc3r

TNPer
-
-

Card Queries



TL;DR: Easily search through all 350 thousand cards using the card queries and advanced card queries pages!

What is this?

Have you ever wondered how many cards there are in The North Pacific? How many of them are legendary, epic, or ultra-rare? Or how many of them have golden badges?

Have you ever wanted to embark on collecting these sorts of cards, only to realize you do not even know which cards you need to collect? And how could you know - there are, after all, more than 350 thousand cards in both seasons, making it practically impossible to go through them one by one.

Card queries are here to help!

To help you answer these questions, be it to satisfy your curiosity, plan your collections, or for any other reason, we created the card queries and advanced card queries pages.

These pages make it easy to parse the official XML list of cards. For example, to get all the cards of The North Pacific, with the WA badge but without the delegate badge, and of uncommon rarity, you can open the card queries page, and enter the query:
Code:
+region:the_north_pacific, +badge:wa, -badge:delegate, +rarity:uncommon
Upon clicking "submit", you will be provided with a list (IDs, names, and links) of the cards satisfying the above criteria. And that's it!

How do I use the card queries pages?

Both the card queries and advanced card queries pages include detailed use instructions. The pages also list all of the options you can use to search for cards. These include, among other things, badges, rarities, regions, trophies, and many more!

You can combine these options to form more complicated queries. Additionally, you can search for cards of either season.

How is the advanced card queries page different?

Compared to the original version, the advanced card queries page allows making more complicated queries. In particular, whereas the original version allows only doing conjunctions (logical AND) between different (potentially negated, i.e., logical NOT) options, the advanced version allows using arbitrary combinations of disjunctions (logical OR) and conjunctions.

For example, using the advanced version, you can do a query of the form: "cards that have The North Pacific as region, and have either badge 'Admin' or badge 'Moderator'." Using the original version, this requires doing two queries, one for "cards that have The North Pacific as region, and have badge 'Admin'", another for "cards that have The North Pacific as region, and have badge 'Moderator'", and then manually merging the results from the two queries.

You can also use the advanced version to combine the decks of multiple puppets (use an OR to combine deck options), implement exclusive OR (XOR) operations (e.g., "cards that have either badge 'Admin' or badge 'WA', but not both), and so on. See this page for inspiration.

Please note that the card queries and advanced card queries pages use different syntax.

Which version should I use?

That is up to you to decide. The card queries uses (arguably) simpler syntax, very similar to the one used by NationStates for telegramming multiple nations. The the advanced card queries page can do everything the simpler version can, and a lot more; but it uses (arguably) more complicated syntax.

You are welcome to use whichever version you prefer. You also do not have to commit to just one or the other version: both will remain available and you are welcome to switch back and forth as you like.

What if I still have questions?

For any questions or comments, including requests for additional features or bug reports, please post in this thread (preferable) or send a telegram to The Northern Light.

P.S. Many thanks to Ballotonia for making the official XML list of cards available!

[Dispatch version]
 
Last edited:
We have created a new version of the card queries page, which is available under the new URL:

https://azure.nsr3n.info/card_queries/submit_advanced.sh

Compared to the original version, the advanced version allows making more complicated queries. In particular, whereas the original version allows only doing conjunctions (logical AND) between different (potentially negated, i.e., logical NOT) options, the advanced version allows using arbitrary combinations of disjunctions (logical OR) and conjunctions.

For example, using the advanced version, you can do a query of the form: "cards that have The North Pacific as region, and have either badge 'Admin' or badge 'Moderator'." Using the original version, this requires doing two queries, one for "cards that have The North Pacific as region, and have badge 'Admin'", another for "cards that have The North Pacific as region, and have badge 'Moderator'", and then manually merging the two queries.

You can also use the advanced version to combine the decks of multiple puppets (use an OR to combine deck options), implement exclusive OR (XOR) operations (e.g., "cards that have either badge 'Admin' or badge 'WA', but not both), and so on. See this page for inspiration.

Please note that the advanced version uses a different syntax than the original version.

Note also that you do not have to switch to the advanced version if the original is good enough for you, nor do you have to commit to just one or the other. Both versions will remain available, and you can use whichever you prefer.
 
Back
Top