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 .
×

Compatibility issues between TokenMod and Collision Detection?

1480654149

Edited 1480654190
Hello all again! You've been so wonderfully helpful, I just can't resist the urge to come back to you for more help. So, I'll include the long story for background, but the short version is that I get an error message when trying to add both scripts to my game (namely that they read or write to the same fields). Now, the wiki page for both scripts says neither have any conflicts, so my question is does anyone know whether they conflict or not? Here's the long story, just in case someone cares to read and catches something in it that I've missed. (But honestly, just skipping it and answering my short question will be incredibely appreciated). I appear to have borked at least my Collision Detection script, and who knows what else. Trouble shooting is difficult because I was using a bunch of scripts, some of which I created myself, so I won't post all the code here and ask anyone to go through that. I installed the Collision Detection script, saw that it had a possible conflict, and continued figuring I could always disable or delete the script. Not surprisingly, I was unable to get it to work. So, I figured I'd go about disabling other scripts until it worked, so that I could try to find a fix for the incompatibility. I disabled and disabled, until nothing was left but Collision Detection. Still, it would not behave. "Well, everything else is disabled." I thought to myself "I must be doing something wrong here." And so I went through (what I know to be) the checklist. My test token was linked to a character, that was controlled by a player (check). My rectangles were #ff00ff, just as they were set in the configs (check). I was drawing in the correct layer, but just to be sure I drew a square in all four layers *and* set the config to all layers (check). But it's my only script, so I must be doing something wrong. I created a new game, and added just the Collision Detection script, and poof it instantly worked as expected. So, I figure, I must have initially done something to set it up wrong somehow. So go back to my original game, and delete the script so I can re-add it. It still fails to work. I noted, however, that upon re-adding the script, despite everything else being disabled, I still got an error saying a conflict was present. So, since it's all easily recoverable, I delete all my scripts and re-add just Collision Detection. It still won't work. At this point I'm entirely baffled. So, I try adding token-mod (which I suspected to be the culprit of the conflict) to my alternate game, and sure enough, I get the conflict warning message. But the Collision Detection still appears to be working. So I create a third game, and I add all my scripts from my original game, in the order (approximate order since they were all now deleted) that I had them originally. Finally, I add Collision Detection, and test it out, and it's still working normally. I am now scratching my head, as I don't want to attempt to attempt to re-create all the specific scenarios that lead to the state that my original game is currently in, but I'm left with the impression that I'm doing something entirely wrong (and I only do it wrong when adding Collision Detection to my world), or one of my scripts has left it's accursed mark in my world preventing Collision Detection from doing it's thing. I don't actually expect anyone to read that wall of bewilderment (the rant was mostly for my sanity and if I could spoiler it I would), but if you do, I'm open to suggestions as I'm very much a greenie when it comes to any sort of API. But, the question that I feel is most likely to have answers is whether or not TokenMod and Collision Detection are actually know to interfere. Then, if they are, I can know to avoid the combination. And if they aren't, I know I can proceed without concern in re-creating this world with working scripts. Thank you in advance!
Have you tried to make a fresh copy of the game and then reinstall the scripts? 
1480687468

Edited 1480687540
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Those auto generated conflict warnings are based on what is put in the script's json file for what the script interacts with. Most of us are pretty generic with what we put in (aka attribute instead of attribute:xp) the one click install checker sees that both scrips modify or read the same thing and it triggers the warning, doesn't actually mean there is an issue. That said, there appears to have been something going on. When you say collision detection didn't work, did it generate an error (and what was the error if so)? Did it just not function as expected? And finally, can you link to the collision detection script you're talking about?
1480689787
The Aaron
Pro
API Scripter
My guess is there is something in the context of your game that Collision Detection depends on which is messed up. I'm not familiar with that script, but some options are the state object, a handout it uses, a character it uses, etc. if a clone of the game works, it's likely the state. 
1480699260

Edited 1480703067
Ravenknight said: Have you tried to make a fresh copy of the game and then reinstall the scripts?  Yes, and making a copy of the game and installing just Collision Detection results in the script not working. (I forgot to include that originally). Scott C. said: That said, there appears to have been something going on. When you say collision detection didn't work, did it generate an error (and what was the error if so)? Did it just not function as expected? And finally, can you link to the collision detection script you're talking about? My apologies, I definitely should have been more clear. I mean that when drawing a rectangle, or any polygon, with the color set in the config a token could pass right though. I additionally made sure that the token was linked to a character, and the character was set to be controlled by a player. I also tried not linking the token to a player and just making it controlled by someone, but that didn't work either. I will mention, that in both instances I'm setting it to be controlled by a GM player, but the forum mentions that it should still function when controlled by a GM player, and doing that worked in both my dummy games. I am using version 2.2 that's available in the open script library. I believe  this is the correct code on github, but I haven't done a diff or anything to verify that they are identical. The Aaron said: My guess is there is something in the context of your game that Collision Detection depends on which is messed up. I'm not familiar with that script, but some options are the state object, a handout it uses, a character it uses, etc. if a clone of the game works, it's likely the state.  I had been playing around with  areaMapper prior to Collision Detection, that utilizes a handout for it's UI. Do you think this could have caused the interference? I will note that in the dummy game where I installed all the scripts and it did work, I had not changed the settings of areaMapper to use a handout, so I'm going to go investigate that now. Thank you for the suggestion. Edit: I'll add another potential game state contender, It'sATrap. All tokens I create appear to still have the creation wizard attached to them, despite the script being deleted in the original game and never added in the copy of the game. Oh, because its just a macro I can delete. And thank you all for your time! DoubleEdit: It appears it was areaMapper's doing! So thank you Aaron, for bringing up the handouts and characters being potential candidates. Upon deleting the handout created by areaMapper and restarting the API, Collision Detection resumed functionality as expected. Now, areaMapper isn't in the script library, so I don't really expect anyone to know anything about it. But is there potential for the two to play nice? I suppose for now, at the very least, I can use areaMapper without the handout mode. Thanks again everyone!
1480746124
Lithl
Pro
Sheet Author
API Scripter
Excend said: I mean that when drawing a rectangle, or any polygon, with the color set in the config a token could pass right though. I additionally made sure that the token was linked to a character, and the character was set to be controlled by a player. I also tried not linking the token to a player and just making it controlled by someone, but that didn't work either. I will mention, that in both instances I'm setting it to be controlled by a GM player, but the forum mentions that it should still function when controlled by a GM player, and doing that worked in both my dummy games. Also worth noting that it only works on the page with the player ribbon, since the script is specifically designed to only affect players and was written long before Split the Party was possible.
Brian said: Also worth noting that it only works on the page with the player ribbon, since the script is specifically designed to only affect players and was written long before Split the Party was possible. Good to know! Thank you. Lucky for me the ribbon was on the correct page, but if it wasn't, it could have easily caused all my problems by itself without me even knowing.