RPTools.net

Discussion and Support

Skip to content

It is currently Thu Aug 17, 2017 6:47 am 






Reply to topic  [ 1616 posts ]  Go to page Previous  1 ... 103, 104, 105, 106, 107, 108  Next

Previous topic | Next topic 

  Print view

Author Message
 Offline
Kobold
 
Joined: Mon Jun 10, 2013 3:44 am
Posts: 7
 Post subject: Re: Wolph42's 'Drop-in' Bag of MT Tricks v.40 [FEATURE CHOIC
PostPosted: Thu Feb 23, 2017 5:23 pm 
Ok, thanks, got it. Will have to maybe setup portals as border teleports.


Top
 Profile  
 
 Offline
Cave Troll
 
Joined: Mon Apr 10, 2017 4:50 am
Posts: 27
 Post subject: Re: Wolph42's 'Drop-in' Bag of MT Tricks v.40 [FEATURE CHOIC
PostPosted: Mon Apr 10, 2017 8:00 am 
I have this strange issue with MT 1.4.1.7 and BoT v42. When I choose to animate a door with a switch, a switch will not be added to the map. I first need to find the switch icon, add it to the map, do the settings to animate a door, and then the switch will be added to the map. I even added the folder of icons as a resource library. Is it hard coded to a specific directory?

Thanks.


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9315
Location: Netherlands
 Post subject: Re: Wolph42's 'Drop-in' Bag of MT Tricks v.40 [FEATURE CHOIC
PostPosted: Mon Apr 10, 2017 9:42 am 
The switch needs to be present on the 'base' map. (which i the map set as such in the bot settings

_________________
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC

My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent and
DPI.
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


Top
 Profile  
 
 Offline
Kobold
 
Joined: Tue Jan 10, 2017 12:17 pm
Posts: 7
 Post subject: Re: Wolph42's 'Drop-in' Bag of MT Tricks v.40 [HEX GRIDS]
PostPosted: Mon May 01, 2017 12:40 pm 
My apologies if this an old question, but are the limit movement functions in the BOT not fully compatible with hex grids? I have been experimenting with this and am finding that "difficult areas" and movement-blocking VBL lines are not lining up with the hex grid. In contrast, these functions work really well on square grids.


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9315
Location: Netherlands
 Post subject: Re: Wolph42's 'Drop-in' Bag of MT Tricks v.40 [FEATURE CHOIC
PostPosted: Mon May 01, 2017 2:08 pm 
Not sur e thuis had ever come up before. To be short: I've never looked at hex and have no clue whether this works correctly or not (well apparently it does not). Given how its created i woud expect it to work. So I'm guessing hex requires some love from the devs

_________________
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC

My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent and
DPI.
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


Top
 Profile  
 
 Offline
Kobold
 
Joined: Tue Jan 10, 2017 12:17 pm
Posts: 7
 Post subject: Re: Wolph42's 'Drop-in' Bag of MT Tricks v.40 [FEATURE CHOIC
PostPosted: Mon May 01, 2017 3:01 pm 
When you define special areas with BOT on a hex grid, the effects on a token's movement are felt one hex high and to the left of where they are supposed to be. Similarly, a token trying to move right on a hex grid is stopped by a VBL line at least a half hex before the token gets to the VBL line, while a token trying to move left on a hex grid can move on top of the VBL line, and thereby expose the FOW for the area beyond the VBL line.

I suspect that the BOT code that is used to locate special areas and the MT code used to compute VBL sight-lines (isVisible) is based on the geometry of square grids and square tokens. When you switch to a hex grid, neither the grid nor the token are square, and therefore the code has a problem with the relative locations of the token, the special areas, and the VBL lines.


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Sep 11, 2007 6:31 pm
Posts: 5410
 Post subject: Re: Wolph42's 'Drop-in' Bag of MT Tricks v.40 [FEATURE CHOIC
PostPosted: Tue May 02, 2017 9:31 pm 
trrpt wrote:
When you define special areas with BOT on a hex grid, the effects on a token's movement are felt one hex high and to the left of where they are supposed to be. Similarly, a token trying to move right on a hex grid is stopped by a VBL line at least a half hex before the token gets to the VBL line, while a token trying to move left on a hex grid can move on top of the VBL line, and thereby expose the FOW for the area beyond the VBL line.

I suspect that the BOT code that is used to locate special areas and the MT code used to compute VBL sight-lines (isVisible) is based on the geometry of square grids and square tokens. When you switch to a hex grid, neither the grid nor the token are square, and therefore the code has a problem with the relative locations of the token, the special areas, and the VBL lines.


That's likely right. square grids "center point" is the top left of the square. On hex grids, its the actual center of the square. At least that's what I seem to remember from the code years ago. There is a reason for this that can't be changed in the code at least not easily. Wolph however, may be able to figure out a solution in his macros as long as the map grid type is something he can query(I don't know if it is or not).

I would be a bit surprised that the VBL does not limit movement properly on the hex grid though....

