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] Page Navigator

1473357660

Edited 1473357714
I noticed where the one error was, looks like in your main top post under the v1.4 changes you have  { "location":"Descriptive Text", "linkLocation":"Descriptive Text", } with the comma at the end. So I have gone ahead and removed all scripts except for Vector Math, MatrixMath, Path Math, Token Collisions, and Page Navigator. I get the following error only when selecting an option after I collide with the setup teleport token. I am able to do "!nav pages player" and use the menu to push my player(myself) to the selected page.  SyntaxError: Unexpected end of input SyntaxError: Unexpected end of input     at Object.parse (native)     at movePlayer (apiscript.js:3068:19)     at handleInput (apiscript.js:3788:33)     at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:105:34), <anonymous>:65:16)     at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:105:34), <anonymous>:70:8)     at /home/node/d20-api-server/api.js:1200:12     at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560     at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147)     at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546)     at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489)     at Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) Thank again!
1473358597
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, that would explain it, that should be: { "location":"Descriptive Text", "linkLocation":"Descriptive Text" } I'll fix the notes in the original post. Thanks for catching that extraneous comma that somehow made it into my example JSON.
Alright! Making headway, when I get the text popup and choose 'Controlling Player(s)' it spits back the text 'Page Navigator: Some players are being split from the party.' However, I then throw the following error. TypeError: Cannot read property 'push' of undefined TypeError: Cannot read property 'push' of undefined at apiscript.js:3074:27 at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:153:9) at movePlayer (apiscript.js:3071:11) at handleInput (apiscript.js:3788:33) at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:105:34), <anonymous>:65:16) at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:105:34), <anonymous>:70:8) at /home/node/d20-api-server/api.js:1200:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546)
1473459874
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hey Korb, Sorry for the delay getting back to you. It looks like I had some legacy code that didn't get purged from one of my efforts to get the token teleporting to work. No idea why it wasn't triggering an error for me, but it's code that shouldn't be there. Could you try this updated code:  v1.41 . Scott
1473635730
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
New Version  1.42 released. In queue for One-click install. Should fix the crashes that were resulting from using the teleport functionality.
Trying to test this script, and the API crashes whenever I try to teleport a token. I am the only player (and GM) in this campaign, as I'm trying to test it and get it working before I go live. Here is the error text I get: Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again. More info... For reference, the error message generated was: SyntaxError: Unexpected end of input SyntaxError: Unexpected end of input at Object.parse (native) at _.each._.chain.movePlayer (apiscript.js:15682:19) at _.each._.chain.handleInput (apiscript.js:16396:33) at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:144:34), <anonymous>:65:16) at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:144:34), <anonymous>:70:8) at /home/node/d20-api-server/api.js:1394:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:400 The API log reads as follows: Previous shutdown complete, starting up... Spinning up new sandbox... "5eShapedCompanion 1478094101886 INFO : -=> ShapedScripts v4.9.0 <=-" "5eShapedCompanion 1478094101891 INFO : Checking config for upgrade, starting state: {\"version\":3,\"config\":{\"genderPronouns\":[{\"matchPattern\":\"^f$|female|girl|woman|feminine\",\"nominative\":\"she\",\"accusative\":\"her\",\"possessive\":\"her\",\"reflexive\":\"herself\"},{\"matchPattern\":\"^m$|male|boy|man|masculine\",\"nominative\":\"he\",\"accusative\":\"him\",\"possessive\":\"his\",\"reflexive\":\"himself\"},{\"matchPattern\":\"^n$|neuter|none|construct|thing|object\",\"nominative\":\"it\",\"accusative\":\"it\",\"possessive\":\"its\",\"reflexive\":\"itself\"}],\"logLevel\":\"INFO\",\"tokenSettings\":{\"number\":false,\"bar1\":{\"attribute\":\"HP\",\"max\":true,\"link\":false,\"showPlayers\":false},\"bar2\":{\"attribute\":\"speed\",\"max\":false,\"link\":false,\"showPlayers\":false},\"bar3\":{\"attribute\":\"AC\",\"max\":false,\"link\":false,\"showPlayers\":false},\"aura1\":{\"radius\":\"\",\"color\":\"#FFFF99\",\"square\":false},\"aura2\":{\"radius\":\"\",\"color\":\"#59e594\",\"square\":false},\"light\":{\"radius\":\"\",\"dimRadius\":\"\",\"otherPlayers\":false,\"hasSight\":true,\"angle\":360,\"losAngle\":360,\"multiplier\":1},\"showName\":true,\"showNameToPlayers\":false,\"showAura1ToPlayers\":true,\"showAura2ToPlayers\":true},\"newCharSettings\":{\"sheetOutput\":\"***default***\",\"deathSaveOutput\":\"***default***\",\"initiativeOutput\":\"***default***\",\"showNameOnRollTemplate\":\"{{show_character_name=1}}\",\"rollOptions\":\"***default***\",\"initiativeRoll\":\"***default***\",\"initiativeToTracker\":\"***default***\",\"breakInitiativeTies\":\"[[@{initiative} / 100]][tie breaker]\",\"showTargetAC\":\"***default***\",\"showTargetName\":\"***default***\",\"autoAmmo\":\"1\",\"autoRevertAdvantage\":false,\"houserules\":{\"mediumArmorMaxDex\":2,\"saves\":{\"useCustomSaves\":\"***default***\",\"useAverageOfAbilities\":\"***default***\",\"fortitude\":{\"fortitudeStrength\":\"***default***\",\"fortitudeDexterity\":\"***default***\",\"fortitudeConstitution\":\"***default***\",\"fortitudeIntelligence\":\"***default***\",\"fortitudeWisdom\":\"***default***\",\"fortitudeCharisma\":\"***default***\"},\"reflex\":{\"reflexStrength\":\"***default***\",\"reflexDexterity\":\"***default***\",\"reflexConstitution\":\"***default***\",\"reflexIntelligence\":\"***default***\",\"reflexWisdom\":\"***default***\",\"reflexCharisma\":\"***default***\"},\"will\":{\"willStrength\":\"***default***\",\"willDexterity\":\"***default***\",\"willConstitution\":\"***default***\",\"willIntelligence\":\"***default***\",\"willWisdom\":\"***default***\",\"willCharisma\":\"***default***\"},\"savingThrowsHalfProf\":false},\"baseDC\":\"***default***\",\"expertiseAsAdvantage\":\"***default***\"},\"tab\":\"***default***\",\"tokenActions\":{\"initiative\":true,\"abilityChecks\":null,\"advantageTracker\":null,\"savingThrows\":null,\"attacks\":null,\"statblock\":true,\"traits\":null,\"actions\":null,\"reactions\":null,\"legendaryActions\":null,\"lairActions\":null,\"regionalEffects\":null,\"rests\":true,\"spells\":false},\"textSizes\":{\"spellsTextSize\":\"text\",\"abilityChecksTextSize\":\"text\",\"savingThrowsTextSize\":\"text\"},\"hide\":{\"hideAttack\":\"***default***\",\"hideDamage\":\"***default***\",\"hideAbilityChecks\":\"***default***\",\"hideSavingThrows\":\"***default***\",\"hideSavingThrowDC\":\"***default***\",\"hideSpellContent\":\"***default***\",\"hideSavingThrowFailure\":\"***default***\",\"hideSavingThrowSuccess\":\"***default***\",\"hideRecharge\":\"***default***\",\"hideFreetext\":\"***default***\"},\"applyToAll\":true,\"hitDiceOutput\":\"***default***\",\"showRests\":\"***default***\"},\"advTrackerSettings\":{\"showMarkers\":true,\"ignoreNpcs\":false,\"advantageMarker\":\"green\",\"disadvantageMarker\":\"red\",\"output\":\"silent\"},\"sheetEnhancements\":{\"rollHPOnDrop\":true,\"autoHD\":true,\"autoSpellSlots\":true,\"autoTraits\":true},\"defaultGenderIndex\":2,\"variants\":{\"rests\":{\"longNoHpFullHd\":false}}}}" "> TokenSwapper v0.5 <" "-=> GroupInitiative v0.9.20 <=- [Thu Sep 15 2016 13:38:13 GMT+0000 (UTC)]" "-=> EasyExperience v1.1 <=- [Fri Oct 07 2016 21:41:37 GMT+0000 (UTC)]" "-=> TimeTracker v0.3 is ready! Time format is set to 12-hours. <=-" "DynamicLightRecorder 1478094101899 INFO : -=> DynamicLightRecorder v1.0.1 <=-" "Script loaded: Waypoint Patrols, actively patrolling" "-=> Page Navigator v0.1.43 <=- [Tue Sep 20 2016 12:33:37 GMT+0000 (UTC)]" "Page Navigator Memory: Stored Page & Destination-Token Ids converted to Roll20 objects. Ready to be accessed" SyntaxError: Unexpected end of input SyntaxError: Unexpected end of input at Object.parse (native) at _.each._.chain.movePlayer (apiscript.js:15682:19) at _.each._.chain.handleInput (apiscript.js:16396:33) at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:144:34), <anonymous>:65:16) at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:144:34), <anonymous>:70:8) at /home/node/d20-api-server/api.js:1394:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:400 Ok, that ended up being bigger than I thought it would - hope you can make sense of it... EDIT/Clarification: I'm using the One Click Install version of the script.  I've also tried this joining as a player to see if it will work.  It doesn't crash the API, but when I get the notification in chat, and click the buttons, nothing happens.
1479419773
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hey Gozer, I apologize for the ungodly delay. I some how missed that there was a new post in the thread. Could you try generating the error with just Page Navigator running? Does this happen at startup or in response to a certain action?
1481431941

