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

[Script] autoButtons - automatically generate damage & healing buttons for your clicking pleasure

1672710692
timmaugh
Pro
API Scripter
What happens if you copy it from it's Mod Script tab in the working game? Click into the script there, CTRL+A, go the the new game, get to a new tab for a new mod script, name it, click into the code window, and CTRL+V. If that doesn't work, what error do you see, and when do you see it... When you paste or when you try to save?
Ah turns out it was a new security 'feature' of my antivirus, disabled it and it fixed it.
is there a way to add a visual indicator for over kill so you can tell the difference between 0hp and below 0?  
1673567420

Edited 1673567769
Master Azroth said: is there a way to add a visual indicator for over kill so you can tell the difference between 0hp and below 0?   Not one built in, but this Script can do what you want - Bloody and Death Script . Just change the '<= 0' to '< 0' so it does put the X on when at 0 HP.
PsychePath said: Master Azroth said: is there a way to add a visual indicator for over kill so you can tell the difference between 0hp and below 0?   Not one built in, but this Script can do what you want - Bloody and Death Script . Just change the '<= 0' to '< 0' so it does put the X on when at 0 HP. It already does the X at 0 I need it to do that and then do something else once it falls below 0
1674604551

Edited 1674604775
Great script, thank you for sharing. So, I like the report function as it lets players know what's going on when I apply damage to their tokens. However it currently doesn't show the damage dealt, just the before and after. Currently it reports this to chat:   (Character) 27HP -> 15HP I would like it to report something like this:   (Character) 27HP -> 15HP (8 damage) I tried to change this with my limited coding knowledge and tracked it to this part of the script, but can't quite figure out how to make the actual change.     _getReportTemplate(barNumber) {       const template = `'*({name}) {bar${barNumber}_value;before}HP -> {bar${barNumber}_value}HP*'`;       return template; If a script expert can help that would be great, or point me to the right direction?
1674775300
Oosh
Sheet Author
API Scripter
Ah yep, that's mixing a normal JS template literal with the syntax needed in Aaron's TokenMod reporting, it's a pretty odd looking line, in fact I thought it was a mistake on first glance. I think you'd want something like this: _getReportTemplate(barNumber) { const template = `'*({name}) {bar${barNumber}_value;before}HP -> {bar${barNumber}_value}HP {bar${barNumber}_value;abschange} damage)*'`; return template; This always outputs a positive number and the word "damage" though, so 10 healing will still output "10 damage". You could just use 'change' and 'HP' instead if you don't want healing to cause any confusion. That should output "(-7 HP)  for damage and (7 HP) for healing. _getReportTemplate(barNumber) { const template = `'*({name}) {bar${barNumber}_value;before}HP -> {bar${barNumber}_value}HP {bar${barNumber}_value;change} HP)*'`; return template; Let me know if neither of those is working for you.
1674854294

Edited 1674862732
Thanks for the script! Been using it for a while and works like a dream. Lately though, I've been trying to find a way to apply damage to multiple bars on one token with a single button?, or alternatively a way to create one button that applies to Bar1, and another button that applies to Bar2, and have them both be usable from the chat button UI?.
1674864879

