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

Could use a push into the right direction...

Hi all, I'm still setting up my game environment and stumbled across an issue I want to resolve. Basically I saw it working in the video by Trigger. It's about populating a map with randomized NPC-Tokens. I know there are examples for 5e, but we play a different RPG so I need a generic approach. What I imagine is a section called "Monsters" which hold a character sheet with all the monsters in my system. To make it simple let's assume they only have 2 stats: HP and Damage. What I would love to do is to be able to "pull" a character from the Journal tab onto the map and it adds a token (if possible a random one from a selection) and fills the two stats with random numbers (based on a definition). I know the Randomizer Script does similar tasks, but my understanding is that it "only" shows the values in the chat. What I would love to have is a token/character based on it so I can include it in the turn marker and track it's life. I think the random token would work with a rollable table and different icons. But how do I add in the stats? Now I'm not asking for a finished script/solution (unless there is one I didn't find), but a push mentioning which scripts/macro I have to combine would be awesome. I'm still fiddling around too much getting lost in my searches :)
1458661355
The Aaron
Pro
API Scripter
So, if I understand what you're saying correctly, you want a script that will: When a character (monster) is dragged onto the VTT Randomizes the values in 2 of it's bars based on the formulas in attributes on that monster (like, rolls hit points, for example) Randomly selects a side on the rollable table token that represents the monster For examples of Rolling a random stat on add:graphic, you can look at my MonsterHitDice script (it rolls a random formula and optionally adds a value, both from attributes on add to page). Setting a random side on a rollable table token will only work if all the faces of the token are from a user library, not the Market Place.  You'd need to update the side (obj.set('side',2)), or the imgsrc of the token (obj.set('imgsrc','some image source or variable') ).