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] Wanting to combine similar macros into one macro or otherwise make my four Overlight Roll Macros more efficient. [Powercards]

Greetings All! For a game I'm a GM for, but not the creator of, I'm making some abilities (using Power Cards) that will represent the different sorts of rolls in the game Overlight. Just to make it easier for the players. There are a bunch of different sorts of roll that are about how you put together your dice pool and what the various results mean. I have created an ability for each of the different roll types (I have one more set of rolls do to that is a bit more complicated, but I want to get this done first.) Everything currently works, but I have a gazillion different abilities with a lot of repeated sections now and I'd like to find a way to either combine some of them into one larger ability, or find a way to switch between the different abilities. I haven't had luck just yet. So I'm wondering if anyone can help me make these macros more efficient. So there are two main sorts of tests, Skill Checks and Open Check. I'll show you the Skill Checks to see if you all can help me slimming this down in some way. The types of Skill Checks are:  -Skill Test (made up of 3 Virtue Dice + 3 Skill Dice if you are trained in the Skill or 1 Skill Dice if you aren't. Count as a success dice over 6. Successes are given names. There is also a 1d4 Spirit Die which...does different things on a 4 including adding to a Spirit Pool..sometimes.) -Combat Test (made up of 3 Virtue Dice + 3 Skill Dice if you are trained in the Skill or 1 Skill Dice if you aren't. Count as a success dice over 6. Successes are damage. There is also a 1d4 Spirit Die which adds to the Fury Pool on a 4) -Chroma Test (made up of 3 Virtue Dice + 3 More Virtue Dice. Count as a success dice over 6. Successes are giving the same names as Skill Tests. There is also a 1d4 Spirit Die which is the cost to activate the Chroma in Spirit Points) -Weath Test (made up of 3 Wealth Dice + 3 Skill Dice. Count as a success dice over 6. Successes are giving the same names as Skill Tests. There is also a 1d4 Spirit Die which is the cost to get the items in Wealth Points) So here are the abilities I've created: An Ability that prompts the player to choose a Virtue and gets the die size: %virtue-option: ?{Virtue?|Wisdom, @{wisdom}|Logic, @{logic}|Compassion, @{compassion}|Will, @{will}|Vigor, @{vigor}|Might, @{might}} Because I realized that for Chroma Tests I needed two different Query names for the two different Virtue calls or they'll be overwritten, so I have this one as well: %virtue-option2: ?{Second Virtue?|Wisdom, @{wisdom}|Logic, @{logic}|Compassion, @{compassion}|Will, @{will}|Vigor, @{vigor}|Might, @{might}} I have the skill options ability that gets the die size (0 if not trained): %skill-options: ?{Skill?|Folklore, @{Folklore}|Intuition, @{Intuition}|Perception, @{Perception}|Windlore, @{Windlore}|Machinery, @{Machinery}|Science, @{Science}|Beastways, @{Beastways}|Inspiration, @{Inspiration}|Performance, @{Performance}|Craft, @{Craft}|Persuasion, @{Persuasion}|Resolve, @{Resolve}|Athletics, @{Athletics}|Blades, @{Blades}|Survival, @{Survival}|Brawl, @{Brawl}|Resistance, @{Resistance}} I have an ability that calculates how many skill die to roll, 1 for untrained and 3 for trained: %skill-num-comp: [[({0,floor(1-abs([[%{selected|skill-options}]]-0))}dl1)*(1-3) +3]] And then an ability that determines the die size to roll for the skill, if they have the skill take their die size. If they aren't trained, then they have a d6: %skill-type-comp: [[({0,floor(1-abs([[%{selected|skill-options}]]-0))}dl1)*(6-[[%{selected|skill-options}]]) +[[%{selected|skill-options}]]]] So those are all the utility abilities. The actual four regular skill checks: Skill Test %skill-test: !power {{ --name|@{Name}'s Skill Test --Successes:|[[ [NH] [$success] {3d[[%{selected|virtue-options}]]>6}+{[[%{selected|skill-num-comp}]]d[[%{selected|skill-type-comp}]]>6}]] --Spirit Die:|[[ [NH] [$spirit] 1d4]] --?! $success -lt 2 !? !Note: *1|~C **//Fail!//** ~C --?- $success -lt 4 -? !Note: *2|~C **//Luminous Success!//** ~C --?- $success -lt 6 -? !Note: *3|~C **//Radiant Success!//** ~C --?- $spirit -eq 4 -? !Note: *4|~C **//Legendary Success!//** ~C --?- $success -eq 6 -? !Note: *5|~C **//Brilliant Success!//** ~C --?! $spirit -ne 4 -and $success % 2 -eq 1 !? Spirit Flare:|//You rolled an odd number of successes, you **may** spend a Spirit Point to bump your successes to the next level.// --?- $spirit -eq 4 -and $success -eq 0 -? Spirit Die Bonus: *1|//No effect.// --?- $spirit -eq 4 -and $success % 2 -eq 1 -? Spirit Die Bonus: *2|//You rolled a four on your Spirit Die, with an odd number of successes! You get a Spirit Flare for free! **Bump your successes up to the next level.**// --?- $spirit -eq 4 -and $success -eq 6 -? Spirit Die Bonus: *3|//You rolled a four on your Spirit Die with 6 successes! You have achieved a **Legendary Success!**// --?- $spirit -eq 4 -? Spirit Die Bonus: *4|//You rolled a four on your Spirit Die and an even number of successes! Add a Spirit point to your Spirit Pool.// }} Combat Test: %combat-test !power {{ --name|@{Name}'s Combat Test --Successes:|[[ [NH] [$success] {3d[[%{selected|virtue-options}]]>6}+{[[%{selected|skill-num-comp}]]d[[%{selected|skill-type-comp}]]>6}]] Damage! --Spirit Die:|[[ [NH] [$spirit] 1d4]] --?! $spirit -eq 4 !? Fury:|//You rolled a 4 on your Spirit Die! **Increase Your Fury Pool by One!**// }} Chroma Test: %chroma-test: !power {{ --name|@{Name}'s Chroma Test --Successes:|[[ [NH] [$success] {3d[[%{selected|virtue-options}]]>6}+{3d[[%{selected|virtue-options2}]]>6}]] --Spirit Die:|[[ [NH] [$spirit] 1d4]] --?! $success -lt 2 !? !Note: *1|~C **//Fail!//** ~C --?- $success -lt 4 -? !Note: *2|~C **//Luminous Success!//** ~C --?- $success -lt 6 -? !Note: *3|~C **//Radiant Success!//** ~C --?- $spirit -eq 4 -? !Note: *4|~C **//Legendary Success!//** ~C --?- $success -eq 6 -? !Note: *5|~C **//Brilliant Success!//** ~C --Chroma Cost:|//You must spend [^spirit] spirit points to fuel your Chroma. If you don't have enough spirit points, you **shatter!**// --?! $success % 2 -eq 1 !? Spirit Flare:|//You rolled an odd number of successes, you **may** spend a Spirit Point to bump your successes to the next level.// }} Wealth Test: %wealth-test: !power {{ --name|@{Name}'s Wealth Test --Successes:|[[ [NH] [$success] {3d[[@{selected|Wealth Rating}]]>6}+{[[%{selected|skill-num-comp}]]d[[%{selected|skill-type-comp}]]>6}]] --Spirit Die:|[[ [NH] [$spirit] 1d4]] --?! $success -lt 2 !? !Note: *1|~C **//Fail or Wealth Point Cost May Be Doubled!//** ~C --?- $success -lt 4 -? !Note: *2|~C **//Luminous Success!//** ~C --?- $success -lt 6 -? !Note: *3|~C **//Radiant Success!//** ~C --?- $spirit -eq 4 -? !Note: *4|~C **//Legendary Success!//** ~C --?- $success -eq 6 -? !Note: *5|~C **//Brilliant Success!//** ~C --Wealth Cost:|//You must spend [^spirit] wealth points to purchase your item, bribe your mark, etc. If you don't have enough wealth points, you may only achieve your goal by bartering away one of your valuables.// --?! $success % 2 -eq 1 !? Spirit Flare:|//You rolled an odd number of successes, you **may** spend a Spirit Point to bump your successes to the next level.// }} So, I would prefer to make this as easy as possible for the players. Ideally there would be only one button on the macro bar for them for these 4 skill tests. I figure there must be a way to either combine these 4 into one very big ability, or to create a meta ability that would prompt them which roll they wanted and then take them to that ability. I've tried but...I've run into some trouble. If I try to make them all into one big ability the user is asked to choose Virtue 1, Virtue2, and Skill...and they don't need all three. If I try to make a meta ability that calls the other abilities....I get the same problem.  So does anyone have any advice on how to make this more efficient so the character sheet is less cluttered for the players and it is just simpler for them?
1606772638