Edited 1674866198
Oosh
Sheet Author
API Scripter
Hmmmm, no the script can't really do that per button. Is this a game system where you regularly need to affect two bars to resolve attacks? Because you could get that working by running a second instance of the script. You would need to change a couple of things on the second copy of the script to stop it colliding with the original instance of the script. Line 3 - change the constant name to autoButtons2 (or anything else really, that isn't the name of any other script). This will stop the script name collision const autoButtons2 = (() => { Line 5 - change the scriptName string to match whatever is in line 3 (autoButtons2 again is fine). This should cover all other clashes with the original script, like state storage, so autoButtons2 is now its own thing as far as the sandbox is concerned. const scriptName = `autoButtons2`, A couple of other things that might be handy: Line 340 - change the background color of the button bar. This will make it much easier to tell them apart. background: #b4e6f6; Line 251 - The two instance of the text ${name} on this line are where the button bar label is slapped on. You could also add some text in there to distinguish the bars Bar 2 - ${name}</div> Then run !autobutton --settings , both scripts will cough up their settings menus but they should have different names at the top as long as you did the line 5 change. Set the second script to target bar 2 and get all the buttons set up however you need them, and you should now have a Bar 1 buttons and Bar 2 buttons triggering each time. There's some more customisation you could do if needed, but I'd imagine the different colors should do the job. edit - Ahhh wait, it's going to be a bit more involved than that. You'll also need to change line 285 to something like this: if (msg.type === 'api' && msgIsGM && /^!autobuttons2\b/i.test(msg.content)) { Otherwise both scripts will react every time you change a setting. Some of the items in the settings menu are hard coded to point to the original script name. The two options here are: 1. Use the command line to change options instead of the settings menu e.g. !autobuttons2 --bar 2 2. Search the script for the text !autobut and replace it with !autobuttons2 , there are 10 occurrences. This will give you a functional autoButtons2 settings menu with buttons pointing to the right script.
1675025307

Edited 1675038758
EDIT:  Never mind.  I knew I'd seen it, but somehow overlooked it.   It's here for anyone who needs it. EDIT:   Derp.   I've looked through this thread and didn't see my issue reported, but it's possible I missed it.  If so, I apologize for rehashing something that may have been resolved. What I'm struggling with currently is AutoButtons doesn't seem to trigger Concentration to call for a saving throw when damage is applied.   AutoButtons  applies damage as expected, but I don't get a prompt from  Concentration  to roll a constitution save for the token that just took damage.  If I apply the damage to the token manually, then  Concentration  asks me for a saving throw.
Hi, This si probably me missing something obvious, but I have set the buttons to be visible to the players and allow them to target the creatures so they can heal/damage themselves but when they press the button and target an enemy their health isnt reduced / healed. any idea why this might be happening?
1675072527
Oosh
Sheet Author
API Scripter
At a guess, you'll need to enable 'players can use ids' in TokenMod. I think you can do it both on the script's tab in on the API scripts page, and also in-game with (I think). !token-mod --config players-can-ids|on autoButtons is just passing the target token's ID string straight to token-mod, which by default doesn't let players use the --id command.
I'll give it a go, thankyou Oosh
The script has just stopped working for me altogether. When I use 1-click install, I get the error message: Failed to load autoButtons No such file or directory @ rb_sysopen - /code/apiscripts/autoButtons/0.7.0/autoButtons.js When I use a copy-pasted version, it just... does nothing and doesn't respond to any chat commands.
1675860885

Edited 1675863862
Oosh
Sheet Author
API Scripter
Yeah sorry, it's currently broken - the one-click has a version mismatch, which is my fault. All other versions are currently not working due to a breaking change in the sandbox - I'm trying to figure out exactly what it is, but Roll20 have changed something and prototype Objects are no longer behaving how they should. I'll try to find a fix for it. Update - Updated the version on the front page to 0.8.1 - this will at least let the script start up. - Custom buttons do not work - Roll20 have made changes to the sandbox (Node's Function constructor no longer works), and I don't have time to write a math parser, so they're probably cooked for good. Sorry.
1675870113
Critical Tavern
Pro
Marketplace Creator
Translator
Oof. Just had the same problem and came here t find out why. I'm sorry to hear about the trouble. Good luck!
Oosh said: Yeah sorry, it's currently broken - the one-click has a version mismatch, which is my fault. All other versions are currently not working due to a breaking change in the sandbox - I'm trying to figure out exactly what it is, but Roll20 have changed something and prototype Objects are no longer behaving how they should. I'll try to find a fix for it. Hi Oosh -- sorry about this!  We have had to make a change to the sandbox and remove all Object.constructor before script execution, in order to mitigate a security vulnerability.  We aren't going to be able to revert this change, but we might be able to provide some alternatives (potentially some access to Standard Lib type stuff, for example); if there's something in that vein that would help, please let me know.
1675893854
Oosh
Sheet Author
API Scripter
Jeff L. said: Hi Oosh -- sorry about this!  We have had to make a change to the sandbox and remove all Object.constructor before script execution, in order to mitigate a security vulnerability.  We aren't going to be able to revert this change, but we might be able to provide some alternatives (potentially some access to Standard Lib type stuff, for example); if there's something in that vein that would help, please let me know. No worries Jeff, the use of constructor was easy enough to work around - it was finding the problem which took time. The silent failing of the Function constructor is more of an issue - presumably related to the same security patching. I doubt there's much to be done on that front, the only alternatives I'm aware of a far scarier than the constructor (e.g. eval).
1675939838

Edited 1675939863
It sounds like the code for this needed to be updated due to a Roll20 change? Can someone post a link to the updated code, I used this script  while running my previous campaign and while doing some tests for my new campaign starting up Saturday I realized the script wasn't working anymore.
1675942068

Edited 1675942134
Antonio F. said: It sounds like the code for this needed to be updated due to a Roll20 change? Can someone post a link to the updated code, I used this script  while running my previous campaign and while doing some tests for my new campaign starting up Saturday I realized the script wasn't working anymore. Here you Go Great work on the Quick Fix Oosh n_n the normal Buttons are plenty.
Hi Oosh I install the new fix and still does not work. any suggestions. 
Nevermind Oosh, found the solution is working now
Ooof...  this one really hurt my game.  I understand that it will not be fixed so we can use custom buttons?
Sean R. said: Ooof...  this one really hurt my game.  I understand that it will not be fixed so we can use custom buttons? Me too!!!!
Even using the version released 3 days ago, I can't get it to work.
1676146888
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Frederico M. said: Even using the version released 3 days ago, I can't get it to work. Make sure you are using this version . The repo was not updated immediately. Line 9 should show the version number to be 0.8.1
I have the script working and it's very handy, but I'm curious if there is a way to add a button or some sort of macro that will handle 3x, 4x, and 5x Critical damage Multipliers? I understand there is no allowance for such in 5E RAW but I use a homebrew system that stacks multipliers and could really use such a feature.
I am hoping that we will eventually figure a way to get custom buttons back for this API.  For the 3.5 and Pathfinder 1e games, the autobutton feature was essential to quicker gameplay at higher levels.  The extra attacks that I'm back to hand entering hurts...  
1677016746
Oosh
Sheet Author
API Scripter
Hi Sean - yeah sorry about that, I know you put a lot of effort into getting those buttons sorted. The local Metamancer has had an idea of a path forward - when I get a minute (probably the weekend) I'll investigate that. No promises at this stage, though :) If it does work, I'll implement it in a way that you won't need to change any of your buttons.
Oosh, That would be great.  If I can do anything, please let me know.  I know that things change, but I'm hopeful!
1677587423
Oosh
Sheet Author
API Scripter
Sean R. said: Oosh, That would be great.  If I can do anything, please let me know.  I know that things change, but I'm hopeful! I should hopefully have something testable in the next day or so - I've at least got a basic custom button working again, just need to make sure everything still works. You can definitely help in that regard, I think you're the world record holder for number of custom buttons! If you have time to test it out once I've got a stable version up, that would be a massive help.
Oosh, I would be (very) happy to help test it for any 3.x systems.
1677898383

Edited 1677899816
Oosh
Sheet Author
API Scripter
Fantastic - that would save me a load of time. You can find the raw test version here - it's on a different branch to the main version, so either use that link to grab it, or if you go through the main github page for any reason, you'll need to change the branch from "main" to "lib-math-integration", or you'll get the wrong version. This is now dependent on MathOps - install the latest version from the one-click, or grab the latest from the repo if you'd prefer manual. Note that it must be the latest version - Tim only just added the public interface to it to help me out. The test script is versioned 0.8.9 - it should back up all of your custom button math before attempting to load them with the new math parser (thanks Tim!). There should be chat messages for any buttons which fail validation. If you can post back with results, we might need to do some tweaking for any failures. Failed buttons will wipe the mathString (otherwise they can't be loaded into state, which means they can't be edited or fixed), but should print out the original math when the validator fails. We've also got the original strings backed up - they're not accessible for now, but we can use a state editor script to recover the strings if we get a load of failures. I've got one called modState - you can do a manual install and use !modstate --path autoButtons/store/customButtons to view all the state entries for the buttons. It should hopefully show all the mathBackup entries if you need them. Timmaugh has a more accomplished state editor, but I'm feeling too lazy to look up the script or instructions right now :) If they're only minor issues in a couple of buttons, it's probably easiest to go ahead and manually fix them. If there's more than a few errors though, I'll need to look at writing some more transforms before the math gets sent to the math library.
Oosh, Thanks for the help.  I've loaded the new script and ended up with a very large report.  I'm going to copy some of it which seems repeated for each of the custom buttons I created. Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:8.0pt; mso-para-margin-left:0in; line-height:107%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri",sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} autoButtons: invalid button Att5Dam1Crit Expected a number, a variable, or parentheses 5:59PM(From autoButtons): autoButtons: recovered button Button math was cleared, the problem math string was -(crit.roll4dmg1crit). 5:59PM(From autoButtons): autoButtons: invalid button Atk5Dam2 Expected a number, a variable, or parentheses 5:59PM(From autoButtons): autoButtons: recovered button Button math was cleared, the problem math string was -(damage.roll4dmg2). 5:59PM(From autoButtons): autoButtons: invalid button Att5Dam2Crit Expected a number, a variable, or parentheses 5:59PM(From autoButtons): autoButtons: recovered button Button math was cleared, the problem math string was -(crit.roll4dmg2crit). 5:59PM(From autoButtons): autoButtons: invalid button Atk6Dam1 Expected a number, a variable, or parentheses 5:59PM(From autoButtons): autoButtons: recovered button Button math was cleared, the problem math string was -(damage.roll5dmg1).
1678146061

