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] It's A Trap! v2.3

October 17 (8 years ago)
Yes, the message generated by the script always correctly identifies the character that collided with the trap.
October 17 (8 years ago)

Edited October 17 (8 years ago)
Hi there,

Is there any way in which you could expand this to secrets on the map that they reveal when nearby?

Such as a secret door:
{
"message": "You spot something on the wall... it looks like an outline of a door",
"spotDC": 15,
"searchDist": 10,
}


It shouldnt move the token to the destination but just reveal the door on the gm layer to the map layer and annouce this?
October 17 (8 years ago)
Ziechael
Forum Champion
Sheet Author
API Scripter
Totally possible as is, you would have to use the stopAt: string to define that you didn't want the tokens to move to the centre of the 'trap' but that should allow you to operate it as you've noted above otherwise.
October 17 (8 years ago)
Ada L.
Marketplace Creator
Sheet Author
API Scripter

Red said:

Yes, the message generated by the script always correctly identifies the character that collided with the trap.

Your gif shows that it's using the default trap message though instead of the message you've provided in the JSON. This default message uses the name of the token, rather than the character's name. 

From what you've showed me so far, it looks like you've got the scripts installed correctly, the trap theme is configured correctly, and your JSON is correct. I've double checked this in my sandbox campaign using your configurations and it's working fine there. Something's not set up correctly, and I don't know what without manually looking at your campaign...
October 17 (8 years ago)
Ziechael
Forum Champion
Sheet Author
API Scripter
Look for duplicate trap themes/it's a trap scripts... that was always the source of my problems ;)
October 18 (8 years ago)

Ziechael said:

Totally possible as is, you would have to use the stopAt: string to define that you didn't want the tokens to move to the centre of the 'trap' but that should allow you to operate it as you've noted above otherwise.

Sort of works.... it shows when they see it passively as a trap on the map but no message which is what I was after.

Other thing is not for it to trigger when walked on unless they saw it passively before or investigate it? 
October 18 (8 years ago)

Edited October 18 (8 years ago)

Stephen L. said:

Something's not set up correctly, and I don't know what without manually looking at your campaign...
If you care to take a gander, I've invited you to the game in question. I'll make you a GM soon as I see you join if you decide to.

Ziechael said:
Look for duplicate trap themes/it's a trap scripts... that was always the source of my problems ;)
I tried this earlier, too. I wasn't sure if I needed to have the 5E-OGL theme installed if I just set the theme on the base script, so I removed it. The only thing that changed was that line at the end of the message that says "MISS!" stopped appearing, so I re-installed it.

FIXED EDIT: My problem was that I was adding the JSON code to the GM notes of a character sheet, rather than to the individual token that was placed in the map. Thanks, Stephen C:
I've created a short video detailing a few issues I've had with the Its a Trap Script including what I've done to try and resolve the issues. 

https://www.youtube.com/watch?v=_5VvUiA92wY

In short the traps reveal to map no matter what I do. In addition I'm getting some weird results from springing some of my traps that I'd like to avoid.

If you're interested in the macro attached to this video its an expansion on Trigshots macro that I was able to set up with the help of Roll20 User: Eastwood I'll list it below. It requires both Token-Mod, The Shaped Fifth Edition D&D Character Sheet, and the 5E Companion Script.

/w gm &{template:5e-shaped} {{title=COPY THE FOLLOWING INTO GM NOTES DELETE ANY LINES YOU DO NOT NEED}} {{{
"attack": "?{Enter attack bonus|1}",
"damage": "?{Trap damage?|1d6+1}",
"message": "?{Message?|}",
"gmOnly": ?{Output to GM?|true},
"save": "?{Save stat?|dex}",
"saveDC": ?{Save DC?|14},
"spotDC": ?{Perception DC?},
"sound": "?{Enter sound name as it appears in Jukebox|}",
"stopAt": "?{Select where token moves on activate|none|edge|center}",
"fx": "?{FX Effect?|bomb|nova|explosion|bubbling|burst|glow|missile|splatter}-?{Color|acid|blood|charm|death|fire|frost|holy|magic|slime|smoke|water}"
}
[Trap Marker](!token-mod --set statusmarkers|!cobweb)[Reveal Marker](!token-mod --set statusmarkers|!bleeding-eye)}}

October 19 (8 years ago)
Ziechael
Forum Champion
Sheet Author
API Scripter