Edited 1606772754
timmaugh
Forum Champion
API Scripter
InsertArg could do it, I think. *insert Paul-Giamatti-as-celebrity-accountant-sighing-heavily.gif... "Hey... buddy... what can InsertArg do, now?"* ...something like... !ia --chat --show#getabil{{!!a#puttext{{!!a#getme{{!!r#name}} !!b#| !!c#?{Skill Check?|Skill, skill-test|Combat, combat-test| Chroma, chroma-test| Wealth, wealth-test}}}}} That should do it. Drop that in an ability and use that ability to create a button. When you run it, it should ask you what Skill Check to run, and substitute in the appropriate information. For explanation: getme{{}} returns the ID or name of the speaker; we use "name" for r to return the name puttext{{}} concatenates its arguments in order; since it uses the result from getme{{}}, it returns something like "Lloyd|skill-test" getabil{{}} gets the text of an ability; one pattern it recognizes is "character name|ability name", so "Lloyd|skill-test" will work --chat is the output we want; we want the result sent to chat --show is the total default command line when using "chat" output but supplying no source;     IOW, "chat" gives us a line that reads "show"; by using "show" as an argument, we will      replace it with the return of our functions (which have now been filled with the contents of the chosen ability) Alternate (Menu) Solution Alternately, IA could construct a menu of the various checks. You would have 1 button to produce the menu, then a chat output of the options the user could pick from. You can see options of the sort of menus IA can create in the linked thread, above. If you'd rather have this sort of solution, post back and I'll try to help.
Well this is very cool! I'm looking forward to checking out the script! Thank you! This seems like it would be something that is useful beyond just this instance! I'm going to look into it now!
1606789584
timmaugh
Forum Champion
API Scripter
Fantastic! Post back if you have questions. The script has an... admittedly... steep learning curve. But the videos should help. I hope.