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.

[Script] PowerCards 2 (Thread 2)

I was concerned about using == because of Javascript myself. I tested it to make sure it would work fine, and there have been no errors. I then kind of figured out why, and (I think) it's because the information is just passed through. It's like a litany of other symbols used for the varying javascript code, used for formatting, and there doesn't seem to be a problem with them. Well, I haven't run into any problems anyhow.
1429885891
The Aaron
Pro
API Scripter
That's why I suggested ====. =D
It seems as though everyone is worried about whether this would affect javascript... interesting.
Sean G. said: I was concerned about using == because of Javascript myself. I tested it to make sure it would work fine, and there have been no errors. I then kind of figured out why, and (I think) it's because the information is just passed through. It's like a litany of other symbols used for the varying javascript code, used for formatting, and there doesn't seem to be a problem with them. Well, I haven't run into any problems anyhow. Well, I am also planning ahead for the next major update to powercards which will include conditional statements in macro's... and I'm going to use >= == <= != comparisons.
1429886382
Gen Kitty
Forum Champion
~~~ makes more sense, to me, and shouldn't conflict with anything in the future. :>
April 24th, 2015 ~ 11:20 am eastern Version: 2.4.13 Bugfix: Changed the horizontal rule inline formatting to ~~~ instead of ]_[
Well HB -- I left my divining rod at my parents' house, so I had no idea you had plans for ==. :P
1429985526
Gen Kitty
Forum Champion
Pssst, update your header to reflect the change to HR :>
1429989826

Edited 1429991872
Gen Kitty
Forum Champion
Ooookay, new bug found. My macros for my 4e use the --format|BLAH approach. Before going multiline this worked perfectly. Post-multiline they use the wrong format. Cards marked for the 2nd defined style use the 1st defined style. Change to the 3rd listed format and it still uses the 1st. A macro set for the first style, uses no style (player's color). I've flip-flopped USE_DEFAULT_FORMAT and it doesn't change things. Help? :(
Hrm, interesting. Will look at this later... leaving here in a few minutes to get some new blinds and blackout curtains for the bedroom. Night shift is a bugger some times.
1429991966
Gen Kitty
Forum Champion
Strike the bit about first style displaying no-style. A work-around is to not put --format|BLAH on a line by itself. Which is just fine for me.
1429993987
Gen Kitty
Forum Champion
Reminder: Put ^^ for linebreak back into the guide
1429994148

Edited 1429994159
Gen Kitty
Forum Champion
PS: using ~~~ in the name field makes for some really slick looking macros. I have --name|@{selected|token_name}~~~Name of Attack and it really looks nice, IMO
GenKitty said: Ooookay, new bug found. My macros for my 4e use the --format|BLAH approach. Before going multiline this worked perfectly. Post-multiline they use the wrong format. Cards marked for the 2nd defined style use the 1st defined style. Change to the 3rd listed format and it still uses the 1st. A macro set for the first style, uses no style (player's color). I've flip-flopped USE_DEFAULT_FORMAT and it doesn't change things. Help? :( I can't re-create this bug...
1430010885
Gen Kitty
Forum Champion
Huh. I'll see about creating you a test case. I think you still have GMship in my 4e campaign, you could go play with stuff there if you like.
1430013001

Edited 1430013328
Yeah... I see it happening in your campaign, but not in mine. Nevermind, I don't see it happening.
How would you do a target info charm where you want to add multiple variables from the target together? Kinda like this: --Attack#?{Number of targets|1%%|[[1d20+5]] vs [[ %%Reflex%% + %%Reflex Modifier%% ]] Reflex (%%token_name%%) The above command doesn't work.
I also can't get the avatars to appear in the chat window. I include --tokenid|@{selected|token_id}, and the --emote does not have a ! after the |. What am I missing?
Joshua M. said: How would you do a target info charm where you want to add multiple variables from the target together? Kinda like this: --Attack#?{Number of targets|1%%|[[1d20+5]] vs [[ %%Reflex%% + %%Reflex Modifier%% ]] Reflex (%%token_name%%) The above command doesn't work. You can't do math with the token charms. Not currently at least. Might be possible at some point. As for the avatars, did you turn on custom avatars by changing CUSTOM_EMOTES and SHOW_AVATAR to true?
1430125151

Edited 1430125168
Gen Kitty
Forum Champion
Why did you put a %% in this section? That is probably causing issues too. --Attack#?{Number of targets|1 %% |
I didn't even see that... --Attack:#?{Number of Targets|1}|[[1d20+5]] is how it should look.
You also need it to read: --charid|@{selected|character_id}, not --tokenid|@{selected|token_id}, unless something has changed.
Sean G. said: You also need it to read: --charid|@{selected|character_id}, not --tokenid|@{selected|token_id}, unless something has changed. Tokens have worked for a long time now. Useful for GM's that just throw out a token and don't make a full character sheet.
1430223446
Gen Kitty
Forum Champion
Also, using the token image works far FAR better than the avatar image, if your avatar image is largish. I do wish the emote text could wrap around the token image, maybe that can go into a later 3.x update. ^_^
GenKitty said: Also, using the token image works far FAR better than the avatar image, if your avatar image is largish. I do wish the emote text could wrap around the token image, maybe that can go into a later 3.x update. ^_^ Partially done. Will update tomorrow for testing. It's bedtime now and I am too tired to test all the possible ways it can break.
Interesting, I tried it with --tokenid|@{selected|token_id} myself, and it doesn't pull up the token image. It pulls up the avatar fine with --charid|@{selected|character_id}. Then again, does that have to do with me using a rollable table for a token?
Oh well, I'm fine with it as character_id anyhow. :)
1430251042
Gen Kitty
Forum Champion
HoneyBadger, you are a wonderful fellow :>
1430251061

Edited 1430251492
Sean G. said: Interesting, I tried it with --tokenid|@{selected|token_id} myself, and it doesn't pull up the token image. It pulls up the avatar fine with --charid|@{selected|character_id}. Then again, does that have to do with me using a rollable table for a token? Hrm, I don't know if I've ever tried tokenid with a rollable table token... ... just tested and it works fine for me. Hrm, I also remember why I didn't use float:left to wrap text. It doesn't center vertically on the token image in the emote.
GenKitty said: HoneyBadger, you are a wonderful fellow :> Which would you rather have? Wrapped or vertically centered?
1430254243
Gen Kitty
Forum Champion
I would rather have wrapped. My emotes are rarely so short as to need vertical centering :>
GenKitty said: I would rather have wrapped. My emotes are rarely so short as to need vertical centering :> my players tend to use paragraphs too HA HA
My emotes depend on the character(s) and whether I am attempting to be funny. On another note, --tokenid|@{selected|token_id} started working out of the blue.... I have no clue why it wasn't, but it started working all of a sudden.
1430268412

Edited 1430268885
when using power cards i just get : API: checked the script and nothing showing up broken.. any ideas ? I'm guessing its from the API update but i've no clue what that has done to it.
HoneyBadger said: You can't do math with the token charms. Not currently at least. Might be possible at some point. As for the avatars, did you turn on custom avatars by changing CUSTOM_EMOTES and SHOW_AVATAR to true? Both CUSTOM_EMOTES and SHOW_AVATAR are set to true. I also tried it with --charid|@{selected|character_id} instead of --tokenid|@{selected|token_id}, and that didn't work either. Is there something more I'm supposed to do?
1430271721
The Aaron
Pro
API Scripter
Azul, can you give some more details about your setup? Do you see the output in the API Console? What command are you issuing?
1430271779
The Aaron
Pro
API Scripter
OldSchoolChris: where do you get a;d;m ? In the chat or in the API Console?
This is what output I get with the following code: !power {{ --charid|@{selected|character_id} --emote|@{character_name} attacks @{target|character_name} with his dagger. --format|atwill --name|Dagger Slash --title|Components: None ^^ Duration: Instantaneous ^^ This is a simple attack using a dagger. --leftsub|Standard Action --rightsub|Range @{weapon2range} ft. --Attack:|[[ 1d20cs>2 + @{accuracybonustempadj} [Accuracy Bonus] - @{accuracypenaltytempadj} [Accuracy Penalty] - @{armoritemtotalhitpenalty} [Armor Penalty] ]] Vs [[ @{target|armor}]] --Hit:|[[ 1d@{weapon2dice} + @{weapon2extradamage} [Bonus Damage] ]] slashing damage }} It does the same thing with --tokenid|@{selected|token_id} instead of --charid|@{selected|character_id}.
GenKitty said: Why did you put a %% in this section? That is probably causing issues too. --Attack#?{Number of targets|1 %% | I used the %% because that is what the example had above. Good Examples !power --name|Single Target Attack --target_list|@{target| |token_id} --Attack|[[1d20+5]] | [[1d20+5]] vs %%AC%% Armor Class (%%token_name%%) --Hit|[[1d8+3]] slashing damage !power --name|Scorching Burst | Nine Targets --target_list|@{target|1st|token_id} | @{target|2nd|token_id} | @{target|3rd|token_id} | @{target|4th|token_id} | @{target|5th|token_id} | @{target|6th|token_id} | @{target|7th|token_id} | @{target|8th|token_id} | @{target|9th|token_id} --Attack#?{Number of targets|1}|[[1d20+5]] vs %%Reflex%% Reflex (%%token_name%%) --Hit|[[1d8+3]] fire damage
1430272593
Gen Kitty
Forum Champion
Yours: --Attack#?{Number of targets|1%%|[[1d20+5]] vs [[ %%Reflex%% + %%Reflex Modifier%% ]] Reflex (%%token_name%%) Example: --Attack#?{Number of targets|1}|[[1d20+5]] vs %%Reflex%% Reflex (%%token_name%%) %% %% is used to enclose charm variable names, so in your example you have a spare %% in the 'number of targets' rollquery, and I see now you didn't close off your rollquery with its closing }, which also would have caused issues.
%% are used for token charms, wherein they open and close, e.g.: %%bar3%% replaces every instance with whatever value is in bar3 on a token. They simply call information. However, you missed a closing brace on ?{Number of targets|1}. Without that closing brace, it won't work properly.
And evidently GK and I spotted the brace at the same time...
Sean, powercards is the only script I have active, tags work fine but any time i add a inline roll of any kind the only output i get is : API: in the chat.
GenKitty said: Yours: --Attack#?{Number of targets|1%%|[[1d20+5]] vs [[ %%Reflex%% + %%Reflex Modifier%% ]] Reflex (%%token_name%%) Example: --Attack#?{Number of targets|1}|[[1d20+5]] vs %%Reflex%% Reflex (%%token_name%%) %% %% is used to enclose charm variable names, so in your example you have a spare %% in the 'number of targets' rollquery, and I see now you didn't close off your rollquery with its closing }, which also would have caused issues. Thanks. :) I fixed that.
I FIGURED IT OUT!!! If you have a space after --tokenid|@{selected|token_id}, then it won't work. You need to be sure that there is no extra space after that line.
1430275096
Gen Kitty
Forum Champion
Azul, do this in chat: !power --name|Test [[1d20]] Tell us if that fails.
Azul - You mean Aaron. I appreciate the elevation in status, but definitely not me.
Azul, can you post here, what the macro is you are attempting to use? I'm asking because from what I understand, with nested inline rolls, there were some changes that needed to be made (if I remember right) to inline roll macros.
1430285531

Edited 1430285668
OOPS, meant Aaron yes. tried !power --name|Test [[1d20]], i get : API: , as for my macros i've tested everything i can , if i just use tags it works, if i add a inline roll i get : API: . I have tested this on two different campaigns on the dev server. One ran by me and another by a friend and the same problem exist. Everything on production servers works fine.