News:

A forum for users of LackeyCCG

Main Menu

Plug in help

Started by greasontim, May 06, 2010, 12:40:54 AM

Previous topic - Next topic

greasontim

#15
ok as for the updatelist.txt
can someone go into a bit of detail about this for me please?

ok well it updates which is good but the card images dont download.

mathman1550

The easiest way to make the images download is to have all images of a single size in one folder like http://www.lackeyccg.com/pluginname/medium/
then at the end of the updatelist.txt put the following:
CardGeneralURLs:
http://www.lackeyccg.com/pluginname/medium/

If you can not have them all in a single folder/directory, you will need to specify where each and every card is online.

greasontim

well i have
WarStarter/(Image name.jpg)   (URL of the image)
in CardImageURLs1.txt
but it doesn't work

picks-at-flies

Why are they in a different file?

mathman1550

Yeah, at the bottom of your updatelist.txt is where you put the information I stated above, since it was the updatelist that you had asked about.

picks-at-flies

Oh... just read it again.  It's better to use CardGeneralURLs since you don't have to individually list each card.  They work like this:

In your cardlist.txt you will have an image 'column'.  Let's say the entry in this column is imagename, and it's from the set setname.

Lackey will look in plugins/pluginname/sets/setimages/setname/ for imagename.jpg

If it doesn't find it, it will then look for it at:
URL/imagename.jpg
and download it to the above location, where URL is whatever you have listed under CardGeneralURLs.

The only reason to use CardImageURLs is if you have a very good reason to keep the images separated by set on your web host.

greasontim

I'll be keeping the sets in different folders

mathman1550

The only reason to have the images at different URL locations is if you are going to have to name two cards from different sets with the same name, which if the game is good, you won't need. I suggest (for simplicitys sake) that you name each card image file something unique and have them all in one URL location.

Trevor

#23
Quote from: mathman1550 on May 26, 2010, 05:27:25 PM
The only reason to have the images at different URL locations is if you are going to have to name two cards from different sets with the same name, which if the game is good, you won't need. I suggest (for simplicitys sake) that you name each card image file something unique and have them all in one URL location.
Ya, there are a number of ways you can store image files, but the best way is to have all image files uniquely named, like "SET001.jpg" and then keep them all in one folder that is online. Obviously, if there are image file name conflicts, you can't use this method.

It's pretty versatile how it's set up. You could put every single card image on a completely different website if you wanted, and as far as the user of your plugin is concerned, he would never know the difference. But it is a bit of an increased amount of work for the plugin MAKER, though.

Also, you can put in plugininfo.txt the following line right before the ISYOURFACEDOWNVISIBLE line.
REUSECARDIMAGES:"yes"

That will make all card images be downloaded to the general/ folder.

Let's say you have a card named "Bonk" from set "alpha" and a reprint with the same name is in a set called "beta". With REUSECARDIMAGES set to yes, only one card image will be downloaded. If you set REUSECARDIMAGES to no, you will get 2 card images, one at plugins/MyPlugin/sets/setimages/alpha/Bonk.jpg
and the other at
plugins/MyPlugin/sets/setimages/beta/Bonk.jpg

With REUSECARDIMAGES set to yes, you will get a single card image which is saved to
plugins/MyPlugin/sets/setimages/general/Bonk.jpg

There are pros and cons to each method. YES lets people download fewer card image files. NO lets people see alternate art and such for every version of the card. YES puts all the cards to a single download folder. If you omit this line in the pluginfolder, it chooses NO by default. So there actually is never a reason to put REUSECARDIMAGES:"no".

But remember, the file hierarchy of the folders and files online have nothing to do with the folders and file hierarchy of a downloaded plugin. A lot of plugin makers forget this and just want to upload their working plugin. You could do that, but it's smarter to remember that there is no reason to do so. This is especially important if one plugin has multiple card image quality versions. All versions should reference the same URL to download a file if they share that file, and this should be true for most files because the only difference between high and medium versions should be things that have something to do with the card images. You could have identical versions of the same files spread where ever you want, but that will be a headache to maintain.
The online and local  file hierarchy is determined by the updatelist.txt file (and optionally additional CardURLFiles).