_______

Plugin Creation Tutorial


Lackey Plugin Creation Tutorial


Table of Contents:

Overview


(click the images to see a larger image)

This page will teach you how to make a plugin for any Collectible Card Game that can be played with LackeyCCG. You can download a sample plugin war3000 (pictured above) here, which you might already have in your plugins folder if you downloaded LackeyCCG already.

I will be greatly automating plugin creation in a future version of LackeyCCG, but until then people can refer to this page. (The greyed out Plugin Creator tab will be where plugin automation is handled.)

To make a plugin, really all you need is a spreadsheet of card data, like this.

Table of Contents

Plugin Hierarchy

The packs folder is optional. If you want people to be able to open virtual packs of cards, you need to define it.

An alternative to putting all card images into folders named by set (such as the "firstset" folder in the above picture) is to put all card images into the "general" folder. The "general" folder, in setimages, is a special folder which will always be checked if a card isn't found in other places. When LackeyCCG is trying to find a card image, it looks in setimages for a folder named the same name as the set name that card is from. If there is a folder by that name, LackeyCCG looks inside and tries to find the file name for that card's image (which is specified in the card data file). If it is not found there, LackeyCCG will also check if an image by that name is in the general folder. Therefore, there are 2 methods of storing card images.

  1. Separating each set's image files into folders by that sets name (e.g., "firstset" in the above example).
  2. Keeping all images, regardless of what set they are from, in general.

The former is a good way to store alternate images for reprinted cards (which are functionally identical but have different artwork). The former also allows you to reuse image file "namespace". That is, if firstset's card images are named 1.jpg, 2.jpg, 3.jpg and so on, and secondset's card images are named 1.jpg, 2.jpg, 3.jpg, and so on, you can keep them in the appropriate folder instead of renaming them.

The latter method is simpler and it allows you to save on space (assuming you have reprints). For example, if you have a card that has been reprinted many times, and you only want one image to be used for it, you can just put one image in the general folder for it and each reprint will use the same image. Not having duplicate images for cards can save a lot of space if there are a lot of reprints in your CCG.

Table of Contents
Plugin Info

The plugininfo.txt file is the most complicated thing about making a plugin, but it really isn't very difficult if you read the exlpanation for each part in it. Take a look at a sample plugininfo.txt.

The first number (0 in the example) is the number of Global stats. These are stats that some CCGs use to keep track of communal stats; stats not associated with any particular player. In this example, there are none, so moving on...

The 2 is the number of player stats. Every player gets an instance of each of these.
In Energy<tab>10, Energy is the name of the stat and 10 is the initial amount of the stat.

Next is the number of SuperZones (2 in this case: Deck and Starting). A SuperZone is used for parts of a deck which are set aside at the beginning of the game. The first one is always the main "Deck". You may want additional SuperZones for a Sideboard or Starting cards or some other group in addition to the main deck.

In Deck<tab>0<tab>0, Deck is the name of the SuperZone, 0 (0=invisible, 1=visible) is the default visibility to the SuperZone's owner and the last 0 is for people other than the SuperZone's owner.

4 is the number of Zones. Zones are like SuperZones with the exception that they are not filled with cards when a deck is loaded. The first one MUST be Hand, and the second one MUST be your main Deck. Aside from that, you can have as many as you want. ALL SuperZones are implicitly Zones, so don't add them here again because Lackey will add them automatically.

The 8 refers to the number of phases in a turn. Following the 8 is the names of the phases of a turn on 8 consecutive lines.

The 4 refers to the number of General functions used. Here is a table with the current General functions, their syntax, and what they do.

The 9 refers to the number of Card functions used. Here is a table with the current Card functions, their syntax, and what they do.

The next 10 refers to the number of Columns of Card Data. They are discussed in the Card Data section. The 1 or 0 means if they should or should not be included in the deck editor. At LackeyCCG is updated, just set them all to 1 except for ImageFile, which should be 0.

Last is a 1 followed by the name of the image file to be used as a card back, excluding the ".jpg" which is implicit.