Edited 1481433339
Hey Scott C,  This script seems really useful. I can't get it to work, I think I just don't understand exactly how it works. I'm a new Pro member, and this is the first API Script I'm trying, save for the D&D 5e OGL Character Sheet Companion. I got your script added, I got the dialogue commands going, and it's useful. I'm more so interested in that teleport feature, though. I don't get the Destination Tokens. Say I'm trying to get my players from Page A to Page B with token collision. Do I put a GM Layer token on Page A called Page B.players? I designated the Flag status marker as the Destination token marker, and put it on the token. Don't I have to put a token on Page B to be the actual destination receiver token? If not, how does the script know where to teleport the player tokens? Sorry for flooding you with questions, I just don't get the concept yet.  EDIT: I achieved a Dialogue that pops up in my players chat:  (From Page Navigation): Your character, Character 2, would like to move to Page 2. Who is traveling with you? Whole Party | Current Party | Controlling Player(s) however, when I click any of those options, nothing happens. And weird enough, I made a character assigned to the GM player, and once I trigger the token collision and click on one of the choices above, the script crashes from a Syntax Error: Unexpected end of input.  SyntaxError: Unexpected end of input at Object.parse (native) at moveAllPlayers (apiscript.js:3592:23) at handleInput (apiscript.js:4211:33) at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:144:34), <anonymous>:65:16) at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:144:34), <anonymous>:70:8) at /home/node/d20-api-server/api.js:1394:12 at /home/node/d20-api server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489)
1481433404
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hi Jonathan, I really need to rework the help menu so that it's more clear (probably switch it to something along the lines of what I did for Roll20AM). That said, here's the steps to get teleportation to work: Create a token on the GM layer of a page. Name this token the exact same as the page to which the players will be moved when they move their token into this area. In the GM Notes of this token you want to put the following JSON (including the quotation marks): { "location":"Where on this page is this token located", "linkLocation":"Where on the destination map does this token link to" } Repeat the above on your destination page Make sure that you have defined the default character(s) for each player in the config menu (There is an update coming soon that will change how these are stored and will require them to be redefined) The script will look for token's on the first destination page whose location matches EXACTLY the linkLocation of the origin token and create these player tokens inside and around that token, and will respect dynamic lighting barriers. Make sure that you have set your destination token markers correctly in the config menu (aka the black flag status marker). Hope that helps, if you've still got questions; feel free to post em up, Scott
1484785742
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Jonathan B. said: EDIT: I achieved a Dialogue that pops up in my players chat:  (From Page Navigation): Your character, Character 2, would like to move to Page 2. Who is traveling with you? Whole Party | Current Party | Controlling Player(s) however, when I click any of those options, nothing happens. And weird enough, I made a character assigned to the GM player, and once I trigger the token collision and click on one of the choices above, the script crashes from a Syntax Error: Unexpected end of input.  This means that your JSON in the GMNotes of the destination token(s) is incorrect. I'll be adding in error handling for this in the next release (which will be soon).
1484885581

