Hmm, thanks for reporting that error! I made a silly mistake there that I didn't see in time, sorry! It's fixed in the Github version now, and I've put up a pull request for one-click (but that will take a while).
Nibrodooh said:
Thanks for the fix, it's working perfectly. Also, that was an amazingly fast fix, i commend you haha.
See 4 posts back, --charid is broken in the current one-click version, I'm very sorry about it :(. You can do one of three things, eitherRavenknight said:
Hiya, I stole the macro below from someone better attuned to the making of macros for OGL 5ed and it's been working flawlessly until last week or so. Now it just breaks the API sandbox whenever used. Any idea on what I'm doing wrong?
!setattr {{
--charid @{selected|character_id}
--mod
--lvl?{Spell Slot Used|1|2|3|4|5|6|7|8|9}_slots_expended|1
}}
Vince said:
Jakob, can CSA adjust character journal permissions? If not, do you know of a script that can, preferably game wide if possible. Thanks
This would be before a token has been linked... We allow people to import their sheets to the PF beta game for testing and it would be very convenient to just run a script and assign "All players" to "All the Players" that have imported their sheets. ;-) M=Normally we look to see if a users name is in the player's name field/attribute and I'll assign specific permission to that player, if not assigning All players works just as well.The Aaron said:
TokenMod, when a token represents a character, will adjust the controlledby of the character.
If it's not too hard... Not sure if anyone else would find it useful, but I would be much appreciated if such a script was written. ;-)Vince said:
Jakob, can CSA adjust character journal permissions? If not, do you know of a script that can, preferably game wide if possible. Thanks
No, and no. Maybe there's something by The Aaron? That being said, it's not complicated easy to write.a one-off that can add or remove a specified player to/from permissions for all characters.
I think that would work fine Aaron. Is it possible to place such a script in the api so that it automatically assigns all permission without GM interaction?The Aaron said:
They do. I use this for spell template characters I pull into a game.
I could write you a script that that makes all characters always have all permissio
ReferenceError: sendChatMessage is not defined(Indeed, I cannot find where sendChatMessage() is defined... 1.2 on GitHub works fine.)
ReferenceError: sendChatMessage is not defined
at _.each._.each._.chain.map.sendFeedback (apiscript.js:585:4)
at dWork (apiscript.js:362:29)
at _.each._.each.delayedSetAttributes (apiscript.js:365:4)
at _.each._.each._.chain.map._.chain.filter.charIDList (apiscript.js:682:7)
at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:146:34), <anonymous>:65:16)
at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:146:34), <anonymous>:70:8)
at /home/node/d20-api-server/api.js:1494:12
at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560
at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147)
at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546)
Silvyre said:
You're welllcome!
SkyCaptainXIII said:
Try putting the !setattr command first. Perhaps it will pull the selected information before you hit any target information.
Jakob said:
SkyCaptainXIII said:
Try putting the !setattr command first. Perhaps it will pull the selected information before you hit any target information.
I think the whole message is only sent after the target has been clicked, at which point it is too late.
Jakob said:
Yes, because roll20 puts the selected information in first. This it why it works with --charid (in any order). But if you looked at that message as an API event, the msg.selected property would be empty.
SkyCaptainXIII said:
Jakob said:
Yes, because roll20 puts the selected information in first. This it why it works with --charid (in any order). But if you looked at that message as an API event, the msg.selected property would be empty.
Ah, that's why. I don't use msg.selected I think for just that reason.
Jakob said:
Indeed, that's the one disadvantage of --sel vs --charid @{selected|character_id} (short explanation: roll20 clears your selection if a message contains a target statement).
You'll have to try fixes b,c, or maybe use --name @{selected|character_name} ?
Ravenknight said:
Jakob said:
Indeed, that's the one disadvantage of --sel vs --charid @{selected|character_id} (short explanation: roll20 clears your selection if a message contains a target statement).
You'll have to try fixes b,c, or maybe use --name @{selected|character_name} ?
No luck for me, I'm afraid. I'm already using version 1.21 so it looks like I'm stuck with 1.14.
!setattr --auto_revert_advantage|1 --automatically_expend_spell_resources|1 --allgm
<select class="sheet-no-shrink" name="attr_show_character_name" dir="rtl"></select>
<select name="attr_output_option"> <option value="" data-i18n="PUBLIC_FOR_ALL" selected="selected">Public for all to see</option> <option value="/w GM" data-i18n="WHISPERED_TO_GM">Whispered to the GM</option> <option value="?{Output|Public,|Whisper,/w GM }" data-i18n="CHOOSE_WHEN_ROLLING">Choose when rolling</option> </select>You can take the values from within the <option> elements.
!setattr --auto_revert_advantage|1 --automatically_expend_spell_resources|1 --show_character_name|{{show_character_name=1}} --allgm
Erl K. said:
Hello,
Can someone explain to me why this command:
!setattr --sel --replace --DmgMult|(1+0.1*`{TarukajaMod})*(1-(0.1*(floor(`{target\|Vi}/10)))-(0.1*`{target\|RakukajaMod}))
Only registers the first backlash in the line, and treats the other one normally? What I end up getting in the attribute is
(1+0.1*`{TarukajaMod})*(1-(0.1*(floor(`{target\|Vi}/10)))-(0.1*`{target\
And then in the max value I get RakukajaMod}))
Jerry F. said:
Does this work on the Shaped sheet for Traits? Also can I use it to expend spell slots/points? I've been trying everything to set the trait attributes with this and it says it's setting it to 0 but it's not doing anything. Maybe I'm doing something wrong but I can get it to work with equipment no problem.
Jakob said:
Jerry F. said:
Does this work on the Shaped sheet for Traits? Also can I use it to expend spell slots/points? I've been trying everything to set the trait attributes with this and it says it's setting it to 0 but it's not doing anything. Maybe I'm doing something wrong but I can get it to work with equipment no problem.
Yes. What are you trying to do respectively entering (and isn't that covered by the companion script, except for spell points?) ?
Thanks! I can implement those, both are easy to do. Though --silente is terrible from a linguistic perspective - I'll have to think about an alternative name that feels better for me.Silvyre said:
I love this script!
A few requests, if possible:
- !modbattr as shorthand for !setattr --modb
- --silente to suppress both output and error messages
Thanks for all your hard work!
Would anybody happen to know the command to set a drop down menu in shaped sheet? I have figured out that the check boxes are a simple 0 or 1, but cannot figure out how to set critical_damage which gives a list of 3 options when selected. I tried entering 2 (I want critical damage maximized) but that didn't work. Also tried the text of the option with and without quotes without it working
--critical_damage_houserule|CRITICAL_DAMAGE_IS_MAXIMIZEDDoes that make sense?
You already have --silent.... quest that means you need to work off the suppress aspect. How about -squash :)Jakob said:
Thanks! I can implement those, both are easy to do. Though --silente is terrible from a linguistic perspective - I'll have to think about an alternative name that feels better for me.Silvyre said:
I love this script!
A few requests, if possible:
- !modbattr as shorthand for !setattr --modb
- --silente to suppress both output and error messages
Thanks for all your hard work!
keithcurtis said:
--mute