A trap is 'active' as soon as it is on the GM layer and has the cobweb status icon. The Activate Trap command does just that and is used for manually 'triggering' a trap.
Salicar said:
thanks got that to work lol. anyway to set them to spot on Perception checks instead for passive perception?
Nate said:
A couple questions:
Any chance that if the trap is not in line of sight via dynamic lighting, can it not be perceived?
Also, is there a way to change the header and italicized part of the spot message from 'IT'S A TRAP!!!" to something else?
Stephen L. said:
Nate said:
A couple questions:
Any chance that if the trap is not in line of sight via dynamic lighting, can it not be perceived?
Also, is there a way to change the header and italicized part of the spot message from 'IT'S A TRAP!!!" to something else?
1) Traps cannot be perceived if line of sight is blocked by dynamic lighting.
2) No. Is there a use case for wanting it to be something else?
Salicar said:
Stephen L. said:
Nate said:
A couple questions:
Any chance that if the trap is not in line of sight via dynamic lighting, can it not be perceived?
Also, is there a way to change the header and italicized part of the spot message from 'IT'S A TRAP!!!" to something else?
1) Traps cannot be perceived if line of sight is blocked by dynamic lighting.
2) No. Is there a use case for wanting it to be something else?
I think he was thinking in the way like. You see a hidden door or you see a note etc.
So it does not say "It's a Trap" you see a hidden door. Its kinda funny but as it is a trap mod, asking it to do other things is up to the script writer.
thomas m. said:
am i just missing something obvious? I cannot for the life of me figure out how to add sound to a trap in the current version. Ive typed the name of the sound effect from jukebox into the field identically....nothing iv tried dragging it over to the field....nothing. If anyone could assist id be very thankful
Ravenknight said:
Stephen L. said:
Ravenknight said:
I must have broken something. (Again) :( It's a trap won't show any names at all now.Stephen L. said:
Ravenknight said:
Is the aura effect for all characters in range enabled in the 5ed OGL trap theme? Edit: I can make it attack three characters but the names won't show in the message.
It's enabled for all themes.
{"attack": 4, "damage": "2d8 + 6", "fx": "explode-death", "message": "A sharpened pole suspended from a rusty chain slams forward", "sound": "Swinging Scythe Trap"}
Are there any other installations beside It's a trap, Trap Theme and the HTML builder?
There's Token Collisions, Path Math, Matrix Math, and Vector Math.
Wasn't that then. They are all installed. Oh well, it works, that's the main thing. :) I can live without names.
Gary W. said:
Ravenknight said:
Stephen L. said:
Ravenknight said:
I must have broken something. (Again) :( It's a trap won't show any names at all now.Stephen L. said:
Ravenknight said:
Is the aura effect for all characters in range enabled in the 5ed OGL trap theme? Edit: I can make it attack three characters but the names won't show in the message.
It's enabled for all themes.
{"attack": 4, "damage": "2d8 + 6", "fx": "explode-death", "message": "A sharpened pole suspended from a rusty chain slams forward", "sound": "Swinging Scythe Trap"}
Are there any other installations beside It's a trap, Trap Theme and the HTML builder?
There's Token Collisions, Path Math, Matrix Math, and Vector Math.
Wasn't that then. They are all installed. Oh well, it works, that's the main thing. :) I can live without names.
I am not getting the names either. They show on the passive perception checks but not on the attack notices
Stephen L. said:
thomas m. said:
am i just missing something obvious? I cannot for the life of me figure out how to add sound to a trap in the current version. Ive typed the name of the sound effect from jukebox into the field identically....nothing iv tried dragging it over to the field....nothing. If anyone could assist id be very thankful
Appears to be working fine for me. Are you sure that you've typed in the sound's name exactly how it appears in the jukebox? Remember that these names are case-sensitive.
Sudain said:
I second the vote to be able to change the header to something other than it's a trap. I'd love to use this as a method to have loot lying around and have players stumble across it. Or to find secret doors. :)
Thank you very much for the menu, it's far easier to work with now, though I still have trouble getting the trap to work properly from time to time.
Kevin Flynn said:
Shadowrun 5e theme pls :)
Ziechael said:
Finally got around to really putting the latest awesome updates through their paces... strange thing keeps happening though, for some reason (using the 3.5e theme) it will not use a tokens armour class, simply defaults to 10 no matter what?
Pre-posting edit!: Just realised the issue, the theme looks for attributes named armorclass, spot and the required save attribute but ALL of these are autocalc'd fields that don't have attributes by default but DO have values by default. Therefore the script is creating these attributes with a value of 0 when a trap is first encountered which is giving a AC of 10 for everyone, a spot chance = to a single die roll as well as a save = to the value of a roll alone too.
Essentially the theme needs to only retrieve the values of those fields since they are there on a new sheet (defaulted to AC=10, Spot=0 and Ref/Will/Fort=0) anyway? Hope that makes sense...
Also, while i'm on it... how hard would it be to add another function to the theme, one that looks to see if the token colliding with the auras has a particular status icon on it and if it does it uses search over spot for finding traps?
Tell me about it! lol, I can get the armorclass one to resolve fine by simply removing the if part of the function (lines 40-45) but the others are beyond me ken at present but if set up to work similar to the AC then they should resolve fine due to how the sheet provides values by default... right?Stephen L. said:
Yeah, weird stuff sometimes happens with auto-calculated fields from the character sheets. This is because the way inline rolls are resolved to get character sheet attribute values in the API via sendChat is inconsistent with how inline rolls work in the chat and macros. The best I can do about this is hacky work-arounds that try to use default values if they can't be resolved.
Ziechael said:
Tell me about it! lol, I can get the armorclass one to resolve fine by simply removing the if part of the function (lines 40-45) but the others are beyond me ken at present but if set up to work similar to the AC then they should resolve fine due to how the sheet provides values by default... right?Stephen L. said:
Yeah, weird stuff sometimes happens with auto-calculated fields from the character sheets. This is because the way inline rolls are resolved to get character sheet attribute values in the API via sendChat is inconsistent with how inline rolls work in the chat and macros. The best I can do about this is hacky work-arounds that try to use default values if they can't be resolved.
For solving a similar problem in Group Initiative, look at the findInitBonus() function (or some such. Should be the only place that calls getAttrByName(). ).Ziechael said:
Fair point, it's a problem for sure... I'll play around (with my limited understanding reinforced by pestering Aaron) and see if I can find a reliable solution for the attribute issue.
[{"_id":"-KX5p0h4sh1nFW1YkSYk","_pageid":"-KVk1zsT6SPO-DJ1Fq0R","left":875,"top":105,"width":70,"height":70,"rotation":0,"layer":"gmlayer","isdrawing":false,"flipv":false,"fliph":false,"imgsrc":"https://s3.amazonaws.com/files.d20.io/marketplace/38372/Ws1zVj69qRL1pbcspAlnVA/thumb.png?1400440324555","name":"","gmnotes":"%7B%22fx%22%3A%7B%22name%22%3A%22beam-blood%22%2C%22offset%22%3A%5B0%2C0%5D%2C%22direction%22%3A%5B3%2C3%5D%7D%2C%22message%22%3A%22test%22%2C%22revealToPlayers%22%3Atrue%2C%22revealWhenSpotted%22%3Atrue%2C%22sound%22%3A%22Splat%22%2C%22stopAt%22%3A%22edge%22%2C%22attack%22%3A10%2C%22damage%22%3A%2210d6+7%22%2C%22hideSave%22%3Atrue%2C%22missHalf%22%3Atrue%2C%22save%22%3A%22ref%22%2C%22saveDC%22%3A10%2C%22spotDC%22%3A100%7D","controlledby":"","bar1_value":"","bar1_max":"","bar1_link":"","bar2_value":"","bar2_max":"","bar2_link":"","bar3_value":"","bar3_max":"","bar3_link":"","represents":"","aura1_radius":"50","aura1_color":"#FFFF99","aura1_square":false,"aura2_radius":"15","aura2_color":"#59E594","aura2_square":false,"tint_color":"transparent","statusmarkers":"cobweb,bleeding-eye","showname":false,"showplayers_name":false,"showplayers_bar1":false,"showplayers_bar2":false,"showplayers_bar3":false,"showplayers_aura1":false,"showplayers_aura2":false,"playersedit_name":true,"playersedit_bar1":true,"playersedit_bar2":true,"playersedit_bar3":true,"playersedit_aura1":true,"playersedit_aura2":true,"light_radius":"","light_dimradius":"","light_otherplayers":false,"light_hassight":false,"light_angle":"","light_losangle":"","light_multiplier":1,"sides":"","currentSide":0,"lastmove":"639,90","_type":"graphic","_subtype":"token","_cardid":""}]Side note, what is the syntax for multiple triggers from the same trap? ["-KX5p0h4sh1nFW1YkSYk,-KX61DRIr3qLyMM8q4vh"] doesn't seem to work...
[]
[]
[]
[]
Are you modifying the JSON directly? It looks like you're missing your quotes in between the two IDs. So it is treating them as one big string.Ziechael said:
Me again! When using the triggers function I get an odd output into the console, the first line appears to be the json from the triggered trap followed by a few lines of simply [], not a huge issue as it works as expected but just wondered if it was something I'm doing wrong?:[{"_id":"-KX5p0h4sh1nFW1YkSYk","_pageid":"-KVk1zsT6SPO-DJ1Fq0R","left":875,"top":105,"width":70,"height":70,"rotation":0,"layer":"gmlayer","isdrawing":false,"flipv":false,"fliph":false,"imgsrc":"https://s3.amazonaws.com/files.d20.io/marketplace/38372/Ws1zVj69qRL1pbcspAlnVA/thumb.png?1400440324555","name":"","gmnotes":"%7B%22fx%22%3A%7B%22name%22%3A%22beam-blood%22%2C%22offset%22%3A%5B0%2C0%5D%2C%22direction%22%3A%5B3%2C3%5D%7D%2C%22message%22%3A%22test%22%2C%22revealToPlayers%22%3Atrue%2C%22revealWhenSpotted%22%3Atrue%2C%22sound%22%3A%22Splat%22%2C%22stopAt%22%3A%22edge%22%2C%22attack%22%3A10%2C%22damage%22%3A%2210d6+7%22%2C%22hideSave%22%3Atrue%2C%22missHalf%22%3Atrue%2C%22save%22%3A%22ref%22%2C%22saveDC%22%3A10%2C%22spotDC%22%3A100%7D","controlledby":"","bar1_value":"","bar1_max":"","bar1_link":"","bar2_value":"","bar2_max":"","bar2_link":"","bar3_value":"","bar3_max":"","bar3_link":"","represents":"","aura1_radius":"50","aura1_color":"#FFFF99","aura1_square":false,"aura2_radius":"15","aura2_color":"#59E594","aura2_square":false,"tint_color":"transparent","statusmarkers":"cobweb,bleeding-eye","showname":false,"showplayers_name":false,"showplayers_bar1":false,"showplayers_bar2":false,"showplayers_bar3":false,"showplayers_aura1":false,"showplayers_aura2":false,"playersedit_name":true,"playersedit_bar1":true,"playersedit_bar2":true,"playersedit_bar3":true,"playersedit_aura1":true,"playersedit_aura2":true,"light_radius":"","light_dimradius":"","light_otherplayers":false,"light_hassight":false,"light_angle":"","light_losangle":"","light_multiplier":1,"sides":"","currentSide":0,"lastmove":"639,90","_type":"graphic","_subtype":"token","_cardid":""}]Side note, what is the syntax for multiple triggers from the same trap? ["-KX5p0h4sh1nFW1YkSYk,-KX61DRIr3qLyMM8q4vh"] doesn't seem to work...
[]
[]
[]
[]
The Aaron said:
For solving a similar problem in Group Initiative, look at the findInitBonus() function (or some such. Should be the only place that calls getAttrByName(). ).Ziechael said:
Fair point, it's a problem for sure... I'll play around (with my limited understanding reinforced by pestering Aaron) and see if I can find a reliable solution for the attribute issue.
Ahh, that'll be it, I used the set up tool to add the first one to get the right syntax for that section but then added the second one manually... so ["-KX5p0h4sh1nFW1YkSYk,-KX61DRIr3qLyMM8q4vh"] should be ["-KX5p0h4sh1nFW1YkSYk","-KX61DRIr3qLyMM8q4vh"]... which works beautifully of course!!Stephen L. said:
Are you modifying the JSON directly? It looks like you're missing your quotes in between the two IDs. So it is treating them as one big string.Ziechael said:
[edited for brevity... assume stupidity lies here]
Ziechael said:
Ahh, that'll be it, I used the set up tool to add the first one to get the right syntax for that section but then added the second one manually... so ["-KX5p0h4sh1nFW1YkSYk,-KX61DRIr3qLyMM8q4vh"] should be ["-KX5p0h4sh1nFW1YkSYk","-KX61DRIr3qLyMM8q4vh"]... which works beautifully of course!!Stephen L. said:
Are you modifying the JSON directly? It looks like you're missing your quotes in between the two IDs. So it is treating them as one big string.Ziechael said:
[edited for brevity... assume stupidity lies here]
Thanks for your continued patience with my ignorance :)
Firepants said:
I've download the API script via the quick-add, and tried setting up a quick trap by placing down a boulder and starting the Trap maker wizard via macro, I only put in the name in the core-properties, and all the theme-properties, but after activating it on a token, and trying to walk another token over it, it did not want to activate the trap on its now.
And now any extra trap I wish to make, when I press the trap-maker macro, it creates the macro retroactively in my chat, not even showing up as a new chat entry? and it wont let me edit any properties any more?
I'm not that experienced with API's in general, but I don't think I messed something up this bad, anyone experienced this before?
Stephen L. said:
If the new menus are somehow being placed behind the old menus in the chat, then that would be a bug in the chat system itself (which I doubt is the problem).
Do you mean instead that you're editing the trap with one of the old menus? Each time you make a change, it displays a new menu with the new properties you just defined, but it might not auto scroll down to it.
Stephen L. said:
Thanks for sharing your stack trace. It helped me identify quickly what your problem might be. When you are setting up your traps, you MUST have the trap's token selected as you set its properties in the menu. If you don't have any trap selected, you'll see those errors in the log. Hope this helps!
Firepants said:
Stephen L. said:
If the new menus are somehow being placed behind the old menus in the chat, then that would be a bug in the chat system itself (which I doubt is the problem).
Do you mean instead that you're editing the trap with one of the old menus? Each time you make a change, it displays a new menu with the new properties you just defined, but it might not auto scroll down to it.
EDIT: I just noticed that all my API scripts died after I played around with It's a trap, ill try deleting it and reinstating it, see if it fixes anything.
----------------------------------------------------------------------------------------------
Sorry it took me a while to respond.
Let me explain exactly what I do,
I put down a token (example, a boulder), I put it on the GM layer, I add the web status effect on it, and then I click the macro while having the boulder selected.
No new chat entry is being made.
It was made when I first installed the script, now it just stopped, it wont make any more, and I cant edit the ones that are in my chat history at the moment (exactly 10 at the moment, and no new ones being created), could it be that I accidentally "activated" a trap while having a player token selected by mistake, and it bugged the script out? Would disabling and reenabling the script jog something in the process?
Gozer the Gozerian said:
Stephen L. said:
Thanks for sharing your stack trace. It helped me identify quickly what your problem might be. When you are setting up your traps, you MUST have the trap's token selected as you set its properties in the menu. If you don't have any trap selected, you'll see those errors in the log. Hope this helps!
Yes, I seem to be getting it to work, but now I've run into another issue. I was testing the spotting function, and it works - that is, I bring a token with a passive perception high enough to reveal the trap within range and it reveals the trap, sending it to the map. But then, I "re-set" the trap (put it back on the GM layer), and the trap still gets triggered by the token, but it is not revealed when the token comes into the passive perception range.
Garrett K. said:
Hello! I've just installed via the installer, and every time I attempt to create a trap the API debugger gives the following error:
{"who":"error","type":"error","content":"Unable to find a player or character with name: <div style="}
any tips? :(
Garrett K. said:
Really that's about the extent of the information I have available,
Steps to produce were: Install API using Script Library, Install 3.5 theme using Script Library, set theme to DnD-3.5, open game. Place token on GM layer, add web, click macro which has now appeared in game as a token macro called "ItsATrap_trapCreationWizard"
API output console then generates the following:
{"who":"error","type":"error","content":"Unable to find a player or character with name: <div style="}
{"who":"error","type":"error","content":"Unable to find a player or character with name: <div style="}
{"who":"error","type":"error","content":"Unable to find a player or character with name: <div style="}
{"who":"error","type":"error","content":"Unable to find a player or character with name: <div style="}
I believe at this step a Menu is supposed to appear?
Garrett K. said:
my name in game is either "Garrett K.", or set to speaking as GM,
The token, I have attempted no name, and Trap1,
The announcer name has been X, and is now GM.
When the macro is used, a cobweb appears on the icon, and the API console gets the same error as before.
Sorry, but I really have no idea what to do this point about your menu error. I can't reproduce the error, and I haven't received any other reports about this sort of error to help me track it down. Since you have been editing the script, I can really make no guarantees to support it.Garrett K. said:
"What other scripts are you running?"
Tons of them. If there's conflict issues, it might be easier to start at any 'known' issues and work backward from there. I can get you my full list when I get home though
[edit1] Progress! While I still can't get the "menu" bit to work, via manually stealing some of the examples and shoving them into the GM notes, i managed to get it to work "correctly", i think?
Only error I am seeing now after manually entering the data, is that even though the voice is set to GM, when a trap is discovered, it is still announced by Admiral Akbar, I would go straight into the API and just Ctrl+F for it, but I used the automated installer. Which script might I find that bit in? The base, or 3.5 ad
don? I'll just replace that one with the manual install including my edit away from Akbar, and that should all work!
[edit2] I'm also getting "Kimjo notices a undefined:" when Player/Token Kimjo goes near the trap, What can I add to change that "undefined"?
here's my GM notes:
{ "attack": 4, "damage": "2d8 + 6", "message": "A pressure plate gives way and darts fire forth from hidden compartments in the walls!", "notes": "If the character is hit, they also become poisoned.", "spotDC": 14, "searchDist": 30 }
Gary W. said:
If I am using two separate tokens (a trigger and a trap) is there a way to set the the trap to only go off because of the trigger?