Edited 1678146090
Here is the mod state report for the same buttons.  All repeat the same pattern.  Atk5Dam1/name Atk5Dam1 Atk5Dam1/tooltip Atk 5 - Dam 1 (%) Atk5Dam1/style font-family: sans-serif; color: black Atk5Dam1/content 5-1 Atk5Dam1/mathString 0 Atk5Dam1/query Atk5Dam1/default false Atk5Dam1/mathBackup -(damage.roll4dmg1) Atk5Dam1/style2 Atk5Dam1/style3 Atk5Dam1/content2 Atk5Dam1/content3 Att5Dam1Crit/name Att5Dam1Crit Att5Dam1Crit/tooltip CritDam (%) Att5Dam1Crit/style font-family: pictos custom; color: red; Att5Dam1Crit/content t Att5Dam1Crit/mathString 0 Att5Dam1Crit/query Att5Dam1Crit/default false Att5Dam1Crit/mathBackup -(crit.roll4dmg1crit) Att5Dam1Crit/style2 Att5Dam1Crit/style3 Att5Dam1Crit/content2 Att5Dam1Crit/content3
1678154467

Edited 1678154560
Oosh
Sheet Author
API Scripter
Thanks Sean, I'll have a go with those formulae and see what I can figure out. I'll add a command to attempt to restore buttons from their backup math string, so don't stress about trying to recover the buttons too much - once the problems are gone I'll make sure they can all be restored easily from the backup. One quick thought (can't test anything right now), MathOps may not like a leading minus, if you try creating a test button with (-crit.roll4dmg1crit) does it still fail validation? Or 0 - crit.roll4dmg1crit ? If that doesn't work I've messed something up with the key name transformer for the crit.roll4dmg1crit part - it was working for 5e template names but I might have missed something for non-5e names maybe.
1678183797

Edited 1678183941
Oosh, Well, I've managed to delete the first button in an attempt to create a new one.  So I'm missing the Atk1Dam1 button now.   I can't seem to create a new button at all to test.  Is there a way to edit an existing button to try to fix the math?  Finally, I can't remember, but wasn't the minus sign indicating that we only wanted a button to show in the results if something was necessarily calling it?  Here is what I would use to create the button I'm missing now.   !autobut --createButton {{name=Atk1Dam1}} {{math=-(damage.dmg1 + damage.rolldmg1)}} {{content=1-1}} {{style=font-family: sans-serif; color: black}} {{tooltip=Atk 1 - Dam 1 (%)}} The crit button for this would be: !autobut --createButton {{name=Att1Dam1Crit}} {{math=-(crit.dmg1crit + crit.rolldmg1crit)}} {{content=t}} {{style=font-family: pictos custom; color: red;}} {{tooltip=CritDam (%)}} What can I do to edit the math on an existing button to test the above?  Can I use the --editButton?
1678279750

Edited 1678279836
Oosh
Sheet Author
API Scripter
Ok, I squashed a few bugs and then tried some of your button math from above - it all seems to work as far as creating the buttons go. At least, it creates them properly now - I don't have a PF game to test the actual numbers in. I've also added a repair function, which should hopefully get most of the buttons working again with minimal fuss. It will only work on buttons which currently have no math in them. If you need to clear the math out of a button you can use a single space, so: !autobut --editButton {{name=myButton}} {{math= }} then the repair function will try to restore any blank (or only whitespace) buttons it can find: !autobut --repair Any of the buttons previously cleared by the script should already be blank, so the repair function should catch all of those. Let me know how you go, hopefully that should do the trick for most of them. The new version is in the same place as the previous one.
Oosh, So I was able to Create a button, edit a button, and repair a button.  But I can't seem to get one to show up when damage is rolled.  Even with different or simple math.  So I'm not sure what is happening.  What I could show is some buttons that I set up for for DR previously.   They look like this. DR5/name DR5 DR5/tooltip DR5 (5) DR5/style font-family: sans-serif; color: green; font-weight: bold DR5/content 5 DR5/mathString (5) DR5/default false DR5/query DR5/mathBackup (5) DR5/style2 DR5/style3 DR5/content2 DR5/content3 DR10/name DR10 DR10/tooltip DR10 (10) DR10/style font-family: sans-serif; color: green; font-weight: bold DR10/content 10 DR10/mathString (10) DR10/default false DR10/query DR10/mathBackup (10) DR10/style2 DR10/style3 DR10/content2 DR10/content3 This is just two of the four that I had set up previously.   Any thoughts on what I can do next?
1678291985

Edited 1678292248
Oosh, Here is the button I made to replace the one I deleted.  I notice that nothing is appearing in the mathString section. Atk1Dam1/name Atk1Dam1 Atk1Dam1/tooltip Atk 1 - Dam 1 (%) Atk1Dam1/style font-family: sans-serif; color: black Atk1Dam1/style2 Atk1Dam1/style3 Atk1Dam1/content 1-1 Atk1Dam1/content2 Atk1Dam1/content3 Atk1Dam1/mathString Atk1Dam1/query Atk1Dam1/default false Atk1Dam1/mathBackup -(damage.dmg1 + damage.rolldmg1) Compared to what I already have for Atk2Dam1 Atk2Dam1/name Atk2Dam1 Atk2Dam1/tooltip Atk 2 - Dam 1 (%) Atk2Dam1/style font-family: sans-serif; color: black Atk2Dam1/content 2-1 Atk2Dam1/mathString 0 Atk2Dam1/default false Atk2Dam1/query Atk2Dam1/mathBackup -(damage.roll1dmg1) Atk2Dam1/style2 Atk2Dam1/style3 Atk2Dam1/content2 Atk2Dam1/content3
1678355497

Edited 1678355744
Oosh
Sheet Author
API Scripter
Huh... I'm not too sure about that last one. I've just made a new button with "-(damage.roll1dmg1)" as the math: !autobut --createButton {{name=test1}} {{math=-(damage.roll1dmg1)}} And it seems to create fine. I also made a DR button like above with simple math like (5), and it seemed to show up fine as well. I did find a couple of errors with the repair function - I'd forgotten to save the buttons to state after repairing them, so the repair wasn't showing up in modState (or saving between sandbox restarts). I've fixed that, and also fixed an issue where it wasn't repairing buttons with a "0" in the mathString. So hopefully with the updated version (it should be 0.8.9b just to make sure it's the right one), running --repair should do a better job and fix more buttons. You can try toggling off the Auto-Hide Buttons option in --settings - see if the buttons show up and function properly. If they're being hidden even when computed a non-zero number that's another issue I'll need to fix. Sorry for the extra legwork here - I haven't had much free time to look at this, it's mostly been late at night when I'm half asleep. Must be getting close to a working script though.... :) The top button here has the mathString sticking ok for the above math, and the button with (5) as the mathString seems to be popping up ok after a damage roll: It's possible that something I just fixed made it work - if you're still not having buttons showing up, we might have another issue. In that case, if you could do a full !modstate --path /autoButtons and throw it up on pastebin, or a PM or something, I'll see if I can figure out what's going on.
1678371694

Edited 1678376328
Oosh, Okay!  Some success!   I have some of the buttons working now.  The ones that I edited will not work, but some of the old ones will after toggling them through --hide and --show and then running the --repair. I still need to get the first damage buttons to work (after I tried recreating them) but I think just recreating them might help.  I will let you know.
1678376244

Edited 1678376454
Oosh, Okay, I have some that are just not showing and I am wondering why.  I've only try to edit the Atk1Dam1 button, deleted it twice, and created it twice but others aren't showing while most of the others are.  So I did some reordering to get them in the correct positions. So it says it will order the missing buttons. That looks like this with proper ordering. Here is the attack by the NPC that should trigger all the attacks, damage, and crits everytime. And here is the current button output. What's interesting is that I can reorder the ones that are missing, but they won't show in the output.  Again, I only ever edited the Atk1Dam1 which content should look like "1-1" I'm missing 1-1, its crit, 1-2 and its crit, 2-1 and its crit, and 3-2 damage.  3-2 crit is showing. 
v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} Normal 0 false false false false EN-US X-NONE X-NONE osh, Sorry for all the info, I just want to be thorough to try to help get it fixed.  At least some are now working which is great! I ran a state check comparing the current Atk1Dam1 and its crit to the Atk9Dam1 and its crit (which works) to show you what is listed. I noticed that Atk1Dam1 has some addition in the math (and I can't remember why that was necessary).   Maybe that is messing with MathOps?  One says -(damage.dmg1 + damage.rolldmg1) and -(crit.dmg1crit + crit.rolldmg1crit) compared to -(damage.roll8dmg1) and its crit -(crit.roll8dmg1crit)
1678377538

Edited 1678377608
Oosh, Finally, For whatever reason, the only ones that have this additive code are: !autobut --createButton {{name=Atk1Dam1}} {{math=-(damage.dmg1 + damage.rolldmg1)}}{{content=1-1}} {{style=font-family: sans-serif; color: black}} {{tooltip=Atk 1 - Dam 1 (%)}} !autobut --createButton {{name=Atk1Dam2}} {{math=-(damage.dmg2 + damage.rolldmg2)}} {{content=1-2}} {{style=font-family: sans-serif; color: black}} {{tooltip=Atk 1 - Dam 2 (%)}} !autobut --createButton {{name=Att1Dam1Crit}} {{math=-(crit.dmg1crit + crit.rolldmg1crit)}} {{content=t}} {{style=font-family: pictos custom; color: red;}} {{tooltip=CritDam (%)}} !autobut --createButton {{name=Att1Dam2Crit}} {{math=-(crit.dmg2crit + crit.rolldmg2crit)}} {{content=t}} {{style=font-family: pictos custom; colord;}} {{tooltip=CritDam (%)}} But then these that don't have that addition in the code don't work either.  !autobut --createButton {{name=Atk2Dam1}} {{math=-(damage.roll1dmg1)}} {{content=2-1}}{{style=font-family: sans-serif; color: black}} {{tooltip=Atk 2 - Dam 1 (%)}} !autobut --createButton {{name=Att2Dam1Crit}} {{math=-(crit.roll1dmg1crit)}}{{content=t}} {{style=font-family: pictos custom; color: red;}}{{tooltip=CritDam (%)}} Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:8.0pt; mso-para-margin-left:0in; line-height:107%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri",sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} !autobut --createButton {{name=Atk3Dam1}} {{math=-(damage.roll2dmg1)}} {{content=3-1}}{{style=font-family: sans-serif; color: black}} {{tooltip=Atk 3 - Dam 1 (%)}}
1678673389

Edited 1678683875
Oosh
Sheet Author
API Scripter
OK, I think I've got the missing button issue sorted. I've updated the test version to 0.8.9d . Again, don't grab the 'main' branch version as I haven't updated it - just follow that link. You gave me enough info there to see a probable cause, it was math with multiple damage properties where one of them resolves to 0. This wasn't obvious with the 5e buttons I tested since the 5e sheet does a bunch of hidden crit rolls, which autoButtons can see and prevents the bug from manifesting. Tim's going to update MathOps to remove the need for the fix I've thrown in, but do go ahead and test it if you get a minute - I'm hoping this should resolve the last few buttons which aren't working, and I won't need to jump into your game and tinker with anything. If you still have buttons not showing up, go to !autobuttons --settings and turn off the "AutoHide Buttons" option. This will force the buttons to show up even when they resolve to zero - just a quick sanity check to make sure the buttons are only hiding because of their zero value. This won't fix the issue (if they're coming up zero when they shouldn't) but at least it will ensure that we're still facing a math processing problem, rather than anything further up the line. Thanks again for testing this - testing in a real world game using a non-5e system is much more valuable to me. Especially a 3.5-like with 4.5 billion damage properties on a roll Edit - have updated from version 'c' to version 'd' with the latest changes. After jumping into your game and doing some testing, I think I've found the final bug.
Oosh, Okay, all is working now.  Thank you and Tim for the fix.  I appreciate it and I know that anyone that uses a 3.x system would/should as well.