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

Dice throws dependent on equipped items - possible?

Hey all, I started using Roll20 because it's a great way for beta testing a board game I am designing. I have a specific question regarding items and could not find the answer in the guides I've encountered. Players in my game play a single hero but rather than having character-dependent items and abilities, they draw cards (from an item stack or a spell stack) that they can equip and then use. They have 3 item slots: hand, apparel and trinket. They also have 3 spell slots (spell 1, 2, 3), and a racial ability/spell that cannot be changed. Most items and abilities give dice in 4 colours: red = melee attack, yellow = ranged attack, blue = ranged attack with a bonus (+2) and green = defense. I want players to be able to cast: #attack, which takes all dice from all item slots #spell1, which takes the die from an equipped spell #spell2 #spell3 #racial Every die that is higher than a monster's threshold becomes a hit. I use d4, d6 and d8 depending on hero level (1, 2, 3, resp). My macros work great if I have spells, weapons, heroes and monsters all as characters with the parameters I need as attributes. For instance: Wizard has Level = 1 Wand has Yellow = 2 Monster has Threshold = 3 The Macro "/roll @{Wand|Yellow}d(@{Wizard|Level}*2+2)>@{Goblin Melee|Threshold}" There are three problems. First, it does not make sense that items (and monsters?) are characters. Second, any players (character) can use this attack with the wand, even those that have no wand equipped. Third, this ranged attack is for a wand-wizard combination specifically, whereas I would want it for general equipped weapons and selected characters. How can I smoothen this?
1417018917
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
Raoul, Is there any issue with making each "object" an attribute on the character. So Wizard would have a Wand stat. If someone doesn't have a wand it's set to a neutral amount. You'd create an attribute for each character representing each item. I.E. Wizard would have Wand at 3 but Axe at 0 and Sword at 0 because he doesn't have those? If that doesn't work for you and you need something more complex, say to manage variables and store values, you might think about using the API .
1417019103
The Aaron
Roll20 Production Team
API Scripter
I think you've reached the limit of what the macro system can do for you. You could certainly get all of that done in the API (mentor level feature). The API allows you to write custom Javascript to implement all sorts of rules and interactions. That said, if you're beta testing a board game, you might not want to macro everything. Players of the real board game will need to total the right dice mentally and then select and roll them. You might be better off just using the macro system to prompt for the number of specific dice: Something like: /roll ?{Yellow Dice to Roll?|0}d(@{Wizard|Level}+2)>@{target|melee-threshold
I would probably set up the character attributes to include the cross product of item slots and item bonuses (e.g. hand_red, hand_yellow, ..., trinket_green), and then set up abilities which reference all of them (e.g. melee_attack might be /r [[@{hand_red}+@{apparel_red}+@{trinket_red}]]d[[@{Level}*2+2]]). However, I agree with Aaron's point about going light on automation for the purposes of testing. Having the software handle all the computation makes it really easy to lose track of how complicated a system is becoming (I once designed an RPG combat mechanic which ended up requiring four rolls to determine if an attack hit; it was great for realism/believability, and worked perfectly fast in software, but it was painful in the physical world).
Thanks for the replies guys. Steve, there are 2 problems there. First, there are many items which then all needed to be attributes of players (for ranged I would have wands, bows, throwing daggers, crossbows, shurikens, etc). Second, and more importantly, weapons don't just give attack, they potentially give 4 different colours of dice, so a weapon that gives 2 red and 1 green die (sword and shield, for instance) would need 2 attribute slots. Items may also give rerolls but I have not thought about that yet. Aaron, that's a good suggestion. I could make a macro that asks the number of dice of all colours, and if that combines all items and abilities in one go, players just add all dice. In the same macro I can ask a player how much mana it would cost to do these rolls. Would it also be possible to have this first macro insert which weapon the character is using and then link to a second macro that have the characteristics of the macro? Then I make macros for all weapons and abilities and when players do a #attack, it prompts them for their equipment. Manveti, does that mean I would change the hand_red, hand_yellow, etc every time a character equips different items? Seems like an awful lot of changing every time.
1417090713
The Aaron
Roll20 Production Team
API Scripter
Would it also be possible to have this first macro insert which weapon the character is using and then link to a second macro that have the characteristics of the macro? I'm assuming you mean characteristics of the weapon. I'm not going to say it's impossible, people do some pretty crazy complex things with macros, but it wouldn't be easy or pretty. It would of course be almost trivial in the JS API, but you don't have a great way of storing state in a macro. Probably if you could represent each item as a number and then prompt for which item numbers you have, you could write some many termed math expressions where all the terms fall out except for the ones corresponding to the selected items. People do that for level defendant bonuses. However, they are dealing with only a handful of numbers. Every time you add another, it would increase the size a good deal, particularly if you multiple colors per item, multiple items in play, etc. I still stand by the idea of letting the players do the math and then check their rolls. What if you made each player a placemat on the VTT, along the bottom edge of the board, then had them play their equipped cards onto it? You could have a deck for race/class, and I assume you already have one for items. That should make the accounting easy and feel like a real board game.
I also thought of using cards for items, to visually display the stats of each item and spell, and boards/placemats for every player where they can put their equipped cards. When players want to attack they type #attack, which prompts them to select an opponent, the number of dice of all colours and total mana cost. I'll work this out first and see how I can incorporate rerolls (which are optional for players and might involve additional mana costs).
For now I have /emas @{selected|token_name} attacks and rolls#yellow #red #green #blue for [[?{Mana cost?|0}]] mana where each additional macro asks how many dice of that colour are rolled and gives the number of successes e.g. /roll ?{Green dice to Roll?|0}d6>3). I changed the system and will use dice with symbols rather than numbers such that some sides give failure, but successes can be 1 or 2 hits. I guess it's not easy (impossible?) to get that into a macro and I don't think I need to do it for testing the game. Right now I have a hit box in the bottom of the map where players can put down their tokens for ranged, defense and melee and I think it works.
1417471590

Edited 1417471607
The Aaron
Roll20 Production Team
API Scripter
If you're talking about rollable tables, you can reference them by the name. So, if you had a rollable table named 'Blue', you could roll 3 of them like this: [[ 3t[Blue] ]] or /roll 3t[Blue]
That's awesome, I hadn't even thought of rollable tables! :D I can make a table for each colour and have a Red one with for instance 2 "Miss" items, 2 "1 Melee Token" items and 2 "2 Melee Tokens" items. Apparently it counts the number in front of the title of the item as a success, which is great in this case. Thanks!
1417501978
Falcon
Pro
Sheet Author
I have thought about using the card deck as a weapon / gear list. And they can have all their equipment and sort through it visually. The problem is that the stats aren't on there and there is no way to keep data in the card - if it gets moved from person to person or back to the GM - you have to manually put token data back in there.
Works like a charm. My macro is /emas @{selected|token_name} rolls ?{Yellow dice to Roll?|0} yellow dice for ?{Mana cost?|0} mana and gets [[?{Yellow dice to Roll?|0}t[Yellow]]] ranged tokens. (dice of other colours are removed here to keep it simple) Players then draw bars in a hit box and are offered the chance to unsuccessful dice (depending on whether they're allowed to reroll). I think we will resolve combat manually (monsters receive hits according to the number of bars in the hit box minus their armour, heroes receive hits according to the damage of monsters minus the number of bars in the defense box).
1417524772
The Aaron
Roll20 Production Team
API Scripter
Cool
Your suggestions on my previous question were splendid so I'd like to ask a follow-up question. Some cards I use have a special die, the "star die". This D6 has 3 sides with a star, which trigger an effect, and 3 without, which do nothing. For instance a player has a sword equipped that gives him 2 red dice and 1 star-die, and a piece of flaming armour that gives him 2 green dice and 1 star-die. If he rolls a star on the sword he has to discard the sword, but if he rolls a star on the armour he must remove a defense token (idea that flaming armour occasionally damages himself). I thought I could make a macro that prompts a player for the number of star-dice he uses, and then gives a list for all effects ("star", "no star", "no star", "star", etc). Then players have to look at the effects of the star-dice on their cards from left to right (or top to bottom). I can just insert ?{Star dice to Roll?|0} to the attack-macro and be done with it. But I'm wondering if there are nicer possibilities.