Pord said:

Ziechael said:

Totally possible as is, you would have to use the stopAt: string to define that you didn't want the tokens to move to the centre of the 'trap' but that should allow you to operate it as you've noted above otherwise.

Sort of works.... it shows when they see it passively as a trap on the map but no message which is what I was after.

Other thing is not for it to trigger when walked on unless they saw it passively before or investigate it? 

Fair point, didn't think of it that way! A useful feature would be using aura 2 to set a perception range or something? If met it would reveal the 'trap' and output the json to chat...
October 19 (8 years ago)
Ada L.
Marketplace Creator
Sheet Author
API Scripter

Ziechael said:

Pord said:

Ziechael said:

Totally possible as is, you would have to use the stopAt: string to define that you didn't want the tokens to move to the centre of the 'trap' but that should allow you to operate it as you've noted above otherwise.

Sort of works.... it shows when they see it passively as a trap on the map but no message which is what I was after.

Other thing is not for it to trigger when walked on unless they saw it passively before or investigate it? 

Fair point, didn't think of it that way! A useful feature would be using aura 2 to set a perception range or something? If met it would reveal the 'trap' and output the json to chat...

Version 2.7 allows you to set a "searchDist" property for how close a unit must be to be able to passively spot the trap. For example, if you set this to 15, then a token would need to be within 15 ft of the trap to be able to spot it.
October 19 (8 years ago)

Stephen L. said:

Ziechael said:

Pord said:

Ziechael said:

Totally possible as is, you would have to use the stopAt: string to define that you didn't want the tokens to move to the centre of the 'trap' but that should allow you to operate it as you've noted above otherwise.

Sort of works.... it shows when they see it passively as a trap on the map but no message which is what I was after.

Other thing is not for it to trigger when walked on unless they saw it passively before or investigate it? 

Fair point, didn't think of it that way! A useful feature would be using aura 2 to set a perception range or something? If met it would reveal the 'trap' and output the json to chat...

Version 2.7 allows you to set a "searchDist" property for how close a unit must be to be able to passively spot the trap. For example, if you set this to 15, then a token would need to be within 15 ft of the trap to be able to spot it.

Yes thats fine ive got that, I just dont want it to trigger on them stepping on it for secret doors.
October 19 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Use the gmonly and stop at properties so that it sends the notice to you only and they're movement is not triggered when they move over it.
October 19 (8 years ago)

Edited October 19 (8 years ago)
Ravenknight
KS Backer
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.
October 19 (8 years ago)
Ada L.
Marketplace Creator
Sheet Author
API Scripter

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.
October 19 (8 years ago)

