Challenge Accepted (Part One)

adamCool, News, Stories

I had some questions from a couple Evangelists early-on about Lackey – namely, how difficult was it to actually make the plugin and what did we have to do to make it work for Phoenix Covenant, especially since PCov has different mechanics and different needs than other card games.

My answer to that seemed unique enough that you all might find it interesting – interesting to those out there who are budding and experienced game designers. So here it goes!

PCov’s a fun and unique game, but it certainly owes much to the many games that have come before it. Great tactical games, great strategy games, great head-to-head, try-to-outwit-everyone games, and of course, rules-are-on-the-card-as-cards-come-into-play games like Magic: the Gathering. Thankfully just about all of these types of games have been made (and made rather well, should I say!) on Lackey.

Step One: Set Goals

A few goals that I had going into this effort were, at minimum:

  • the plugin needed to store pre-constructed decks
  • duplicate decks (or rather, arbitrarily-selected decks) could be loaded to two (or more) players
  • the game board needed to be displayed at all times
  • cards needed to move once placed from one’s Hand to the Battlefield
  • cards needed to rotate to face different directions (strictly critical due to the core, tactical mechanics of the game)
  • resources and status-effects, like Exertion, needed to be tracked

Can’t recommend it enough: write down your goals whenever you take on a project, no matter how small. Making this list focused my work and helped me keep on-point for my next step, research.


I started with reading the entire tutorial for creating plugins from Lackey’s site. But I’m a hands-on learner, so while the tutorial is completely thorough (well, I didn’t know that when I read it, but it’s great to say that about it in hindsight!), I needed to try out some real-world tests in order to get a feel for the code. Scouring the Lackey Forums, I downloaded or poked-at at least 10 different plugins made by very different people.

Quick note about what I mean by “very different” – in the programming world, people get to know one another through their code; it can act like an online profile does: giving other folks an insight into how you think, what you like to do, and how you like to do it. Granted, nothing “deep” like how much you “so totes lovvvveee the new TSwift album,” but certainly insight into how, for instance, you solve problems and organize your work.

Two of the most helpful plugins were lolcats and stratego. That fact actually surprised me, because I was expecting some other tactics-oriented game to be super helpful, but each time, all that there was to learn was how to place units on the field, which was the same as playing a card from your hand.


The lolcats plugin saved a ton of time for me. It had decks, pre-constructed ones at that, and a clearly-written and organized card data file so the Lackey Deck Editor could easily display all of the relevant information for each card.

Understanding the plugin (and the Deck Editor) started with just running it in Lackey. I loaded the plugin, just scanned the settings, what was loaded when I opened it, and what wasn’t. I opened the configuration and specification files in a text editor, too, so I could double-check things to see if I was really “getting” what was there.

The Deck Editor works by pulling in the deck file data and loads everything according to each card’s info in the card data file. The great part about that is you can maintain just one file rather than one per deck file. Granted, whenever you make a deck, you need to create a specific deck file, so there’s some multi-point maintenance that needs to happen, but overall, you aren’t stuck in copypasta world. What you see from the player’s perspective is a list of all decks (according to the deck files in Lackey) and when you select a deck, all of the cards and their info get loaded into the Deck Editor window.

So, to get that working, you need to carefully create all of the support files, the most important of which is the card data file. lolcats really shed a lot of light on these files and the card data file itself because – and perhaps this was a happy accident – all of the data was different, so it was straightforward to track each number or bit of text to the column in which it displayed inside the Deck Editor window. Yatta!

Making a card data file was really smooth, but one thing was most important – to make sure the right image file loaded, you need to write the entire filename, not an ID number or anything, but the filename itself, exactly as it was in the plugin’s setImages folder. Otherwise, everything else gets treated by Lackey as text (and you can do some really cool things with that knowledge, more on that next time).

The last, but really significant thing, that I learned from lolcats was how to use the card-action menu – and being able to edit & customize those actions. In Lackey, you can select cards in-play and modify them. Sometimes those modifications are critical to gameplay, like “tapping” in Magic where you actually turn a card to one side or not, or important to bookkeeping, like moving cards to a Discard pile or bouncing a card back into your Hand.

