Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Mod to "Deal cards to turn order items".

1683177645
vÍnce
Pro
Sheet Author
Just looking for a more streamlined approach to handle initiative for Forbidden Lands. Is this possible?    1. select token(s) and use a macro to execute mod.    2. prompt to draw X number of cards from a 10 card deck. (Cards are unique/finite).    3. in the case of multiple draws; allow the player to choose which card to use.    4. deal the card to the turn order.    5. sort the turn order descending (least to highest).    6. recall all cards/shuffle the deck. I assume that a mod would have to be used to automate this?  Can this be done with roll20's deck and mod hooks, or would this need to be done w/out roll20's decks/cards?
1683178826
Gauss
Forum Champion
I'd ask The Aaron, he chimed in on another card deck issue here . Spells out some limitations on handling decks. 
1683223421
Finderski
Pro
Sheet Author
Compendium Curator
vÍnce  if you want a non-specific dealer, Deal-Init (for Savage Worlds) may be able to accommodate what you want, but it doesn't use the deck of cards from Roll20, but has it's own "deck" of cards inside the mod. It would need some customization, but I think it does everything you want already...would need to modify the deck JSON, though.
1683226499
The Aaron
Roll20 Production Team
API Scripter
Most of the things I had to say in that other thread were about dynamically building decks.  "Dealing" to initiative from a deck, particularly when it's a custom deck, would be easier.  I might suggest that all players draw cards, or more than one if they get to, then discard the ones they don't want, and play the ones they do want to the table.  A Mod Script could then see who played what and add them to initiative.  The only complication is figuring out which token to associate, though there are ways to work with that.
1683264288
vÍnce
Pro
Sheet Author
The Aaron said: Most of the things I had to say in that other thread were about dynamically building decks.  "Dealing" to initiative from a deck, particularly when it's a custom deck, would be easier.  I might suggest that all players draw cards, or more than one if they get to, then discard the ones they don't want, and play the ones they do want to the table.  A Mod Script could then see who played what and add them to initiative.  The only complication is figuring out which token to associate, though there are ways to work with that. This seems to be a sensible method.  Maybe I'll try and write my first mod...  @Finderski I'll have a look at the Deal-Init script as well.  It sounds like it's close to what I need already.
1684690565
vÍnce
Pro
Sheet Author
Just posting back... I've taken the deal-init mod and attempted to remove about 85% of the Savage Worlds code that would be unnecessary for handling Forbidden lands initiative.  lol Not sure if my hackish programming chops are going to get me the rest of the way and given I would really like to use roll20's deck, I think I might try a different method. Recap my goals; 1. 10 unique cards (1-10) 2. Deal 2+ cards to any players or npc/monster (token-based) that have Surprise and/or Talents that enable a multi-draw. 3. Anyone with multiple cards must choose 1 card and discard(delete) back to the deck. 4. re-shuffle the deck. 5. Deal 1 card to everyone else (players or npc/monster) face-up. 5. Everyone may now swap cards if desired. 6. Add everyone's hand to the turn order and sort low to high. I'm thinking Keith's Dealer mod should handle dealing the card(s).  Not sure how Dealer will work if a GM is controlling multiple enemies... and I might need to make a friendly request for a "--shuffle" command to handle any discards back to the deck. For #6:  Is there a mod that can read the player's hand and add it to the turn order?