User Tools

Site Tools


misc:penny_arcade_random

This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

====== Penny Arcade Deck Building Card Game Randomizer ====== ===== About ===== For anyone who knows me, they know I'm a bit of a tabletop gaming nerd. I've played a lot of [[http://www.amazon.com/Rio-Grande-Games-RGG370-Dominion/dp/B001JQY6K4/ref=sr_1_1?ie=UTF8&qid=1369770834&sr=8-1&keywords=dominion|Dominion]], but I recently picked up the [[http://www.amazon.com/Rio-Grande-Games-RGG370-Dominion/dp/B001JQY6K4/ref=sr_1_1?ie=UTF8&qid=1369770834&sr=8-1&keywords=dominion|Penny Arcade game]]. I've used randomizers for Dominion for a long time (dealing with the randomizer cards kind of sucks), but I couldn't track down a randomizer for Penny Arcade. Since there was a lack of randomizer, I decided to hack one out really quick one day. ===== Randomizer ===== The randomizer is pretty simple and is laid out to be used from a mobile device. Again, this is pretty hacky. If you want to use it, just go to [[http://pa.splitstreams.com]]. It's a super-simple page that just has a bit of javascript to hit a CGI script that generates some JSON. ==== API ==== If anyone is interested in using just the "API", feel free to do so. It is just a cgi page that takes some options and returns some JSON. The base "API" CGI lives at [[http://pa.splitstreams.com/pa.cgi]]. Here are the different query string options: ^ Key ^ Values ^ Description ^ | gset | 1 (Gamers vs. Evil) or 2 (Rumble in R'lyeh) | The gset corresponds to the game set you want to include in the results, if nothing is specified for this, it defaults to "1" (Gamers vs. Evil). This can be specified multiple times to randomize from multiple sets | | gold | 1 | If you include this key, it will add gold cards to the mix. Note that adding gold cards automatically implies gset=2 (Adding Rumble in R'lyeh) | | bal | 1 | If you include this key, it will balance the red and green cards that are used | | pp | 1 | This is mainly used for testing/debugging. It will "pretty print" out your results | | jsonp | callback | The name of the callback is used for a JSONP response | | callback | callback | An alias for jsonp | As you can see, this is pretty simple. If you want to generate a JSON response with all options set, just do [[http://pa.splitstreams.com/pa.cgi?gset=1&gset=2&gold=1&bal=1&pp=1]]. There is also an "allow any" header for CORS support as well. ==== Source Code ==== If anyone is actually interested in getting the source for this, let me know. It's not very good (one more time, totally hacked this out one afternoon), but just send me an email and I could add it to github or something. Otherwise, use the site/API as you desire.

misc/penny_arcade_random.1409864379.txt.gz · Last modified: 2014/09/04 20:59 by jay