the movement pad
Full Bleed wrote: One of the things MT doesn't yet do is measure and restrict movement.
I've been thinking that maybe we can kind of add that functionality through a macro by creating a small movement pad in its own frame with directional arrows that people can click on to move their tokens (presumably 8-way in a grid.)
Given that people have custom frames for character sheets, I figure that having a movement pad should be pretty doable.
So instead of picking up and dragging their token, players would move by clicking on directional arrows in the pad. Each click would move the token one square in the correct direction (using a combination of getTokenX, getTokenY, moveToken, and goto.) We could then, with each click, subtract the consequent distance from a movement property, and make it so that they couldn't move any more if they were out of movement. They would, of course, always be able to grab their token and move it outside the bounds of the movement pad (unless Locking Player Movement can stop that while still allowing movement with the pad, thereby forcing them to use the pad if we so chose.)
I think there is a lot of room to customize such a pad with additional functionality for specific systems, but a core pad might get people headed in the right direction and give them something to build on if they want this sort of functionality.
Using and Installing the movePad
Install the movePad
-------------------
Open your campaign (or a new one).
Drop the lib-token "lib_cifMovPad_v1_7_final.rptok" on the map.
Import the tables "tbl_graphics.mttable" and "tbl_footsteps.mttable".
If you like you can drop the "lib_events.rptok" and "tkn_secretDoor.rptok" as well, these are needed for specific features of the pad.
This is a good time to execute the "onCampaignLoad"-macro of the lib-token.
Next we create the footpath tokens.
Drop a new clean token (any will do) to your map.
Copy the macro "Create footpath tokens" (its in the SETUP group way down the list) to your campaign macros.
Select the new token and execute the "create footpath tokens"-macro.
This will create a bunch of tokens used for displaying the moved paths.
You can delete the macro from your campaign macros as well as the dropped token.
Depending on your settings you might have to create some states here. The graphics are in the states-folder. Note that you can switch off the state usage at all as well as set the names of the states used (to make it work with your preferred states set).
Copy the "Open" and "Settings" from "copy me to campaign"-group of the lib token to your campaign macros. It would be a good practice to create a macro group "MovePad" for them but that is entirely you business
If you use those features you might want to copy "Setup events/terrain" and "Setup token" as well.
Execute "Settings". I'll explain all the stuff in detail later, but here is what you must change to your setup.
Map and Cost -> Map grid ad Map cost settings
Misc -> Movement Property
States -> either set to existing state names or uncheck them
Basic Using
-----------
Open the pad using the "Open" macro.
Select a token you wish to move.
Click the center button of the pad. The token(s) selected is now stored in the pad.
If you click on the arrow buttons you would move if your token would have any movement (it might depending on your setup).
The movePad-menu contains the following:
- Undo a step
- Undo all steps
- Switch "perform 5-foot-step" mode. Activated it allows a single step.
- Switch "peek" mode. This allows moving the token one field in a direction to set its vision - thus allowing it to peek around a corner.
- End turn. This will refresh the movement property and resets path, states, etc ...
- Switch "Change facing" mode. Activated the buttons will not move but change the facing of the token.
- "Add to movement" can be used to add (or subtract if you enter negatives) to you movement property.
For start press "End turn" once.
Now you should be able to move the token. Play around...
Note that the features "vbl blocks movement", "terrain modifier" and "events" slow down the pad. Deactivate them if you dont make use of them.
The Settings in detail
----------------------
*Map and cost*
Map grid: use Square, vertical or horizontal grid
Movement cost settings:
The pad can use the map settings for cost calculations. Note that to have th metric "ONE_TWO_ONE" work correctly you have to check "fix ONE_TWO_ONE bug".
If you dont use the map defaults you can set your own cost. This works with decimal numbers. You can set different cost for diagonal movement. The actual payed amount is the multiplie times the units per cell.
Face changing:
If checked face changes will cost. If you enter a single number changing face costs that much regardless of the angle. You can enter a list of costs as well, so that a 45° turn might be free (0) but a 90°+ turn costs 1 and a 180° turn costs 2.
Backpedaling and strafing can costs differently. You can set up modifier that will be added or multiplied. If you dont want to use this set them 1 and multiply (or 0 and add).
*Display*
Pad style: some clients have problems with image links I used for displaying the pad. If you experience ignored clicks you can switch the pad to html form buttons that work more reliable.
Display selection: show a list of selected tokens under the pad.
Center screen to moved token: after a step (or selection) is performed the map is centered on the token.
Show selection on center: replace the center button of the pad with the selected token.
Show movement: shows the amount of movement for the selected tokens under the pad.
Show path with footprints: the moved token will leave a trail of footprints (will be cleared by "end turn")
Show origin of peek: If peeking a copy of the token will show where you peek from. The state "isOrigin" (settable later) will be activated so that it can be dimmed or marked otherwise.
Name or id of token used to show footprints: the footprints marking the moved path will be made with copies of this token. Note that you can set a token to use other footprint tokens (thus making different paths).
Map where FP-token can be found, empty for current: the map where the footprint tokens are placed must be set here.
*Misc.*
Change selection automatically: the token set in the movepad changes automatically if you change the selection (making use of the onSelection event).
Block movement by VBL: VBL will block the movement of your token. Note that this will slow down the pad. Note as well that your token can get stuck if the VBL are not according to the grid - but undo will help.
Use terrain modifiers: movement cost will be modified if you move over specifically set up terrain tokens. This will slow down the pad.
Use event tokens: event macros will be called if you move over specifically set up event tokens. This will slow down the pad.
Lib:token for events: to ease the setup of events the token set here will be scanned for macros. If you use the "setup event/terrain" macro the macros will be selectable there.
Allow diagonal movement: you can deactivate the buttons to move diagonal.
Dont set any facing: check this and the pad wont mess with token facing anymore.
Adjust token facing to move direction: if you move in a direction token facing will be set the same.
Change facing prior to move: You can only move in facing direction, otherwise facing will be set.
Allow movement for token with initiative only: only tokens having initiative can be move. This is recommended!
Get GM approval for peeking: peeking will now send a link to the gm, if he approves the peek/clicks the link, the peek will be performed.
Movement property: this is the property to keep track of the actual movement left. It will be refreshed by the max. Movement field, that can be a property, a number of even a function (the field will be evaled).
**Buttons**
You can display the functions in the menu bar you like and hide others.
**States**
You can set the states movepad should use as well as their actual names here.
There are 3 different sets of states.
isPeeking and isOrigin will be used in peeking mode.
walking/hustling/running will be set if your movement is a certain part of your max movement. Eg would the walking state shown if you used movement is less than 25% of your max movement. You can set up those percentages here as well.
5foot will be set if a 5foot-step was performed.
Q&A
---
How can i set up showing the movement left on the token.
You need to set up many many states with those numbers and modify the macro "showMovementHookIn" to actually set/unset those states. You could set here bars as well.
Latest version: v1.8.3 this version requires MT v1.3b70+
get it from the announcement
Version history
v1.1:
- example movecost management
- change selection onSelection event
- goto moved token
- show movement in frame (not formatted at all)
- show the selection in the center of the pad (or a + sign if there are more tokens selected)
- all changes are made optional
- minor bug fixes
- Selection now centers the token (if centering is on). This should get rid the odd first move thing.
- you can allow/forbid diagonal moves
- added setting units per cell
- default behaviour is now to get movement cost from map defaults (i use getDistanceXY())
- movement can be locked to initiative
- replaced the lib token image
- undo last step
- added support for vertical and horizontal hex grids
- using the nice undo icon instead of text link
- i made some changes to get rid off the unknown token bug. Not sure if its enough...
- movement & max-movement property via settings
- refreshToken functionality to be included in your endTurn-macro
- peek mode
- 5foot step
- images now in a table, not image tokens
- fixed some bugs
- moved path shown
- undo: single steps, all, to point on path
- terrain modifier, events, changes in appearance, more buttons
- to do
- sped up a lot
- combined undo function