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

[Help] PowerCards Item List - Hidden rolls still rolling

1482597861

Edited 1482597975
So, I am going to be doing a short quest where the party take over an Item shop for a little while and NPCs will come in to buy, sell or ask for types of items. Depending on the type of NPC, commoner or royal, they have differing amounts of money on hand, which will affect what they will be able to sell or buy from the players. I want to make a macro that does this all automatically for me, however it seems to keep the final hidden roll of the if statements, for example, their Gil is 188 so they should roll for items of value 150 or below, but it returns me an item worth 1000 Gil which they shouldn't have access to. Any advice? Current Macro: !power {{ --whisper|Gm --name|Item Wanted --Character:| @{selected|token_name} [[ [$BuyOrSell] 1d3]] --Character Wealth?:| [[ [$wealth] 49 + ?{Character Type?|Commoner, 1d150|Adventurer, 6d250|Royal, 10d250} ]] Gil --?? $wealth <= 50 ?? 50 Gil Item:| [[ [$item] 1d4]] --?? $wealth >= 51 AND $wealth <= 75 ?? 75 Gil Item:| [[ [$item] 1d5]] --?? $wealth >= 76 AND $wealth <= 100 ?? 100 Gil Item:| [[ [$item] 1d9]] --?? $wealth >= 101 AND $wealth <= 150 ?? 150 Gil Item:| [[ [$item] 1d12]] --?? $wealth >= 151 AND $wealth <= 200?? 200 Gil Item:| [[ [$item] 1d21]] --?? $wealth >= 201 AND $wealth <= 300?? 300 Gil Item:| [[ [$item] 1d27]] --?? $wealth >= 301 AND $wealth <= 500?? 500 Gil Item:| [[ [$item] 1d41]] --?? $wealth >= 501 AND $wealth <= 750 ?? 750 Gil Item:| [[ [$item] 1d45]] --?? $wealth >= 751 AND $wealth <= 1000?? 1000 Gil Item:| [[ [$item] 1d54]] --?? $wealth >= 1001 AND $wealth <= 3000?? 2000 Gil Item:| [[ [$item] 1d55]] --?? $BuyOrSell == 1?? Transaction Type:| Buying this item --?? $BuyOrSell == 2?? Transaction Type:| Selling this item --?? $BuyOrSell == 3?? Transaction Type:| Wants this type of item --?? $item == 1 ?? Item:| Echo Screen - 50 Gil --?? $item == 2 ?? Item:| Light Curtain - 50 Gil --?? $item == 3 ?? Item:| Lunar Curtain - 50 Gil --?? $item == 4 ?? Item:| Eye Drops - 50 Gil --?? $item == 5 ?? Item:| Dream Powder - 75 Gil --?? $item == 6 ?? Item:| Antidote - 100 Gil --?? $item == 7 ?? Item:| Smelling Salts - 100 Gil --?? $item == 8 ?? Item:| Healing Spring - 100 Gil --?? $item == 9 ?? Item:| Squid Ink - 100 Gil --?? $item == 10 ?? Item:| Deadly Waste - 150 Gil --?? $item == 11 ?? Item:| Mute Mask - 150 Gil --?? $item == 12 ?? Item:| Vaccine - 150 Gil --?? $item == 13 ?? Item:| Arctic Wind - 200 Gil --?? $item == 14 ?? Item:| Black Club - 200 Gil --?? $item == 15 ?? Item:| Bolt Plume - 200 Gil --?? $item == 16 ?? Item:| Fire Fang - 200 Gil --?? $item == 17 ?? Item:| Fish Scale - 200 Gil --?? $item == 18 ?? Item:| Gale Winds - 200 Gil --?? $item == 19 ?? Item:| Gold Needle - 200 Gil --?? $item == 20 ?? Item:| Earth Drum - 200 Gil --?? $item == 21 ?? Item:| White Ribbon - 200 Gil --?? $item == 22 ?? Item:| Hi-Potion - 300 Gil --?? $item == 23 ?? Item:| Luck Mallet - 300 Gil --?? $item == 24 ?? Item:| Magic Tentacles - 300 Gil --?? $item == 25 ?? Item:| Maiden's Kiss - 300 Gil --?? $item == 26 ?? Item:| Silver Hourglass - 300 Gil --?? $item == 27 ?? Item:| Spider Web - 300 Gil --?? $item == 28 ?? Item:| Ether - 500 Gil --?? $item == 29 ?? Item:| Dark Matter - 500 Gil --?? $item == 30 ?? Item:| Bomb Fragment - 500 Gil --?? $item == 31 ?? Item:| Dragon Scales - 500 Gil --?? $item == 32 ?? Item:| Earth Mallet - 500 Gil --?? $item == 33 ?? Item:| Holy Water - 500 Gil --?? $item == 34 ?? Item:| Ice Crystal - 500 Gil --?? $item == 35 ?? Item:| Prism Powder - 500 Gil --?? $item == 36 ?? Item:| Purifying Salt - 500 Gil --?? $item == 37 ?? Item:| Remedy - 500 Gil --?? $item == 38 ?? Item:| Shrivel - 500 Gil --?? $item == 39 ?? Item:| Swift Bolt - 500 Gil --?? $item == 40 ?? Item:| White Globe - 500 Gil --?? $item == 41 ?? Item:| Wind Chime - 500 Gil --?? $item == 42 ?? Item:| Baccus Wine- 750 Gil --?? $item == 43 ?? Item:| Basilisk Claw - 750 Gil --?? $item == 44 ?? Item:| Dazers - 750 Gil --?? $item == 45 ?? Item:| Star Curtain- 750 Gil --?? $item == 46 ?? Item:| Dark Gem - 1000 Gil --?? $item == 47 ?? Item:| Earth Gem - 1000 Gil --?? $item == 48 ?? Item:| Fire Gem - 1000 Gil --?? $item == 49 ?? Item:| Ice Gem - 1000 Gil --?? $item == 50 ?? Item:| Light Gem - 1000 Gil --?? $item == 51 ?? Item:| Lightning Gem - 1000 Gil --?? $item == 52 ?? Item:| Water Gem - 1000 Gil --?? $item == 53 ?? Item:| WindGem - 1000 Gil --?? $item == 54 ?? Item:| Hi-Ether - 1000 Gil --?? $item == 55 ?? Item:| Phoenix Down - 2000 Gil }} What it returns:
1482604060

