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 Tweaking Hunters Mark API

As a DM, I have recently got into AP's and have been FULLY sold on them. One of my favorites is the Hunters Mark API by GiGs on Roll20. If you don't know, it basically allows players to set a custom Marker on a target token. And not just that, but the next time they try and Hunters Mark, it'll erase the old one and place one on the new target. Now this works PERFECTLY for my Ranger Player, and it ALMOST works for my Bard players as Bardic Inspiration. The problem? It erases the previous marker in place of the new one, and Bardic Inspiration works on multiple targets. Unfortunately, I'm no programmer. But I also feel like it's (probably) not that difficult to just tweak the original into a new script to my needs. More specifically, just changing the commands and removing whatever in the script erases the previous Marker. I may be TOTALLY incorrect in assuming that's something that can be done, but if anyone familiar with API script making/with the Hunters Mark API would like to give it a shot that would be awesome! I don't really plan on handing it out past personal use, so feel free to keep whatever (if any) script that’s made!
1732647188

Edited 1733323885
GiGs
Pro
Sheet Author
API Scripter
I love that you enjoy this script. It should be possible to fix this. It definitely sounds fixable. I can't promise to look at it immediately, but if you don't hear an update by the weekend, feel free to press me. Do you have any idea to distinguish between bard and hunter use? You are sking for two different ways to behave (the hunter and the bard method). Should I just assume hunter is the default and add a flag (like --bard) for when it does not remove the marker?
Oh wow, I DEFINITELY wasn't expecting a reply from the creator! And honestly, a separate tweaked API with different wording for the commands (just so wires don't get crossed during use) and didn't delete the mark was what I originally had in mind, and figured I'd just remove it by hand when necessary. I definitely don't mind the encumbrance, but then again I wasn't expecting a reply from the Creator lol. So really its whichever way is more convenient/easy for you. I hadn't even considered it being in the same API, and it would definitely be more convenient to just have a separate "Bard" feature. But like, I said if just copy pasting it without the mark being deleted/Bard instead of hunter is easier,  that would be more than enough! But while I have you on the horn, maybe someone with more experience than me could answer this question. I never could figure it out after an hour of fiddling with commands, but I was attempting to make a Macro for the players to use that would help bypass having to highlight themselves first, and THEN select the target, by just having their character ID written directly into the command. Is that at all possible? If not then oh well, it was just a lil DM love I was wanting to  give em, but they can deal. Their honestly just hyped to be able to do it at all!
1732672087
Gauss
Forum Champion
Beau said: Oh wow, I DEFINITELY wasn't expecting a reply from the creator!  Someone may have paged him. *smirks*
Gauss said: Beau said: Oh wow, I DEFINITELY wasn't expecting a reply from the creator!  Someone may have paged him. *smirks* Wow, this is an amazing community lol
This is a really handy API I hadn't previously known.  I have several characters in my group which could make use of it, so I'm definitely adding it to my game. One comment for anyone else picking this up for the first time.  The help clearly says it, but I managed to miss it on first reading: to set up a hunter, you select the hunters token and add a single status marker, then use the "add" function. It will issue errors with both zero and >1 markers set (obvious in hindsight, but it took me a couple of minutes to puzzle out what I was doing wrong). For the OP: while it's not quite as clean as using an API, for inspiration you could use token-marker in a macro to set or remove a mark on inspired characters, like: !token-mod --set statusmarkers&#124+aura (aura is the name of the marker with curved spiky lines on either side of a figure, and the pound-124 is a vertical bar, the code is needed when used in a macro, and change the plus sign to a minus to remove it) You would need to enable player use of token-mod in its config settings (!token-mod --config). For a longer explanation, see here .
1732738943
GiGs
Pro
Sheet Author
API Scripter
Ken S. said: For the OP: while it's not quite as clean as using an API, for inspiration you could use token-marker in a macro to set or remove a mark on inspired characters, like: !token-mod --set statusmarkers&#124+aura (aura is the name of the marker with curved spiky lines on either side of a figure, and the pound-124 is a vertical bar, the code is needed when used in a macro, and change the plus sign to a minus to remove it) I'm not following you here, since using token-mod is using the API.
Sorry, poorly phrased.  I meant as compared to updating the hunters-mark API. Yes, it still requires API access, but presumably anyone posting about an API script issue has that.
1732752582
GiGs
Pro
Sheet Author
API Scripter
Ken S. said: Yes, it still requires API access, but presumably anyone posting about an API script issue has that. That was occuring to me after I asked :)
For the OP: while it's not quite as clean as using an API, for inspiration you could use token-marker in a macro to set or remove a mark on inspired characters, like: !token-mod --set statusmarkers&#124+aura (aura is the name of the marker with curved spiky lines on either side of a figure, and the pound-124 is a vertical bar, the code is needed when used in a macro, and change the plus sign to a minus to remove it) You would need to enable player use of token-mod in its config settings (!token-mod --config). For a longer explanation, see here . WAIT HOLY SHIT THATS PERFECT- I've always seen the TokenMod around, but being so new to API's I could never wrap my head around it lol Thank You!
Ken S. said: !token-mod --set statusmarkers&#124+aura (aura is the name of the marker with curved spiky lines on either side of a figure, and the pound-124 is a vertical bar, the code is needed when used in a macro, and change the plus sign to a minus to remove it) TokenMod allows you to use a hashtag instead of vertical bar to separate items, so either of these will work: !token-mod --set statusmarkers|+aura !token-mod --set statusmarkers#+aura The second one with a hashtag is useful when you need to embed the command in a query. 
1732834453

