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

Drag a character onto the map, creating its default token

June 09 (5 years ago)

Edited June 09 (5 years ago)

I would really like to have spell templates created when casting certain spells.  Currently I have characters for the templates, with appropriate default tokens, but it would be nifty if I didn't have to find the journal entry every time the spell is cast.  I do not need my players to be able to call up the tokens, as my players are all face-to-face and I'm the only one using the roll20 interface.

I just want to click something like my "Ice-Storm" macro and either have my pointer become the token or, less ideal, have the token just plop down on the map.

June 09 (5 years ago)
GiGs
Pro
Sheet Author
API Scripter

This is possible with a script, the tricky part is how to decide where the template character should appear. The script engine as far as I know has no concept of where your screen is focused, or your current zoom level, so you have to give it specific coordinates.

You could have the token always appear at a specific point on your screen (like the top left of your map), or have it require you to select a token already on the map, and it gets the position of that token and drops the new template on that token, or some preset offset from it.

If you had such a script, you wouldnt need to maintain a list of template characters. You could set up a rollable table token, and your macro would prompt which template you want and it pastes that token and flips the displayed token to the number in the rollable table. But you could still use the template characters if you prefer, and select which one ion a dropdown.


I like using the characters because it seems that a default token carries the size I've set it to, where as a rollable token doesn't come in the dimensions I want.  I don't mind the token being placed somewhere odd on the map, it's easy enough to drag around.  I just hoped to save a step by not having to browse to the character in the journal.  

June 09 (5 years ago)
Ziechael
Forum Champion
Sheet Author
API Scripter

In my game I set up a rollable token for each of the types (line, radius, cone) and used a combination of King's Summon script and tokenMod to place the template and set which image side, who could control it and what size it needed to be... cast a spell, do a few clicks and continue with the mass murder that magic allows :)

Now that I think about it, with an extra query in the setup I could have housed them ALL in one template, oh well!

June 09 (5 years ago)

Edited June 09 (5 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

As a Pro user you could do all of this without the creation part using only token-mod. Set up one character as a rollable token spell and keep that on the field of play off to the edge, possibly behind a Fog of War border. Just drag it onto the visible area of the map when you want to use it. Using this macro, you can have one token handle all spell effects. The example I linked uses two other script, but Token mod can change faces, and you don't have to include sound effects. Here's a video of it in action.

June 10 (5 years ago)

Edited June 10 (5 years ago)

That's pretty cool but not quite what I had in mind.  I've already got all the characters with their appropriate tokens set up and want an easy way to bring up the token when a spell is cast. It's not a big deal, as of now I just find the character entry in the journal and drag it out, but I was hoping it could all be done in the spell's macro.

Is it possible to create a link to a character sheet in chat that can be dragged to the VTT to create a token?


June 10 (5 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

Not as such. The only tokens that can be dragged from chat are dice from dice rolls. It would be theoretically possible to drag one of those to the tabletop and make it perform to spec with token-mod, but most spells roll in roll templates rather than show graphic dice. There is a summon script which creates tokens on command, based on the default token, but that might be getting a bit complicated, and would still require clicking a button to create, and another to make it be a particular spell.

The whole idea could be created with a dedicated script I suppose, but that's out of my wheelhouse.