Edited 1482604924
As has been pointed out many times in the main thread, you cannot use the same tag name over and over like that. You need to use the Same Name  tag option. --Item *1: Content --Item *2: Content --Item *3: Content --Item *4: Content
1482604674

Edited 1482607311
SkyCaptainXIII said: As has been pointed out many times in this thread, you cannot use the same tag name over and over like that. You need to use the Same Name  tag option. --Item *1: Content --Item *2: Content --Item *3: Content --Item *4: Content I tried the search function but nothing came up and with 100+ pages of PowerCards related queries it will be incredibly hard to find a solution, though I did try. Can you explain this a bit more in-depth? I tried how I thought you meant to do it but still getting the same problem. EDIT: Just made 2 separate macros, think I had this issue before. 1st Macro is for rolling their Gil and tells me what to roll on the lookup macro. --?? $wealth <= 50 AND $wealth <= 75 ?? 50 Gil Item:| 1d4 --?? $wealth >= 76 AND $wealth <= 99 ?? 75 Gil Item:| 1d5 -- Item Number?:| [[ [$item] ?{Amount of Dice?|1d4, 1d4|1d5, 1d5|1d10, 1d10|1d13, 1d13|1d22, 1d22|1d28, 1d28|1d42, 1d42|1d46, 1d46|1d55, 1d55|1d56, 1d56} ]]
1482610279