For PCov’s plugin, we needed to take “tapping” to the next level, as you all know. Our cards can face in every cardinal direction in order to take advantage of armored sides and protect weakpoints. Lackey already allows us to display our card images just fine, so players can easily see the armor and weakpoints, but could Lackey allow us to rotate cards in every direction, and not just 90-degrees to the right?

Short answer. Yes.

Lackey allows for card-level actions to be programmed into any plugin. Thankfully, some of those card-level actions include rotating cards and adding markers or counters. Adding counters was really easy – it’s pretty much just defining the name of the counter and allowing Lackey to know whether the action you’re programming is an “add-counter” or “remove-counter” kind of action. But for rotating our cards, I had to do a little Lackey jiu-jitsu. Four separate actions needed to be written, and each had to be linked separately to a specific rotation. What resulted is what you see as a player – four options that allow you to face Front, Right, Left, and Rear. Oh, happy tactics!


Extra-thankfully, the stratego plugin was equally as helpful as lolcats. And yes, I just read that sentence aloud, and it’s really quite funny.

PCov is a tactical game, and a key part of the game is the battlefield. So we needed to load in the gameboard and it needed to let cards be placed according to the grid-layout. stratego uses a board and placement is just as important in that game as it is in PCov. This plugin made it simple – all we needed to do was a) have a custom “playmat” loaded into the images folder and b) make sure that Lackey knew to load that image file when the player requested it.

But stratego went even further, and it helped a lot. This plugin could be loaded in two different ways – from a save-game file or from the standard plugin loader. While the standard loader wasn’t any different than other plugins that I’d poked-at, the save-game/start-a-new-game procedure showed me that I could specify where a gameboard image file could be loaded and with what specifications.

This is why you can select two different battlefield images (the HD and the SD versions) in the PCov plugin. The game knows to find one or the other based on your request. Using the pre-loading sequence learned in stratego, you can also pre-load Hardpoints and pre-place them on the field according to the particular gameboard that you have loaded. The really nice thing about this part is this opens us up to create different scenarios (for single-player, puzzles, or cooperative mode) or allow you to design – from your own decks – an opening formation to get down to tactics even faster.  

On top of all of that that, stratego included a way to associate cardbacks with cards and even make decks load different cardback files. Granted that last bit isn’t too important to PCov, but it was pretty darn cool. Nonetheless, I did learn that special cardback and cardfront files could be pre-loaded just in case there weren’t card images ready or designed by a plugin creator. That means that we have the option to customize your plugin experience even more with special – or player-designed – cardback files!

OK, so the gameboard loads nicely, cardbacks are properly linked to the cards, card images are looking nice, and if players want, they can pre-load Hardpoints on the battlefield. But what about moving cards across the field? Good question.

Lackey was built for card games, and poker-sized cards at that. PCov has square cards to emphasize that all directions are important in the game. But a rectangle is not a square (heh, heh, math). So something that quickly became a problem was that while cards could be placed and moved about the field, our square card images couldn’t “line up” with the rectangular grid-layouts inherent to the Lackey platform. It was an interesting challenge, and required some poking around in the Forums to get a good answer.

Ultimately the answer was trick-sy (like most hobbitses) Lackey’s grid-layouts can be scaled to almost any size, so I set the plugin code to scale the grid to super, super, super tiny. When so many tiny rectangles are laid out next to one another, a group of them form a square. Center the card on that square and boom! Sweet layout.

Take-aways, & What’s Next

After doing all of this research and playing-with/poking-at the plugins and the Lackey platform itself, I felt really confident that this program would be a good start for our digital plugin. Lackey accomplished all of our minimum goals, and there were some cool things that Lackey could do that I never thought it could. The effect of re-sizing the gameplay-grid was really cool and configuring it was, looking back on it, surprisingly simple.

I’ll share more thoughts in another post, what other things were discovered in the platform. If I had to point at some really important take-aways, they’d have to be:

  • Write down your goals – it keeps you focused.
  • Learn from others and what others have done – real experiences matter.
  • Make a minimum set of features first that’ll do the job, then build on that.
  • Ask questions and keep trying – you’ll be surprised who will answer, and how quickly!

And remember, you can review our Plugin Guide and download Lackey and our Plugin whenever you like! And if you want to submit a video of a playthrough or remake a particularly-amazing crowning moment of awesome, we might post it to our Media Room! Looking forward to seeing your moment!