the movement pad
Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice
-
- Kobold
- Posts: 1
- Joined: Wed Apr 20, 2011 8:21 pm
Re: the movement pad
Where can I find the latest version of this and the latest install instructions?
- CoveredInFish
- Demigod
- Posts: 3104
- Joined: Mon Jun 29, 2009 10:37 am
- Location: Germany
- Contact:
Re: the movement pad
The version 1.8.3 pointed to in the first post is the most recent.
I'm afraid I did nothing yet to fix the lastly reported bugs - sorry. Also I havent found time to update any docs yet.
I think - buts its some time ago I used it - it hasnt changed much from the stuff written in the top post ... but if you get stuck I'll help out.
I'm afraid I did nothing yet to fix the lastly reported bugs - sorry. Also I havent found time to update any docs yet.
I think - buts its some time ago I used it - it hasnt changed much from the stuff written in the top post ... but if you get stuck I'll help out.
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: the movement pad
I tried installing MP1.8.3 in MT1.3b76 using the instruction for MP1.7Final and it's got some major issues. There must be a step or two missing in the installation instructions...CoveredInFish wrote:The version 1.8.3 pointed to in the first post is the most recent.
I'm afraid I did nothing yet to fix the lastly reported bugs - sorry. Also I havent found time to update any docs yet.
I think - buts its some time ago I used it - it hasnt changed much from the stuff written in the top post ... but if you get stuck I'll help out.
So, I gave that up and I've been looking for ways to incorporate some of the MovePad features using onTokenMove. So far tracking movement, dynamically applying/removing movement states (5'foot step, walk, hustle, run), and auto directional facing is working.
CiF, is there any way that onTokenMove could be used to spawn MovePad footprints?
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."
Re: the movement pad
You could use getLastPath() to get the Coords. But then youll still have to be smart about the direction unless eg you use a dot or circle.
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
- CoveredInFish
- Demigod
- Posts: 3104
- Joined: Mon Jun 29, 2009 10:37 am
- Location: Germany
- Contact:
Re: the movement pad
Yep, what he said. Dropping the fotprints wont be a problem, but I dont see a way to figure the step-by-step facing.
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: the movement pad
I actually found some work on footprints that Aliasmask did HERE.wolph42 wrote:You could use getLastPath() to get the Coords. But then youll still have to be smart about the direction unless eg you use a dot or circle.
I ran into some issues trying to use it in an existing b76 campaign, but I hope to work that out with some input from Alias. Though, ultimately, I'd like to have the "click on foot path to move token back to that step" feature that the MovePad had. Being able to auto track movement is great, but if a player moves too far and I have to move them back I'm going to have to add movement to them manually which is a bit of a pain.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."
- CoveredInFish
- Demigod
- Posts: 3104
- Joined: Mon Jun 29, 2009 10:37 am
- Location: Germany
- Contact:
Re: the movement pad
Yeah ... the undo feature. You could probably save the the moved path on a token property and use it to recalculate the correct movement score. Other idea would be to save all needed informations on the footprint tokens (like moved-Token-Id, position (duh?), current movement score, ...).
Re: the movement pad
in all I don't think its too difficult to do that, i mean you have the coordinates of two cell you know which one first and which one later so you know the direction the token should be facing.CoveredInFish wrote:Yep, what he said. Dropping the fotprints wont be a problem, but I dont see a way to figure the step-by-step facing.
Eg movement from (x,y) --> (0,0) to (1,1) that's one step SE. You could do some angle calculations on that, but I think its way faster (and easier) to just create 3 if statements (if x==0, 1, -1) with three embedded if statements (if(y==0, 1, -1) note that you can skip (0,0), this gives you 8 possibilities and just set the right facing per case.
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
Re: the movement pad
I thought about automating the undo part by checking the current square for your footprint. It would then readjust the amount of movement you have done. Mostly because the foot prints are on the object layer and aren't clickable in the version I did. The drawbacks are that the player has now exposed an area he should not have exposed and he could not end his move on his path (like running in a circle for whatever reason). Perhaps a popup could resolve that question to reset path to that point.
My lib didn't actually keep track of total movement and only showed footprints for the last path. I planned to change that though by keeping track of current movement, max movement for various movement "levels". Another thing I didn't bother with was multiple people moving tokens at the same time, or did I? I don't recall.
re-facing and CiF: Don't you remember? We worked on that together? You came up with better/more efficient code using a matrix and a json string. I was using powers and you suggested just using 1's and 10's or something else. I was looking for the code, but can't seem to find it.
Here was my original code:
My lib didn't actually keep track of total movement and only showed footprints for the last path. I planned to change that though by keeping track of current movement, max movement for various movement "levels". Another thing I didn't bother with was multiple people moving tokens at the same time, or did I? I don't recall.
re-facing and CiF: Don't you remember? We worked on that together? You came up with better/more efficient code using a matrix and a json string. I was using powers and you suggested just using 1's and 10's or something else. I was looking for the code, but can't seem to find it.
Here was my original code:
Code: Select all
[H: dx = arg(0)]
[H: dy = arg(1)]
[H: matrixVal = power(2,dx+1)+power(2,dy+4)]
[H: matrixTable = "17,33,34,36,20,12,10,9"]
[H: macro.return = listFind(matrixTable,matrixVal) * 45]
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
- CoveredInFish
- Demigod
- Posts: 3104
- Joined: Mon Jun 29, 2009 10:37 am
- Location: Germany
- Contact:
Re: the movement pad
Yes I do remember NOW and yes it is doable. I just got the insight that if I can do it for the last step (thats what we did) i can do it for every step as well ... *facepalm*
EDIT: tested it, works fine
EDIT: tested it, works fine
Code: Select all
@@onCampaignLoad
@PROPS@ fontColor=black;autoExecute=true;fontSize=1.00em;sortBy=;color=default;playerEditable=false;applyToSelected=false;group=;tooltip=;minWidth=
[defineFunction("calculateFacing", "calculateFacing@this")]
@@calculateFacing
@PROPS@ fontColor=black;autoExecute=true;fontSize=1.00em;sortBy=;color=default;playerEditable=false;applyToSelected=false;group=;tooltip=;minWidth=
[h: from = arg(0)]
[h: from.x = json.get(from, "x")]
[h: from.y = json.get(from, "y")]
[h: to = arg(1)]
[h: to.x = json.get(to, "x")]
[h: to.y = json.get(to, "y")]
[h: dx = 1 + min(1, max(from.x-to.x, -1))]
[h: dy = 1 + min(1, max(from.y-to.y, -1))]
[r: listGet("-45, 0, 45, -90, 0, 90, -135, 180, 135", 3*dx+dy)]
@@onTokenMove
@PROPS@ fontColor=black;autoExecute=true;fontSize=1.00em;sortBy=;color=default;playerEditable=false;applyToSelected=false;group=;tooltip=;minWidth=
[h: path = json.reverse(macro.args)]
[h, if(json.length(path)<=1): abort(0)]
[h: index = json.length(path)-1]
[r, while(index>0), code: {
<!-- calculate step by step facing, you could create footstep tokens here -->
[h: from = json.get(path, index)]
[h: to = json.get(path,index-1)]
[r: calculateFacing(from, to) ]
[h: index = index - 1]
}]
<!-- actually set last facing -->
[h: from = json.get(path, 1)]
[h: to = json.get(path,0)]
[h: setTokenFacing( calculateFacing(from, to)) ]
Last edited by CoveredInFish on Thu May 12, 2011 3:38 am, edited 1 time in total.
Re: the movement pad
@Alias: I just had glance at the campaign file of yours. Looks nice. It does not have multiple tokens move (actually weird stuff happens when you do that).
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: the movement pad
Yeah, I knew they wouldn't be clickable without switching to the object layer, which is fine. I don't suspect people would need to use it a lot, it's just that when you have a player move a long distance that's auto-calculated, you do have to occasionally move them back... at which point you now have to start counting squares and adding movement back in. Storing current movement totals on each footprint seems like it would be the easiest method. Knowing to delete every footprint that came after a particular point might be tougher if all the steps aren't stored somewhere though.aliasmask wrote:I thought about automating the undo part by checking the current square for your footprint. It would then readjust the amount of movement you have done. Mostly because the foot prints are on the object layer and aren't clickable in the version I did.
Fortunately, I only wanted to use your code for the tokens that had initiative anyway, so I didn't need multi-token support.Another thing I didn't bother with was multiple people moving tokens at the same time, or did I? I don't recall.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: the movement pad
CiF,
Any chance you could strip out the movepad only (just the actual pad window and functioning buttons)? I tried downloading an earlier version of the campaign before all of the bells and whistles, but it was no longer available... and I'm having a tough time figuring out what I need and don't need when I look through the code as it's broken into a lot of macros.
Any chance you could strip out the movepad only (just the actual pad window and functioning buttons)? I tried downloading an earlier version of the campaign before all of the bells and whistles, but it was no longer available... and I'm having a tough time figuring out what I need and don't need when I look through the code as it's broken into a lot of macros.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."
- CoveredInFish
- Demigod
- Posts: 3104
- Joined: Mon Jun 29, 2009 10:37 am
- Location: Germany
- Contact:
Re: the movement pad
Yup, there is a chance. I cant promise I find time for that real soon, but I see where it fits in. I also dont now how easy it is to accomplish but I guess its easier for me than anyone else
I'll also try to find time to complete a package for the onTokenMove event. I completed the (facing correct) footprint path and its deleted when you move again. Should be little work to implement cost accounting (maybe even terrain?) and undo.
I'll also try to find time to complete a package for the onTokenMove event. I completed the (facing correct) footprint path and its deleted when you move again. Should be little work to implement cost accounting (maybe even terrain?) and undo.
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: the movement pad
CoveredInFish wrote:Yup, there is a chance. I cant promise I find time for that real soon, but I see where it fits in. I also dont now how easy it is to accomplish but I guess its easier for me than anyone else
I used Aliasmask's code to create footsteps but it kept erasing them any time you picked up the token and moved it again. I don't know about you, but I always have players picking up their tokens more than once each turn and then their paths would get erased before the end of their turn. I think it would be best if there was a way to make a single UDF clear the active path so that people could call it when they needed to (I use a manual "Next Init" button so that's where I'd put it, but others might just want to create an "End" button.)I'll also try to find time to complete a package for the onTokenMove event. I completed the (facing correct) footprint path and its deleted when you move again.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."