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

Assigning Personality traits to individual NPC tokens. 5e/ OGL character sheet

So i'm hosting storm kings thunder and I have 4 rollable tables. to deal with the personality traits, bonds, flaws and ideals of giants.  This is the macro I figured out /w gm &{template:npcaction} {{rname= Roleplaying The Giant }} {{name= Roll Result }} {{description= [[1t[Giant-Personality-traits]]][[1t[Giant-Ideals]]][[1t[Giant-Bonds]]][[1t[Giant-Flaws]]] }} And it works fine enough, but I would like to get 2 results from personality traits. However what I want is to utilise the red token bubble (unassigned to anything by default, green for health and blue for AC.  So here's a situation. I have a fire giant in the scene. He is assigned to the fire giant character sheet. I want to be able to select his token and while it is selected, use this macro to have "Giant Characteristics" assigned to it.  I'm happy if it erases the characteristics figured out before but preferably every token remembers the results for me to look at.  Super ideally, after a result is "attached" to the giant token I randomly rolled for, I use a follow up macro like I use for initiative to recall the information remembered and re-display it %{selected|initiative} So in this example it might be %{selected|Giant-characteristic} Any thoughts / Opinions / Idea's on this?  Hit me up! 
1533820856
The Aaron
Pro
API Scripter
Getting it to display and set the information would be difficult as you can't reuse roll results in a macro.  What you could do is have one macro for setting the result, and another for showing it.  TokenMod can set the value: !token-mod --set bar1_value|"[[1t[Giant-Personality-traits]]][[1t[Giant-Ideals]]][[1t[Giant-Bonds]]][[1t[Giant-Flaws]]]" Then you can have a macro like: /w gm &{template:npcaction} {{rname= Roleplaying The Giant }} {{name= Roll Result }} {{description= @{selected|bar1}] }} Adjust as needed for the right bar.
Hey The aaron!  You look familiar dude!  Have you helped me out in the past? :D
Ok so the second part works, I took out the bar1 and made it bar3  Copying the !token mod function didn't work though sorry. 
1533822506
The Aaron
Pro
API Scripter
It's possible:    15426 Forum Posts =D You'll need to install the TokenMod script if you haven't already.  
Ok. So where can I find this tokenMod Script?
Adding the script! Did you make it? :D
1533822870
The Aaron
Pro
API Scripter
It's one of a few I've contributed to the community. =D
Wow, awesome! 
1533822959
The Aaron
Pro
API Scripter
Here's the current release/discussion thread for it:&nbsp;<a href="https://app.roll20.net/forum/permalink/4225825/" rel="nofollow">https://app.roll20.net/forum/permalink/4225825/</a>
It has updated! It's working nicely now and that's pretty awesome! Plus if I add a # It lets me merge it into one macro but I will like it as 2 since I may just want to state what that giant's personality is like.&nbsp; Solid stuff though!&nbsp;
1533823943

Edited 1533824030
The Aaron
Pro
API Scripter
The problem with putting them together is that the @{selected|bar3} gets expanded on the client side before the TokenMod command has the opportunity to set it on the API side.&nbsp; If you want to put them together, you can use this custom API script: on('ready', ()=&gt;{ on('chat:message', (msg) =&gt; { if('api' === msg.type &amp;&amp; playerIsGM(msg.playerid) &amp;&amp; /^!show-traits/i.test(msg.content)){ msg.selected .map(o=&gt;getObj('graphic',o._id)) .filter(g=&gt;undefined !== g) .forEach(t=&gt;{ sendChat('',`/w gm &amp;{template:npcaction} {{rname= Roleplaying The Giant }} {{name= Roll Result }} {{description= ${t.get('bar3_value')}}}`) }); } }); }); Just install that in another tab and use: !token-mod --set bar1_value|"[[1t[Giant-Personality-traits]]][[1t[Giant-Ideals]]][[1t[Giant-Bonds]]][[1t[Giant-Flaws]]]" !show-traits Let me know if that has any issues, I just wrote it off the cuff and didn't actually test it. =D
thanks! i'll be keeping it just to the first set of macros :) it does the job great for what i'm after :D
1533824850
The Aaron
Pro
API Scripter
No worries. =D Cheers!
The Aaron said: It's one of a few I've contributed to the community. =D The Aaron said: &nbsp; 15426 Forum Posts =D About, what, half of those posts are AMAZING scriptomancy spells!
He is a very good script/ code wizard :3
Phnord Prephect said: The Aaron said: It's one of a few I've contributed to the community. =D The Aaron said: &nbsp; 15426 Forum Posts =D About, what, half of those posts are AMAZING scriptomancy spells! The other half are :) The Aaron said: No worries. =D Cheers!
1533828298
The Aaron
Pro
API Scripter
=D