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

Access to Abilities of Target Token?

1475164277

Edited 1475164377
Hey guys, here is my problem. i play a system the target of a succesfull hit (head, body etc) is determined through a rollable table. The problem is with bigger enemies you have different hittables (from the side, the front or behind). the question is can i access through target token the abilities of a token (or at best specific ones) so i could make the hittables as abilities only showing up when the token is targeted? my workaround at the moment is, i enable the different hittable abilities manual for the makro bar so players can use them but maybe there is a more elegant way to do it
1475165752

Edited 1475165840
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I'd make your hit location rollable tables for each size category of monster and then make an attribute on the monster's attribute/abilities tab called locations. put an inline roll of the appropriate table in there, and your players can then reference it in their attack macros via @{target|locations}. No idea about your system specifics, but I'd probably do something like this: &{template:default} {{name=Broadsword}} {{Attack=[[1d20]]}} {{Damage=[[1d8]]}} {{Hit Location=@{target|locations}}} The content of the monster's locations attribute would be something like: [[1t[mediumLocations] ]] - this is what I use in my example below. Which gives this output:
1475167067

Edited 1475167245
If you name the ability the same on all the sheets then %{target|ABILITY} would pull the Ability of the target so it could be different based on the sheet. Edit:  Scratch that, Scott's idea works better.
Scott C. said: I'd make your hit location rollable tables for each size category of monster and then make an attribute on the monster's attribute/abilities tab called locations. put an inline roll of the appropriate table in there, and your players can then reference it in their attack macros via @{target|locations}. No idea about your system specifics, but I'd probably do something like this: &{template:default} {{name=Broadsword}} {{Attack=[[1d20]]}} {{Damage=[[1d8]]}} {{Hit Location=@{target|locations}}} The content of the monster's locations attribute would be something like: [[1t[mediumLocations] ]] - this is what I use in my example below. Which gives this output: oh you can use makros as attributes? didnt know that, thx. does it reroll the hittable everytime i target the attribute? the problem is i need three hittables for the same token dependent on the place the character stands. so i would need three different attributes with hit locations for each side and three makros for every attack to target them, or am i wrong? because thats the reason i hoped there is a possibility not to spam things in the makro bar and just make them accessible when you target the token but its still a good tip, a more elegant solution for something i have already solved, thx
1475170544

Edited 1475170611
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, then you can take advantage of the  order of operations and add a roll query into the locations attribute like so: [[1t[?{Position|front|behind|flank}MediumLocations] ]] You'd then have one rollable table for each position (frontMediumLocations, behindMediumLocations, flankMediumLocations in my example) for each size category of monster instead of just one, but other than the bloat to the rollable tables list, it should work just fine. It will then query the player each time they call it for what their position is and will use the same answer for any given macro run if you have it in multiple positions. From personal experience, bloating the rollable tables list doesn't really have an effect on game performance; I've got a game that has 208ish tables with a total of I think 5,000+ table items and I don't really notice a performance difference between it and the copy without the tables. Attributes can hold anything, although I don't believe they handle new lines particularly well (but I could be wrong). The roll is only executed when it is sent to chat, so it will roll every time the macro is triggered.
1475171659

Edited 1475172566
great this is the solution of the problem. through the attribute i can target specific hittables (not only the sides but different tables for things with or without wings for example by changing the table name) and still just need one button in the makro bar. thats even better what i thought, thx a lot guys edit: yieppiehh works like a charm ;) and there is even a drop down menu, it gets better and better :D
1475172155
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Have fun with the game.
1475227220
Ziechael
Forum Champion
Sheet Author
API Scripter
Sorry Jochen, you are now likely a macro junkie and simply won't be able to stop making more and more optimised macros until you reach that point where they just don't scratch the itch anymore... thats when you'll become a sheet author, or worse, an API script writer and then there will be no help for you. It's one of the issues of such an awesome and helpful community who 'push' macros which are simply a gateway code... the API and Character Sheet forums are essentially support groups for people who fell down the same dark path ;) Seriously though, the possibilities are almost endless and if you need any further help just shout and people like Ed and Scott will literally race each other to help out!
Scott's been beating me lately :/
1475241059
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
:-D
Ziechael said: Sorry Jochen, you are now likely a macro junkie and simply won't be able to stop making more and more optimised macros until you reach that point where they just don't scratch the itch anymore... thats when you'll become a sheet author, or worse, an API script writer and then there will be no help for you. It's one of the issues of such an awesome and helpful community who 'push' macros which are simply a gateway code... the API and Character Sheet forums are essentially support groups for people who fell down the same dark path ;) Seriously though, the possibilities are almost endless and if you need any further help just shout and people like Ed and Scott will literally race each other to help out! so true :D there are a lot of ideas floating in my brain, this was not the last time i need help ;) a really great and helpfull community, kudos to you all
Ed S. said: Scott's been beating me lately :/ Tell me about it!