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

Special Effect Help

1490297275
David Silver
Marketplace Creator
So I want to make a macro that causes a fan of flame to come out of my character's toke. How do I refer to my character's token reliably without having to click my character's token?
1490298039
The Aaron
Pro
API Scripter
Are you wanting guidance on writing a script to do it, or direction to a script that is already capable of it (if such exists)?
1490298135
David Silver
Marketplace Creator
Relatedly,  is there a way to run /fx inside another statement, such as [[/fx stuff], which does not work.
1490298168
David Silver
Marketplace Creator
The Aaron said: Are you wanting guidance on writing a script to do it, or direction to a script that is already capable of it (if such exists)? I'm actually just trying to do this in a macro. Is this doable in a macro?
1490298385
David Silver
Marketplace Creator
The Aaron said: Are you wanting guidance on writing a script to do it, or direction to a script that is already capable of it (if such exists)? Ultimately I have a spell in the pathfinder sheet for burning hands. I want, ideally, to make it so when I click that, it shoots flames from my character towards whatever other token I have selected. This is proving difficult.
1490298545
The Aaron
Pro
API Scripter
My suggestion would be to use @{selected|token_id} for your character and @{target|token_id} for the foe.  There isn't really a way to do this reliably without either having your token already selected (@{selected}) or clicking it (@{target}).  You usually have a token selected when you perform an action (and token actions are only accessible with a selected token, so that makes them ideal), so it usually is pretty natural.
1490298570
The Aaron
Roll20 Production Team
API Scripter
(Moved to Specific Use Questions & Macros forum)
1490298694
PaprikaCC
Pro
API Scripter
If you want to make a cone of flames appear from your character like Burning Hands, you can use this macro: #create-fire-cone: /fx breath-fire @{target|source|token_id} @{target|direction|token_id}
1490298702
David Silver
Marketplace Creator
The Aaron said: My suggestion would be to use @{selected|token_id} for your character and @{target|token_id} for the foe.  There isn't really a way to do this reliably without either having your token already selected (@{selected}) or clicking it (@{target}).  You usually have a token selected when you perform an action (and token actions are only accessible with a selected token, so that makes them ideal), so it usually is pretty natural. That's a pity. No way to look up a token that is attached to a given character sheet? That aside, using /fx. The place I insert it in is not being parsed as a line of its own, so it just comes out as /fx stuff stuff stuff in the middle of the pretty box. How do I get it to parse on its own? I tried wrapping it in [[ ]] and it didn't like that.
1490299066
David Silver
Marketplace Creator
PaprikaCC said: If you want to make a cone of flames appear from your character like Burning Hands, you can use this macro: #create-fire-cone: /fx breath-fire @{target|source|token_id} @{target|direction|token_id} Thanks! I got that part down, but it isn't happy living inside the fancy box of the spell output.
1490299158
The Aaron
Pro
API Scripter
What character sheet are you using?
1490299283
David Silver
Marketplace Creator
The Aaron said: What character sheet are you using? Pathfinder 1.19
1490301903
The Aaron
Pro
API Scripter
I think this won't be possible without the API or some very specialized support from the Pathfinder Sheet Community.
1490306622
David Silver
Marketplace Creator
So there is no way to call /fx except on its own line then?
1490307147
The Aaron
Pro
API Scripter
/ commands must be the first thing on their line.  The API could be used to pull a / command out of the middle of something else and execute it (SkyCaptainXIII just dropped a script this morning that does some similar peeking on the OGL's Roll Templates).
1490307471

Edited 1490307499
David Silver
Marketplace Creator
I feel like this is a thing that should exist for fx, a [[]] callable form. Where would I submit such request?
You should be able to replace @{selected|token_id} with the token's actual id and then you would just have to click the macro and then click a target. Select your token, enter into chat @{selected|token_id} and then use that string in chat in your fx macro for the source. /fx breath-fire -KeElcDOaACvGSczHlem  << This macro will pop up the aiming tool after you enter it into chat or hit the macro. /fx breath-fire -KeElcDOaACvGSczHlem @{target||token_id} << This macro will prompt you to select a target for the fx. Replace the -KeElcDOaACvGSczHlem in the above with your own token's id instead.
As for being able to trigger an fx command from the character sheet.... you could make a new macro on your character sheet (Abilities tab at the top) and put the /fx command in there first and then the %{macro_name} second. You would get the % macro name by dragging it to the macro bar at the bottom and then triggering it and pressing up arrow in chat to get the name.
And as TheAaron alluded to, it is possible to write API script listeners that can peek at the chat as it goes through and react to it... but it cannot change the output since it's already gone through. It would actually be pretty simple to do what you want to do, but you would have to have your DM install it any campaigns you play in, if they're Pro subscribers.
1490312096
David Silver
Marketplace Creator
SkyCaptainXIII said: As for being able to trigger an fx command from the character sheet.... you could make a new macro on your character sheet (Abilities tab at the top) and put the /fx command in there first and then the %{macro_name} second. You would get the % macro name by dragging it to the macro bar at the bottom and then triggering it and pressing up arrow in chat to get the name. I made a macro called bfire, then added this to the contents of the description of the spell: [[%bfire]], it then refuses to roll. Without the [[ ]] it just displays %bfire.
1490312737
David Silver
Marketplace Creator
Oops, missed the { } in there, added them, and got a fresh error: TypeError: Cannot read property 'substring' of undefined
1490314439
David Silver
Marketplace Creator
I also tried: %{#bfire} -- Same error.
1490316327
David Silver
Marketplace Creator
I figured it out, except it doesn't work. It just shows the content of the ability instead of actually doing the effect.
1490318705
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
It's a built in feature for spells on the [Shaped] sheet, but that won't help you for Pathfinder.
1490320698

Edited 1490320789
David Silver said: SkyCaptainXIII said: As for being able to trigger an fx command from the character sheet.... you could make a new macro on your character sheet (Abilities tab at the top) and put the /fx command in there first and then the %{macro_name} second. You would get the % macro name by dragging it to the macro bar at the bottom and then triggering it and pressing up arrow in chat to get the name. I made a macro called bfire, then added this to the contents of the description of the spell: [[%bfire]], it then refuses to roll. Without the [[ ]] it just displays %bfire. That's not how that works at all... I'm talking about creating a macro on the Abilities tab at the top of the character sheet and putting the /fx command in there first. Then you get the name of the macro you want to use in conjunction with the breath of fire and put that in there second. /fx breath-fire charid @{target||token_id} %{macro-name} I have no idea what the macro-name is, but you you can use the steps I showed above to get the name. The above commands DO NOT GO INTO ANY PART OF THE SPELL MACRO ON THE CHARACTER SHEET. They go into their own separate macro.
1490321247
David Silver
Marketplace Creator
It works! Thank you. Clumsy, but functional.
1490333258
vÍnce
Pro
Sheet Author
Glad you have figured it out.  You can only have one /<command> pre line for chat as Skycaptainxiii(HB) has demonstrated, not to mention you cannot nest these types of chat commands inside a roll template macro.  We also include /w if you have enabled whispers from the sheet's settings.  If you want this included "on-sheet" with the roll, it best to add /fx as a new line after the full macrotext.