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
This post has been closed. You can still view previous posts, but you can't post any new replies.

Faster Access of the Character Sheet assigned to a Token

1484836999

Edited 1484842922
If I have a map prepared, ready with tokens, I always have the problem that I must search for the appropriated Character Sheets in the Journal. Which can be hard if you have hundreds of NPCs. Therefore I would like to suggest: create e.g. a context menu (right-click) of a token to open the related Character Sheet which is assigned to it. By the way: since I have a bit of expierence concerning software development, I humbly estimate that the implementation should not take more than 15min: there is already the connection between token and sheet, and there is already a context menu implemented. To add an already existing method (open()) of the sheet to the menu should be no big deal. I really would appreciate this. Thanks! Bernd
1484854482
Gold
Forum Champion
Good news Bernd, there is already a shortcut to open the Bio Tab on the Journal of the Character associated with a token. Just shift-click the token. &nbsp;You will still need to tab over to the Character Sheet itself because it opens onto the Bio. Wiki docs for this, <a href="https://wiki.roll20.net/Token_Features#Represents_" rel="nofollow">https://wiki.roll20.net/Token_Features#Represents_</a>...
Absolutely awsome! Great! Thanks for the quick help. Should read the Wiki more carefully.
1485325610

Edited 1485325701
plexsoup
Marketplace Creator
Sheet Author
API Scripter
It's a good point though. If customers are not finding features, then maybe the features are too hard to find. Anything available by hotkey should probably be available in the right-click menu. Also worth noting, there's a hotkey reference in the game which doesn't include shift-click (or shift-z).
1511753389

Edited 1511753512
I would say this could still be easier. On the&nbsp; wiki page, under Represents Character , it states the following If a Token represents a Character, you can open that Character to its Bio & Info Tab by holding down Shift and double-clicking on that Token or by holding down Shift and single-clicking on its Token Settings icon. Holding down Alt instead of Shift will open that Character to its Attributes & Abilities Tab . Nowhere is the Control key used when double clicking on the token. Is there not a reason to add the ability to Control + Double Click to open directly to the Character Sheet as opposed to the Bio or Attributes tab? Seems like a pretty simple thing to ask / add. I'm actually quite surprised that the default is not the most used part of the Character Journal entry to be honest.
I'm really happen to learn of this shift double click to open the character sheet from the token. However, I had no idea that feature existed since its not apparent from the UI at all. I think it would be better to have the token automatically have the character sheet tabs integrated with the token dialog when the token represents a character.
1520603571

