{ "name": "Marching Order", "script": "marchingOrder.js", "version": "3.1", "previousversions": ["2.0", "2.1", "2.2", "2.3", "2.4", "3.0"], "description": "# Marching Order\r\r_3.1 Updates_\r* Added button for creating ad-hoc formations that aren't saved.\r* Added button for making one token follow another at some set distance as an ad-hoc formation.\r* Reorganized the menu a little bit.\r* Formations will only look for their tokens on the objects layer when they are applied.\r\r_v3.0 Updates_\r* The script has been reworked entirely. Marching orders now work based upon formations formed when you tell a group of tokens to follow a leader.\r* You can now save multiple formations and load them up to be used later.\r\rThis script allows you to select tokens and tell them to follow each other\rin some specified marching formation. Marching orders are defined by formations,\rwhere there is a leader token and one or more follower tokens. When you set\rtokens to follow a leader, it will record their position relative to the\rleader in that formation, and they'll maintain that position as the leader\rmoves. This formation is maintained even when the leader travels around corners.\r\r## Chat Menu\r\rWhen the script is installed, it will create a macro called\r'MarchingOrderMenu'. This macro will display a menu in the chat that provides\rthe user interface for the script.\r\rBelow is documentation for each of the menu items:\r\r### Ad-Hoc Formations\r\rThe following menu items allow you to create one-time-use marching formations.\r\r#### Ad-Hoc Formations -> Follow\r\rThis button allows you to have a token simply follow behind another.\r\rFirst, select the token that you want to be the follower, then click the Follow\rbutton. Next, click the token you want them to follow. Then in the prompt that\rappears, enter how far behind you want them to follow (leave as 0 to follow\rdirectly behind them).\r\rBe advised of the following gotchas:\r* A token can't follow behind another if the other token already has followers.\r\r#### Ad-Hoc Formations -> Ad-Hoc Formation\r\rTo form a one-time-use formation, use this button.\r\rTo create a new marching order formation, select a group of tokens, with one\rof them having either the black-flag or flying-flag status marker active. That\rtoken will be the leader of the formation. (See Moving in Formation below)\r\rThen click the Ad-Hoc Formation button in the chat menu. It will ask you to enter\rwhich direction the formation is facing at the time you've created it.\rThis marching formation will be applied to the selected tokens.\r\rBe advised of the following gotchas:\r* You must have one of the selected tokens have either the 'black-flag' or 'flying flag' status marker. This is used to designate the leader of the formation.\r\r### Saved Formations\r\rUnder this section of the chat menu, you can view the formations you have\rpreviously created. The formations each displayed in a boxed area with their name,\ra preview of the formation, and some buttons to either use the formation or\rdelete it. The previews display the marching orders proceeding westward.\r\r### Saved Formations - > New formation\r\rThis button allows you to create a formation and save it for future use.\r\rTo create a new marching order formation, select a group of tokens, with one\rof them having either the black-flag or flying-flag status marker active. That\rtoken will be the leader of the formation. (See Moving in Formation below)\r\rThen click the New Formation button in the chat menu. It will ask you to enter\rwhich direction the formation is facing at the time you've created it, and it\rwill ask you to give a name for the new formation. This marching formation will\rbe applied to the selected tokens and it will also be saved for future use\r(See Saved Formations).\r\rBe advised of the following gotchas:\r* You must have one of the selected tokens have either the 'black-flag' or 'flying flag' status marker. This is used to designate the leader of the formation.\r* Each new formation must have a unique name.\r\r#### Saved Formations -> Use\r\rClick this button to use the previously saved marching formation. It will be\rapplied to the relevant tokens on the page that currently has the\rplayers ribbon.\r\rBe advised of the following gotchas:\r* All of the tokens in the formation must be on the current page. If a token is missing, the script will yell at you for it, but the rest of the tokens will be allowed to move in formation.\r* There can't be duplicates of any tokens in the formation on the current page.\r\r#### Saved Formations -> Delete\r\rClick this button to delete the previously saved marching formation.\r\r### Other Actions\r\r#### Other Actions -> Stop Following\r\rTo stop all the active marching formations, click the Stop All Following button\rin the chat menu.\r\r#### Other Actions -> Clear Script State\r\rIf you'd like to start afresh with a whole blank state for the Marching Order\rscript, you can click the Clear Script State button to reset the script\rto its factory settings.\r\r## Moving in Formation\r\rWhen a marching formation is applied, all the tokens relevant to the formation\rwill begin following their leader in that formation. When the leader moves,\rthe other tokens in the formation will move along with them, according to\rtheir position in the formation.\r\r## Stepping out of Formation\r\rYou can remove a token from an active formation at any time by just moving it\rmanually. That token will no longer move along with the other tokens in that\rformation.\r\r## But I liked the old version of this script!\r\rYou can still use the old version of this script by reverting back to\rversion 2.4. However, do so with the understanding that I won't be providing\rany further technical support on versions prior to 3.0.\r\r## Help\r\rMy scripts are provided 'as-is', without warranty of any kind, expressed or implied.\r\rThat said, if you experience any issues while using this script,\rneed help using it, or if you have a neat suggestion for a new feature,\rplease shoot me a PM:\rhttps://app.roll20.net/users/46544/stephen-l\r\rWhen messaging me about an issue, please be sure to include any error messages that\rappear in your API Console Log, any configurations you've got set up for the\rscript in the VTT, and any options you've got set up for the script on your\rgame's API Scripts page. The more information you provide me, the better the\rchances I'll be able to help.\r\r## Show Support\r\rIf you would like to show your appreciation and support for the work I do in writing,\rupdating, maintaining, and providing tech support my API scripts,\rplease consider buying one of my art packs from the Roll20 marketplace:\r\rhttps://marketplace.roll20.net/browse/search?category=itemtype:Art&author=Stephen%20Lindberg|Stephen%20L\r", "authors": "Stephen Lindberg", "roll20userid": 46544, "useroptions": [], "dependencies": [ "Vector Math", "Token Collisions" ], "modifies": { "left": "read, write", "rotation": "read, write", "token": "read", "top": "read, write" }, "conflicts": [] }