>>> LackeyCCG Tutorial, Part 1: Installation

 


Table of Contents:


Overview

This page will teach you how to make a plugin for any Collectible Card Game (and many other kinds of games) that can be played with LackeyCCG.

Creating a plugin is both fast and simple. To make a plugin, all you really need is a spreadsheet of card data, image files for the cards (in jpg format), and a few text files to tell LackeyCCG things about your game (such as the names of the phases of the turn).

For the purpose of this tutorial, I will refer to 2 different plugins, both included in the LackeyCCG download (see the downloads page).

"simplesample" is the bare-bones, simplest plugin you can have. If you are making your first plugin, you can start off with this as an example.

"zombie" is more advanced because it includes additional examples of things you can do, such as supporting booster packs, using custom sounds and images, and many other things.


 Plugin Hierarchy

All CCGs are different, and there are many options for doing things, so all plugins will look different. Here is what the 2 sample plugins file hierarchies look like. You'll notice that "zombie" has a lot more files because it demonstrates a lot functionality.

Here is a brief description of the files.

plugininfo.txt contains information like the number of phases in a turn, how many stats there are, and mostly everything that defines a plugin.

setlist.txt has 2 functions. First, it lists which card data files (spreadsheet style data) are included that defines a cards. Secondly (and optionally), it can include "format" definitions which are premade card filters that can appear in the deck editor.

cardback.jpg is the default image used for the backs of cards. Important info, like aspect ration, is gathered from this.

spawned.jpg is used for 2 things. It is used for spawned cards to the table, and it is also used whenever a card image is missing for some reason.

The image files in sets/setimages/general/ , aside from cardback.jpg and spawned.jpg, are individual images for cards.


Plugin Info


/* This tells lackey the format of the plugininfo.txt you are using. Use "1.0".*/
PLUGINVERSION:"1.0"

/*This is the first player stat. Each player has these stats. Note the first one is labeled 0, and the second is labeled 1, and so on for as many as you want. The syntax is PLAYERSTATX, colon , the label for the stat in quotes, tab, and then the default (initial value).*/
PLAYERSTAT0:"Energy1" 10
PLAYERSTAT1:"Arcana2" 10

/*This is the list of super zones. A super zone is essentially the piles that make up a deck before the game starts. Some CCGs have sideboards, or starting card super zones Some CCGs just use the one main deck. The syntax is SUPERZONEX, colon, the label for the super zone in quotes, a tab, a 1if it is visible by default to its owner, a tab, and then a 1 if it is visible by default to people other than its owner. If they aren't visible, put a 0 instead of a 1. */
SUPERZONE0:"Deck" 0 0
SUPERZONE1:"Sideboard" 1 0

/*The following are zone definitions, which are defined just like superzones described above. The difference between super zones and zones are how they are used in a game. A super zone is a pile of cards that you enter the game with (it's how the deck you made is separated). A zone is a pile of cards that is created DURING the game. An example of zone would be a discard pile, or a removed-from-the-game pile. All superzones are implicitly created as zones once a game has begun. So the Sideboard will appear in the game as a place you can move cards to and from even though it isn't explicitly listed as a zone.*/
ZONE0:"Hand" 1 0
ZONE1:"Deck" 0 0
ZONE2:"Discard" 1 1
ZONE3:"Removed" 1 1

/*This section defines the number of, and labels for, the phases of the turn.
The syntax is PHASEX, colon, and then the label in quotes.*/
PHASE0:"Refresh"
PHASE1:"Upkeep"
PHASE2:"Draw"
PHASE3:"Deploy"
PHASE4:"Combat"
PHASE5:"Regroup"
PHASE6:"End"