Edited October 19 (8 years ago)
Ravenknight
KS Backer

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.
I must have broken something. (Again) :( It's a trap won't show any names at all now.

{"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 required installations beside It's a trap, Trap Theme and the HTML builder?

October 19 (8 years ago)
Ada L.
Marketplace Creator
Sheet Author
API Scripter

Ravenknight said:

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.
I must have broken something. (Again) :( It's a trap won't show any names at all now.

{"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.
October 19 (8 years ago)
Ravenknight
KS Backer

Stephen L. said:

Ravenknight said:

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.
I must have broken something. (Again) :( It's a trap won't show any names at all now.

{"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.
October 22 (8 years ago)

Edited October 22 (8 years ago)
I was able to fix the script always sending traps to the map layer regardless of whether that option is checked in the script config page by using TokenMod. Though this only works for traps you manually spring using this macro. It does help you out by removing the icons on your trap after it gets sprung.

Kindof disappointed I went to the trouble of explaining my problem in great detail and got no response as to why the option does not work. I even went to the trouble of creating a very short video detailing my problem in the event that I wasn't explaining it correctly (and also to show I wasn't crazy and that the option was indeed not working). I'd prefer not to have to employ a workaround like this but for those of you having this same problem here you go.

!itsATrapRemoteActivate
!token-mod --set layer|objects
!token-mod --set statusmarkers#!bleeding-eye
!token-mod --set statusmarkers#!cobweb

Also here's a macro for resetting your traps using token-mod. Useful for when you have a trap that only works in a particular scenario. For more generic traps I've taken to using Trigshot's idea (it wasn't obvious to me. Thanks a lot for this) of binding them to character entries.

!token-mod --set statusmarkers|+cobweb:0|+bleeding-eye:0 layer|gmlayer
October 22 (8 years ago)

Edited October 23 (8 years ago)
Ada L.
Marketplace Creator
Sheet Author
API Scripter

Avatar of Woah said:

I was able to fix the script always sending traps to the map layer regardless of whether that option is checked in the script config page by using TokenMod. Though this only works for traps you manually spring using this macro. It does help you out by removing the icons on your trap after it gets sprung.

Kindof disappointed I went to the trouble of explaining my problem in great detail and got no response as to why the option does not work. I even went to the trouble of creating a very short video detailing my problem in the event that I wasn't explaining it correctly (and also to show I wasn't crazy and that the option was indeed not working). I'd prefer not to have to employ a workaround like this but for those of you having this same problem here you go.

!itsATrapRemoteActivate
!token-mod --set layer|objects
!token-mod --set statusmarkers#!bleeding-eye
!token-mod --set statusmarkers#!cobweb

Also here's a macro for resetting your traps using token-mod. Useful for when you have a trap that only works in a particular scenario. For more generic traps I've taken to using Trigshot's idea (it wasn't obvious to me. Thanks a lot for this) of binding them to character entries.

!token-mod --set statusmarkers|+cobweb:0|+bleeding-eye:0 layer|gmlayer

Sorry it took a while to get back to you on this. I haven't had as much time this month to look into many of the new features and issues. Thanks for pointing those issues out. They do appear to be actual bugs in the script, so I'll try to address these for version 2.8.
@ Stephen L.

I didn't necessarily need you specifically to address my concerns. I figured it was something obvious that I must be overlooking and that everyone was just too busy to clue me in. Thanks for getting back. I love this Script.
October 24 (8 years ago)

Edited October 24 (8 years ago)
Ada L.
Marketplace Creator
Sheet Author
API Scripter

Update: It's A Trap v3.0 now available


There have been some significant changes and refactoring to the script in this version to support some new features that will greatly enhance usability:
* Traps are now modified through a chat menu instead of editing the JSON by hand.
* Traps can now be disabled so that they won't activate but can still be spotted.
* There is now an option to reveal the trap token when it is spotted. This, along with the disable option, can be used to create hidden things that are not necessarily traps such as secret doors.
* Fixed 'revealTrapsToMap' user option bug.
* Fixed 'GM Only' output bug.

All of the existing trap themes have been also updated to be compatible with the new version. Trap Themes prior to version 3.0 will not be compatible with It's A Trap 3.0. Some secondary ways to specify the JSON have also been deprecated (notably for specifying FX) to support the new interface. So, some existing traps might be broken in this new version too. Sorry about that.

For the brave, you can get the new version and trap themes here: https://github.com/Cazra/roll20-api-scripts/tree/T...

Demo:

October 24 (8 years ago)
Ravenknight
KS Backer

Stephen L. said:

* There is now an option to reveal the trap token when it is spotted. This, along with the disable option, can be used to create hidden 
Now that is excellent!!
October 24 (8 years ago)
Ziechael
Forum Champion
Sheet Author
API Scripter
Am I right in assuming that the chat menu just builds the json in the GM notes? In other words can we still apply the json manually ie. with a lovely and quick copy/paste mechanic?

Some awesome sounding features to test when this gets merged too! Thanks :)
October 24 (8 years ago)
Ada L.
Marketplace Creator
Sheet Author
API Scripter

Ziechael said:

Am I right in assuming that the chat menu just builds the json in the GM notes? In other words can we still apply the json manually ie. with a lovely and quick copy/paste mechanic?

Some awesome sounding features to test when this gets merged too! Thanks :)

Yes, it still uses JSON in the GM Notes under the hood. So you can still copy-paste it from one trap to another. 
October 24 (8 years ago)
Ziechael
Forum Champion
Sheet Author
API Scripter
Awesome, thanks for confirming and thanks as always for continuing to make this a 1 stop shop for DM's who want to hide things!!
October 27 (8 years ago)

Edited October 27 (8 years ago)
I'm not sure how to actually use this. I'm testing it with a trap set up using the chat menu, but there doesn't appear to be anywhere for the damage/attack rolls/etc. Also, it isn't activating when a character token comes nearby.
Is there something basic I'm missing?

