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

[Script] Autolinker — Quick Handout and Compendium Linking

1772683470

Edited 1772744002
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Autolinker Available now in One Click Install Purpose Autolinker extends the basic linking functions built into Roll20. The basic function of Roll linking allows you to link to a character or handout by placing the name in square brackets. This script provides advanced controls converts bracketed shorthand written in the Notes or GMNotes fields of handouts and characters into clickable Roll20 journal or compendium links when the entry is saved. This extends the basic linking functions built into Roll20. General Usage These formats may be used in the Notes or GMNotes fields of any handout or character. Note: The script runs after a save event. Because the handout may refresh before processing finishes, you may need to close and reopen the handout (or click Edit again) to see the updated links. Journal Links [goblin|Jimmy] Creates a link to the handout or character named goblin, displayed as Jimmy. If no display text is provided, standard Roll20 journal linking rules apply. Compendium Links [5e:fireball] Links to the D&D 5e compendium entry for fireball. [5e:wall of fire|the wall] Links to the D&D 5e compendium entry for wall of fire, displayed as the wall. Supported Compendium Prefixes: 5e: — D&D 5th Edition pf2: — Pathfinder 2nd Edition Handout Header Linking Header links apply to handouts only and use the # character. Link to a Header in Another Handout [Dungeon of Doom#6. Zombie Chorus|See Room 6] Links to the header 6. Zombie Chorus in the handout Dungeon of Doom, displayed as See Room 6. Link to a Header in the Same Handout [#6. Zombie Chorus|See Room 6] Links to the header 6. Zombie Chorus in the current handout, displayed as See Room 6. Omit Display Text [#6. Zombie Chorus] If no display text is supplied, the header text is used as the link text. Help To view the syntax in-game, type "!autolinker --help" into chat.
This is amazingly useful.  You have been added to my shrine of Mod authors. 
1772732940
vÍnce
Pro
Sheet Author
Nice addition Keith.&nbsp; Free users can only hope that Roll20 takes notice of Autolinker as well as the many other mods you've contributed... (<a href="https://wiki.roll20.net/Keith#APIs" rel="nofollow">https://wiki.roll20.net/Keith#APIs</a>) and integrates them into the VTT.&nbsp; The ultimate compliment, perhaps? Thank you. p.s. You need to update that wiki page(2023). I know you've been VERY busy these last few years.&nbsp; ;-P
1772742397
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Heh, the process was kind of the reverse in this case. I can't take full credit for this one. The basic code is from an internal tool used to aid in module conversions. I recently updated the code to include the new header linking functionality, and got permission to post that part as a standalone script for the public forum.
1772743276
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
vÍnce said: \p.s. You need to update that wiki page(2023). I know you've been VERY busy these last few years.&nbsp; ;-P Updated! 28 scripts and scriptlets, all categorized and linked.
Any chance you are going to be able to expand this to Pathfinder 1e?&nbsp;&nbsp;&nbsp;&nbsp;
1772834958
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I'm not familiar with how robust the PF1 compendium is, but I'll investigate.