Edited 1732834677
GiGs
Pro
Sheet Author
API Scripter
It's coming along - progress has been made! The tricky part is ironically something the hunters-only version already does (removing other marks when you select a new one, while a hunter - supporting bards who can have multiple marks turns out to create a few tricky parts you wouldn't anticipate, I know I didn't!): I found that it was - in theory - easy enough to have a huntert-only or bard-only version of the script (only one line of code needed to be changed), but you couldn't easily run both scripts in the same campaign - many more sections of the script needed tweaking. I also found that you couldn't select a pure colour status marker (you know those one-colour items at the start) - that causes the sandbox to crash (making all scripts fail). You still can't pick them, but it now displays an error message and doesnt cause the sandbox to crash.
1732834830
GiGs
Pro
Sheet Author
API Scripter
Ken S. said: One comment for anyone else picking this up for the first time.  The help clearly says it, but I managed to miss it on first reading: to set up a hunter, you select the hunters token and add a single status marker, then use the "add" function. It will issue errors with both zero and >1 markers set (obvious in hindsight, but it took me a couple of minutes to puzzle out what I was doing wrong). I also made this mistake a few times - it's been a while since I've used the script :)
1732834933
GiGs
Pro
Sheet Author
API Scripter
Jarren said: TokenMod allows you to use a hashtag instead of vertical bar to separate items, so either of these will work: !token-mod --set statusmarkers|+aura !token-mod --set statusmarkers#+aura The second one with a hashtag is useful when you need to embed the command in a query.  Token mod is very much the swiss army knife of scripts. There are a few things it doesn't do, but it's still the first script I install in every campaign, it is just so useful and vital.
Thanks Jarren, for the note about hash marks, I hadn't known that.  TokenMod is one of those scripts that so complex I can never figure out how to do anything with it, and resort to looking for posts from others on how they made it work. GiGs, if you want to make other changes, Warlocks with Hex act just like Rangers with Hunter's mark (I've already set up my game for the next session to enable my ranger and two warlock players to use it). There's literally no functional difference, but you could add button/categories to explcitly identify them as Warlocks if you want. I predict my players are going to love it just as it is though.  Very useful script.
1732844541
GiGs
Pro
Sheet Author
API Scripter
Ken S. said: GiGs, if you want to make other changes, Warlocks with Hex act just like Rangers with Hunter's mark (I've already set up my game for the next session to enable my ranger and two warlock players to use it). There's literally no functional difference, but you could add button/categories to explcitly identify them as Warlocks if you want. I predict my players are going to love it just as it is though.  Very useful script. I think it would be better to come up with a term that identifies hunter and warlock types together, and use that (and another for Bard behaviour). If they do the same thing, there shouldn't be an extra buton - which is more bloat among the options. The curent terms Hunter and Bard  should be seen as Hunter-like and Bard-like.
1732865233

Edited 1732865311
GiGs
Pro
Sheet Author
API Scripter
I have it working. I need to do some error testing then I can update the public version. Any suggestions for alternate names for the Hunter and Bard lists and buttons?
Never heard about this script before but I have a ranger that is hooked on Hunter's Mark! I tried using your script but keep getting this message when I use the help command: (From HUNTERSMARK):  Hunter is not found. Check they are set up properly. Would you have any suggestions?
1732907000

Edited 1732907519
GiGs
Pro
Sheet Author
API Scripter
It looks like that error crops up when you have a token that is not recognised as having a marker. First, click the Show button (if you dont see that button, !hunters-mark show will work) and see if that character is in the list. If not, add a status condition to that character (just one), select that character and click add (or type !hunters-mark add ). Addiing a status condition to a token can be confusing (I might need better help for this). First, select a token, and see the bottom icon: Click that very botttom icon and you'll see the status markers: Select exactly one (and deselect others if you have more than one). (Also don't select any of the options on that first row, that'll cause a crash in the old version.) then run that add command, and the character will now place the token marker. Does this fix your issue?
1732951508
GiGs
Pro
Sheet Author
API Scripter
I've posted it to the roll20 script repo, so the updated version should soon appear in your games. (How often do the roll20 devs upsate the scripts?)
Any suggestions for alternate names for the Hunter and Bard lists and buttons? Well, "Hunting" for hunters, as the word implies a single target being stalked. For Bards, maybe "Buffs", as it could apply to spells like Bless as well as Inspiration.
I agree with Ken suggestion, if you're gonna make a 2nd separate script - Buffs might be ok, since it seems to be usable for other classes.  As with Hunter Mark and Hex might be in the same boat 
1733231414