Edited 1485215756
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
V1.46 pull request sent  Merged into one-click. New features/Bug fixes: Token removal - Enable this feature in the config menu to have the script remove any tokens representing characters controlled by the player(s) being moved before generating the new tokens Added error handling for some JSON.parses that hadn't been properly handled previously. The script should no longer crash when an improper JSON is entered in a token's GM notes As always, most recent version is accessible from  my fork of the repository .
1485454670
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I am currently getting an error with the most recent update. It looks like something has gone wrong in the calls to PathMath (one of the dependencies). If you are getting this crash, I apologize for the inconvenience. I am working on the problem. -Scott C.
1485528382

Edited 1485569302
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
If you are currently experiencing the crash I mentioned above, please replace your PathMath with the version found  here . There is also currently a bug with character sheet sheetworkers that causes a character's sheet to stop updating when a token representing that character is deleted. If you have token removal activated on your PageNavigator, this will cause your character sheets for the characters being teleported to stop updating correctly. See  here for more details, this error does affect all sheets using sheetworkers and not just the pathfinder sheet as far as I know. EDIT:Minor update to the script released. Removed several extraneous logs as well as a state definition declaration that would cause a crash for any new users. If you are a new user to the script and are getting a crash, please try setting the version to the previous version and then updating to the current version in one-click. This fix has been submitted for one-click, and should be the default version soon.
I still don't understand how teleportation works and how to set it up, the gif and the description is not clicking for me I'm sorry.
1489851269

