LackeyCCG

LackeyCCG Forum => Plugins & Plugin Creation Forum => Topic started by: clutchonline on August 26, 2019, 10:26:14 PM

Title: How to get a d24 in the game?
Post by: clutchonline on August 26, 2019, 10:26:14 PM
I need my players to be able to roll a d24. How do I do that?
Title: Re: How to get a d24 in the game?
Post by: CrazyChucky on August 27, 2019, 12:38:11 AM
Here's a helpful list of console commands in Lackey: http://www.lackeyccg.com/tutoriallogcommands.html (http://www.lackeyccg.com/tutoriallogcommands.html)

You can roll a d24 by typing "/roll d24" in the console and hitting enter. The space is optional, and capitalization doesn't matter.

If you want it available as a button, include something like this in your plugininfo.txt:

Code: [Select]
<generalfunction><label>Roll d24</label><kind>roll d24</kind><includeasbutton>yes</includeasbutton></generalfunction>
Title: Re: How to get a d24 in the game?
Post by: clutchonline on August 27, 2019, 10:39:13 AM
Sorry, but that didn't work. I got the 20-sided die no problem as a button, but the 24-sided die won't work. I don't want to have to force people to use commands in the chat.
Title: Re: How to get a d24 in the game?
Post by: clutchonline on August 27, 2019, 10:44:21 AM
Here's the code:


<generalfunction><label>Draw</label><kind>DRAWCARD</kind></generalfunction>
<generalfunction><label>Roll Regular Die</label><kind>ROLLD20</kind><includeasbutton>yes</includeasbutton></generalfunction>
<generalfunction><label>Roll Power Die</label><kind>ROLLD24</kind><includeasbutton>yes</includeasbutton></generalfunction>
<generalfunction><label>Take Control</label><kind>CHANGEOWNER</kind></generalfunction>


Everything works except the d24.
Title: Re: How to get a d24 in the game?
Post by: CrazyChucky on August 27, 2019, 11:11:02 AM
Argh, you're right. I was confusing chat commands with general functions (http://www.lackeyccg.com/tutorialplugininfo.html#plugininfogeneralfunctions), which have some overlap but aren't all the same.

Unfortunately it looks like only 3-, 4-, 6-, 8-, 10-, 12-, and 20-sided dice are available as general functions. I just tested it for 130 and yep, they're the only ones that show up as buttons.

What you could do instead is include it as a script, which is then available on one or more cards. (If you need it to always be available, you could make a "dummy" card that's there only to have this ability, and set the game to always start with that card on the table, as detailed here (http://www.lackeyccg.com/tutorialplugin.html#start).)

Below is the result of putting "<s><l>Roll d24</l><f>/rolld24</f></s>" in the "Script" column for a card.