NATION

PASSWORD

SherpDaWerp's Puppet Checker - Easily Manage Card Farms!

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.
User avatar
SherpDaWerp
Technical Moderator
 
Posts: 1896
Founded: Mar 02, 2016
Benevolent Dictatorship

SherpDaWerp's Puppet Checker - Easily Manage Card Farms!

Postby SherpDaWerp » Sat Feb 29, 2020 8:03 pm

Useful code time!

I made this a while back for my personal use, because using Auralia's wrapper makes using the NationStates API so much easier. However, recent discussion on the NS Cards discord server prompted me to release this code to the wider world! What it does is it uses Node.js to find out how many issues, how many card packs, how much bank and how much deck value your puppet nations have.

Linky here: https://github.com/abrow425/ns-puppet-checker.

DISCLAIMER: THIS SCRIPT REQUIRES YOU TO PUT YOUR PUPPET PASSWORDS IN!
I have no way to access these passwords if you follow the setup instructions of the README file. All you are doing is putting these passwords into a local file on your computer. The API needs these passwords to check the number of issues and the number of card packs that your puppet has, because these details are something you cannot see without logging in.

Because you have to put passwords in, I am operating under the assumption that you own these nations and are keeping them alive. So, please don't put in CTE nations.

To run the code, follow the instructions found in the README file. Basically, go here and scroll down. It's decidedly less easy to use than Valentine's script, but it can read a couple more things (packs, issues) because it uses authentication.

If you have any suggestions, issues, tips, or bugs then don't hesitate to: TG me, post a reply on this page, or ping me in Discord if you're in the Cards server.

Go forth, and farm your hearts out!
Became an editor on 18/01/23 techie on 29/01/24

Rampant statistical speculation from before then is entirely unofficial

User avatar
9003
Diplomat
 
Posts: 624
Founded: Oct 25, 2012
Corporate Police State

Postby 9003 » Sat Feb 29, 2020 8:06 pm

Thanks!

What happens if I do put a CTE nation in or a fake nation in becuse I miss spell a name
proud member of PETZ people for the Ethical Treatment of Zombies

Active member of The cards market place discord

User avatar
SherpDaWerp
Technical Moderator
 
Posts: 1896
Founded: Mar 02, 2016
Benevolent Dictatorship

Postby SherpDaWerp » Sat Feb 29, 2020 8:09 pm

For now, it throws an UnhandledPromiseRejectionWarning. That's the first thing I'll try to fix.

In the meantime, if it does this, do a KeyboardInterrupt and check your list of puppets to make sure they're all spelled correctly.

EDIT: Ok, done. Due to the fact that the program has to make 2 API calls per nation, you might get errors twice if the program keeps running. But they are now handled a lot smoother than before.
Last edited by SherpDaWerp on Sat Feb 29, 2020 8:45 pm, edited 1 time in total.
Became an editor on 18/01/23 techie on 29/01/24

Rampant statistical speculation from before then is entirely unofficial

User avatar
Valentine Z
Postmaster-General
 
Posts: 13027
Founded: Nov 08, 2015
Scandinavian Liberal Paradise

Postby Valentine Z » Sun Mar 01, 2020 3:54 am

As I have said in the card server, thank you all for your acknowledgements and credit to me! I have to admit that my code was not as user-friendly and requiring logging into Gmail because it was at first, a quick and dirty solution for myself to keep track of how much bank my puppets have. Eventually, the idea grew and grew thanks to you all with the suggestions. ^^

As always, feel free to work on and improve on whatever that you guys have! With you being able to log in, being able to display how many issues you have, along with the number of packs you have, is nothing short of amazing and it will make the job of card farmers easier! ♥

Thank you, once again! ^^
Val's Stuff. ♡ ^_^ ♡ For You
If you are reading my sig, I want you to have the best day ever ! You are worth it, do not let anyone get you down !
Glory to De Geweldige Sierlijke Katachtige Utopia en Zijne Autonome Machten ov Valentine Z !
(✿◠‿◠) ☆ \(^_^)/ ☆

Issues Thread Photography Stuff Project: Save F7. Stats Analysis

The Sixty! Valentian Stories! Gwen's Adventures!

• Never trouble trouble until trouble troubles you.
• World Map is a cat playing with Australia.
Let Fate sort it out.

User avatar
SherpDaWerp
Technical Moderator
 
Posts: 1896
Founded: Mar 02, 2016
Benevolent Dictatorship

Postby SherpDaWerp » Sun Mar 01, 2020 8:17 pm

Valentine Z wrote:As I have said in the card server, thank you all for your acknowledgements and credit to me! I have to admit that my code was not as user-friendly and requiring logging into Gmail because it was at first, a quick and dirty solution for myself to keep track of how much bank my puppets have. Eventually, the idea grew and grew thanks to you all with the suggestions. ^^

As always, feel free to work on and improve on whatever that you guys have! With you being able to log in, being able to display how many issues you have, along with the number of packs you have, is nothing short of amazing and it will make the job of card farmers easier! ♥

Thank you, once again! ^^

Your original public version was amazing, and it's still probably easier to use than my version purely because it can be run online. Though, now that Racoda's version is out there, there's a third alternative too.

It's kinda cool that the existence of cards has driven so many more API-based tools to be created.
Became an editor on 18/01/23 techie on 29/01/24

Rampant statistical speculation from before then is entirely unofficial


Return to Technical

Who is online

Users browsing this forum: 9003, Britain Interbellum RP, Countriopia, Crnagorska, Dewant, Floppa Lovers, Giovanniland, Ioudaia, Itzlan, Kwaj, Lantros, Loveable Dogs, Nekoatsumelandia, Oceara, Riemstagrad, Second Scratch Empire, Sudpommern, The Southern Dependencies, The Wasp Nest

Advertisement

Remove ads