Post subject: Wolph42's 'Drop-in' Bag of MT Tricks v.24 [SELECTION GROUPS]
Posted: Fri Sep 10, 2010 9:31 am
Tutorial session of the bag of tricks, it deals with roughly 75% of the features, the remainder I'll do another time.
0 - 29:44 settings 30:41 - 56:11 ALL teleport pads 56:11 - 1:02:00 other special pads (canopy, foliage, roof, wards) 1:02:00 - 1:12:56 special areas (e.g. difficult terrain) 1:12:56 - 1:15:45 Warded Roofs (forgot that part for the roof pads) 1:15:45 - 1:23:50 Animated doors 1:23:50 - 1:29:00 Vision blocking layers on doors. However this functionality does NOT work under MT b87, you need a special patch for it to work. 1:29:00 - 1:33:30 Animated token movement 1:33:30 - end Most of the utility functions (e.g. switch map, show handout, etc.)
VERSION 24 Group Select Functions. Three macros in total 'Group (Select)', 'Ungroup (Select) and 'Activate Group'. With these macros you can create a group that will act as one object. When you select one token of the group, all other tokens will be auto-selected as well. This is particularly useful when creating a map with tokens and you want a set of tokens to act as one object. These 'select' groups have nothing to do with the 'move' group functions (aka formations) which is explained in more detail in the manual. For this reason I've renamed the group move macros to better distinct them.
In addition a z-order panel has been added that you can activate. With this panel you can edit the draw order of the (selected) tokens, rotate them individually, random or as a group. It also contains layer and shape dropdown list.
On Map Teleport pads:(PadStart, PadEnd) every teleport consists out of a starting pad and ending pad (paired pads), if you drop a token on one it will end on the other. You can resize or place them anyway you want, as long as its on the same map.
Between Map Teleport pads:(Interpad) Any Interpad is automatically paired with the Interpad with the SAME number on a DIFFERENT map. Again, size and place are completely free, as long as its on two different maps.
One way teleports: (PadJump, PadDrop, InterJump and InterDrop) Moving onto a 'Jump' token will transport you its paired 'drop' token. And NOT the other way round. The 'Inter' version can be used for transport between maps.
One Way Teleport Border pads: (PadJumpBorder, PadDropBorder, InterJumpBorder and InterDropBorder) As with the one way teleports The big difference with the 'normal one way teleports' is that the 'border teleport' tokens will teleport a token that moves onto OR OVER the special pad. I've added 8 new tokens to the zip file (4 horizontal and 4 vertical as you must NOT rotate the tokens, because the footprint of the token does NOT rotate). The inter versions can ideally be used for e.g. large maps where you can build seperate sections on seperate MT maps. This will keep the memory use per map low and will give an easy transfer between to sections. The map versions can be used for creating e.g. a closed loop map where the edges of the map are connected. Moving over the edge will automatically transport you to the opposite edge.
InterPadBorder, PadStartBorder, PadEndBorder: These are added to complete the list. The Jump/Drop versions (one way teleports) already existed, now the two way versions exist as well.
Mapped Teleports: (MappedPad) These pads work similar to the teleport pads, although of these there is only one type of pad and not two like the start and end pad with the 'normal' teleports. When initializing them you'll get a pop-up per map where they exist and here you can set the destination pad. The 'destination' must be a number, so you can if you like also put in forumulas or dice rolls, as long as the result is a number (and as long as a destination pad with that number actually exist).
Move related special EVENT pad tokens
Transparent Roofs: (Roof) When a token moves onto a building (with a roof) the roof automatically turns transparent (with a red halo) and return opague again when the token moves away from it. For this to work you will need to install the tabel into your framework inside the attached zip file.
Warded Roofs: (Roof) Roofs have now a corresponding 'set roof' macro with which you can assign doors to the roof. If doors are assigned, the Roof automatically becomes a 'warded' area, which you can ONLY enter through the OPEN door. Thus if the door is closed, there is no way a player can move her token onto the roof. If the door is open, a player can ONLY move in the building when it moves her token OVER the door token first.
Foliage: (Foliage) Tokens with these names work exactly as roofs, except there will be NO red halo outline for the transparent version AND you can choose to use a different picture to swap with when you move over it. (on default when you move over them their image is swapped with an transparent image from the tables).
Canopy: (Canopy) Tokens with these names are automatically given an treetrunk as alternative image when a token moves over them.
Warded Areas:(Ward) Tokens that move onto this area are moved back to their original position. They cannot enter the area.
Event Pads:(EventPad) These tokens are triggered on certain event e.g. when a token move onto the pad. These events can be set through a 'set event pad' macro. These pads replace the former Pit and Trap pads and allow for a much more versatile use. When the pad is triggered then a macro that you linked to it will run. Extra example is added: trip wire in combination with a net trap (thnx Pinkrose)
Move related special EVENT AREAS - Difficult Terrain These are Areas you can define (and these can take ANY form, with a resolution of the grid) and depending whether a token moves onto, over, off, etc. it will trigger an event (macro). The best use for these are to define difficult terrain areas which impede the movement of a token. For which the 'Limit Movement' macro in the lib:Eventmacro lib is now adapted. Finally one other good thing of these areas: they're FAST! A lot faster then the token method currently in use.
Move related utilies
Group Movement: You can combine tokens into one group. When you move ONE token of that group then the whole group moves accordingly.
Group Rotation: When the group is defined you can use the CW or CCW rotation buttons to rotate the group. For snapped tokens the increment is 90, for unsnapped its 45 and its also possible to select a token from the group and set its facing and then click either CW or CCW, after which the group will be rotated to that direction (unsnapped only).
Group Formations: For defined groups (or a group of selected tokens) you can set different formation like, square, wedge, line, echelon, spread and compact.
Centre on token: When a player moves a token the screen will be centred on that token (for that client only)
Centre on Token: Added toggle to the settings where you can turn on continuous centre on token. This will force a centre on map for every token moved. (only works for single token move).
Restore FoW (Fog of War): When a player moves a token all the FoW will be restored and only the PC visible areas will be cleared. This function has the extra advantage that the VBL lag bug (game gets very laggy after a while when there is a lot of VBL on the map) is ommitted.
VBL (Vision Blocking Layer) move check: This function is created by Aliasmask. It can also be found on his lib:Players. However to make both libs compatible I've added it to the BoT so it can be turned off on lib:Players. This function checks EVERY step of the just-moved-token and checks whether it can see into gridcell its moving into. If not then the movement is halted. This function too has the extra advantage that the VBL lag bug is ommitted.
Path Tracking: Added toggle to the settings where you can turn on path tracking. This will show small feet in the grid cells where the last token moved. Red for NPCs and blue for PCs.
Lock Movement: This is a toggle on the macro panel that will lock down the movement of ALL tokens. Only the gm can move the tokens now. To use simply hit the macro button and hit it again to allow movement again.
NEW: Lock Token:Similar to lock movement, only this works on the individual token. It prevents the token from being moved. Both by player and gm! To use: select one or more token. Click the 'lock token' macro. There is a general toggle in the settings to turn this feature on and off.
Utility macros
Set Light: A macro whith which you can easily set lights sources on tokens
Rumbles Dice Box: A frame where you can set a pool of dice that you can roll in one click. I have used Rumbles code and layout as a basis and rewrote most of it. Noteably I've added 'options' so you can fully customize the frame.
Show Token Handout: A macro that forces a pop-up on ALL clients showing a token handout (gm only).
Switch Map: A macro that forces ALL clients and selected tokens to the chosen map AND forces all views to the centreOnMePad (if its on the map)(gm only).
Seek token (updated): A utility that scans ALL maps and ALL tokens returning a list of all tokens that match the search string. Updated with a wide variety of options, biggest change is showing the results as macro links which allows you to either Copy, Move or Select the token.
Animations
Animated Doors: Full functionality to setup animated doors, both single and double. Including support to activate them in at least 5 different ways
Sliding doors: I guess that tells the tale...
Animate Token Movement: A macro and macro button with which you can animate the movement of one or more tokens. See video
Animated text: Both a macro that can be called and an input screen to do it on the fly. This will pop up a frame on every client pc showing a frame where a delayed text is printed in.
Map Creation macros
Scatter: Select one or more tokens, set an area and a number and copies of the tokens will be randomly scattered accross the preset area. Ideal for e.g. rocks, trees, or a chaos warband.
Building A Forest: A macro to build a big forest FAST and have it ready for the Canopy 'Trick'. This is a specialized macro based on the 'Scatter' macro
Summon tokens: A macro with which you can summon tokens from the 'BASE' map onto the current.map . The location you can set by hand or you can summon it onto a selected token.
Token door switches (with proximity check): Set up a door with a switch token that corresponds with that door when you click on the switch. Option for the gm to 'Lock' the door, so players can't open it. You can also set a proximity check, that checks whether a token of the player is close enough to open the door.
Fill Area: A macro that with which you can quickly fill an area with tokens (also useful for creating special areas).
NEW: Group (Select): Create groups of tokens. When you select one token of the group, all the tokens are automatically selected.
NEW: Draw Order Edit Panel: With this panel you can edit the draw order of the selected tokens, rotate them individually, random or as a group. It also contains layer and shape dropdown list.
Vision Blocking Layer (VBL) macros To make use of these functions in 1.3b87 you need Jamzthemans special .jar file which can be downloaded below in the download section and replace the .jar file in your MT install directory with that one. This is not required in 1.3b89, here these functions are embedded.
VBL to doors. Toggling a door will give the following options: look through key-hole, look through window, crack door open, open door half way, open door fully. The VBL will be adjusted accordingly
VBL Stamps on tokens. With this macro you can add a VBL layer upon a token that 'moves' with the token. (Its not really ON the token, but erased and redrawn as you move the token). Possible VBL are Square, Rectangle, Line, Regular Polygon. With a bunch of extra options (like offset, scale, fill, etc.).
NEW: Drawable Polygon Stamps: in addition to the 'normal' stamps, you can now also draw and store multiple polygon VBL on a token. This is particular usefull for dungeon tiles where you can store the VBL data onto the tile and then copy paste the tile over the map.
Mass VBL. This function will draw VBL on ALL tokens that match a (partial) search string. Its mainly intended for roofs and canopy but options (selection, all, layers) have been added to use it for other purposes. This macro also contains 2 different scaling techniques to apply the VBL onto the token. Finally you can also store the ENTIRE VBL structure and you can use Toggle VBL to turn that on or off
Toggle VBL. This function corresponds with Mass VBL. In Mass VBL you can store all the added VBL and with this function you can turn it on or off instantly.
VBL Grenade. This function will erase ALL VBL in a given radius (in grid cells) around one or more selected tokens.
Other
Macro Panel: A macro that initiates a macro panel containing all Bag of Tricks related macros
Alternative Initialization: This method is map specific and meant for maps that use a lot of pads (>100) it calculates each x,y position of the pads on the map and saves it on an array of lib:tokens. This speeds up the move process a lot.
Force Selection: To use with 'Always on Top' application. With this feature you can force a client slave to have the same button selected as you have on the master. Read the manual for more info. Usefull for those that like to use Full Screen Mode but still have a chat window and macros available. (and working)
Load Map and Coordinates on Start Up: This feature can be found in the settings, where you can set the map to load on start-up and the coordinates (or token name) on that map to go to.
AssignedPads: Teleport pads that are linked to a specific token, can be used for a mass invasion!
NEW: Full Screen Mode: A setting which allows you to enter full screen mode, but still have access to the BoT menu and macros. Toggling is done with F2. Note that dialogs are used which show in Full Screen mode BUT if you click on the full screen then they loose focus and are send to the background. You can use alt+tab (windows) to get them back.
Functions Manual As of version 19 The BoT contains an extra manual with a description of ALL available functions you can use in your own code. Just click 'Manual' macro and two manuals will pop-up. One is the classic manual, the other is the function documentation. Examples are bot_animateText(), bot_getValidTokens(), bot)AnimateToken().
Message function Message macros. Version 20 contains an update not readily available for most but in the form of a new macro set. Message macros. For example: [h:bot_message('This is a message', 'This is the header', 'black-white', bot_all(), 'Wolf', 'Prey')]. This will broadcast a formatted message with a header containing both the images of the Wolf and Prey token and the header text and with black background color and white text. I've also included 'user' macros like bot_all(), bot_self(), bot_gm(), etc. that return a json array with the users in question. Read the macro manual for more info.
Retrieve User functions These function can be used in conjunction with the bot_message() macro but also for other purposes. They return a json array with all the names of the appropriate users. Examples are bot_self() (return name of macro initiator), bot_gm (return all gm names), bot_ownergm() (return all owners of the currentToken and gm names), bot_nself() return everyone but the initiator of the macro.
FIRST SCREENSHOT 1.5 YEARS LATER
-
A screenshot of one map with some explanatory visuals for the different types of teleport pads:
___________|INSTALLING / UPDATING THE BAG OF TRICKS|__________________
INSTALLATION IN A NEW / FRESH CAMPAIGN: IMPORTANT: please note that installing the Bag of Tricks is difficult, this is due to the complexity of its features. To get it to work it is VITAL that you follow the below steps PRECISELY, skip one, or misinterpret one and you WILL get errors. I think the best approach is to FIRST watch the video and then install the BoT following the steps described below in the 'Detailed installation Description'. Of course if you still get stuck or don't understand something, post in this forum. This will help me to further fine-tune the instruction and you getting it to work!
Alternatively you can export the BASE map from the BoT campaign file and import it in your current campaign. This way you can skip the 'drag and drop' steps in the quick install chart. Do note that you FIRST need to create the states and THEN import the BASE map. (else the states will not be applied to the special tokens).
Inspired by CoveredInFish
To embed into your own campaign do the following: FIRST
Download the Wolph42 - Bag of Tricks.rptok file and the Wolph42 - Bag of Tricks - The Special Pad Tokens.zip file
Internet explorer has (sometimes) the nasty feature to rename Wolph42 - Bag of Tricks.rptok into Wolph42 - Bag of Tricks.zip or .rptok.zip. DO NOT unzip that file, but rename it back to: Wolph42 - Bag of Tricks.rptok. When you drag this file onto a map in Maptool you will notice that it turns into: lib:OnTokenMove
Create a propety type called 'SpecialPad': menu-->edit-->campaign properties-->token properties tab-->Name:SpecialPad-->Update-->Ok. (This is not required, but a safety measure, you *can* ignore this if you know what you're doing.)
Extract the Wolph42 - Bag of Tricks - The Special Pad Tokens.zip file and drag the content (except the .mttable file) and the rptok file into you campaign. Of that zip content you will AT LEAST need to have the lib:EventMacros on the map. (Alternatively: you can also export the entire Bag of Tricks map [menu-->map-->export map] and import it in your own campaign file. You will still need to extract the .mtttable from the .zip file and continue the next steps.)
Load the Bag of Tricks Table.mttable file. To do this, first make sure you extracted it from the Wolph42 - Bag of Tricks - The Special Pad Tokens.zip file. Then in Maptools go to: menu-->windows-->tables. A table panel will pop-up. Click 'Import' on that panel and look for the Bag of Tricks Table.mttable file. Select and press ok.
Double click on the lib:OnTokenMove (an edit window will pop up) go to the ownership tab and make sure that NO owner is checked. Also do this for lib:EventMacros
Select the lib:OnTokenMove token and make sure both the selection panel and the campaign panel are open (menu-->windows-->).
Now drag the campaign macros from the selection panel onto the campaign panel At the top you will notice a big black button called: Bag of Tricks Macros instead of dragging ALL the campaign button macros to the campaign panel you can also choose to drag just this one button as when you click on it it will show a menu with ALL the buttons. (do press it yet first you need to finish the rest of the implementation)
Run onCampaignLoad (once this time) from the selection panel. Its very likely that the settings window pops up, if so check the BASE map setting and make sure its correct and click ok. If not, correct it, click ok and run the settings once just to be safe.
Finally drag the 'Bag of Tricks' macro from lib:OntokenMove to your campaign panel, run it, if you did everything ok a macro panel will pop-up. On this panel there is a button near the top 'initialize maps', run it. All the special tokens you just dragged onto the map will now be initialized. Also a initialization form will pop-up showing you which special pads are active on which maps and whether there are some errors (e.g. a teleport start without a teleport end.) Note: IF you used the method of importing the entire BASE map into your campaign, then keep in mind that this map contains a couple (6?) intermap tokens that are linked to intermap tokens on another map. This other map is likely not in your campaign file, so when you click 'initialize maps' you get a list of [Error: found only one Inter... on map BASE] error. This should not be a problem but overall its probably wiser to turn off the initialization for the BASE map in the settings: settings-->Exclusions tab-->BASE checkbox.
THATS IT !
FURTHER INSTRUCTIONS FOR SPECIAL FEATURES. YOU ONLY NEED TO FOLLOW THESE IF YOU INTEND TO USE THEM
When you want to use Canopy: first you need to have a map called 'BASE' (you can change this in the settings), here you need to drag the 'Trunk....rptok' files from the .zip file. Then you need to run the 'Choose Trunks' macro. Note that the Trunk rptok files are just images, you can create others yourself.
When you want to use the Alternative Initialization Method (> 100 special pads on one map): you need to drag the libCoords.rptok file onto your 'BASE' map (see canopy).
When you want to use Summon tokens: Drag the "_none" image from the .zip file onto your 'BASE' map and run settings and set it up to your game.
When you want to use Set Light: run settings to exclude certain light types.
In addition to the tutorial video, which does not cover the door button switches, special areas and path tracking:
When you want to use the Token Door Switches: FIRST add the two states: 'isButton' and 'Locked', THEN drag the lever.rptok file onto the 'BASE' map. (Create State: menu-->edit-->camp. prop.-->states-->enter name-->browse for pic.-->click add-->click ok.)
When you want to use the special areas feature you will need to create a 'Special Area' state. Pic is provided in the zip
When you want to use the path tracking feature you will need to create a 'pathFeet' state. Pic is also provided in the zip
Extra tip: ALL the special pads have the property type: "SpecialPad". When you load these in your current campaign the property type dropdown box will be empty. You can create this property type in the MT settings. In the BoT settings you can also add that property type to the exclusion list. This way the special pads will NOT trigger the onTokenMove event.
Teleportation within a map
Create paired teleport pad: these can be any tokens you like to use. The first pair needs to be called: "PadStart 1" and "PadEnd 1". Note that you can resize them to any size you want, they will always work if a token is ON the pad. This means that with free form you can create any size, albeit rectangular, you want. Also note that you can put them on ANY layer (including hidden).
Now you can copy-paste them. At least if you have "Duplicate Token Numbering" in the preference set to: "Increment" (is the Default).
Read on at the "Remaining Steps"
Teleportation between two maps
Create paired teleport pad: these can be any tokens you like to use. They must be named 'InterPad n' where 'n' is a number. Two Interpads are connected when they have the same number.
Make sure that of each number there exists only ONE PAIR in ALL the maps.
EventPads, Warded areas and Roofs These work in a similar manner as the teleport pads, but then without the pairing. Just make sure you name them ..1,..2,..3,..4 etc. as you place more and update the number in the map macro. Name convention is key.
EventPads should be names "EventPad 1", "EventPad 2", etc.
Warded areas should be named "Ward 1"
Roofs should be named "Roof 1", etc.
Note that for pits and traps additional code is required, this can be added/adjusted in the corresponding macros on the lib:ontokenmove The differences between these three are:
Code for EventPads (formerly known as: Pits and Traps) The structure of this drop-in allows for different a great versatility of tokens like traps and or pits. Here a short explanation how to create e.g. a trap:
Create a macro on the lib:EventMacros (there are two examples there already) E.g. 'Spear Trap'.
Select the EventPad (e.g. 'EventPad 2') to for which you want to use 'Spear Trap'.
Run 'Set Event Pad' from the campaign panel
Choose 'Spear Trap' (name of the macro) from the dropdownbox.
Select which events trigger the pad, for traps this usually is: token moved on pad, moved over pad and moved outside, used a waypoint and returned
When someone triggers Trap 2, then the code in 'Spear Trap' is now used.
Turning Pads On/Off This will impeed the speed of the movement of the tokens so its not implemented. If you want this functionality however, here's how: 1. create a new property for the Teleports in the settings: "dontUse:0" (without the "") 2. in the macro corresponding with the map e.g. teleportGrasslands add the following lines:
Note that there are 3 [if(json.contains.... in that macro, one for padstart, one for padend and one for interpad. Edit them all three just to be safe. 3. Select the teleport pad you wish to 'turn on/off' 4. on the selection panel create a new macro (right click in the panel) 5. give it any name you want and paste the following code into the macro:
Code:
[h:dontUse = 1-dontUse] [gm:if(dontUse,"Pad is turned off", "Pad is turned on")]
And that's it. Now to turn the pad on or off, just select the pad and click on the macro. Tip: you can combine this with an Aura or Tokenstate (gm visible only) that you toggle in the same way as the pad in the same macro. This way you can instantly see whether the pad is active or not.
FINALLY When your completely done and have added all kinds of pads to all your maps. Go to the campaign panel and click 'Initalize Pads'. When done you will get a report. This report might contain error messages meaning that you made some mistakes when placing the 'special' tokens. Read through the report, if no error messages appear then your golden. Everytime when you add or delete a 'special' token on a map you need to run this macro again.
UPDATING A CAMPAIGN FILE WITH A NEW VERSION:
With the addition of the lib:EventMacros you no longer need to redo all your settings nor need to move or copy paste any personal event macros that you created on that lib. All *your* settings are stored on lib:Eventmacros. So when you upgrade a version you ONLY need to do 2 things: 1. replace the lib:OntokenMove for the new one (delete first, then drag the new one on your map) 2. run settings once! Note that when you run the settings that its possible that you get some *errors* in the form of input request for strange variables. These are the new settings that have been added but obviously not yet set on *your* lib:eventMacros. You only need to click 'ok' (depending on the update this can be many clicks) and then the settings menu will eventually pop-up. Always check the settings (they should not have changed) and then finally click ok. If you *did* get the input requests then very likely you will notice that there are more settings available. If you only only clicked 'ok' during the input requests, then they all should be turned off by default. THAT'S IT!
NOTE ON VERSION <18: when upgrading from <18 the above method will not be sufficient to upgrade. In addition to the above the following also needs to be done for ALL: You will also need to reinitialize all the maps (that is: run initialize pads once. And alt. init pads for those maps where you use that, if at all) SCRIPTERS: if you are using any functions from the BoT e.g. mtt_getValidToken() in your code then you need to rename these with a new prefix mtt_ to bot_ e.g. bot_getValidToken(). Also the properties have been renamed from 'mtt.' to 'w42.bot.' Also the macros on lib:Eventmacros have been updated reflecting these changes. If you don't use events or limit movement then you do not need to update this lib, else I would suggest updating that as well.
NOTE ON VERSION <13 If you upgrade from version 13x or lower then you will also need to update the table (see implementation section).
GENERAL REMARK: note that YOU CAN ONLY HAVE ONE "ONTOKENMOVE" MACRO IN YOUR CAMPAIGN. So if you e.g. create a backup of the old lib token, you will have 2!! One on the backup lib and one on the new one. Stuff will go haywire!! (actually you *can* have two ontokenmove macros within a campaign, but they will both be activated on the event, which very likely will have unpredictable results. In short: its bad practice)
ERRORS DURING SETUP: first make sure that there is a lib:EventMacros token on the same map as the lib:OntokenMove. If that is taken care of then its possible (likely even) that you get al kind of input requests when you run the settings. Just click OK (NOT Cancel) as long as needed (can be upto 20 clicks) and finally you will see the settings panel. Check the BASE map location and click ok again. If you run settings again you should no longer get any pop-ups. This will happen again when you upgrade. The reason is that if I add new settings option, then these are stored AND retrieved from lib:EventMacros. The first time however they won't be there and thus the requests. After you click ok all the variables will be there, until you upgrade again.
THE PADS DON'T WORK: There can be several reasons: 1. the onTokenMove event is turned off. This can be checked by checking te name in group 2. on the lib:OntokenMove: if it says #onTokenMove its turned off. Hit the "Turn On Token Move Event On/Off" macro. 2. you just dragged the libs onto your map and you forgot to run onCampaignLoad (or save and reload the campaign file) 3. you forgot to run the settings. 4. 'visible to players' is turned off. Double click on token --> config --> check the checkbox on the right 'visible to players' 5. SNAP TO GRID: if you turn this off then pads will ONLY work when you MOVE ON them. In ALL other cases like MOVE OVER or OFF they WILL NOT WORK. This is a limitation of Maptool. (getlastpath() for unsnapped tokens will only give the start and end position.). 6. Non alphanumeric characters in the token names e.g. This can lead to all kinds of random errors. Alphanumeric: a to Z and 0 to 9. Non Alpha: ",.;"{}[]!@#$%^&*" etc. ESPECIALLY comma's, and quotes can be killing.
DOOR VBL NOT WORKING PROPERLY:
Make sure that you have the VBL option checked in the settings
Make sure that the door image follows the 3 basic rules (see BoT manual for more info on that)
Make sure that you are NOT using the 'more robust Eval() function' described here (this will result in the same VBL option being repeated when using it.)
ERROR: if you get an error 'Error executing movedOverToken: the token name or id {1} is unknown.' this means that the code is looking for a token that is not on the map. Run the 'Initialize Pads' again from the camapaign panel and look through the report.
ERROR: if you use a interteleport and on destination you're asked for coordX and coordY then the two paired interteleports do NOT have the same name/number. Run the 'Initialize Pads' again from the camapaign panel and look through the report.
ISSUE: when snap to grid is turned of and you try to teleport more than 2 tokens that overlap, the teleport MIGHT not work.
ERROR: Can't find map '1' (or any other number). If you name your maps 01, 02 or 001, 002, etc. then in the code MT script will transform these 'numbers' into real numbers: 1,2,etc and those maps do not exist. So make sure that the map name cannot be recognized as a number OR be making it an actual number. So 1,2,3 would work and 01m, 02m, etc. also.
-
Changes in 24 New feature (as always when I increase the version number): Group Select Functions. Three macros in total 'Group (Select)', 'Ungroup (Select) and 'Activate Group'. With these macros you can create a group that will act as one object. When you select one token of the group, all other tokens will be auto-selected as well. This is particularly useful when creating a map with tokens and you want a set of tokens to act as one object. These 'select' groups have nothing to do with the 'move' group functions (aka formations) which is explained in more detail in the manual. For this reason I've renamed the group move macros to better distinct them. Other changes: - Updated seektoken to match all when search string is left empty: ' '. - added extra check OCL: all lib:tokens on BASE map will be checked for ownership. An error is reported when ownership is set. - VBL stamps are now also supported by multiple token move. - on request of Jamz, added proximity check to 'toggle doors' macro. A gm can use the macro without selecting a pc token, a player must have a player token selected before this macro works. It then shows a list of doors to open where you're close to enough. - fixed incompatibility issue with VBL check and draw polygon VBL stamp - added snap to grid and extend vbl for draw polygon VBL stamp - two fixes in the vbl stamps - minor tweaks in the polygon vbl code - the macro panel now works without the img_table installed - added setting to turn off the messaging checks oncampaignload - updated OCL to check the existance of the VBL-brush token Changes in 23 New feature: Multiple drawable Polygon VBL Stamps. What this means is that you can add (more then one) polygon vision blocking layer to a token. This is particularly usefull for Dungeon Tiles. You can add the VBL to the tiles, save them and then copy paste them over the map and then activate their VBL. I've also went one step futher and added a 'draw mode' where you can use a brush to draw the VBL onto token. To use you will need either b87 with Jamz' fork installed or b89+. In the bot settings, toggles tab, turn on 'VBL Stamps'. Then select a token and run 'Set VBL Stamp'. There choose the polygon option and click ok. Other changes:
fixed OCL for b87
added is fullscreen check to the door switch frame. So the isfull screen is now done automatically (b89+)
renamed the area buttons after the tutorial
fixed issue with assigned macro to areas not showing up.
fixed issue draw area, token not appearing on selected token.
something went wrong with the OCL of 'd'. 2nd attempt.
made sure that json.fromlist is NOT redefined from b89+ (as its fixed in that version and broken before that)
Added VBL macro check for build 89 and beyond (so the VBL macros are activated for this version.
Fixed VBL on move check bug with tokens with the same name.
macro clean up, reshuffled OCL.
Added new macro: bot_sortTokeByProp. sort tokens by property. Can be found in function manual
added tan function.
added option to bot_travelAngle() to return cardinal points instead of angle
fixed several issues with lock token. one with the track path still showing and one with vbl check still on. Also multipleontokenmove had some issues.
Changes in 22 New in this version: Lock Token. New feature: lock token. This prevents the token from being moved. Both by player and gm!<br> To use: select one or more token. Click the 'lock token' macro. There is a general toggle in the settings to turn this feature on and off. Note that the 'lock' property is stored on the token itself. When you select a mixture of locked and unlocked tokens and run the macro then their settings will be inverted. So the locked will unlock and the unlocked will lock!<br> Other changes
updated manual with explanation between initalize maps and alt.init.maps
Fixed several small bugs in the define and remove area tokens
Fixed bug in fill area macro (bugged out when using one selected token NOT on basemap
Added extra functionality to the fill area macro: the fill coordinates are now derived fully when two tokens are selected (upper left is from token 1 and width and height are derived from the relative position of token 2
fixed small bug in switchmap when gm forces player to the map where the gm already is (and tokens are selected
fixed bug in seek tokens
warded areas will be checked first THEN Eventpads THEN the rest (to prevent stepping on a teleport AFTER moving over a ward
fixed bug in warded tokens
removed the lower() function from all the message related macro like gm(), self() etc.
VBL compatibility check is now done OCL
added more verbosity in OCL
restored door vbl macro (was erased for unknown reason.
fixed bug in util menu.
fixed 'base map' bug in OCL.
added workaround for a bug in broadcast(), is only in effect when the redefined bc setting is set.
made sure that all the message owner/self/all/etc macros return lower case names.
Added bot_getTokensPath(). This function returns the path in cell coordinates (including and) between two tokens.
Updated function manual with getTokensPath() and getPath()
Changes in 21 Full Screen Mode. Currently this mode needs to be toggled (Shortcut key is F2) as there is no way to check whether you are in Full Screen or not (in the next MT build this should be solved). How it works is simple: if you are in full screen (ctrl+alt+enter) you can press F2 to toggle to full screen mode. The BoT menu will also pop in screen. All the relevant screens will show up in dialog, even the last chat message IF you make use of the message function implemented in this FW. To do that you will need to check the 'redefine broadcast' setting in the settings. This results in the broadcast function not only porting to chat but also to a chat dialog. In that case you will always see the last broadcasted message in full screen. One remark: when you click somewhere on the MT map then the dialogs will 'dissapear' (as they are moved to the background). To get them back use alt+tab. Other changes
the door shape is now automatically set to TOP DOWN (if you have the special jar file installed) for doors that are set.
expanded the VBL stamps, they now incorporate rotational offsets (not yet in the input). This does require a re-set of the tokens with a vbl stamp. When setting old vbl stamp tokens you get a couple of input requests, just click ok.
added upgraded code for doors icw vbl stamps (currently deactivated). Something for the future. It does work, but not yet for sliding nor for double doors.
completely rewritten the door VBL code. Its now simpler (I hope) and the window vbl remains issue should be solved. I've tested it for ALL possible combinations and they all work.
in addition (though not tested yet) this should allows for freeform doors, so the doors no longer need to be 'large' (4x4 cells) size.
The only current drawback is that this function is no longer compatible with older set doors, so you will need to set the doors in your campaign again.
fixed numerous issues with doors (vbl, toggledoors, identifiers, etc.)
filtered out the double doors from the toggle doors macro.
fixed bug in toggledoor when only one or no option is selected
Based on an idea of Pinkrose I Added the net-trap to the campaign file. To use this you will need to add the 'trapped' state to your campaign and you need the 'Standard Net Trap' macro located on lib:EventMacros. There are also a net token and a trip wire token available in the zip.
updated manual with rules for the door images when using the VBL option.
extended 'switch map' with the functionality to move selected tokens as well.
Changes in 20 Message macros. Version 20 contains an update not readily available for most but in the form of a new macro set. Message macros. Specifically bot_message('This is a message', 'This is the header', 'black-white', all(), 'Wolf', 'Prey'). This will broadcast a preformatted message with a header containing both the images of the Wolf and Prey token and the header text and with black background color and white text. I've also included 'user' macros like all(), self(), etc. that return a json array with the users in question. Read the macro manual for more info. Other changes
Switchmap automatically selects current map.
Updated the virtual tables and message() so they remain compatible with java 7.
added message() functions..
fixed bug in turning the ontokenmove event on and off. Relic from the split up of the menu. Message is now set to gm only.
the roof and canopy special pads are automatically moved to the background layer when moved over and moved back to the original layer when moved off
solved issue with open frame OCL where players got an not gm error message
track path is turned off for unsnapped to grid tokens
vbl move check and path tracking now work together (single tok move only)
updated issue in settings when upgrading from <v18
show handout function now also has the option to show portrait and token image. Also updated the GUI of this function
added option to the settings for track path that allows for manual/command removal of the 'path feet'
Changes in 19 Not really a big change but a new feat nonetheless: path tracking. In the settings --> toggles tab a new toggle has been added called Show the last moved path. When checked, small feet will be placed in the cells over which a token is moved. Red feet for NPCs and Blue feet for PCs. Other changes
formation rotation goes slightly faster as its optimized
when the group is NOT snapped to grid the rotation will go in increments of 45 instead of 90 for snapped to grid
when the selected token has tokenfacing set then the group is rotated according to that tokens rotation
added Extra manual. When you click 'manual' you will get 2 manuals. The default one and one explaining the available functions from the macro lib.
added waypointfinder macro to new macro utils (not yet accessible through campaign panel).
Changes in 18 Observant users might notice I've skipped v17 entirely, which I actually didn't but the whole version remained fully in beta and was only available through another topic. This concerned the addition of VBL (Vision Blocking Layer) support. After I was finished with that I did a FULL overhaul of EVERYTHING, mainly function names and property names. This means that this new version will not be backwards compatible with older versions. That is... if you only use teleport pads you need to reinitialize and everything will work, other stuff though like assign pads, doors and canopy probly not. I've made numerous changes and fixes in this version and did not keep track cause of the sheer amount of it. The major VBL changes however you can read. in this log under v 17 Note that this MT version supports the new VBL code, but you need both the .jar file and replace it with the current one in the mt install directory AND you need to turn on 'VBL support' in the settings.
Other changes under v18
fixed two links in the assign and define area macro buttons, which occured during the tutorial session. The macros are ok, but the buttons were not.
Added draw area macro, which enables you to fill up an area with one token by dragging the other. The 'one' token will be copied in the path of the moved token.
Expanded options for Mass VBL with All and Selection
Added VBL grenade. Select one or more tokens, run macro, set radius (in grid cells) and ALL VBL in that radius around the selected tokens will be cleared.
Change canopyVBL into Mass VBL and added a lot of options (layers, search string and the option to save the VBl)
Added Toggle Mass VBL macro, with which you can turn on or off mass VBL structures created by the Mass VBL macro.
bugfix in the layers selection of Seek Token.
added circular VBL Stamps
VBL Stamps can now be added to multiple selected tokens (of different size and rotation)
token stamp snap to grid issue resolved
implemented the draw and erase funcitons with json variables
added horizontal and vertical line option to the vbl stamp
implemented the draw and erase funcitons with json variables
added horizontal and vertical line option to the vbl stamp
Changes in 17 NEW: This version needs a special .jar file for the vbl support to work. Hopefully this code will be implemented in the last version of MT, for no you will need to replace the .jar file in the mt install directory with the vbl support one. Added VBL draw and remove for doors (rotating, sliding and double doors for both). In addition some bugfixes to the doors code. further improvements on seek token
find duplicate lib:tokens and swiftly delete them
sort the found tokens
restructure the seek token GUI
updated the regex for looking for partials. I've removed the start/end part but the results show up roughly 3x faster.
maps in switch map are sorted
seekToken can now also be called in a macro, similar to getTokenNames only here you can actually set a name partial for the return.
fixed bug in seek token, move from map didn't work
other changes
updated manual.
updated settings with VBL options.
split up the virtual menu into two tabs (macro got a bit long)
added token stamp vbl. If you label a token 'VBLStamp' then a vbl cross will be added to the token when you move it and the vbl will move along with the token.
vbl stamp now also handles 90 degrees rotations.
fixed issue with doors on multi clients and some clients getting a pop-up
fixed vbl issue with doors on clients
fixed several doors bugs (pop-up request on settin door, duplicate doors over clients)
VBL for rotating doors is now set ON the door. So if the door is under an angle the VBL line is in the same angle.
On door VBL now also works for double doors.
added couple of functions from Aliasmaks lib:math (cos, sin, toradians)
created facingToCoord()
updated door section to work with the new vbl functions
fixed clearFoW issue (hopefully)
added the following VBL settings for doors:
crack open door
half way open door
peek through key hole
peek through window
rewrote VBL part
made it work for both the non-animated and the animated version
updated set door with extra tab concerning VBL
added setting: VBL support (so you can turn it off)
changes before v 17 can be found in the old log file
__________________|SOME FEATURES ELABORATED|_______________________
I've added an extra map with a demo of how to implement Event Pads that limit the sight of a token that moves over it, slowly decreasing the sight of the token as it moves further into the fog. This is based on an earlier discussion with Aliasmask and Lonewolf.
In the 5.0 addition I've added a couple of functions to scatter tokens, very usefull to build forests. In version 5.1 I've also created a macro that fully automates the whole process. Watch this screencast to see how it works.
Here's a short screencast showing what it can do. Here a screencast showing a different way to toggle the doors and it shows the 'ghosting effect' on the GM client with two clients connected (with a fast connection, with a slow connection, you'll likely see the first screencast as gm). Note that this effect is ONLY seen by the GM. Tutorial Screencast - Setting up Animated Doors And here's the manual of the animated doors, to give an impression of the howto: Parameters To make use of this functionality you need to create special 'door' tokens, with the following parameters. - The length of these tokens needs to be twice the length of the door. The width is irrelevant. Select a couple of doors in the campaign file to get an idea. - The name of the token needs to start with 'Door ' followed by an identifier, usually a number, but can also be a string. - In case of a double door, there needs to be a mirrored copy of the 'main' door with the same name ending with 'a'. E.g. if the main door is 'Door 5' then the mirrored copy must be called 'Door 5a'. You only need to setup the main copy.
Setup To create a single animated door you simply need to select the door and click 'Set Door' and enter the parameters for that door: angle closed door: When you set the door for the first time, the current angle of the door is automatically picked. Its thus best to put the door in the closed position and then run the setup. If you copy paste a door that has already been set, the set value will be taken. To reset it, make sure this field is empty, click save and run setup again. You will now get the current angle of the door. degrees open door: The is the amount of degrees the door turns when you open it. Half open would be 45, open would be 90 and wide open is 160 (default) open clockwise: The way the door turns time (ms): The amount of time it takes for the door to open. 1000 = 1 second. The default is 2000 (2 seconds). double door: If there is another door with the same name as the door you set, but with 'a' at the end (e.g. 'Door 5a') then you can check this. When you open the door, then 'Door 5a' will also open in a mirrored direction Message opened door: This message will be send to the chat when the door is opened. No message will be send to the chat when the value is set to 0 or blank. Message closed door: Dito for opened door, only now when closed Note: When you have set the door, the name of the door will appear in the GM Notes. So when the door is on the object layer and you click on it while on the token layer, the name of the door will appear!
Operating doors There are several ways to operate a door: 1. Select the door and run the 'Toggle Door' macro from the campaign panel. 2. Impersonate the door and enter '[r:toggleDoor()]' in the chat 3. Enter '[r:toggleDoor(5)]' in the chat to operate 'Door 5' 4. Create a macro on the campaign panel with: '[r:toggleDoor(5)]' to specifically operate 'Door 5' with a one click button 5. Run 'Toggle Doors' macro from the campaign panel, this will give you a list of doors that have been set up AND are on the OBJECT layer. The ones you select will be animated.
Added the possibility to set an alternative image for the foliage (and roofs). For this you need to check the checkbox in the settings and load the alternative image in the 'token handout' section of the token. Here an example (based on a neat trick learned from RecklessEnthousiasm) Note that for this you do not need to load the table (but without the table you do need to set an alternative image for every roof and foliage token)::
-
Granted 'Auto-roofs' sounds a bit weird. Anyway, this function automatically removes a roof when a player walks 'into' a building and replaces it when he walks out of it. To implementation just import the attached table into your FW, name your roofs "Roof 1", "Roof 2", etc. and set the total number of roofs inside the maprelated macro. Outside: Moving in: Moving out again*: *yeah the first and last image are the same screenshot, but its to represent the effect ;-D
Download Links
Rptok file: Wolph42 - Bag of Tricks v24.rptok(= lib:OnTokenMove) To install read the 'DETAILED INSTALLATION DESCRIPTION' section here above Note: when you download the .rptok, check the ownership of the token (doubleclick on token) and make sure NO OWNER IS CHECKED To take away some confusion: The 'FILE' is called "Wolph42 - Bag of Tricks.rptok" (if your browser makes it a .zip file, rename it back, DO NOT UNZIP ). When you drag "Wolph42 - Bag of Tricks.rptok" onto a map in maptools it will turn into: lib:OnTokenMove
a .mttable file this is the only file you really need. You can import this table through the 'tables' panel in maptools.
Example pad tokens (as you can see in the screenshots). You do not need those as only the name of the token is important but they are neat and useful nonetheless.
Some (state) pictures these you can use for the door 'locked' and door 'isButton' state.. Again you do not need these pics but they are useful.
a lib:EventMacros you do need a lib:EventMacros again you do not need this one per se. You can simply name a token such. However the lib in this zip is initialized (so no or little pop-ups when you run the settings the first time) and it contains some useful example event macros.
Campaign file: Wolph42 - Bag of Tricks.cmpgn The campaign file contains everything from the screencasts and screenshots and you can use it to have a look or test things or see how its done if you don't get it to work. You can also use it as a base where you import your own maps into. Do note however that the 'distance per cell' is standard set to 1 (metric system: e.g. Dark Heresy) and not 5 (imperial e.g. D&D). This you can change through the settings.
.jar file for VBL in version 18(or later) required for 1.3b87 only! 1.3b89 has this embedded.: maptool-1.3.b87.jar (VBL - BETA) This is the .jar file you need ONLY IF you want to use the vision blocking macros in the BoT. Note that this BETA and thus use it at your OWN RISK !!. I have so far not encountered any issues using this .jar but that's of course no guarantee that it does not contain any bugs.
- make sure you have MT version 1.3b87. go to the install directory Install .jar - locate the maptool-1.3.b87.jar file and rename it maptool-1.3.b87.old (so you have it as backup if anything goes wrong) - download the .jar file from the link and put it into the install directory To turn on the VBL settings - first check the 'VBL support' checkbox on the first tab of the BoT settings and click ok - Then run the settings again and check the 'Use VBl Stamps' in the 'toggles' tab thats it.
NEW: Bag of Tricks Example Campaigns:Light (as in stripped) version This link leads to another post where its explained how to create a light version of the BoT and contains two examples.
If you have any questions... pls check the manual first (its on the lib:token) and if that doesn't help post in this topic.
Also, perhaps you could create a "trap" builder macro....
_________________ 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..
Also, perhaps you could create a "trap" builder macro....
_˅_ . | ¯¯¯
Hey, didn't you know? Doing something only proves you can do more stuff!
<hmpfff>
attached is an update with the option to teleports to other maps as well. This works exactly the same except that you need to set the OTHER map name in the tokenproperties of the inter teleport token. It also has the option to create teleports on other maps as well. ...and it now also centres correctly on the new teleport...
This works slightly more complicated as the first version, as every map now has its own UDF, which needs to be created and put in the onCampaignLoad
Soo... I can expect the trap builder by the end of the weekend?
_________________ 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..
I just played with this. Good stuff!! but I can't help but think it could be simpler. For example, select two tokens(assuming they stay on the same map) and run macro that uses getselected to "link" two tokens by setting it's partner into a property together(perhaps with a dialog that asks to select map names for both to "teleport" to(or keep same map). Perhaps keeping the list of teleporters in a json array on the Lib::Token to see if the token ended it's movement on it? Anyway, just a thought.
_________________ 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..
Admittantly I was hopping on my seat when I figured this out. Conceived problem: jfrazierjr created the nice onTokenMovement patch for e.g. traps and teleports
Well heck.. if my patch is a problem, perhaps I should take it out.
_________________ 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..
I just played with this. Good stuff!! but I can't help but think it could be simpler. For example, select two tokens(assuming they stay on the same map) and run macro that uses getselected to "link" two tokens by setting it's partner into a property together(perhaps with a dialog that asks to select map names for both to "teleport" to(or keep same map). Perhaps keeping the list of teleporters in a json array on the Lib::Token to see if the token ended it's movement on it? Anyway, just a thought.
Maybe. But not Sure. First of the fact that you only need to copy paste is very very simple. And as for the internal teleport. You do need to create separate udf's cause else you'll get errors while mt starts looking for tokens that do not exist.
Admittantly I was hopping on my seat when I figured this out. Conceived problem: jfrazierjr created the nice onTokenMovement patch for e.g. traps and teleports
Well heck.. if my patch is a problem, perhaps I should take it out.
Yes that is a problem... o thee twister of words...
Maybe. But not Sure. First of the fact that you only need to copy paste is very very simple. And as for the internal teleport. You do need to create separate udf's cause else you'll get errors while mt starts looking for tokens that do not exist.
Ok.. Forgive my ignorance since I have mainly let others do macro framework stuff, but why do you need the udfs per map at all? I guess I was thinking about a general macro that onTokenMove() calls passing in the path in the args and that macro does all of the lookups and stuff from a json stored on a lib token. Perhaps I am just way under thinking this all since as I say, I don't really know the macro language super duper well.
As for the copy/paste, yea, that is simple with the proviso that you have to change your token numbering scheme if you do like I do and have random numbers as well as make sure the tokens have a specific name base. Granted, this is less work if it's done right, but I think if the other way can be made to work, it would be easier to document as a set of macros.
_________________ 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..
The big trick is that you can set the teleport pads as (invisible) objects. This has the benefit that you can deform the base e.g. A landingstrip and the name is irrelevant (well it is for the code but not for the map. 2.
first of I noticed iced that multiple tokens transport does work within a map but not in between maps, though I think I know the solution for that. What I can't figure out, is the fact that a 'pause' is needed after the transport to another map has taken place, to get the coordinates for the 'arrival' pad. Somehow if I do it directly they're not received. Does anyone know why and better yet, how to solve this pickle? This is the routine: CurrentX and Y are the coordinates of the token when on the departure pad. newX and Y == offsetCentreX and Y if I don't use te pause (which is wrong).
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
Who is online
In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (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: No registered users and 1 guest