Edited 1482611591
As you may have guessed, conditionals don't prevent inline rolls from executing; they only prevent them from displaying in the output. So, [[ [$item] 1d55]], being the last defined, overwrites the other Roll IDs. The solution I recommend is breaking your macro up into two macros (such that we can change Gil from a roll into a Roll Query within the latter): !power {{ --whisper|gm --name|Character Wealth --Character:| @{selected|token_name} has [[ 49 + ?{Character Type?|Commoner, 1d150|Adventurer, 6d250|Royal, 10d250} ]] Gil. }} !power {{ --whisper|Gm --name|Item Wanted --Character:| @{selected|token_name} [[ [$BuyOrSell] 1d3]] --Character Wealth:| [[ ?{Gil|50} ]] Gil [[ [$item] 1d[[4 + {0, ?{Gil}}>75 * 1 + {0, ?{Gil}}>100 * 4 + {0, ?{Gil}}>150 * 3 + {0, ?{Gil}}>200 * 9 + {0, ?{Gil}}>300 * 6 + {0, ?{Gil}}>500 * 14 + {0, ?{Gil}}>750 * 4 + {0, ?{Gil}}>1000 * 9 + {0, ?{Gil}}>2000 * 1]] ]] --?? $BuyOrSell == 1 ?? Transaction Type:| Buying this item --?? $BuyOrSell == 2 ?? Transaction Type:| Selling this item --?? $BuyOrSell == 3 ?? Transaction Type:| Wants this type of item --?? $item == 1 ?? Echo Screen| - 50 Gil --?? $item == 2 ?? Light Curtain| - 50 Gil --?? $item == 3 ?? Lunar Curtain| - 50 Gil --?? $item == 4 ?? Eye Drops| - 50 Gil --?? $item == 5 ?? Dream Powder| - 75 Gil --?? $item == 6 ?? Antidote| - 100 Gil --?? $item == 7 ?? Smelling Salts| - 100 Gil --?? $item == 8 ?? Healing Spring| - 100 Gil --?? $item == 9 ?? Squid Ink| - 100 Gil --?? $item == 10 ?? Deadly Waste| - 150 Gil --?? $item == 11 ?? Mute Mask| - 150 Gil --?? $item == 12 ?? Vaccine| - 150 Gil --?? $item == 13 ?? Arctic Wind| - 200 Gil --?? $item == 14 ?? Black Club| - 200 Gil --?? $item == 15 ?? Bolt Plume| - 200 Gil --?? $item == 16 ?? Fire Fang| - 200 Gil --?? $item == 17 ?? Fish Scale| - 200 Gil --?? $item == 18 ?? Gale Winds| - 200 Gil --?? $item == 19 ?? Gold Needle| - 200 Gil --?? $item == 20 ?? Earth Drum| - 200 Gil --?? $item == 21 ?? White Ribbon| - 200 Gil --?? $item == 22 ?? Hi-Potion| - 300 Gil --?? $item == 23 ?? Luck Mallet| - 300 Gil --?? $item == 24 ?? Magic Tentacles| - 300 Gil --?? $item == 25 ?? Maiden's Kiss| - 300 Gil --?? $item == 26 ?? Silver Hourglass| - 300 Gil --?? $item == 27 ?? Spider Web| - 300 Gil --?? $item == 28 ?? Ether| - 500 Gil --?? $item == 29 ?? Dark Matter| - 500 Gil --?? $item == 30 ?? Bomb Fragment| - 500 Gil --?? $item == 31 ?? Dragon Scales| - 500 Gil --?? $item == 32 ?? Earth Mallet| - 500 Gil --?? $item == 33 ?? Holy Water| - 500 Gil --?? $item == 34 ?? Ice Crystal| - 500 Gil --?? $item == 35 ?? Prism Powder| - 500 Gil --?? $item == 36 ?? Purifying Salt| - 500 Gil --?? $item == 37 ?? Remedy| - 500 Gil --?? $item == 38 ?? Shrivel| - 500 Gil --?? $item == 39 ?? Swift Bolt| - 500 Gil --?? $item == 40 ?? White Globe| - 500 Gil --?? $item == 41 ?? Wind Chime| - 500 Gil --?? $item == 42 ?? Baccus Wine| - 750 Gil --?? $item == 43 ?? Basilisk Claw| - 750 Gil --?? $item == 44 ?? Dazers| - 750 Gil --?? $item == 45 ?? Star Curtain| - 750 Gil --?? $item == 46 ?? Dark Gem| - 1000 Gil --?? $item == 47 ?? Earth Gem| - 1000 Gil --?? $item == 48 ?? Fire Gem| - 1000 Gil --?? $item == 49 ?? Ice Gem| - 1000 Gil --?? $item == 50 ?? Light Gem| - 1000 Gil --?? $item == 51 ?? Lightning Gem| - 1000 Gil --?? $item == 52 ?? Water Gem| - 1000 Gil --?? $item == 53 ?? WindGem| - 1000 Gil --?? $item == 54 ?? Hi-Ether| - 1000 Gil --?? $item == 55 ?? Phoenix Down| - 2000 Gil }} [[ {0, ?{Gil}}>75 ]] resolves to equal 1 if ?{Gil} is greater than or equal to 75. Otherwise, it resolves to equal 0.
Yeah, I think I saw this problem with an attack roll last year and kind of forgot I was avoiding it, so forgot it was a problem at all. Your 2 macros look better and ask nicer questions then mine so cahnged their format to yours, Thanks Silvyre.