News:

A forum for users of LackeyCCG

Main Menu

Apply Scripts to Cards

Started by StarcatProducts, May 12, 2016, 03:35:39 PM

Previous topic - Next topic

StarcatProducts

Howdy,

Is there any tutorial on the website that goes over how to add scripts to cards?
The MTG plugin has some amazing stuff such as the cards coming into play tapped, the transform options, and spawn specific token buttons.

I looked all over the tutorial page and I cannot for the life of me locate how to do this.
Any assistance would be appreciated.

Thanks! 8)

MasterJediAdam

I didn't know custom scripts could be added to specific cards. Will take a look at the plugin and let you know.

StarcatProducts


AuraDragon

Scripts have limited functionality in Lackey; there are no smart scripts, only dumb scripts.

Each script is defined in the card's Script column (if you don't have one in your plugin, add one, this is easily done with Excel or a similar spreadsheet program).  A script can only affect the card it's on and do global things that a player would be able to do, such as drawing cards or spawning cards/tokens.

An example of a script:

<s><l>Spawn Emblem</l><f>/spawn Emblem Jace, Unraveler of Secrets</f></s>

Each script is consists of the opening tag "<s>" and and a closing tag "</s>" , these tags tell Lackey that this is a script and that everything between the tags is part of that script, and to associate everything within to that script.


Scripts also use:

The tags "<a>" and "</a>", which stands for Automatic, as in it activates the moment you put the card on the field (good for cards that start with counters, for example).  You are not obligated to add this tag to your scripts.

The tags "<l>" and "</l>", which stands for Label, it lets you change the name of the button on right click menu of the card.

The tags "<f>" and "</f>", which stands for Function, which defines what happens when you activate this script, it uses the same commands that the player has access to, as well as a few other ones relating to the card that you activated the script from.  You can do multiple things in one function tag by separating commands with the ; character.


Here's an example script from MTG:  (Each line was on the same line, separated by a space, in the Scripts column)

<s><a>y</a><l>Set Initial Loyalty</l><f>/ccgreen=5</f></s>
<s><l>+1 Loyalty</l><f>/ccg+1;/s Using Jace, Unraveler Of Secrets's +1 ability.</f></s>
<s><l>Scry 1</l><f>/s Scrying 1;/vp1pt1</f></s>
<s><l>-2 Loyalty</l><f>/ccg-2;/s Using Jace, Unraveler Of Secrets's -2 ability.</f></s>
<s><l>-8 Loyalty</l><f>/ccg-8;/s Using Jace, Unraveler Of Secrets's -8 ability.</f></s>
<s><l>Spawn Emblem</l><f>/spawn Emblem Jace, Unraveler of Secrets</f></s>

(/ccg and /ccgreen are the same command)

That's all I have time for right now, good luck!

MasterJediAdam

Snoogy, do you have a list of commands somewhere like the "/ccg" command? I can't seem to find any documentation for it.

AuraDragon

I do not.

I only know of the ones to hover (/ch), set counters (/ccg for green), look at the top of your deck (/vp1pt1) and all the commands that players normally can use (like draw, and roll a die).

StarcatProducts

Thanks everyone this is super helpful! I will work on adding script commands to my plugin soon!
;D