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 .
×

[Dark Heresy 1e] Referencing advanced skills in macros

Hi. I'm new here and all that jazz... I've been preparing a Dark Heresy 1e campaign for a few days and came across a problem while making macros for skill rolls. Is there a way to reference the advanced skills I put on the sheet myself for making macros? As opposed to the existing basic skills, simply using the following code does not work. @{selected|Literacy} [Literacy as an example for a advanced skill I put there myself] I know absolutely nothing about html so I might have missed some vital information in the source code.
I'm gonna be so bold an bump my own thread here. I haven't been able to figure this one out and any help would be greatly appreciated.
1417118218
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
Beelzedude, I'm not sure I understand your terminology of "advanced skill." I'm going to guess you mean Abilities. The way you reference an ability is: %Literacy or %{Beelzedude|Literacy} If you meant other macros, you can call them #literacy You can read up about it in more detail here .
1417125552
Finderski
Pro
Sheet Author
Compendium Curator
Beelzedude - can you share your html code snippet with the advanced skills? I looked at the Dark Heresy sheet that's out on github and didn't see the advanced skill you mention. So, here's an example of a skill that is on that sheet: <input name="attr_quirk" type="text"> For a macro to be able to access your skills, they need to be done similar to this, where there name starts with "attr_". To access the above skill in in a macro you would use @{quirk}. If the skills you added do not start with attr_ in the input field, that will be a problem. Hope that helps a little.
I don't think that it is possible to get to them with macros. The advanced skills are created using <fieldset class="repeating_advancedskills"> and they will not be under the names that you write down in the blank spaces.
1417194247

Edited 1417194360
Finderski
Pro
Sheet Author
Compendium Curator
Actually, repeating fields can be access by macros using @{repeating_skills_0_SkillName}. The last portion of that is the field name within the fieldset. So, that example is from a a repeating fieldset with the class called repeating_skills, and a a field within that set called attr_SkillName. So, going along with your example, it would be: @{repeating_advancedskills_0_<fieldname>} (where the <fieldname is replaced with the field name you want to call.
Thanks for all the answers. @Steve K.: Here "advanced skill" is a term specific to Dark Heresy that has nothing to do with roll20 in itself. @D. V:You may have already found it, but the following snippet is the one concerning itself with advanced skills: <fieldset class="repeating_advancedskills"> <table> <tr> <td> <div class="sheet-row"> <div class="sheet-item sheet-bigger"> <input class="sheet-baseinfo" name="attr_advancedskillname" type="text"> </div> <div class="sheet-item sheet-med"> <select class="charaselect" name="attr_advancedskillcharacteristic"> <option value="@{S}">(S)</option> <option value="@{T}">(T)</option> <option value="@{Ag}">(Ag)</option> <option value="@{Int}">(Int)</option> <option value="@{Per}">(Per)</option> <option value="@{Wp}">(Wp)</option> <option value="@{Fel}">(Fel)</option> </select> </div> </div> </td> <td><input name="attr_advancedskillbox1" type="checkbox" value="0.5"></td> <td><input name="attr_advancedskillbox2" type="checkbox" value="10"></td> <td><input name="attr_advancedskillbox3" type="checkbox" value="10"></td> <td><button name="roll_advancedskill" type="roll" value="/em rolls @{advancedskillname} with [[(@{advancedskill}+?{Modifier|0}-1d100)/10]] degree(s) of success!"> <input disabled="true" name="attr_advancedskill" type="number" value="floor((@{advancedskillbox1}+0.5)*@{advancedskillcharacteristic}+@{advancedskillbox2}+@{advancedskillbox3})"> </button></td> </tr> </table> As I said above I don't know jack about html, though. I also tried your proposed solution, but I can't get it to work. An example for a working macro using the Awareness skill: /roll floor((@{selected|Awareness}+?{modifier|20}-1d100)/10) Using your method I get: /roll floor((@{selected|repeating_advancedskill_0_Literacy}+?{modifier|20}-1d100)/10) Where "Literacy" is exactly what's in the field on the character sheet. Doing this I get the errors that no such attribute was found and that there is an error in the formula. If this it is not possible to do this, it can't be helped, but it would be a nice thing to have.
1417291255

Edited 1417292389
Finderski
Pro
Sheet Author
Compendium Curator
BIG EDIT: Assuming "Literacy" is what you typed in in the first input box (generated by the above code), then that's the problem. @{repeating_advancedskills_0_skillname} = Literacy So, the problem with the above code is that the input box for the advanced skill is disabled (i.e. read-only) has no input so would never be really initialized for macros to use. However, the code above does tell us what the read-only field is. So, you can use that in your macro. Doing that, your macro becomes: /roll floor(((floor((@{repeating_advancedskills_0_advancedskillbox1}+0.5)*@{repeating_advancedskills_0_advancedskillcharacteristic}+@{repeating_advancedskills_0_advancedskillbox2}+@{repeating_advancedskills_0_advancedskillbox3}))+?{modifier|20}-1d100)/10) Essentially, you need take the individual fields and make use of them in the formula. For the next advanced skill, you would change the _0_ to _1_, but everything else would remain the same. So, I had the following set up: And using the above formula provided the following results: I hope this helps,
You are a particularly cool person. After adding the "Selected|"-modifier I got it to work. Otherwise I got an error stating that no character was found for the individual parts of the code. Anyways...thank you very much for figuring this one out for me.
1417354165
Finderski
Pro
Sheet Author
Compendium Curator
Glad you got it working. :)