EDIT: Realised I was using the wrong cobweb icon, and thats why it wasn't activating properly. Still not sure how damage/attacks work though. I know they aren't automatically deducted from the token or anything, but there's no damage shown at all.
I don't even have the option for it in the wizard (http://puu.sh/rXjZA/dec69959af.png).

EDIT 2: I tried switching to the old version that is provided in the One-Click script library, and had a similar problem; AC/Damage etc doesn't show up, even when using the provided example traps: http://puu.sh/rXkZ4/4b464e353f.png
October 27 (8 years ago)

Edited October 27 (8 years ago)
Ada L.
Marketplace Creator
Sheet Author
API Scripter

NeighbourJim said:

I'm not sure how to actually use this. I'm testing it with a trap set up using the chat menu, but there doesn't appear to be anywhere for the damage/attack rolls/etc. Also, it isn't activating when a character token comes nearby.
Is there something basic I'm missing?

EDIT: Realised I was using the wrong cobweb icon, and thats why it wasn't activating properly. Still not sure how damage/attacks work though. I know they aren't automatically deducted from the token or anything, but there's no damage shown at all.
I don't even have the option for it in the wizard:

The options for attacks rolls and damage are only there if you have a D&D-style trap theme configured with the script. This is most easily configured from the script's One-Click page's user options. Setting this up is a bit more hackery if you just copied the scripts in. To do it though, enter the line below into one of your API scripts.

state.ItsATrap.theme = 'Theme name goes here. E.g. 5E-OGL';
Also, be sure that you have the 3.0 version of the trap theme you want to use.
October 27 (8 years ago)
When will this make the repository? Any idea?
October 27 (8 years ago)
Ada L.
Marketplace Creator
Sheet Author
API Scripter

Gary W. said:

When will this make the repository? Any idea?

No idea. The pull request schedule is entirely at the whims of the Roll20 devs.
October 28 (8 years ago)

Edited October 28 (8 years ago)

Stephen L. said:

The options for attacks rolls and damage are only there if you have a D&D-style trap theme configured with the script. This is most easily configured from the script's One-Click page's user options. Setting this up is a bit more hackery if you just copied the scripts in. To do it though, enter the line below into one of your API scripts.

state.ItsATrap.theme = 'Theme name goes here. E.g. 5E-OGL';
Also, be sure that you have the 3.0 version of the trap theme you want to use.


Ah, I see. Where's the 3.0 theme? I couldn't find it on GitHub. Maybe I just missed it somehow.
October 28 (8 years ago)
Ada L.
Marketplace Creator
Sheet Author
API Scripter

NeighbourJim said:

Stephen L. said:

The options for attacks rolls and damage are only there if you have a D&D-style trap theme configured with the script. This is most easily configured from the script's One-Click page's user options. Setting this up is a bit more hackery if you just copied the scripts in. To do it though, enter the line below into one of your API scripts.

state.ItsATrap.theme = 'Theme name goes here. E.g. 5E-OGL';
Also, be sure that you have the 3.0 version of the trap theme you want to use.


Ah, I see. Where's the 3.0 theme? I couldn't find it on GitHub. Maybe I just missed it somehow.
They're on the same branch I shared the link for. https://github.com/Cazra/roll20-api-scripts/tree/T...
The branch is named 2.8, but it's actually 3.0.
November 02 (8 years ago)
I tried to think of ways to enable "radius" of trap activation/trap colliding, and tried out a transparent tile (I gave it an aura of radius 0, so I knew where it was located) and stretched it from 1x1, to 3x3. It pulls in the character when they step onto any of the tiles, but in the middle of the 3x3 transparent trap is the actual trap I want to activate. Is there any way to activate the "center" trap, too? Right now it just pulls a token into the middle, and the transparent trap goes off, but the center trap doesn't.

It's pretty late, maybe it says it in the readme/info, but I cannot seem to find it. Any help would be greatly appreciated!

Thanks in advance,
Best Regards,

ExoMemphiz
November 02 (8 years ago)
Ada L.
Marketplace Creator
Sheet Author
API Scripter

Chris R. said:

I tried to think of ways to enable "radius" of trap activation/trap colliding, and tried out a transparent tile (I gave it an aura of radius 0, so I knew where it was located) and stretched it from 1x1, to 3x3. It pulls in the character when they step onto any of the tiles, but in the middle of the 3x3 transparent trap is the actual trap I want to activate. Is there any way to activate the "center" trap, too? Right now it just pulls a token into the middle, and the transparent trap goes off, but the center trap doesn't.