Edited 1520867792
I was looking into finding a better solution to this with the help of a javascript bookmarklet. I've have some help from the aaron, but still not there yet. Though I was looking through the console log on Chrome this morning and the event logs. I think this would be super easy to implement a 3rd double click modifier that's not currently being used. This is really low hanging fruit that adds some quality of life. This is the current code used to open the character's page to either the Bio and Info tab or the Attributes tab. t.on("dblclick", function (e) { &nbsp; &nbsp; if (e.target && "text" == e.target.type) d20.engine.editText(e.target, e.pageX, e.pageY); &nbsp; &nbsp; else if (e.target && "image" == e.target.type && e.target.model) &nbsp; &nbsp; &nbsp; &nbsp; if ((e.e.e.shiftKey || e.e.e.altKey) && "" !== e.target.model.get("represents")) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; console.log("Show token's character..."); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var t = d20.Campaign.characters.get(e.target.model.get("represents")); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (t) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var n = t.get("inplayerjournals").split(","); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (window.is_gm || -1 !== _.indexOf(n, "all") || window.currentPlayer && -1 !== _.indexOf(n, window.currentPlayer.id)) && t.view.showDialog() &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.e.e.altKey ? $(".dialog[data-characterid=" + e.target.model.get("represents") + "] .characterviewer ul.nav a[data-tab='attributesabilities']").trigger("click") : $(".dialog[data-characterid=" + e.target.model.get("represents") + "] .characterviewer ul.nav a[data-tab='bioinfo']").trigger("click") &nbsp; &nbsp; &nbsp; &nbsp; } else e.target.model.trigger("showtokeneditor") }); It's clear where they're intercepting the double click and hotkey. This could easily be re-written to include an additional case statement or a switch statement like below. t.on("dblclick", function (e) { &nbsp; &nbsp; if (e.target && "text" == e.target.type) d20.engine.editText(e.target, e.pageX, e.pageY); &nbsp; &nbsp; else if (e.target && "image" == e.target.type && e.target.model) &nbsp; &nbsp; &nbsp; &nbsp; if ((e.e.e.shiftKey || e.e.e.altKey || e.e.e.ctrlkey) && "" !== e.target.model.get("represents")) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; console.log("Show token's character..."); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var t = d20.Campaign.characters.get(e.target.model.get("represents")); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (t) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var n = t.get("inplayerjournals").split(","); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (window.is_gm || -1 !== _.indexOf(n, "all") || window.currentPlayer && -1 !== _.indexOf(n, window.currentPlayer.id)) && t.view.showDialog() &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; switch (e.e.e) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case altkey &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ? $(".dialog[data-characterid=" + e.target.model.get("represents") + "] .characterviewer ul.nav a[data-tab='attributesabilities']").trigger("click") &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case&nbsp; shiftKey &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(".dialog[data-characterid=" + e.target.model.get("represents") + "] .characterviewer ul.nav a[data-tab='bioinfo']").trigger("click") &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case ctrlkey && $charsheet != null &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(".dialog[data-characterid=" + e.target.model.get("represents") + "] .characterviewer ul.nav a[data-tab='charsheet']").trigger("click") &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; default: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; } else e.target.model.trigger("showtokeneditor") }); I'm not 100% on the null check in javascript. I know further in the source there's a function to get the character sheet (as charsheet) for the campaign though. For those unaware, this would probably be needed for games that do not have a character sheet chosen or included. I'm surprised this hasn't been implemented. I've seen complaints about this in several places, and it's a major annoyance. I'm going to add to this, that I think the the dialog that opens should autosize to better fit the contents of the character sheet when doing this. For example, when you open an NPC sheet vs a PC sheet in the 5e OGL sheet. There are two very distinct width differences. There should be a way to either fit all contents (which could be unimaginably large), or the sheet creator somehow could specify the default open to size in width and height.&nbsp;
I would add that this could be added then to the initiative tracker so when i have Rat 1 through N i can just open that sheet i want in the case that each has different max HP. right now i track them all on 1 HP max for ease... also that brings me to the thought that i wish initiative tracker would have HP tracking and possibly atks listed right with it all. making a comprehensive tracker. Right now I still track all of this with P&P and i think thats something a system as full as Roll20 i shouldnt be doing anymore
joshua g. said: I would add that this could be added then to the initiative tracker so when i have Rat 1 through N i can just open that sheet i want in the case that each has different max HP. right now i track them all on 1 HP max for ease... also that brings me to the thought that i wish initiative tracker would have HP tracking and possibly atks listed right with it all. making a comprehensive tracker. Right now I still track all of this with P&P and i think thats something a system as full as Roll20 i shouldnt be doing anymore Do you have the rat tokens set up&nbsp; properly ? Specifically that you have the bar with the correct value and that the bar is not linked to the character sheet. If you have this set up then you would simply replace the default value with the individual hp roll for the rat. If you don't want to have to do this yourself, there are scripts that will roll the hp for a token when it is brought to the VTT, but that would require the PRO subscription.
Yes i could set them up that way, but i find the system to not be easy to track because rat 1-N all look the same its hard to first highlight the initiative to find them then open it and change them, i wish it were a simple 14/14 with arrows to raise and lower right next to the initiatives would be faster and more simple, its not that i cant but having P&P with each numbered rat and their HP in a list i can do things faster than the system.
There's another thread on this, I am going to move my vote over there, as it already has 25 votes to it compared to the 7 here. -&nbsp;<a href="https://app.roll20.net/forum/post/3637236/control-doubleclick-to-open-directly-to-character-sheet-tab-from-token" rel="nofollow">https://app.roll20.net/forum/post/3637236/control-doubleclick-to-open-directly-to-character-sheet-tab-from-token</a>
Devs could probably be marking this as on Dev with the new Measured release they are working on in Dev servers.
1534271555
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
I'm marking this as complete and closing it. Alt+Double Click on a token now directly opens the charactersheet if one is being used by the game and the token has a represents relationship to a character.