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] Trouble with MarvelSH Table script

So I found the table script for Marvel Super Heroes. It rolls a d100 and compares to a chart based on the column data provided. Anyway all that works fine, but the script contains a modifier to allow the entry of a character id. But even when the modifier is entered, a result of "undefined" is still returned. I think the portion of the script is the source of this problem is: I'm script dumb, but can sometimes trace down bugs like missing closers and such. This doesn't seem to be the issue here. I think there may be something wrong with "if (character !== undefined) {". Should the operator be !== or something else? Thanks in advance for anything else.
1455992460
The Aaron
Pro
API Scripter
That looks fine.  !== means "exactly equal to", as opposed to != which means "can be equal to with conversion".  For example 0 !== '0' is true ,but 0 != '0' is true. Can you post the command you are running and a link to the original script?
No Problem Aaron. link:&nbsp; <a href="https://github.com/madartiste/roll20-api-scripts/b" rel="nofollow">https://github.com/madartiste/roll20-api-scripts/b</a>... The command that is not working is as follows. !ut [rank] [CS] [Attack] --roll:"text" --id:"character id" When anything is entered for either roll or character id, the result of undefined is returned for the character name. If no roll or id modifier is used, the player name is returned in the template.
it seems to work in a character sheet when @{character id} is used.
1455998581
The Aaron
Pro
API Scripter
I don't think you want to have the quotes: !ut Remarkable DO -2 --id:@{Bob|character_id} or in a character: !ut Remarkable DO -2 --id:@{character_id}
1455998897

Edited 1455998953
Phillip G.
Sheet Author
Right, I was just using the quotes to indicate the entered text. If I understand it correctly, the --id modifier must have an actual character id. As opposed to just free form text. I have a couple of macros set up now, that grab the character id so basically the problem is mostly solved. The final macro looks like this: !ut ?{Choose an Ability| Fighting,@{Selected|VFighting}| Agility,@{Selected|VAgility}| Strength,@{Selected|VStrength}| Endurance,@{Selected|VEndurance}| Reason,@{Selected|VReason}| Intuition,@{Selected|VIntuition}| Psyche,@{Selected|VPsyche}} ?{Column Shift|0} ?{Choose an Attack Type| None, | Blunt, BA| Edged, EA| Shooting, SH| Throwing Edged, TE| Throwing Blunt, TB| Energy, EN| Force, FO| Grappling, GP| Grabbing, GB| Escaping, ES| Charging, CH| Dodging, DO| Evading, EV| Blocking, BL| Catching, CA| Stun, Stun| Slam, Slam| Kill, Kill} --roll:?{Reason for roll| | Fighting Feat| Agility Feat| Strength Feat| Endurance Feat| Reason Feat| Intuition Feat| Psyche Feat} --id:@{Selected|character_id} With the selected feature, it allows for a great amount of freedom. Thanks for taking a look at it for me. Any idea if this could be incorporated into a sheet roller or is that not possible because it is an API Script?
1456000285

Edited 1456000352
Hi Phillip G., I'm afraid I got quite distracted from working on the script, but I DO have a character sheet that was designed to work with it. &nbsp;I just never got around to testing it extensively enough to feel confident adding a pull request. Here's the latest version of the script, though (including a help.txt for suggestions):&nbsp; <a href="https://github.com/madartiste/roll20-api-scripts/t" rel="nofollow">https://github.com/madartiste/roll20-api-scripts/t</a>... And here is the character sheet:&nbsp; <a href="https://github.com/madartiste/roll20-character-she" rel="nofollow">https://github.com/madartiste/roll20-character-she</a>... I haven't had the chance to investigate whether it can be added into the sheet rollers since they didn't exist at the time I was working on it. &nbsp;I'll have to look it over again, but if&nbsp;you want to test what I have in the meantime and let me know of any problems you'd find, that would be great!
Yeah, I can take a look at them. The script is really great by the way. I have done some modification to meet specific needs of the GM that i am gaming with. But truly a great script.
Oh, thank you! &nbsp;It was really fun to work on and helped me learn quite a bit. &nbsp;It's nice to know there are people out there enjoying this great game!
Here's another macro I figured using the script: !ut ?{Choose a Rank| Shift 0,0| Feeble,fe| Poor,pr| Typical,ty| Good,gd| Excellent,ex| Remarkable,rm| Fantastic,fa| Incredible,in| Spectacular,sp| Amazing,am| Sensational,sa| Monstrous,mn| Awesome,aw| Unearthly,un| Shift X,x| Shift Y,y| Shift Z,z| Class 1000,1000| Class 3000,3000| Class 5000,5000| Beyond,b} ?{Column Shift|0} ?{Choose an Attack Type| None, | Blunt, BA| Edged, EA| Shooting, SH| Throwing Edged, TE| Throwing Blunt, TB| Energy, EN| Force, FO| Grappling, GP| Grabbing, GB| Escaping, ES| Charging, CH| Dodging, DO| Evading, EV| Blocking, BL| Catching, CA| Stun, Stun| Slam, Slam| Kill, Kill} --roll:?{State your Power} --id:@{Selected|character_id}
Oh, that's a really good one! &nbsp;I can see that being useful for pretty much any situation.