Current General Functions
The following is a table of all current general functions that can be used. Most CCGs would only use a few of them. If your CCG needs a function, contact Trevor and he can likely add it for you.
Name Syntax Description
DRAWCARD DRAWCARD<tab>Draw<tab>1 This draws a card from the main deck to the hand. Like all general functions, it ends in a 1 or a 0, meaning it appears in the set of common used function buttons below the table or it doesn't, respectively. "Draw" is the name that this function will appear as to the user.
DRAWCARDTOTABLE DRAWCARDTOTABLE<tab>DrawUp<tab>0 Puts the top card of your deck directly onto the table. "DrawUp" is the function alias.
FLIPCOIN FLIPCOIN<tab>FlipCoin<tab>0 This flips a coin. The result appears in the chat log.
ROLLD3 ROLLD3<tab>RollD3<tab>0 Rolls a 3-sided die.
ROLLD4 ROLLD4<tab>RollD4<tab>0 Rolls a 4-sided die.
ROLLD6 ROLLD6<tab>RollD6<tab>0 Rolls a 6-sided die.
ROLLD8 ROLLD8<tab>RollD8<tab>0 Rolls a 8-sided die.
ROLLD10 ROLLD10<tab>RollD10<tab>0 Rolls a 10-sided die.
ROLLD12 ROLLD12<tab>RollD12<tab>0 Rolls a 12-sided die.
ROLLD20 ROLLD20<tab>RollD20<tab>0 Rolls a 20-sided die.
SPAWNCARD SPAWNCARD<tab>Draw<tab>1 This spawns a card to the table.
SPAWNPLAYERICON SPAWNPLAYERICON<tab>Draw<tab>1 This function is now obsolete. Don't use it.
ALLYOURCARDSMAKERIGHT0DEGREES ALLYOURCARDSMAKERIGHT0DEGREES
<tab>ReadyAll<tab>1
This makes all your cards on the table unturned.
ALLYOURCARDSMAKERIGHT90DEGREES ALLYOURCARDSMAKERIGHT90DEGREES
<tab>ExertAll<tab>1
This makes all your cards on the table turned 90 degrees.
ALLYOURCARDSMAKERIGHT180DEGREES ALLYOURCARDSMAKERIGHT180DEGREES
<tab>StunAll<tab>1
This makes all your cards on the table turned 180 degrees.
ALLYOURCARDSMAKERIGHT270DEGREES ALLYOURCARDSMAKERIGHT270DEGREES
<tab>SleepAll<tab>1
This makes all your cards on the table turned 270 degrees.
PREVIOUSPHASE PREVIOUSPHASE<tab>PrevPhase<tab>0 This sets the phase of the turn to the previous phase.
NEXTPHASE NEXTPHASE<tab>NextPhase<tab>0 This sets the phase of the turn to the next phase.
PREVIOUSTURN PREVIOUSTURN<tab>PrevTurn<tab>0 This sets the turn to the previous turn.
NEXTTURN NEXTTURN<tab>NextTurn<tab>0 This sets the turn to the next turn.
TRANSFERCARD TRANSFERCARD<tab>Filter<tab>1<tab>-1<tab>3<tab>T<tab>-1<tab>1<tab>B You can use up to 10 different transfer card functions. The arguments mean:
TRANSFERCARD= the type of function.
Filter
= the alias used in your CCG.
1
= If it is in the Table buttons menu.
-1
= This is the player's seat from which this card is taken. -1 is used if it is the performer of the function.
3
= The ordinal zone the card comes from, starting from 0. (The player's hand should always be the first, and their deck should always be the second, or 0 and 1 respectively.)
T
= T or B, for top or bottom of the source. Or you can use R, for a random position.
-1<tab>1<tab>B
= This is similar as the previous 3 items, except these describe the destination position. The destination position, unlike the source position, can be the table, in which case the destination owner should be declared as -2. If the destination is the table, the last argument should be U or D, for "face up" and "face down", respectively.
You could use a TransferCard function instead of a Draw function and it might look like:
TRANSFERCARD<tab>Draw
<tab>1<tab>-1<tab>1<tab>T<tab>
-1<tab>0<tab>T
To send a random card from your deck to the table face down, it might look like:
TRANSFERCARD DeckToTable 1 -1 1 R -2 -1 D
TRANSFERCARD2 TRANSFERCARD2<tab>Filter<tab>1<tab>-1<tab>3<tab>T<tab>-1<tab>1<tab>B See above.
TRANSFERCARD3 TRANSFERCARD3<tab>Filter<tab>1<tab>-1<tab>3<tab>T<tab>-1<tab>1<tab>B See above.
TRANSFERCARD4 TRANSFERCARD4<tab>Filter<tab>1<tab>-1<tab>3<tab>T<tab>-1<tab>1<tab>B See above.
TRANSFERCARD5 TRANSFERCARD5<tab>Filter<tab>1<tab>-1<tab>3<tab>T<tab>-1<tab>1<tab>B See above.
TRANSFERCARD6 TRANSFERCARD6<tab>Filter<tab>1<tab>-1<tab>3<tab>T<tab>-1<tab>1<tab>B See above.
TRANSFERCARD7 TRANSFERCARD7<tab>Filter<tab>1<tab>-1<tab>3<tab>T<tab>-1<tab>1<tab>B See above.
TRANSFERCARD8 TRANSFERCARD8<tab>Filter<tab>1<tab>-1<tab>3<tab>T<tab>-1<tab>1<tab>B See above.
TRANSFERCARD9 TRANSFERCARD9<tab>Filter<tab>1<tab>-1<tab>3<tab>T<tab>-1<tab>1<tab>B See above.
TRANSFERCARD10 TRANSFERCARD10<tab>Filter<tab>1<tab>-1<tab>3<tab>T<tab>-1<tab>1<tab>B See above.
You can only use one of each of this functions. There should be no reason to use more than one of any of them because that would be redundant, with the exception of TRANSFERCARD. That is why there are 10 different TRANSFERCARD functions: TRANSFERCARD, TRANSFERCARD2, TRANSFERCARD3, TRANSFERCARD4, TRANSFERCARD5, TRANSFERCARD6, TRANSFERCARD7, TRANSFERCARD8, TRANSFERCARD9, TRANSFERCARD10. They all have the same syntax, but merely a different name.


Current Card Functions
The following is a table of all current card functions that can be used. A card function works on a selected card or cards. Most CCGs would only use a few of them. If your CCG needs a function, contact Trevor and he can likely add it for you.
Name Syntax Description
EDITNOTE EDITNOTE<tab>EditNote<tab>1 The selected card(s) get a note on them you can type in.
TURNOVER TURNOVER<tab>Flip<tab>1 Turn selected card(s) face down.
TOGGLETURNALLIMMUNITY TOGGLETURNALLIMMUNITY<tab>Pin<tab>0 Selected card(s) not affected by functions like ALLYOUR
CARDSMAKERIGHT0DEGREES
CHANGEOWNER CHANGEOWNER<tab>Flip<tab>0 Take control of selected card(s).
MAKERIGHT0DEGREES MAKERIGHT0DEGREES<tab>Ready<tab>1 Set selected card(s) to being turn 0 degrees.
MAKERIGHT90DEGREES MAKERIGHT90DEGREES<tab>Exert<tab>0 Set selected card(s) to being turn 90 degrees.
MAKERIGHT180DEGREES MAKERIGHT180DEGREES<tab>Stun<tab>0 Set selected card(s) to being turn 180 degrees.
MAKERIGHT270DEGREES MAKERIGHT270DEGREES<tab>Sleep<tab>0 Set selected card(s) to being turn 270 degrees.
ADDCOUNTERBLACK ADDCOUNTERBLACK<tab>Black+1<tab>1<tab>.2<tab>.1 Add a black counter to selected card(s). The .2 and .1 are normalized x,y coordinates telling Lackey where that token's number should be displayed over the card. 0,0 would mean at the bottom left corner and 1,1 would mean at the top right corner.
ADDCOUNTERWHITE ADDCOUNTERWHITE<tab>White+1<tab>1<tab>.2<tab>.1 Add a white counter to selected card(s).
ADDCOUNTERRED ADDCOUNTERRED<tab>Red+1<tab>1<tab>.2<tab>.1 Add a red counter to selected card(s).
ADDCOUNTERORANGE ADDCOUNTERORANGE<tab>Orange+1<tab>1<tab>.2<tab>.1 Add a orange counter to selected card(s).
ADDCOUNTERYELLOW ADDCOUNTERYELLOW<tab>Yellow+1<tab>1<tab>.2<tab>.1 Add a yellow counter to selected card(s).
ADDCOUNTERGREEN ADDCOUNTERGREEN<tab>Green+1<tab>1<tab>.2<tab>.1 Add a green counter to selected card(s).
ADDCOUNTERBLUE ADDCOUNTERBLUE<tab>Blue+1<tab>1<tab>.2<tab>.1 Add a blue counter to selected card(s).
ADDCOUNTERINDIGO ADDCOUNTERINDIGO<tab>Indigo+1<tab>1<tab>.2<tab>.1 Add a indigo counter to selected card(s).
ADDCOUNTERVIOLET ADDCOUNTERVIOLET<tab>Violet+1<tab>1<tab>.2<tab>.1 Add a violet counter to selected card(s).
REMOVECOUNTERBLACK REMOVECOUNTERBLACK<tab>Black-1<tab>1 Remove a black counter to selected card(s).
REMOVECOUNTERWHITE REMOVECOUNTERWHITE<tab>White-1<tab>1 Remove a white counter to selected card(s).
REMOVECOUNTERRED REMOVECOUNTERRED<tab>Red-1<tab>1 Remove a red counter to selected card(s).
REMOVECOUNTERORANGE REMOVECOUNTERORANGE<tab>Orange-1<tab>1 Remove a orange counter to selected card(s).
REMOVECOUNTERYELLOW REMOVECOUNTERYELLOW<tab>Yellow-1<tab>1 Remove a yellow counter to selected card(s).
REMOVECOUNTERGREEN REMOVECOUNTERGREEN<tab>Green-1<tab>1 Remove a green counter to selected card(s).
REMOVECOUNTERBLUE REMOVECOUNTERBLUE<tab>Blue-1<tab>1 Remove a blue counter to selected card(s).
REMOVECOUNTERINDIGO REMOVECOUNTERINDIGO<tab>Indigo-1<tab>1 Remove a indigo counter to selected card(s).
REMOVECOUNTERVIOLET REMOVECOUNTERVIOLET<tab>Violet-1<tab>1 Remove a violet counter to selected card(s).
CLEARCARD CLEARCARD<tab>Clear<tab>1 Clear selected cards. Remove status changes like counters or turned status.
Table of Contents

Set List

The setlist.txt file is used to tell LackeyCCG what sets there are, and what sets make up a "format". A format is a grouping of sets that many CCGs use to restrict what sets are allowed for construction of a deck. For example, one format may only allow cards from the first 3 sets of your CCG. Take a look at a sample setlist.txt.

The first number (1 in the example) is the number of card data files (which are explained here) that LackeyCCG will look at. It is recommended that you merge all sets into one file and you only use only that one card data file. It is a lot easier to maintain one, most up-to-date file, and it is also easier for users to update their files if there is just one card data file to update.

Next is 2, the number of formats. By default, there will always be one format for "All" which includes all cards from all sets, so you don't need to make an "AllSets" format.

Next is that many formats, each defined with:

  1. A format name, BlockOne in the example.
  2. the number of sets which comprises this block, 3 in the example.
  3. And finally the names of the sets. Note that the number of sets you have listed must match the number above.
Note that the names of sets cannot include spaces and they must match the names of the sets which appear in the second column of your card data file (which is explained here).

Table of Contents

Card Data File

The card data file is where all a card's information, including Name, Set, ImageFile, and other information about the card is stored. Take a look at a sample card data file.

A card data file is a tab-delimited text format file, which can be made with Excel (save it as tab-delimited text).

The first three columns must be Name, Set, and ImageFile. Beyond that, you can have between 0 and 30 additional columns. If you leave columns blank or do not include them, then LackeyCCG will be unable to display that field's information in the deck editor or in the pop-up card info box during play. Also, player's will not be able to search for cards which match that type in the deck editor if the corresponding field is not filled in. But if you were doing a really quick rush plugin, all you need is the first 3 columns to play, in which you would be relying on people to look at the card images for any information they need.

The Card Data file is also a good place for players to read a card's errata; changes in rules text which may be more date than what is printed in the card's image file.

The Name of a card must be different for each card that is functionally different. Otherwise, a decklist would be ambiguous as to which card by that name you are referring to. (It is ok if a reprint has the same name as another card.) At the moment weird characters, like ü, are not supported in LackeyCCG. So until they are, please change characters like ü and é to characters like u and e.

The Set of a card must match the one in the setlist.txt file (explained here) in order for it to be included in the formats it defines. Spaces are not currently allowed, though you can use an underscore (_).

The ImageFile column tells LackeyCCG what the name of a card's image file is, EXCLUDING THE ".JPG", which is implicit.

A few notes on Card Data files:

Excel is a common spreedsheet program which you can use to make the card data, however it has the very annoying habbit of adding " before and after a column. One workaround for this is to, after saving it as a tab-delimited text file, open it in wordpad or some other text editor, and batch search for " and replace-delete them all. This will also delete all " in the card data file that you wanted. To maintain the " in the card data file that you want, you can use this method.

  1. In Excel, find-replace all instances of " with | (a "pipe" next to the ] key on most keyboards).
  2. Save it as Tab-delimited text in Excel and close it.
  3. Open it in a text editor, e.g., wordpad or TextEdit.
  4. In the text editor, find-delete all " characters.
  5. Then do a find-replace for all | and replace them with ". Or you can just leave the |s in instead of ".

It is strongly recommended that you make the longest field be the last column. This is usually the Text column. This makes it look better in the deck editor. Also, it is suggested that you don't include any unimportant data, like the artist or "flavor text". These items just take up space and don't really help play the game. If a player wants to see them, he can just look at the image of the card.


Table of Contents


Card Images

All card images should be in the jpg format. All references to image files do not need and should not have the .jpg as a suffix because it is implicit. All card images should be the same size (in dimensions), which is the same size (in dimensions) as the cardback.jpg file. You can have multiple versions of your plugin, each with different card sizes/qualities. This way, a person can download the zipped setimages folder specific to their desired quality of plugin.

Computers with smaller monitors or with slow internet connections may want smaller plugins (in dimensions or file size, respectively).

As discussed in the hierarchy section, you can store all images files in a general folder within the setimages folder, or in a folder named after the set within the setimages folder.

You always need a cardback.jpg and a spawned.jpg in your plugin's setimages folder (or in the setimages/general folder). The name of the cardback image file must match the one the end of your plugininfo.txt file, as discussed in the plugin info section.

Currently, only one card back image is supported in LackeyCCG, but this will be augmented later. The spawned.jpg is used for missing card images or for blank cards which are spawned to the table.

I think a good card size for a plugin is about 214x308, but it largely depends on the size of the font on your cards, what is legible, and what looks nice. You might want to make 3 sets of images for 3 different qualities: low, medium and high. It is up to you.

Using Photoshop to automate image resizing:

You may want to use Photoshop to batch alter/resize your card images. All card images should be the same dimensions within a plugin, and photoshop is a good way to do that.

To use Photoshop to resize your cards:

  1. Open up an untouched image in Photoshop.
  2. Under Actions, make a new action and name it Mt CCG Resize.
  3. Under Photoshop's Image menu, choose Image Size... and enter in your desired dimensions. It might look something like this:
  4. Then in the File menu, choose Save for Web... Your menu might look like this:
  5. Save it to your desktop or some folder for the finished images, and then close the original, making sure your select "Don't Save Changes" for it.
  6. Now hit the button in the Actions window and stop recording your actions. It might look like this:
  7. Finally, in the File menu, choose Automate... Batch.... Select the action you just made and Choose... the source folder with all the untouched image files. You don't need to set any Destination because your Action that you defined, as part of it, saves the output to a file. Your menu might look like this:

You can use a similar process to remove the borders of card images or turn images sideways. All images in your plugin should have the same dimensions as the cardback.jpg. If they do not, (e.g., if they are naturally sideways) you will have to turn them and/or resize them.

Table of Contents


Pack Definitions

You may or may not include a packs folder, adjacent to plugininfo.txt, setlist.txt and sets/ in your plugins folder. This will allow users to open virtual packs of your plugin.

Inside the packs folder should be a file called packdefinitions.txt and any number of pack image files (usually one for each pack definition in packdefinitions.txt). Below is a sample pack image.

Here is a sample packdefinitions.txt.

You can have have any number of types of packs. The example to the left has 2 types of packs defined: a booster pack and a starter pack.

PACKNAME:<tab>"First Set Booster" This is where the name of this pack is defined.

IMAGENAME:<tab>"SamplePack" This is where the name of this pack's image file is defined, excluding the implicit ".jpg".

Next is the number of types of cards in the pack, 3 in the example. All the data is seperated by tabs.

1 is the number of cards contained in the pack.

IGNOREDOUBLES or ALLOWDOUBLES tells LackeyCCG whether or not to allow duplicate cards in the pack.

Next is the number of criteria used to select this type of card. 2, in this case.

Set<tab>IS<tab>"firstset" is a critera that means that cards of this type must be from the set named "firstset".

Rarity<tab>CONTAINS<tab>"R" is a critera that means that cards of this type must contain an "R" in their Rarity Column, hence they are Rare cards.

The Starter Deck example shows how to do a combition of fixed cards and random cards.

Table of Contents


Packaging a Plugin for download

I suggest you separate the setimages from the plugin itself. This will make it a lot easier to update the plugin, and also allow multiple versions of the plugin (e.g., low, medium, high).

You can zip the main plugin, like war3000.zip, and on your webpage have different setimages.zip to download for each plugin version. You might also want to have each set seperately availible to download too. In that case, when a new set comes out, a person just has to download the newest war3000.zip (which doesn't include the images and hence is small) and the latest set's images (and they will put them in their existing setimages folder.

A much better way up having people download or update plugins is by using updatelists. Read about them here.

Table of Contents


Creating an updatelist.txt file

An Update List is a small text file that you can create that will make it a lot easier for people to update your plugin. There are many advantages to using update list files:

  1. Installing a plugin for the first time is as easy as typing in a single URL.
  2. Updating a plugin to the most up-to-date version is as easy as typing a single URL.
  3. You can spread required files all over the web while maintaining the same ease up updating.
  4. Having an updatelist.txt allows people to download card images all at once or as needed, greatly decreasing download time in the latter case.
  5. You can use updatelists to update avatars, background images, or another other file.

Using an updatelist.txt file is easy. Just go to the Preferences Tab, click on the Plugin panel, and type in the URL of the updatelist.txt. Click the "Update plugin from URL" button and LackeyCCG will update everything that needs updating.

Take a look at a sample updatelist.txt.

The first line contains the name of the plugin, followed by a tab, and then the date of the last time this update was made. (Make sure you write the date in the form of mm-dd-yy.)

The next several lines, until CardImageURLs:, define how to update any file. (You could use it for card images, but you should really use the CardImageURLs or CardGeneralURLs definitions, defined later in this section.) Each line consists of the destination path name, relative to Lackey, a tab, the URL from which this file can be downloaded, a tab, and finally a checksum. A checksum is a single number which sums up the contents of a file and it should be unique, differentiating this file from all other files. How you get checksums for files is explained later in this section.

The file name in the destination does not have to match the file name in the URL. This is a good way to rename files.

You may want to use either CardImageURLs or CardGeneralURLs or both.

CardImageURLs are defined much like the other files, except they don't use checksums. You can have any number of definitions following the line with "CardImageURLs:". They consist of a local destination path, a tab, and the URL from which to download the file. Since these are all card images, the local destination path is not relative to the Lackey folder, as the previous definition type's local paths were. Rather, the destination path is relative to your plugin's setimages folder. With CardImageURLs, the <Lackey'sfolder>/plugins/<pluginname>/sets/setimages/ is implicit, so you don't need to type it in for each local destination path of cards.

You can use these definitions to rename files you download. For example,
firstset/dr-x2.jpg http://this-is-some-URL/samplefolder/set01001.jpg

In this case, the card image from http://this-is-some-URL/samplefolder/set01001.jpg would be downloaded and saved as "d2-x2.jpg" at <Lackey's folder>/plugins/war3000/sets/setimages/firstset/d2-x2.jpg

CardGeneralURLs are addresses to online directories in which LackeyCCG will look for files. The file name LackeyCCG uses to search these folders is the one defined in your card data file (discussed here) in the IMAGEFILE column. When the files are downloaded, they will be placed in a folder in your setimages folder named after the set the card is a part of.
Example:
If you refer to the card data section, you will see that the card "Stalker Drone" is from the set named "firstset", and that the imagefile is named "Stalker_Drone.jpg". So, if you had http://www.lackeyccg.com/war3000/medium/general/ defined as a CardGeneralURL folder, LackeyCCG would look for a card at http://www.lackeyccg.com/war3000/medium/general/Stalker_Drone.jpg, and if it found one, it would download it and save it to <Lackey'sfolder>/plugins/war3000/sets/setimages/firstset/Stalker_Drone.jpg.

You can use both CardImageURLs and CardGeneralURLs, but LackeyCCG will always attempt to download the specific CardImageURL you specify for a card before it looks in the folders.

Procedure for getting checksums
First create the updatelist.txt file in a text editor, using a checksum of -1 as a placeholder value for each checksum. It should look something like this:

Save the file and put it in your plugin's directory, in this case <Lackey'sfolder>/plugins/war3000/. Then make sure the files are where they should be. For example, the first definition here says that there is a file called plugininfo.txt and it is at plugins/war3000/plugininfo.txt.

Run LackeyCCG and type:

/mkupdate updatelist.txt

in the log text entry field, as shown in this picture.

Hit return, and it will generate the checksums. LackeyCCG will create a file adjacent to your old updatelist.txt file, with "NEW" added to its name. You can delete your old updatelist.txt an rename updatelistNEW.txt as updatelist.txt. If you look inside, you will see the checksums have changed from the place holder -1 value to actual checksums. A value of 0 for a checksum means the file was not found. Working checksums can be positive or negative numbers.

Checksums are useful. They are used by LackeyCCG to determine whether or not a file needs to be downloaded. Before downloading any file, it checks if the local file matches the checksum in the updatelist.txt file. If it does match, LackeyCCG knows it already has the file, so it won't bother downloading it.

You can use multiple updatelist.txt files. You can have a different updatelist.txt file for each plugin quality. You can have the high quality image quality version look very much like

except that you replace all the "/medium/" references with "/high/". Then that updatelist.txt would download the same text files, but it would download different image files. This is handy because you only need to maintain a single file that multiple plugin qualities will use.

You can also use an updatelist.txt file to update/download other things, like avatars, background images, decks, or optional sets (which are not part of the main download). For example, you could have an updatelist called UpdateAvatars.txt, which might look like:

All you need to do to have people download any files you want is to make an updatelist.txt file, upload it to some place, and tell them its URL. When LackeyCCG starts up, it will read only the main updatelist.txt file, so name only the major plugin updatelist.txt by that exact name. If you have an optional set apart from other cards, name that updatelist something like updatelistMySet.txt and instead of using CardImageURLs and CardGeneralURLs definitions, treat all the files, card images or otherwise, as regular files. (In this case, you will need to generate checksums for them.)

WARNING: When you run an updatelist.txt, you will copy over (thus deleting) any files which had the same names as the newer files in your updatelist.txt. For this reason, you should try to make your resulting file names unique. For example, you could name an avatar XXCoolface.jpg. All avatars in your UpdateAvatars.txt file could have the same maybe a 2 or 3 letter prefix to specify that they all came from the same pack. You could use perhaps your initials, or some other short prefix.

Rules of thumb, Trouble-shooting, and F.A.Q.

This is a collection of miscellaneous tips for creating a plugin. Read this section if your plugin isn't working and you can't figure out why.

Many parts of a plugin use a system where there is a number followed by X entries where X is that number. For example, if your plugininfo.txt says you have 10 columns, you better make sure you have exactly 10 column names on the 10 subsequent lines.

If your plugin defines 10 columns of data, make sure you have exactly 10 columns in your card data file.

If you have " in your Card Data file at the beginning of entries, this is caused by Excel adding in ". See the Card Data section for how to fix this.

If you see a blank card in your Deck editor, this is likely caused by an extra line or 2 at the bottom of your card data file. Try deleting unndeed new line characters.

Make sure you don't use ".jpg" as part of the name of any image file. All image files are assumed to have .jpg as a suffix. If you have .jpeg as a suffix, rename it to .jpg. If you have .gifs or .bmps, use a converter program (such as Photoshop) to convert them to jpg.0.

Don't use NotePad to edit text. Use WordPad or some other text editor. NotePad seems to add invisible junk characters which may mess up a plugin.

Many things currently do not allow spaces. For example, an alias for a function (defined in your plugininfo.txt) cannot have a space. Instead of "Ready All", use "ReadyAll" or "Ready_All". This same no-spaces restriction also applies to names of phases and names of columns in the card data file. I will eventually make LackeyCCG less picky about what syntax it requires, but until then you can work around it.

If you are making a plugin, try hacking the sample war3000 plugin and adding your data. Test it and modify it more. If it doesn't work because of recent changes, try reverting to how it was before and see if that works.

Feel free to email me or ask me questions on AIM, but please read this page before asking me. My AIM screenname is Lykos4 and my email address is trevor@lackeyccg.com.