_________________
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..


Top
 Profile  
 
 Offline
Kobold
 
Joined: Tue Jan 10, 2017 12:17 pm
Posts: 7
 Post subject: Re: Wolph42's 'Drop-in' Bag of MT Tricks v.40 [FEATURE CHOIC
PostPosted: Wed May 03, 2017 2:23 am 
Thanks for the info, jfrazierjr. I will experiment with tweaking the "center" point of the token based on grid type. By the way, I think that the grid type can be queried as follows:

[h: gridType = json.get(json.get(getInfo("map"), "grid"), "type")]


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Sep 11, 2007 6:31 pm
Posts: 5410
 Post subject: Re: Wolph42's 'Drop-in' Bag of MT Tricks v.40 [FEATURE CHOIC
PostPosted: Wed May 03, 2017 9:26 pm 
trrpt wrote:
Thanks for the info, jfrazierjr. I will experiment with tweaking the "center" point of the token based on grid type. By the way, I think that the grid type can be queried as follows:

[h: gridType = json.get(json.get(getInfo("map"), "grid"), "type")]



I seem to think 3-4 years ago when wolph was making changes constantly to this(right after I and some of the others added some of the new macro code) this topic might have come up. I could be remembering wrong, but I would absolutely suggest trying to search within this thread for "hex"

_________________
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..


Top
 Profile  
 
 Offline
Kobold
 
Joined: Tue Jan 10, 2017 12:17 pm
Posts: 7
 Post subject: Re: Wolph42's 'Drop-in' Bag of MT Tricks v.40 [FEATURE CHOIC
PostPosted: Sat May 06, 2017 6:56 pm 
trrpt wrote:
I will experiment with tweaking the "center" point of the token based on grid type.

Attached below are the changes that I made to moveVBLToken to set separate X and Y offsets for isVisible() based on the grid type and the token size. I have standardized on 5e sizes in the code below. This seems to be working now for VBL blocking on Square, Hex, and Isometric grids. I have not tried to make it work for no grid. Also, I have not tried to tackle the code for special areas.

Code:
@@ -7,11 +7,49 @@
 [H: hasVision = if(isPC(),1,0)]
 <!-- Calc Size and center of token -->
 <!-- Test FreeSize and make sure it works correctly -->
-[H: tokenSizes = json.append("","Medium","Large","Huge","Gargantuan","FreeSize","Colossal")]
-[H: tokenSizeMod = max(1,json.indexOf(tokenSizes,getSize(id))+1)]
-[H: gridSize = json.get(json.get(getInfo("map"),"grid"),"size")]
-[H: sizeInPixels = gridSize * tokenSizeMod]
-[H: offset = round(sizeInPixels/2)]
+[h: tokSize = getSize(id)]
+[h: tokSize = if(tokSize == "Humongous", "Gargantuan", tokSize)]
+[h: tokenSizes = json.append("","Medium","Large","Huge","Gargantuan")]
+[h: tokenSizeMod = max(1,json.indexOf(tokenSizes,tokSize)+1)]
+[h: gridSize = json.get(json.get(getInfo("map"),"grid"),"size")]
+[h: sizeInPixels = gridSize * tokenSizeMod]
+[h: gridType = json.get(json.get(getInfo("map"),"grid"),"type")]
+[h, switch(gridType), code:
+   case "Square": {
+      [h: xoffset = round(sizeInPixels/2)]
+      [h: yoffset = xoffset]
+   };
+   case "Horizontal Hex": {
+      [h, if(tokSize ==  "Large"), code: {
+         [h: xoffset = round(gridSize/2)]
+         [h: yoffset = round(0.57735 * xoffset)]
+      };{
+         [h: xoffset = 0]
+         [h: yoffset = xoffset]
+      }]
+   };
+   case "Vertical Hex": {
+      [h, if(tokSize ==  "Large"), code: {
+         [h: yoffset = round(gridSize/2)]
+         [h: xoffset = round(0.57735 * yoffset)]
+      };{
+         [h: xoffset = 0]
+         [h: yoffset = xoffset]
+      }]
+   };
+   case "Isometric": {
+      [h: yoffset = round(sizeInPixels/2)]
+      [h: xoffset = 0]
+   };
+   case "None": {
+      [h: xoffset = 0]
+      [h: yoffset = xoffset]
+   };
+   default: {
+      [h: xoffset = 0]
+      [h: yoffset = xoffset]
+   }
+]
 
 <!-- Move token to first position -->
 [H: firstPosition = json.get(path,0)]
@@ -30,7 +68,7 @@
    [H, if(counter < pathLength): next = json.get(path,counter)]
    [H: x = json.get(next,"x")]
    [H: y = json.get(next,"y")]