It's pretty late, maybe it says it in the readme/info, but I cannot seem to find it. Any help would be greatly appreciated!

Thanks in advance,
Best Regards,

ExoMemphiz
Enter the name of the trap you want the outer radius to trigger in the "triggers" property. That will cause the center trap to also be triggered when the outer trigger area is triggered.

November 02 (8 years ago)

Edited November 02 (8 years ago)

Stephen L. said:

Chris R. said:

I tried to think of ways to enable "radius" of trap activation/trap colliding, and tried out a transparent tile (I gave it an aura of radius 0, so I knew where it was located) and stretched it from 1x1, to 3x3. It pulls in the character when they step onto any of the tiles, but in the middle of the 3x3 transparent trap is the actual trap I want to activate. Is there any way to activate the "center" trap, too? Right now it just pulls a token into the middle, and the transparent trap goes off, but the center trap doesn't.

It's pretty late, maybe it says it in the readme/info, but I cannot seem to find it. Any help would be greatly appreciated!

Thanks in advance,
Best Regards,

ExoMemphiz
Enter the name of the trap you want the outer radius to trigger in the "triggers" property. That will cause the center trap to also be triggered when the outer trigger area is triggered.


Wonderful, many thanks for this wonderful script.
I've just started using Roll20 here a week ago, and I'm just exploring as much as possible, there really are endless opportunities.

If you have time, I have 1½ more questions:

1) Is there a property to not move a character to the center when it activates?
And the half: Is there some sort of list of commands/inputs that the JS knows, so I don't have to ask you guys and basically waste your time with my silly questions? ^^'

Thanks once again, and fantastic job on the script!
November 02 (8 years ago)
Ada L.
Marketplace Creator
Sheet Author
API Scripter

1) Is there a property to not move a character to the center when it activates?

And the half: Is there some sort of list of commands/inputs that the JS knows, so I don't have to ask you guys and basically waste your time with my silly questions? ^^'
1) Change the "Stop At" property to "none".
1/2) You mean like a help menu? Not currently. I could put tooltips into the buttons if that would help.

November 02 (8 years ago)

Stephen L. said:

1) Is there a property to not move a character to the center when it activates?

And the half: Is there some sort of list of commands/inputs that the JS knows, so I don't have to ask you guys and basically waste your time with my silly questions? ^^'
1) Change the "Stop At" property to "none".
1/2) You mean like a help menu? Not currently. I could put tooltips into the buttons if that would help.


More just of like... A long command list in the forum here, or on the Github repo, or the likes.
Example:

"Attack" : "Value" --- This has X effect
"message" : "Text" --- Displays a message for the players

Or even without the extra comments added, just a list of command names would be great :)
I can also try to read through the code, I guess, and get them from there, though, first thought of this now, haha ^^'

Anyway, thank you for the swift replies, and the amazing scripts and helping the community!
November 02 (8 years ago)
Ada L.
Marketplace Creator
Sheet Author
API Scripter

Chris R. said:

Stephen L. said:

1) Is there a property to not move a character to the center when it activates?

And the half: Is there some sort of list of commands/inputs that the JS knows, so I don't have to ask you guys and basically waste your time with my silly questions? ^^'
1) Change the "Stop At" property to "none".
1/2) You mean like a help menu? Not currently. I could put tooltips into the buttons if that would help.


More just of like... A long command list in the forum here, or on the Github repo, or the likes.
Example:

"Attack" : "Value" --- This has X effect
"message" : "Text" --- Displays a message for the players

Or even without the extra comments added, just a list of command names would be great :)
I can also try to read through the code, I guess, and get them from there, though, first thought of this now, haha ^^'

Anyway, thank you for the swift replies, and the amazing scripts and helping the community!

All of the command names are in the chat menu for the script. The when script first installs, it creates a macro called "ItsATrap_trapCreationWizard" which displays the menu for the script in the chat. For reference though, here are what all the core properties do:

  • Name: The name of the trap's token
  • API Command: An API chat command that is executed when the trap activates.
  • Disabled: Prevents the trap from activating, but still can be spotted.
  • Effect Distance: The range at which the trap hits characters when it is activated.
  • Effect Shape: Whether the trap's effect is a circle or square area.
  • Flying: Whether the trap can affect flying creatures (one's with the wing status)
  • Special FX: Spawns FX when the trap is activated.
  • GM Only: When the trap is activated, the GM is notified, but there is no other output for the players.
  • Message: A message displayed for the trap when it is activated.
  • Notes: Secret GM notes whispered to the GM when it activates.
  • Reveal When Activated: Whether the trap is moved to the objects or map layer when activated.
  • Reveal When Spotted: Whether the trap is moved to the objects or map layer when spotted with passive searching.
  • Passive Search Distance: The maximum distance a character can be to passively search for the trap.
  • Sound: A sound from your jukebox that is played when the trap is activated.
  • StopAt: Whether the character is pulled into the center, stopped at the edge, or not moved at all when the trap is activated.
  • Triggers: A comma-separated list of names for other traps that are activated when this one is activated.
D20 system themes also have these additional properties:
  • Attack: The trap's attack bonus vs AC.
  • Damage: How much damage the trap does.
  • Hide Save Result: Whether the saving throw result is hidden from the players.
  • Miss - Half Damage: Whether characters take only half damage on a successful save.
  • Saving Throw: The type of saving throw involved.
  • Saving Throw DC: The DC for the saving throw.
  • Spot DC: The DC to passively spot the trap using your passive perception.
November 02 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I've been meaning to ask you Stephen, how does the script pass the API chat command that is triggered?
November 02 (8 years ago)
Ada L.
Marketplace Creator
Sheet Author
API Scripter

Scott C. said:

I've been meaning to ask you Stephen, how does the script pass the API chat command that is triggered?
It just passes it along to sendChat.

November 02 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, so if there is playerid gating in the script being called, it may crash the API/just not work. Been meaning to put in handling for API generated messages to my scripts, now I know that at least one script might be calling them this way (so, now I actually have a reason to do it :) )
November 02 (8 years ago)
Ada L.
Marketplace Creator
Sheet Author
API Scripter

Scott C. said:

Ah, so if there is playerid gating in the script being called, it may crash the API/just not work. Been meaning to put in handling for API generated messages to my scripts, now I know that at least one script might be calling them this way (so, now I actually have a reason to do it :) )

Right. If you have guards in your script which, for example, only allow player IDs for GMs to pass, then those won't work since it is sent from the API.
November 02 (8 years ago)

Edited November 02 (8 years ago)
Ziechael
Forum Champion
Sheet Author
API Scripter
Just updating my json creation wizard (yup, I'm that guy) and I was wondering, how would a layman... and idiot if you will... determine the direction vector coordinates in a way that makes sense to someone who doesn't have the foggiest how [0,0] is any different from say [4,2]?

I'm fine with the offset, it's just direction that my minimal testing has left me stumped on...
November 02 (8 years ago)
Ada L.
Marketplace Creator
Sheet Author
API Scripter

Ziechael said:

Just updating my json creation wizard (yup, I'm that guy) and I was wondering, how would a layman... and idiot if you will... determine the direction vector coordinates in a way that makes sense to someone who doesn't have the foggiest how [0,0] is any different from say [4,2]?

I'm fine with the offset, it's just direction that my minimal testing has left me stumped on...

You can think of the first number as the number of squares horizontally (negative goes left, positive goes right) and the second number as the number of squares vertically (negative goes up, positive goes down).
November 02 (8 years ago)
Ziechael
Forum Champion
Sheet Author
API Scripter
Ah, I get it... i think, so using that logic something like [3,3] would give a direction of due south-east assuming up was north?
November 02 (8 years ago)
Ada L.
Marketplace Creator
Sheet Author
API Scripter

Ziechael said:

Ah, I get it... i think, so using that logic something like [3,3] would give a direction of due south-east assuming up was north?

Right.
I'm sorry if I missed this, but how do you define if the token reveals to the object layer, or to the map layer?
November 02 (8 years ago)
Ada L.
Marketplace Creator
Sheet Author
API Scripter

Malkindred said:

I'm sorry if I missed this, but how do you define if the token reveals to the object layer, or to the map layer?
That is set using the revealToMap option on the OneClick page.

Thank you, I totally missed that check box. 
November 04 (8 years ago)

i enter this trap triggers after i hit activate trap. It triggers right away what am I doing wrong? any help would be great.