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

How difficult will this be to change?

1587930499

Edited 1587930521
The game my group is playing (Harnmaster) uses a CS from the github (Harnmaster3). The sheet has static skills that are relevant to every character (such as Initiative) which are percentages. The sheet also has blanks where variable skills can be added (such as Broadsword or Battleaxe) which are also percentages. The sheet has roll buttons for both where one clicks on the button and it rolls the appropriate dice (d100) and returns whether the attempt was a success or not (as well as some other details). If one creates a macro from the static skills using the up-arrow, copy/paste method. It works perfectly and when the skill increases (89 raises to 90), the macro recognizes the new skill level. If one creates a macro from the variable skills using the up-arrow, copy/paste method. It works perfectly, but when the skill increases (89 raises to 90), the macro does not recognize the new skill level. The skill will be static at 89. How difficult will it be to fix this functionality problem. I'm aware of two workarounds (update the macro every time the skill increases or add the skill to the Attributes and target that with the macro, which requires updating those specific attributes every time). It'd be nice to just have the added skills create and update their relevant Attributes as the static skills do. Any advice is welcome. Thanks!
1587932794
Kraynic
Pro
Sheet Author
If you use the "roll from the sheet and then hit up arrow in chat" method of getting a macro for something, it is basically a snapshot of that roll.  It usually isn't going to respond to values changed later in the sheet, because your copy has the earlier values hard coded into it.  But there is a way to call rolls from the sheet in a way that is dynamic and will respond to things changing on the sheet.  Being able to do this does rely on the sheet being coded correctly however (hopefully that one is). Are you able to drag these skills to the macro quick bar at the bottom of the screen (assuming you activate it in your collection settings)?  If so, you will get a different syntax of the roll that way.  For instance, on a sheet of mine that uses percentage rolls for skills, I get this if I hit a skill set up for Locate Secret Compartments & Doors on a character, and just copy it via the up arrow in chat method: @{Vispa|whispertoggle}&{template:custom} {{color=green}} {{title=**@{Vispa|character_name}'s**}} {{subtitle=Locate Secret Compartments & Doors}} {{Check=[[d100cs<1cf>100-@{Vispa|iq_bonus}]]}} {{Skill=42}} {{desc=Requires active searching, and takes 15 minutes to search a 10ft area.}} However, if I drag that same skill roll button to the quick macro bar, make the roll from there, and then hit the up arrow in the chat, I get this: %{Vispa|repeating_skillelective_-Lu9kAPCr8cW6EO5jFv1_electiveskill} That version will call the roll as if hitting the button on the sheet and will respond to any changes made in the future to the sheet.  Since this is out of a repeating section, it has the repeating section name, the repeating section row ID, and the name of the roll button with an underscore between them (all rolls from a repeating section will be set up that way). If the roll you are after is hard coded into the sheet instead of out of a repeating section, then it is easier.  It should always be: %{character_name|roll_button_name} For instance, initiative for the same character I used above is: %{Vispa|initiative} In any game with the same sheet, it could even be made to work on any selected token by just using: %{selected|initiative} I have never used the sheet you are using, but all you need is the name of the roll button you want.  If you don't want to poke around in the code, dragging it to the quick macro bar is the fastest and easiest way to get it. 
1587933296
GiGs
Pro
Sheet Author
API Scripter
I had a quick look at the code (without installing the sheet) and I'm not seeing why its working the way you describe. It looks like it should be taking into current values. Can you show is an example macro that isnt working properly? Something is happening to the macro when the button is printed to chat, and seeing what it is being converted into will help us figure out how to fix it. Note: you can also call the button directly, bypassing the need to create separate macros, with %{CHARACTERNAME| repeating_physicalskill_$0_ PhysicalSkillCheck} The $0 in the above, refers to the row in the repeating section. $0 is the first, $1 is the second, and so on, as is traditional in programming. You can also make chat menu buttons to call them, which would look like [BUTTON-NAME](~CHARACTERNAME| repeating_physicalskill_$0_ PhysicalSkillCheck) The two bits in ALL CAPS need to be changed - change the charactername to whatever the character has (or use selected , to make it all purpose). BUTTON-NAME can be anything, so you'd put the name of the skill there. Since you're a pro user there are two scripts that can automate this: Universal Chat Menu , and Menu Maker . I'll focus more about UCM, since I wrote it so i know it better. I think UCM is easier to use, but Menu Maker has features it doesnt, like making token actions as well as chat menus. Here's some UCM code that will generate buttons for your physical and combat skills, including the repeating attributes automatically. !chatmenu @{selected|character_id} @{selected|character_name} Actions --title:Combat Skills --Dodge,DodgeSkillCheck|Condition --repeating_combatskill|COMBATSKILL_NAME|CombatSkillCheck --title:Physical skills --Climbing,ClimbingSkillCheck|Condition,ConditionSkillCheck|Jumping,JumpingSkillCheck|Stealth,StealthSkillCheck|Throwing,ThrowingSkillCheck --repeating_physicalskill|PHYSICALSKILL_NAME|PhysicalSkillCheck Put it all on one line, I've broken it up into sveeral lines so you can see how it is structured. More instructions are at the link above, including for making the output use an existing rolltemplate. Here it is as a one-line command, which it needs to be to work properly. !chatmenu @{selected|character_id} @{selected|character_name} Actions --title:Combat Skills --Dodge,DodgeSkillCheck|Condition --repeating_combatskill|COMBATSKILL_NAME|CombatSkillCheck --title:Physical skills --Climbing,ClimbingSkillCheck|Condition,ConditionSkillCheck|Jumping,JumpingSkillCheck|Stealth,StealthSkillCheck|Throwing,ThrowingSkillCheck --repeating_physicalskill|PHYSICALSKILL_NAME|PhysicalSkillCheck (If I've made a typo or its not working for some other reaosn, better take that to the UCM thread to avoid cluttering this one.)
1588029248

Edited 1588029407
First off, thank you both for such helpful and CLEAR answers! Kraynic, your suggestion does work. It's less convenient to have the quick button on the bottom bar instead of the token bar, but it's a fantastic and immediate answer to the problem at hand. Thank you. GiGs, below is the example of the two different calls, one from a repeating skill and one from a static skill, both copied using up-arrow, copy/paste. I highlighted the static number that always appears in the repeating skills: Rolled of a Repeating Skill off of the CS &{template:rollcheck} {{character_name=@{Bragga|NAME}}} {{rolldesc=attacks with a Battleaxe (Sunder)}} {{rolltarget=[[{[[{[[ 90  - [[(@{Bragga|PHYSICAL_PENALTY})*5]] + ?{Target Modifier?|0}]],5}kh1]],95}kl1]]}} {{penalty=[[(@{Bragga|PHYSICAL_PENALTY})*5]]}} {{rollresult=[[1d100cs5cs10cs15cs20cs25cs30cs35cs40cs45cs50cs55cs60cs65cs70cs75cs80cs85cs90cs95cs100]]}} {{targetmod=[[?{Target Modifier?|0}]]}} {{ml=110}} {{note=B(9) E(12) P(9)}}   Roll of a Static Skill off of the CS &{template:rollcheck} {{character_name=@{Bragga|NAME}}} {{rolldesc=rolls @{Bragga|INITIATIVE_NAME}}} {{rolltarget=[[{[[{[[@{Bragga|INITIATIVE_ML} - [[(@{Bragga|PHYSICAL_PENALTY})*5]] + ?{Target Modifier?|0}]],5}kh1]],95}kl1]]}} {{penalty=[[(@{Bragga|PHYSICAL_PENALTY})*5]]}} {{rollresult=[[1d100cs5cs10cs15cs20cs25cs30cs35cs40cs45cs50cs55cs60cs65cs70cs75cs80cs85cs90cs95cs100]]}} {{targetmod=[[?{Target Modifier?|0}]]}} {{ml=@{Bragga|INITIATIVE_ML}}} Any advice you can give would be great. Thank you as well for the UCM and MM. I've made some "wrapper" macros, but I think these scripts will work much better. Besides, for my Pro subscription, I'd like to get full use of the Scripts that are out there. ;-)
1588033039
GiGs
Pro
Sheet Author
API Scripter
It looks like when its being send to chat, the attribute scores are being read and converted into numbers. If you want to use the chat menu scripts, that iwll bypass this issue, but you should be able to do it with a bit of manual replacement too. In the macro you posted, you need to replace 90 with the proper attribute reference for the score. If you look at the code for the button on github, that is value="&amp;{template:rollcheck} {{character_name=@{NAME}}} {{rolldesc=rolls @{COMBATSKILL_NAME}}} {{rolltarget=[[{[[{[[ @{COMBATSKILL_ML } - [[(@{PHYSICAL_PENALTY})*5]] + ?{Target Modifier?|0}]],5}kh1]],95}kl1]]}} {{penalty=[[(@{PHYSICAL_PENALTY})*5]]}} {{rollresult=[[1d100cs5cs10cs15cs20cs25cs30cs35cs40cs45cs50cs55cs60cs65cs70cs75cs80cs85cs90cs95cs100]]}} {{targetmod=[[?{Target Modifier?|0}]]}} {{ml= @{COMBATSKILL_ML} }}" (added line breaks to make it readable.) You can see two attribute references there. It looks like a valid attribute reference, but its only part of the attribute name, Attributes in a repeating section have a full name thats made up of three parts: The repeating section name A row id The apparent attribute name For combat, the repeating section name is&nbsp;repeating_combatskill, the row ID is $0 for the first row, $1 for the second row, $2 for the third, etc. Row ids come in two forums, the above is the simpler form - you'll see the other form soon. So if your battleaxe is the first weapon in your repeating section, that name would be repeating_combatskill_$0_COMBATSKILL_ML But you have to use a character name or selected with it, that owuld look like %{selected| repeating_combatskill_$0_COMBATSKILL_ML} %{Bragga| repeating_combatskill_$0_COMBATSKILL_ML} So for this weapon, the macro should probably be&nbsp; &amp;{template:rollcheck} {{character_name=@{NAME}}} {{rolldesc=rolls @{COMBATSKILL_NAME}}} {{rolltarget=[[{[[{[[ @{Bragga|repeating_combatskill_$0_COMBATSKILL_ML } - [[(@{PHYSICAL_PENALTY})*5]] + ?{Target Modifier?|0}]],5}kh1]],95}kl1]]}} {{penalty=[[(@{PHYSICAL_PENALTY})*5]]}} {{rollresult=[[1d100cs5cs10cs15cs20cs25cs30cs35cs40cs45cs50cs55cs60cs65cs70cs75cs80cs85cs90cs95cs100]]}} {{targetmod=[[?{Target Modifier?|0}]]}} {{ml= @{Bragga|repeating_combatskill_$0_COMBATSKILL_ML} }} Remember to remove all linebreaks, it has to be a single row. Each repeating section will have a different name. You can find out what they are by scanning the github page for the sheet:&nbsp; <a href="https://github.com/Roll20/roll20-character-sheets/blob/master/HarnMaster3/harnsheet.html" rel="nofollow">https://github.com/Roll20/roll20-character-sheets/blob/master/HarnMaster3/harnsheet.html</a> &nbsp;and search for repeating_ , and you'll also bind the code for the button under there. You can also do it easier, just drag the button from the character sheet to your macro bar at the bottom of the roll20 interface. (If it's not enabled, you need to activate it in the macro tab: "Show macro quick bar".) If you drag a button to the bar you'll get something like this: This shows the character name, then the button name, then a massive string of letters and numbers which is a row id, and finally the attribute name. That row id looks pretty horrible, but you can replace it with the short forum $0, $1, etc. But the disadvantage of the short form is that they depend on the order in the repeating section not changing. If the player changes the order of the rows, the short form will point at the wrong stats. The long form is much harder to type, but is the real row id for that row - it will always work even if the rows are reordered. So the button in the screenshot would be one of the following %{Udru Voiw|repeating_attacks_-M5y3H983DCu4PTyj5he_Attack} %{Udru Voiw|repeating_attacks_$0_Attack} If you use one of the chat menu scripts you still need to figure out the repeating section names and attribute names, but they do the row id part for you.
Wow GiGs, that is not only a fantastic amount of help, but also clearly explained. I understood going into this that I needed to replace the numeric value with a call back to the sheet, but as I've never done coding in JS, I was very unsure how to do it, especially since I knew they were generic, repeating actions. I cannot thank you enough for taking the time to look at this. Phenomenal! RY
1588036076
GiGs
Pro
Sheet Author
API Scripter
You're welcome, and its very nice of you to say :)
1588039165

Edited 1588039211
Kraynic
Pro
Sheet Author
RobbaYaga said: Kraynic, your suggestion does work. It's less convenient to have the quick button on the bottom bar instead of the token bar, but it's a fantastic and immediate answer to the problem at hand. Thank you. GiGs has you all taken care of, but I thought I would respond to this.&nbsp; I don't like the quick macro bar either.&nbsp; The only time I use it is as a player to get the type of dynamic commands that GiGs and I were talking about.&nbsp; I then put all of them I want on my character sheet as individual Ability macros, and then create categorized Chat Menus for them which I then enable as token actions.&nbsp; That way I don't need to open my sheet for my list of attacks, saving throws, commonly used skills, etc. This is all because I haven't been able to convince the people I play under to use the Universal Chat Menus api script...&nbsp; :(&nbsp;&nbsp; Makes me feel spoiled when I am in my own games.
Kraynic said: This is all because I haven't been able to convince the people I play under to use the Universal Chat Menus api script...&nbsp; :(&nbsp;&nbsp; Makes me feel spoiled when I am in my own games. I've been making chat menus the hard way with macros. I've DAMN excited to start using the API script. Thanks again for your help.
GiGs said: If you use one of the chat menu scripts you still need to figure out the repeating section names and attribute names, but they do the row id part for you. Hi GiGs, Sorry to bother you again with this, but I'm just now getting back to this (due to work, which is a good problem to have during the pandemic). This is a screen shot of what I get when I drag the button to the macro bar: This is what I convert it to as per your instructions: %{Hron| repeating_weapon_-M34Q0lm4Qq2stEv13pl_WeaponAMLSkillCheck} This is the button code from the cut from the up-arrow in the chat window: &amp;{template:rollcheck} {{character_name=@{Hron|NAME}}} {{rolldesc=attacks with a Spear}} {{rolltarget=[[{[[{[[98 - [[(@{Hron|PHYSICAL_PENALTY})*5]] + ?{Target Modifier?|0}]],5}kh1]],95}kl1]]}} {{penalty=[[(@{Hron|PHYSICAL_PENALTY})*5]]}} {{rollresult=[[1d100cs5cs10cs15cs20cs25cs30cs35cs40cs45cs50cs55cs60cs65cs70cs75cs80cs85cs90cs95cs100]]}} {{targetmod=[[?{Target Modifier?|0}]]}} {{ml=98}} {{note=B(5) E(0) P(7)}} This is what it looks &nbsp;like after I insert the above line I created from the information in the macro bar: &amp;{template:rollcheck} {{character_name=@{Hron|NAME}}} {{rolldesc=attacks with a Spear}} {{rolltarget=[[{[[{[[%{Hron| repeating_weapon_-M34Q0lm4Qq2stEv13pl_WeaponAMLSkillCheck} - [[(@{Hron|PHYSICAL_PENALTY})*5]] + ?{Target Modifier?|0}]],5}kh1]],95}kl1]]}} {{penalty=[[(@{Hron|PHYSICAL_PENALTY})*5]]}}{{rollresult=[[1d100cs5cs10cs15cs20cs25cs30cs35cs40cs45cs50cs55cs60cs65cs70cs75cs80cs85cs90cs95cs100]]}} {{targetmod=[[?{Target Modifier?|0}]]}} {{ml=%{Hron| repeating_weapon_-M34Q0lm4Qq2stEv13pl_WeaponAMLSkillCheck}}} {{note=B(5) E(0) P(7)}} And finally, this &nbsp;is the error message that I am getting: Is my problem related to your last comment that I quoted above? I do not *believe* I have any typos that are causing the error. Again, any help is greatly appreciated.
1589148905

Edited 1589148939
GiGs
Pro
Sheet Author
API Scripter
There should be no space here: %{Hron| repeating_weapon_-M34Q0lm4Qq2stEv13pl_WeaponAMLSkillCheck} It should be %{Hron|repeating_weapon_-M34Q0lm4Qq2stEv13pl_WeaponAMLSkillCheck} does that fix the issue? PS: that's a very thorough way you asked the question. Great work.
GiGs said: does that fix the issue? Unfortunately, no. Thanks for the complement, but alas, here I am again. When I take out the space (from both instances of that code) the macro activates, I know this because I get the dialog box I'm supposed to, but then literally nothing happens in the chat window. No error, no result, nothing at all. Heh. Unresponsive, locked, errors all make sense. I'm truly don't know what to make of no response at all.
1589337778

Edited 1589337790
GiGs
Pro
Sheet Author
API Scripter
Something I just noticed: This %{Hron|repeating_weapon_-M34Q0lm4Qq2stEv13pl_WeaponAMLSkillCheck} is code for button, not an ability. I'm not sure you should be including that in a rolltemplate. What happens if you paste that, and that alone into chat? Also, if nothing is being printed in chat, one common cause of that is using the wrong template. Does the rollcheck template exist in the sheet you are using?&nbsp;
1589337908
GiGs
Pro
Sheet Author
API Scripter
This thread has been going a while, and I've lost the train of the problems it is dealing with. Can you give a summary of what the current outstanding problems are?
GiGs said: Something I just noticed: This %{Hron|repeating_weapon_-M34Q0lm4Qq2stEv13pl_WeaponAMLSkillCheck} is code for button, not an ability. I'm not sure you should be including that in a rolltemplate. What happens if you paste that, and that alone into chat? If I paste it alone in the chat, it functions, but does not access the character sheet and so the target skill is 0%. However, you making me aware that this could be executed in the chat window made me realize the obvious, that all macro calls should be executables in the chat window. So, I dragged the roll button down to the macro bar, used it (which has consistently worked perfectly) and then did the up-arrow &amp; copy / paste into the macro and now the macro works perfectly as well. This officially solves all the issues I was having with the character sheet and once more, I cannot thank you enough. Take care!
1589409780
GiGs
Pro
Sheet Author
API Scripter
Congrats on getting it solved :)