/*This section defines the general functions that your plugin uses. A general function is in contrast to a card function (defined next). A card function is a function that operates on a card, such as adding a counter, or turning it face down, or adding a note to a card. A general function is more general, such as advancing the turn, or rolling a dice. Drawing a card is a general function because card functions modify cards, and when you draw a card you are just moving a card and not modifying it. Card functions require you to select the card(s) to apply it. The list of possible general and card functions you can use it extensive. Lackey gives you a lot of control of what you can do. Because of this, I am making separate sections where I define how to make general and card functions.*/
GENERALFUNCTION0:"ALLYOURCARDSMAKERIGHT0DEGREES" "Untap All" 1
GENERALFUNCTION1:"DRAWCARD" "Draw" 1
GENERALFUNCTION2:"PREVIOUSPHASE" "Previous Phase" 0
GENERALFUNCTION3:"NEXTPHASE" "Next Phase" 0
GENERALFUNCTION4:"TRANSFERCARD" "Syphon Deck" 0 -1 1 T -1 2 T
GENERALFUNCTION5:"ROLLD6" "Roll D6" 1
GENERALFUNCTION6:"SPAWNCARD" "Spawn Card" 0
GENERALFUNCTION7:"NEXTTURN" "Next Turn" 0
GENERALFUNCTION8:"ROLLD20" "RollD20" 0
GENERALFUNCTION9:"ALLYOURCARDSMAKERIGHT90DEGREES" "TapAll" 0
GENERALFUNCTION10:"PREVIOUSTURN" "Previous Turn" 0
GENERALFUNCTION11:"FLIPCOIN" "Flip Coin" 0

/*See note on general functions above.*/
CARDFUNCTION0:"MAKERIGHT0DEGREES" "Refresh" 1
CARDFUNCTION1:"MAKERIGHT90DEGREES" "Exert" 1
CARDFUNCTION2:"REMOVECOUNTERGREEN" "Green-1" 1
CARDFUNCTION3:"ADDCOUNTERGREEN" "Green+1" 1 .9 .04
CARDFUNCTION4:"REMOVECOUNTERRED" "Red-1" 1
CARDFUNCTION5:"ADDCOUNTERRED" "Red+1" 1 .7 .04
CARDFUNCTION6:"EDITNOTE" "Edit Note" 1 .4 .95
CARDFUNCTION7:"TURNOVER" "Turn Over" 0
CARDFUNCTION8:"TOGGLETURNALLIMMUNITY" "Doesn't Refresh" 0
CARDFUNCTION9:"CHANGEOWNER" "Take Control" 0
CARDFUNCTION10:"CLEARCARD" "Clear" 1

/*This section defines the card data. It is very important that the number, order, and name of the columns you define here match the card data files (the spreadsheet of card data). The first 3 columns MUST be Name, Set, and then ImageFile. You can have as many as you want after that, but things work best if you try to minimize how many you have. For example, don't include unimportant card data, like the artist's name or flavor text. If people want to read that, they can look at the card image. The card data file is largely to help people use the deck editor, allowing people to filter certain fields to find the cards that they want. You could just have the 3 required columns and nothing else and the plugin would work fine, but people wouldn't be able to find cards as easily with the deck editor. Also if people are missing image files, this card data can at least tell them what the card is and does. One last note about the columns is my suggestion that you make the last field the "Text" column, because the card text column is typically the longest, and the longest field looks best on the far right in the deck editor and when the card text box is displayed. Another use of the card data is to include errata, where the card image might be obsolete. The syntax is COLUMNX, a colon, the name of the column, a tab, and then a 1 for every entry except ImageFile.*/
COLUMN0:"Name" 1
COLUMN1:"Set" 1
COLUMN2:"ImageFile" 0
COLUMN3:"Affiliation" 1
COLUMN4:"Type" 1
COLUMN5:"Cost" 1
COLUMN6:"Converted Cost" 1
COLUMN7:"Offense" 1
COLUMN8:"Defense" 1
COLUMN9:"Mind" 1
COLUMN10:"Body" 1
COLUMN11:"Skills" 1
COLUMN12:"Text" 1

/*There are many ways to handle card images. The simplest is to include REUSECARDIMAGES:"yes". Including this will download all card images to a single directory: <your plugin name>sets/setimages/general/
The bad thing about this method is it requires each image file to have a unique file name, which is a good idea any way. I suggest labeling cards like "Alpha001.jpg", including the set abbreviation and the card number.*/
REUSECARDIMAGES:"yes"

/*This defines whether mousing over a facedown card will allow its owner to see the card face. If card owners can see their face down cards any time they want, include this.*/
ISYOURFACEDOWNVISIBLE:"yes"

/*This defines the name of the main cardback*/
CARDBACK0:"cardback"