Edited 1733231745
Beau
Pro
GiGs said: I have it working. I need to do some error testing then I can update the public version. Any suggestions for alternate names for the Hunter and Bard lists and buttons? Sorry I’ve been MIA on your updates!! We actually had our session Sunday, and the original hunters mark script worked great!! But with the TokenMod for my bard, however, we quickly came to the realization that he needs to have access to a token to be able to select it and mark them lol. And awesome, I’ll give it a shot after work!! Is there a different way to activate it? I’ll be going through this thread however, so if you’ve already said then just ignore this lol as for names, unless you’ve already decided on one, just a basic “Stamp” might be a good idea. Just since I imagine other people would benefit from it as well and may even use it past just a Bard (I saw someone mention something about warlocks lol) but just “Bard” or “Inspiration” would work to lol. Thank you so much again!! When I told my player I talked to you about this it blew his mind XD, so he’s very thankful also
1733233672
timmaugh
Pro
API Scripter
Beau said: Sorry I’ve been MIA on your updates!! We actually had our session Sunday, and the original hunters mark script worked great!! But with the TokenMod for my bard, however, we quickly came to the realization that he needs to have access to a token to be able to select it and mark them lol. This is what Ken was referring to when he first referenced TokenMod, saying you have to configure it to allow player access. TokenMod, by default, works on only the token you selected; that gives it in-built security that you are only affecting Tokens you have control over. TokenMod has a way to let players affect tokens they do NOT control (I believe it's something like "--playerscanuseids", but I don't have my game handy to double check). I DO know that this is near the bottom of the TokenMod help documentation/handout. Another option to get around this limitation is to install the MetascriptToolbox, and use a {&select} statement to modify the TokenMod command with a targeted token: {&select @{target|Recipient|token_id} } With the Toolbox installed and adding that snippet to a TokenMod command line, you will effectively change the selected token to be the token you are targeting. TokenMod doesn't see anything different, and it allows you to add the marker.
1733272277

Edited 1733272350
GiGs
Pro
Sheet Author
API Scripter
I don't know when the one-click library files will be updated, so if you want to manually update the script sooner, use this link to get the script. Important: if you manually created your own hunters-mark links, change character-id to token-id. The script now uses token ids instead of character ids. If you use the buttons created by the script, this change happens automatically.
1733272794

Edited 1733272893
GiGs
Pro
Sheet Author
API Scripter
Beau said: GiGs said: I have it working. I need to do some error testing then I can update the public version. Any suggestions for alternate names for the Hunter and Bard lists and buttons? Sorry I’ve been MIA on your updates!! We actually had our session Sunday, and the original hunters mark script worked great!! But with the TokenMod for my bard, however, we quickly came to the realization that he needs to have access to a token to be able to select it and mark them lol. And awesome, I’ll give it a shot after work!! Is there a different way to activate it? I’ll be going through this thread however, so if you’ve already said then just ignore this lol as for names, unless you’ve already decided on one, just a basic “Stamp” might be a good idea. Just since I imagine other people would benefit from it as well and may even use it past just a Bard (I saw someone mention something about warlocks lol) but just “Bard” or “Inspiration” would work to lol. Thank you so much again!! When I told my player I talked to you about this it blew his mind XD, so he’s very thankful also That's great to hear. The way to activate it is to select the character who is placing the mark, then in chat type this: !hunters-mark @{selected|token_id} @{target|token_id} That's long-winded, you can create a macro to do that (that's what the script button does) and make it available to everyone. Stamp is a good name, but I need two different kinds of names - one for hunters-marks and one for inspiration or bard-like marks). Ideally, they'd be words that aren't linked to a specific game system (this is why I like Stamp).
1733283116

Edited 1733283271
Beau
Pro
Stamp is a good name, but I need two different kinds of names - one for hunters-marks and one for inspiration or bard-like marks). Ideally, they'd be words that aren't linked to a specific game system (this is why I like Stamp). So first of all, thanks again for everything! (last time I swear lol) As for name, the first thing i think of is either just "Stamp 1" and "Stamp 2". Or even just calling both Stamp and just add an 's' to Stamp for the bard like version since it deals with multiple (but that would probably get confusing). Or hell, even just leaving the Hunters Mark as just "Mark" or "Marks" since it deals with marking things one at a time. And calling the Bard like one "Stamps" since your stamping multiple tokens. Then again I'm tired so i'm not terribly creative at the moment lol.