Edited 1489851376
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hey Chaos, sorry for the delay, I apparently missed the new message notice in a slew of the pathfinder thread new messages. The idea behind teleportation is pretty simple; when you send players to a new map, you often want them to have a token on the map and you often want them to have that token in a specific place (like say the start of a dungeon). Teleportation creates these tokens for your players at destination tokens that you have formatted correctly. Specifically it looks for a specific "location" text to match to either the "linkLocation" text from the destToken that your player(s) moved their tokens onto in the previous area, or the location text that you selected when you moved players to a page by chat command. It then creates the tokens, filling the destination token first and then spiraling out from the destination token. Token creation will respect DL walls and will not overlap tokens regardless of their size. In order for the script to know what tokens to create, you need to set up player's default characters in the config menu, this will bring up a roll query prompt of all the characters that that player has specific control of (so ignores characters that only have "all" in the controlled by field). You can currently set up to 6 characters as default characters for a player. The script will then use the default token for that character whenever a token needs to be made for it. So, that's how it currently works. With PageNavigator 2.0, which is what I've been working on for the last month or so, this will change slightly and improve a great deal. The command buttons in the config menu will still only ask you for up to 6 characters for a player, but you will be able to more easily manually enter an API command to set more than that if you need to. Teleportation will be dramatically faster. The current iteration of the logic for not overlapping tokens and respecting DL walls was my first attempt at it. Stephen S. and Aaron have been a huge help in showing me a better way that makes this process a lot smoother and nearly instantaneous The overall command syntax of the script is going to change a great deal. The current syntax in v1.xx is extremely cumbersome and requires a very large handleInput function as a result with probably an 1/8th of the script's line count  just being the handleInput function. This new syntax is going to be very similar to my Roll20AM syntax. The chat based help menu is going away to be replaced with an archived character whose Bio&Info section will contain the full help menu complete with example use cases. This character will also store the details of page folders. The script will utilize a simple folder or tag system to allow you to organize your pages into related categories. This will also affect how pages are tagged as player accessible. A new variable is being added to the possible syntax of the JSON in the GM notes of a destination token. The new variable is "chat" and will allow you to define things that you would like sent to chat when a player is teleported to this destination token. I'd envision people using this for activating API commands such as using my Roll20AM script, or another jukebox control script, to replicate the "play on load" setting of a page. Won't really affect the end user, but v2.0 is pretty much a complete rewrite of v1.xx resulting in a much more streamlined code with a drastically reduced usage of the state variable's 2mb size limit. A beta of v2.0 should drop sometime in the next 2 weeks, and I'll submit it to One-click a week or so after that. With such a big reworking, I really want to get it put through its paces before putting it in the repository. Hope that helps, Scott
Sorry, Scott -- but I cannot get Page Navigator v1.4.7 to work.  I'm using the latest version of the 5e Shaped sheet and Shaped Companion script.  Whenever I issue any !nav commands other than help, the script errors out with the following error message: TypeError: Cannot read property 'get' of undefined TypeError: Cannot read property 'get' of undefined at apiscript.js:22039:26 at Function._.map._.collect (/home/node/d20-api-server/node_modules/underscore/underscore.js:172:24) at pagesPlayerDialog (apiscript.js:22038:25) at handleInput (apiscript.js:22503:37) at eval (eval at (/home/node/d20-api-server/api.js:146:1), :65:16) at Object.publish (eval at (/home/node/d20-api-server/api.js:146:1), :70:8) at /home/node/d20-api-server/api.js:1510:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) I have a couple of additional questions: 1.  When I set up the default token for players, I also get a dialog box for me, the GM.  I'm not sure why?   2.  Do I need to update the script PathMath (a comment from a couple of months ago seems to indicate so)? 3.  What exactly must I include in the json code that goes into the GM Notes?  Assume I have a Start Page, a Middle page, and an End Page.
1490989908
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Mark W. said: Sorry, Scott -- but I cannot get Page Navigator v1.4.7 to work.  I'm using the latest version of the 5e Shaped sheet and Shaped Companion script.  Whenever I issue any !nav commands other than help, the script errors out with the following error message: TypeError: Cannot read property 'get' of undefined TypeError: Cannot read property 'get' of undefined at apiscript.js:22039:26 at Function._.map._.collect (/home/node/d20-api-server/node_modules/underscore/underscore.js:172:24) at pagesPlayerDialog (apiscript.js:22038:25) at handleInput (apiscript.js:22503:37) at eval (eval at (/home/node/d20-api-server/api.js:146:1), :65:16) at Object.publish (eval at (/home/node/d20-api-server/api.js:146:1), :70:8) at /home/node/d20-api-server/api.js:1510:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) I have a couple of additional questions: 1.  When I set up the default token for players, I also get a dialog box for me, the GM.  I'm not sure why?   2.  Do I need to update the script PathMath (a comment from a couple of months ago seems to indicate so)? 3.  What exactly must I include in the json code that goes into the GM Notes?  Assume I have a Start Page, a Middle page, and an End Page. Hi Mark, I apologize for the inconvenience. I'll need to dig into the script to figure out what is going on with your error. Can you post the exact commands that you tried that triggered the error? As for your questions: The GM is listed as a player because I know that there are some games that have rotating gm's/creator's as players and it was easier to just put all members of the game in the list than write a bunch of extra logic steps to figure out who to display If you are using the one-click install and have everything set to "latest version", then you're good to go. Stephen got a patch out for that issue very quickly and it is now resolved. In the current version of the script, the JSON has two sections: { "location":"The text describing this token's location on the map", "linkLocation":"The text describing the destination's location on the map" } The text can be whatever you want, the linkLocation text just has to be the same as the location text of whatever destination you want that point to link to. I'll dig into that error this weekend (along with several issues I've got in other scripts). Let me know if you have any other questions, or any feature requests, Scott
Scott C. said: In the current version of the script, the JSON has two sections: { "location":"The text describing this token's location on the map", "linkLocation":"The text describing the destination's location on the map" } The text can be whatever you want, the linkLocation text just has to be the same as the location text of whatever destination you want that point to link to. I'll dig into that error this weekend (along with several issues I've got in other scripts). Let me know if you have any other questions, or any feature requests, Scott Cool, thanks.  I'm using the version of Page Navigator that comes in  the Roll20 API Script Library. I guess I'm not understanding the purpose behind the json code.  Can I put any arbitrary text in both sections, or do I need to list (per my example), say "location":"Start page", "linkLocation":"Middle page" or should I be putting something more specific.  I guess what I'm wondering is what is the relationship between the name of the page token and what we're to be putting in the json? I appreciate the help!
1491000655
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, the location and linkLocation text don't need to be anything specific other than the linkLocation text in a token being the same as the location text of the token you want to link to. As an example, let's say that I have two pages: Castle Grounds, and Castle Interior. In addition, let's say that I only have a main entrance into the interior of the castle. I'd have my destination tokens set up like this: On the Castle Grounds page Token Name: Castle Interior GMnotes: { "location":"entrance", "linkLocation":"exit } On the Castle Interior Page Token Name: Castle Grounds GMnotes: { "location":"exit", "linkLocation":"entrance" }
Scott, excellent -- thanks!  I'll set everything up correctly (this time) and give it a try again.  :-)
Okay, I've gotten this far.  What's supposed to happen now?  The player banner moved just fine, but nothing else happened.  Should the party tokens automatically be created/moved to the location of the page token?  I expect that the PCs will be damaged when they move from place to place in the scenario I have planned for them.  Does Page Navigation note the state of each PC and recreate it at the new location?  
One additional oddity -- I'm getting this error message.  The weird thing is that I have nothing in the gmnotes field for this particular character (a familiar for one of my PCs).  I've gone in an did a Ctrl-A and delete to be sure that there wasn't something hidden somehow and it's still happening.  
1491169765

Edited 1491170007
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Mark W. said: Okay, I've gotten this far.  What's supposed to happen now?  The player banner moved just fine, but nothing else happened.  Should the party tokens automatically be created/moved to the location of the page token?  I expect that the PCs will be damaged when they move from place to place in the scenario I have planned for them.  Does Page Navigation note the state of each PC and recreate it at the new location?   Hey Mark, Sorry for the delay getting back to you, life's been a bit crazy. So, it looks like you don't have any destination tokens setup with location text on [GM] Tenement, 1st Floor. If you did, there would be a button for each destination token on that page labeled with its location text, you would then click that button to generate PC tokens at that location. If the players were moved to the page because of moving their tokens onto a destination token and having their move approved, the tokens would be automatically generated at the destination token with location text matching that of the linkLocation text in the token the player(s) moved onto. For the damage, the script takes the default token of the character, so if you have the default token setup to link to their HP on the character sheet, then the tokens will show whatever state is on the character sheet. If you have default tokens setup without linked bars, then it will create the tokens with whatever values were in the default token's values. Mark W. said: One additional oddity -- I'm getting this error message. The weird thing is that I have nothing in the gmnotes field for this particular character (a familiar for one of my PCs). I've gone in an did a Ctrl-A and delete to be sure that there wasn't something hidden somehow and it's still happening. This means that something in that token's settings could not be parsed by the javascript JSON.parse function. This is usually because something has been put in the gm notes, but it could be from any attribute of that token. If you post a screenshot of the token's settings page, I might be able to see what it is, but there's no guarantee. Make sure to click the update button in the config menu after making any changes to your characters.
Hey Scott,  Thanks for all the help and keep up the good work. So I believe I got everything set up properly. I set up a page like the example you gave with the Castle. I have two pages: Castle Grounds.players & Castle Interior.players ... When I collide a player token with it, I get the message saying  Your character, Lasette Dinrova, would like to move to Castle Grounds.player. Who is traveling with you? Whole Party Current Party Controlling Player(s) 11:46PM(From Page Navigator): There was a problem with the GM notes of the Castle Grounds.player origin token. Please review the formatting guidelines in the script forum post. that 11:46 message came when I hit Controlling Players.  When I hit Whole party, it successfully moves the player ribbon to the correct page.  When it hit Current Party, it crashes the API with the following message:  ReferenceError: obj is not defined ReferenceError: obj is not defined at moveCurrentParty (apiscript.js:4607:97) at handleInput (apiscript.js:5278:33) at eval (eval at (/home/node/d20-api-server/api.js:146:1), :65:16) at Object.publish (eval at (/home/node/d20-api-server/api.js:146:1), :70:8) at /home/node/d20-api-server/api.js:1510:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Zd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) this is what I have in my Castle Interior.player GM notes: { "location":"exit" "linkLocation":"entrance" } and my Castle Grounds Grounds.player GM notes: { "location":"entrance" "linkLocation":"exit" } I like the idea of the new token removal, that sounds handy. One of the main reasons I'm using this is because I'm expecting my players to be flipping through pages without the DM online.  Anyways, hope this information helps, and I'm not too far off course. I'm mostly looking to get the token collision Controlling players functionality working.  Thanks again. 
1491797834

Edited 1491797914
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hi Middleman3, sorry for the inconvenience. I think the problem is in your JSONs in the token gmnotes. From what you've posted it looks like you're missing a comma: { "location":"exit" "linkLocation":"entrance" } Should be: { "location":"exit" , <===-----Note comma on this line "linkLocation":"entrance" } You need to have a comma at the end of each line. I'm working on a token setup wizard for the next update to the script to make this process much less error prone. When you say that "whole party" successfully moves the ribbon, does it also create the player's tokens? If it does do this, then I'll need to dig in a little farther.
1492052770
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
V2.0 is up for beta . Due to the high number of changes between the versions, I have started a new thread.