Help with script to add counters when card flips

Started by ransomman, November 27, 2017, 05:42:37 AM

Previous topic - Next topic

ransomman

Is there a way to add a script so that counters are only added to a card when you flip it over? What I want to achieve is this: 1.) a double sided card is placed onto the table from a shared zone. It has  zero counters on it (technically it's faceup, although it's double sided). 2.) when the card is flipped to its other side, (green) counters are added. Thanks for the help!

MasterJediAdam

Yes, you should be able to script that. Shoot me a PM if you need help, but the Magic plugin has some scripting that is similar.

ransomman

Glad to hear that! Can you think of a specific card that does that so I can find the script more easily when I dl and search the plugin?

MasterJediAdam

Funny thing is that I do not play Magic at all. I went through all the cards looking for script. I will look a little later on and try to script it out for you.

I maintain the FFG SWLCG plugin, and have decided to begin scripting some of the cards.

You will find that the documentation on scripting for LackeyCCG is very limited.

ransomman

Yea man, I spent all night trying to figure out scripting. Being able to have clue counters appear after location cards are flipped is such a huge part of AHLCG so I'd love to add it. I can also look into it a bit later. Thanks for the effort!

ransomman

The best solution I can think of is to add a script that flips the card and adds a token in one fell swoop... are there any scripts that flip cards over? I've tried /turnover and /TURNOVER

ransomman

I FIGURED IT OUT! Kinda... so there is a script for performing card functions, it's /cN where N is the number of the function in the list of right-click functions for that particular card. So what I did was add the script:

<s><l>Flip, Add 1 Clue</l><f>/c6;/ccgreen=1</f></s>

So now when you right click on the card there is an option to "Flip, Add 1 Clue" which turns the card facedown (revealing the other side of the card) and gives it 1 green token!

MasterJediAdam

Quote from: ransomman on November 27, 2017, 12:42:31 PM
I FIGURED IT OUT! Kinda... so there is a script for performing card functions, it's /cN where N is the number of the function in the list of right-click functions for that particular card. So what I did was add the script:

<s><l>Flip, Add 1 Clue</l><f>/c6;/ccgreen=1</f></s>

So now when you right click on the card there is an option to "Flip, Add 1 Clue" which turns the card facedown (revealing the other side of the card) and gives it 1 green token!
Great job!

ransomman

Also, turns out you can just use /cflip to flip the card... smh.  ;D

MasterJediAdam

Quote from: ransomman on November 27, 2017, 04:25:41 PM
Also, turns out you can just use /cflip to flip the card... smh.  ;D
yes, but your scripting does what you want it to do!