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

Auto-ID Filler possible?

Working with some small Macro implementing while utilizing the Pathfinder Community sheet. I'm an individual who attempts to simplify everything as much as possible. &{template:pf_block} @{toggle_accessible_flag} @{toggle_rounded_flag} {{font=@{apply_specfont_chat}@{use_specfont}}} {{scroll_desc=@{scroll-desc}}} {{color=@{rolltemplate_color}}} {{header_image=@{header_image-pf_block-item}}} {{character_name=@{character_name}}} {{character_id=@{character_id}}} {{subtitle}} {{name=@{name}}} {{location=^{location@{location}} }} {{hasuses=@{has_uses}}} {{qty=@{qty}}} {{qty_max=@{qty_max}}} {{shortdesc=@{short-description}}} {{description= **!Stat Info!** **HP** [[@{repeating_item_-lqtpxf4nrsp-5fifcbp_item-hp}]]/[[@{repeating_item_-lqtpxf4nrsp-5fifcbp_item-hp|max}]] **Max** @{description}}} This topic focuses on this very macro >  [[@{repeating_item_**-lqtpxf4nrsp-5fifcbp**_item-hp}]] **-lqtpxf4nrsp-5fifcbp**  < This ID is extremely helpful, as I'm able to implement desired attributes associated only with the desired Item. The inconvenient part, however, is this slight Custom Macro I've placed down isn't a default Macro. Which means I'll need my players for any new items they add to their character sheets or move about, will have to... A) Place the Macro in the Macro Text as so. A Copy and Paste. B) Replace the ID with the Item's appropriate ID. Is there a macro loop-hole that can simplify these steps? My desires is simply one Macro that can auto-pull the Item's ID for the copied-Paste Macro to utilize. This would help in huge abundance as I'll be capable of displaying item information more appropriately instead of small detail such as Name and description. (I could just put this information in the description, but the Items have more appeal when they auto-update information on the fly by simply pressing the "Roll" button, displaying any and all information the players may have changed.)
1570330473

Edited 1570330561
Kraynic
Pro
Sheet Author
In place of the item ID, does it work to put in the row number in it's place starting with zero?  So, if that was the first row in the repeating section, you would replace that ID with "$0".  Next row, you replace the 0 with 1, etc. [[@{repeating_item_$0_item-hp}]]
Kraynic said: In place of the item ID, does it work to put in the row number in it's place starting with zero?  So, if that was the first row in the repeating section, you would replace that ID with "$0".  Next row, you replace the 0 with 1, etc. [[@{repeating_item_$0_item-hp}]] Astounding, this works just as effective. I'll have to come up then with a concept that can make things easier for my players through the PF Community sheet with equipment and items. This generally shortens the amount of Macro typing I'll have to do though. I'm also astonished how compatible this macro you've design can function. I love it.
1570332085

Edited 1570332442
vÍnce
Pro
Sheet Author
If they edit the macro-text of the item, they won't need the rowID since it's given automatically. &{template:pf_block} @{toggle_accessible_flag} @{toggle_rounded_flag} {{font=@{apply_specfont_chat}@{use_specfont}}} {{scroll_desc=@{scroll-desc}}} {{color=@{rolltemplate_color}}} {{header_image=@{header_image-pf_block-item}}} {{character_name=@{character_name}}} {{character_id=@{character_id}}} {{subtitle}} {{name=@{name}}} {{location=^{location@{location}} }} {{hasuses=@{has_uses}}} {{qty=@{qty}}} {{qty_max=@{qty_max}}} {{shortdesc=@{short-description}}} {{description= **!Stat Info!** **HP** [[@{item-hp}]]/[[@{item-hp|max}]] **Max** @{description}}} They can simply replace {{description=@{description}}} with {{description= **!Stat Info!** **HP** [[@{item-hp}]]/[[@{item-hp|max}]] **Max** @{description}}} Of course this only works IF they are using the sheet roll button of the item to post to chat...
1570332235

Edited 1570332355
Just keep in mind if they re-order the rows in any repeating section, the $0, $1, $2, etc., numbers will change, and they will have to edit any related macros to match the new numbers. The ugly "gibberish" ID is the one true unique way to refer to that and only that entry, no matter where it is moved to.
Vince said: If they edit the macro-text of the item, they won't need the rowID since it's given automatically. &{template:pf_block} @{toggle_accessible_flag} @{toggle_rounded_flag} {{font=@{apply_specfont_chat}@{use_specfont}}} {{scroll_desc=@{scroll-desc}}} {{color=@{rolltemplate_color}}} {{header_image=@{header_image-pf_block-item}}} {{character_name=@{character_name}}} {{character_id=@{character_id}}} {{subtitle}} {{name=@{name}}} {{location=^{location@{location}} }} {{hasuses=@{has_uses}}} {{qty=@{qty}}} {{qty_max=@{qty_max}}} {{shortdesc=@{short-description}}} {{description= **!Stat Info!** **HP** [[@{item-hp}]]/[[@{item-hp|max}]] **Max** @{description}}} They can simply replace {{description=@{description}}} with {{description= **!Stat Info!** **HP** [[@{item-hp}]]/[[@{item-hp|max}]] **Max** @{description}}} Getting really upset with myself in a non-annoying, but more "Why don't I notice these things" kind of way. Alright, I'll be using this now and go from there. See how this all handles out. Much appreciate man. Don't know how to throw out those compliments enough to yah.
Rabulias said: Just keep in mind if they re-order the rows in any repeating section, the $0, $1, $2, etc., numbers will change, and they will have to edit any related macros to match the new numbers. The ugly "gibberish" ID is the one true unique way to refer to that and only that entry, no matter where it is moved to. Yeah, I'll be keeping that as well in the back of my head. Honestly my intent focuses on allowing the most plausible info for my players to look and enjoy. Appreciate your input, this be a good reminder for me!
1570336740
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You might be able to use the Universal Chat Menu script by GiGs. It's built to cycle through or even filter repeating actions.
1570337655
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Or use my menumaker script, it allows creation of custom repeating abilities.
Scott C. said: Or use my menumaker script, it allows creation of custom repeating abilities. keithcurtis said: You might be able to use the Universal Chat Menu script by GiGs. It's built to cycle through or even filter repeating actions. I'll proceed in locating those scripts and indulge in some fun diddly-daddle. Can't wait to see just what possibilities are going to come arise through all these options. This is a big project, so can't wait to see what comes out of it once this campaign launches.
Scott C. said: Or use my menumaker script, it allows creation of custom repeating abilities. I do not see MenuMaker in the API library or in GitHub, and the link in the original thread for it seems to be 404. Do you have an updated link or should I look for a different name?
1570379433
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
hmm, interesting. I'll have to re upload the code.
1570562312
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ok, uploaded the code to a gist until I can get the repo fixed. You can find menu maker here .
1570562905

Edited 1570562948
Scott C. said: Ok, uploaded the code to a gist until I can get the repo fixed. You can find menu maker here . It amazes me how the little request and post I make. Just how much is suddenly communicated, accomplished. To see that from a few sentences. It isn't me doing it; its just how well everyone is connected. I know this sounds a bit... off topic -- the community of the players and individuals whom dig among the forms is why I stay in Roll20. A lot can still be worked on for Roll20 Developers, but you guys are what makes me ultimately appreciated to be here.
Thanks, Scott! Looking forward to trying Menu Maker.
1570594997
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You're welcome, hit me up on the script thread with any questions