-   [H: canSee = isVisible(x+offset,y+offset)]
+   [H: canSee = isVisible(x+xoffset,y+yoffset)]
    [H, if(canSee), code: {
       [H: moveToken(x,y,1,id)]
       [H, if(hasVision): exposeFOW()]
@@ -74,5 +112,5 @@
 <!-- This is needed to override the tokens.denyMove when using moveToken (draw order problem) -->
 [H: z = eval("0"+getProperty("elevation"))]
 <!-- set draw order based on x, y, z and token size -->
-[H: drawOrder = (y + offset) * 1000 + (x + offset) - (tokenSizeMod -1) * gridSize + floor(z/5) * gridSize]
+[H: drawOrder = (y + yoffset) * 1000 + (x + xoffset) - (tokenSizeMod -1) * gridSize + floor(z/5) * gridSize]
 [H: setTokenDrawOrder(drawOrder,id)]
\ No newline at end of file


Top
 Profile  
 
 Offline
Kobold
 
Joined: Fri Mar 10, 2017 11:25 am
Posts: 8
 Post subject: Re: Wolph42's 'Drop-in' Bag of MT Tricks v.40 [FEATURE CHOIC
PostPosted: Fri May 26, 2017 9:25 pm 
I'm still a Maptool and BoT novice, so I've likely done something wrong, but I am having a very strange problem on only campaigns with BoT installed. It has to do with moving tokens around. Any tokens on the object layer work just fine, but tokens on the token layer behave weirdly. With Snap to Grid off, I can drag a token around, and it moves smoothly with the pointer (as opposed to jumping from square to square the way it does when Snap to Grid is on, but the moment I release the mouse button, the token jumps onto the nearest grid square. With Snap to Grid turned on, when I move tokens around, the jump from square to square, following the mouse pointer, but when I release the button, they SOMETIMES jump diagonally one square up and to the left. If a particular token is doing it, then it does it all the time. I've closed and reopened Maptool, loaded campaigns without BoT installed, and everything is fine. But I've tried two campaigns with BoT, and they both do this. I'm sure I've screwed something up, but I'd really appreciate it if someone could help me fix it.


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9315
Location: Netherlands
 Post subject: Re: Wolph42's 'Drop-in' Bag of MT Tricks v.40 [FEATURE CHOIC
PostPosted: Sat May 27, 2017 4:19 am 
There's a setting in the bot which also snaps token s turn that off

edit:its under the 'toggles'tab.

_________________
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC

My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent and
DPI.
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


Top
 Profile  
 
 Offline
Cave Troll
 
Joined: Mon Apr 10, 2017 4:50 am
Posts: 27
 Post subject: Re: Wolph42's 'Drop-in' Bag of MT Tricks v.40 [FEATURE CHOIC
PostPosted: Thu Jun 22, 2017 3:17 pm 
I'm now having an issue with BoT v42 and MapTools v1.4.1.7.

I'm using the door opening/closing feature with the switches next to the door. When I'm in the regular view mode, the doors open can close normally. However, when I'm in Fog of War view, I click a switch and the door opens and then closes. I need to click the switch a few times to finally make it stay open. Do you know what could be going on? Also, when I click the Toggle door button on the macro panel, the door opens and closes as normal.

Thanks.


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9315
Location: Netherlands
 Post subject: Re: Wolph42's 'Drop-in' Bag of MT Tricks v.40 [FEATURE CHOIC
PostPosted: Thu Jun 22, 2017 4:23 pm 
yes I now what is going on. the selection of the switch activates the ontokenselection event...4 times. hence the door opens and closes 4 times. To omit this issue I've build in a delay, however when you are using fow things slow down and the delay isn't long enough. In the BoT settings there is a menu item concerning the 'delay' (i can't recall its exact name but it shouldn't be too hard to find) I think its set to 1000 (ms) you can raise that number and see if that resolves the issue. Note thus that eg setting it to 10.000 it will take 10 seconds before you can hit a switch again (or any other tokenselectionevent). HTH

_________________
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC

My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent and
DPI.
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


Top
 Profile  
 
 Offline
Cave Troll
 
Joined: Mon Apr 10, 2017 4:50 am
Posts: 27
 Post subject: Re: Wolph42's 'Drop-in' Bag of MT Tricks v.40 [FEATURE CHOIC
PostPosted: Sat Jun 24, 2017 6:53 am 
wolph42 wrote:
yes I now what is going on. the selection of the switch activates the ontokenselection event...4 times. hence the door opens and closes 4 times. To omit this issue I've build in a delay, however when you are using fow things slow down and the delay isn't long enough. In the BoT settings there is a menu item concerning the 'delay' (i can't recall its exact name but it shouldn't be too hard to find) I think its set to 1000 (ms) you can raise that number and see if that resolves the issue. Note thus that eg setting it to 10.000 it will take 10 seconds before you can hit a switch again (or any other tokenselectionevent). HTH

The default was set to 250, increasing it to 1000 made it all work right. Thanks for help. :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 1616 posts ]  Go to page Previous  1 ... 103, 104, 105, 106, 107, 108  Next

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there are 3 users online :: 1 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: Yahoo [Bot] and 2 guests





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman