RPTools.net

Discussion and Support

Skip to content

It is currently Wed Apr 23, 2014 10:39 pm 






Reply to topic  [ 1262 posts ]  Go to page 1, 2, 3, 4, 5 ... 85  Next

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 7191
Location: Netherlands
 Post subject: Wolph42's 'Drop-in' Bag of MT Tricks v.35 [DIAGNOSE]
PostPosted: Fri Sep 10, 2010 9:31 am 
_______________________|VIDEO TUTORIALS|__________________________

Note that an installation video tutorial can be found below in the section 'Installing the Bag of Tricks' showing a full install. The 'Roofs, Canopy, etc.' tutorial just below shows a quick (light version) install of the Bag of Tricks.

Main Video Tutorial Session of the bag of tricks, it deals with roughly 75% of the features.
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 (VBL) 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.)

Note that the parts about Roofs, Canopy and Foliage have been updated in the below tutorial. It explains additional and new functionality like bridges.


Tutorial on setting up areas with movement limitation and other macro events (trap) .

Tutorial on Roofs, Canopy, Foliage & Bridges including VBL swapping for houses.
0:00 - Quick Install of the Bag of Tricks
2:30 - Roofs
4:00 - Canopy & Foliage
7:00 - Linked Pads
11:00 - Bridges
14:50 - Swapping Vision Blocking Layers (VBL) between house & roof and forcing movement through door.

Note that I've added 'Tunnels' in a later BoT version (and thus not in this video) which work opposite from bridges but are installed in the same way. Read the manual for more info.


Tutorial on ShadowPads - Setting up multi level building where you can 'watch' the ground floor map from the first floor map (and vice versa).

Tutorial on Quickly Creating an Entire Forest - This is a rather old tutorial, but it still works the same. The extra feature that has been added since is that its now also possible to automatically add VBL to all the tree trunks in the forest.


____________________|NEW IN VERSION 34-35|______________________

Version 31 and beyond will be compatible with b89+ but without the VBL support and b90+ with full VBL support. Below version 25 is also still available which works with b87+ and supports VBL in b89.
If you don't know what VBL is, then don't worry the rest works!

Version 35: Map Diagnosis New macro that checks ALL maps and ALL (lib)tokens for potential issues. It checks whether token names contain non-alphanumerical characters and checks the libs for the same and owner ship and visibility. Any errors are rendered in a frame with hyperlinks that lead you to the token.

Version 34: TABLES-
TABLES
These utilities consits out of several macros:

In the menu:
- Create Table: this macro opens a form in which you can copy paste a table straight from excel. Beneath it you can set the title of the table. The checkbox enables you to view the table afterwards and edit it. This is NOT a maptool table but a Bag of Tricks table. It will be stored on lib:EventMacros. The advantage is that its dynamic and it allows multiple columns.
- Show Table: this macro shows you a list of available tables. The one you pick is shown in a form in which you can edit the values.
- Delete Table: this macro shows you a list of available 'Bag of Tricks' tables that you created using 'Create Table'. The one you pick is will be deleted from lib:EventMacros

As functions (these only work for the 'Bag of Tricks' Tables, stored on lib:EventMacros):
- bot_table(): with this function you can retrieve a value from the stored BoT Tables.Usage: bot_table('name of table', optional: 'column', 'row', ). Both 'column' and 'row' can either be an index number or the name of the row/column. Leaving them empty will result in a random choice.
- bot_listBoTtables(): returns a list with the stored BoT Tables.
- bot_listMTtables(): returns a list with the stored Maptool Tables.
- bot_getRows('table name'): returns the row names of the given BoT table
- bot_getColumns('table name'): returns the column names of the given BoT table

In addition the following functions have been added, originally created by Craig, updated by LMarkus001 and slightly tinkered by me.
- json.path(): returns the nested keys from a json object
- json.pget(): returns the requested value. Usage: json.pget(jsonObject, 'key1\key2\etc')
- json.pset(): sets a value for the given key. Usage: json.pset(jsonObject, 'key1\key2\etc', value)



_______________________|GENERAL INFO|____________________________

Move related special TELEPORT pad tokens
  • 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 identifier (e.g. '1') 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)
  • NEW:Linked Pads:(Canopy, Foliage, Roof) Linked tokens are special pads that are activated simultaneously. If you have two or more tokens that are linked by the same link identifier, e.g. 'Linked 1 Roof 5' and 'Linked 1 Canopy 3' (here the link identifier is '1'), then when one of the tokens is activated (by moving a token on top of it) the other is activated as well.
  • NEW:Linked Bridge Pads:(i.c.w. Canopy, Foliage, Roof) Bridges are pads that you link with Canopy, Foliage or Roof pads. When you move over a Bridge and then onto a Roof (in one move) then the roof does NOT dissapear (See vid. tutorial for more info).
  • NEW:Linked Tunnel Pads:(i.c.w. Canopy, Foliage, Roof) Tunnels work exactly the same as Bridges albeith the opposite effect. So when moving over a tunnel token the roofs disappear, while moving directly onto a roof they won't.
  • NEW:Shadow Pads:(ShadowPads ) This allows to watch token movement on map A from map B. Typical use is a 2 story building where you can watch the ground floor from the first floor through a gap in the floor (and vice versa). See vid tutorial for more details.

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.
  • 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.
  • bot_debugInfo(): A macro that shows all kinds of debug info (primarily for tracking variable values), with several optional settings.
  • NEW: Aliasmasks Disguise macro: A macro that allows you to add extra token images to a token, so you can e.g. 'polymorph' during gameplay into something else.
  • NEW: LMarkus Whisper Frame: A frame where you can whisper (with some text formats) to one or more players without needing to use the /w option. It also includes an impersonation feature so you can speak as another token, without needing to actually impersonate it.
  • NEW: Rumbles Delete Macros utility: A macro that allows you to copy/paste/delete macros from/on a selected token onto another token.
  • NEW: Plothos Message Manager uttility: A macro that allows you to create and store messages for players.
  • NEW: Event Buttons: A macro that links a lib:EventToken macro to a token. When the token is selected, the macro is activated. Usefull for e.g. switching maps.
  • NEW: Benchmark: A macro specially developed for macro developers. It can be used to discern the execution time for a certain macro.
  • NEW: Map Diagnosis: A macro that checks ALL maps and ALL (lib)tokens for potential issues. It checks whether token names contain non-alphanumerical characters and checks the libs for the same and owner ship and visibility. Any errors are rendered in a frame with hyperlinks that lead you to the token.

NEW: Tables
Macros in the BoT menu:
  • Create Table: this macro opens a form in which you can copy paste a table straight from excel. Beneath it you can set the title of the table. The checkbox enables you to view the table afterwards and edit it. This is NOT a maptool table but a Bag of Tricks table. It will be stored on lib:EventMacros. The advantage is that its dynamic and it allows multiple columns.
  • Show Table: this macro shows you a list of available tables. The one you pick is shown in a form in which you can edit the values.
  • Delete Table: this macro shows you a list of available 'Bag of Tricks' tables that you created using 'Create Table'. The one you pick is will be deleted from lib:EventMacros
Functions, these only work for the 'Bag of Tricks' Tables, stored on lib:EventMacros:
  • bot_table(): with this function you can retrieve a value from the stored BoT Tables.Usage: bot_table('name of table', optional: 'column', 'row', ). Both 'column' and 'row' can either be an index number or the name of the row/column. Leaving them empty will result in a random choice.
  • bot_listBoTtables(): returns a list with the stored BoT Tables.
  • bot_listMTtables(): returns a list with the stored Maptool Tables.
  • bot_getRows('table name'): returns the row names of the given BoT table
  • bot_getColumns('table name'): returns the column names of the given BoT table
In addition the following functions are available, originally created by Craig, updated by LMarkus001 and slightly tinkered by me.
  • json.path(jsonObject): returns the nested keys from a json object
  • json.pget(jsonObject): returns the requested value. Usage: json.pget(jsonObject, 'key1\key2\etc')
  • json.pset(jsonObject): sets a value for the given key. Usage: json.pset(jsonObject, 'key1\key2\etc', value)

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...
  • VBL on Doors (b89+): As from MT version 89+ the VBL on doors will be automatically adjusted
  • 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
  • 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: Roof VBL Swap: in addition to existing Roof swap function, an option is added where you can store the VBL currently on a building and swap it with a VBL cross shape. Hence from the outside players can see the partially and as soon as they enter the building the VBL of the roof is swapped with the VBL of the building.
  • NEW: Drawable Polygon Stamps: in addition to the 'normal' stamps, you can now also save ANY VBL currently over the token as a stamp. So you can draw VBL over a token as you normally draw VBL and the store that VBL as a stamp onto the token. This is particularly 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!
  • 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.
  • NEW:Geometric functions: These function can be used to select tokens in a shape (cone, circle, line, triangle, square), draw that shape or check if a point or tokens is in that shape.


FIRST SCREENSHOT
Image
1.5 YEARS LATER
Image
-
A screenshot of one map with some explanatory visuals for the different types of teleport pads:
Image


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.
Image




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)::
Image
-
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:
Image
Moving in:
Image
Moving out again*:
Image
*yeah the first and last image are the same screenshot, but its to represent the effect ;-D



___________|INSTALLING / UPDATING THE BAG OF TRICKS|__________________

INSTALLATION IN A NEW / FRESH CAMPAIGN:
IMPORTANT: please note that installing the *basic* Bag of Tricks (BoT) is relatively easy, just drag two library tokens onto a map, save & reload, click ok when the settings pop-up and your golden. However to make use of its full potential is (especially for new users) a rather difficult process, this is due to the complexity and versatility of the BoT's features. To get *everything* to work you need to 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!

Note that with version 24+(-ish forgot the exact version) I've added a feature that shows you an installation check overview on campaign load. This overview shows which functionalities will work and which won't and why.


Special Pads Setup and Tutorial Video. (UPDATED: 13-July-2012)
-
Image
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. NOTE: Make sure that ALL lib:tokens are on the TOKEN layer at all times and visible to players and owned by no one.
  • Create a propety type called 'SpecialPad': menu-->edit-->campaign properties-->token properties tab-->Name:SpecialPad-->Update-->Ok. This step is not required per se, but the tokens in the zip are set to this property type and the onTokenMove event is instructed to ignore tokens with this property type. This prevents e.g. special tokens from warding or teleporting when you happen to drag them over a special pad.
  • 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 run the 'Bag of Tricks' macro from the campaign panel, 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. After that an 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 or when you dragged ALL tokens from the zip onto the map, then keep in mind that this map contains a couple (6?) intermap tokens that are linked to an 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 (that is the map where lib:ontokenmove can be found) 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 (so you won't accidentally e.g. teleport the teleportpad).

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:
Code:
[Token(teleportStartName):    check = dontUse]
[if(check):abort(0)]

Straight after the line:
Code:
   [if(json.contains(teleporterTriggered,currentLocation)), CODE:{

So it becomes:
Code:
   [if(json.contains(teleporterTriggered,currentLocation)), CODE:{
      [Token(teleportStartName):    check = dontUse]
      [if(check):abort(0)]

      [teleportEndName = "PadEnd " + i]
      ...

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!
3. (not always required, but better safe then sorry:) either save and reload or run 'oncampaignload' once on lib:ontokenmove.
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 REMARKS
  • 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)
  • DO NOT put the lib:tokens anywhere else then in the TOKEN layer and make sure that they're visible to players.
  • b89 is plagued by the smiley bug, so turn the smiley of in the settings (of version 89) or even better use b90(beta: if the official is not released yet, its more stable)

SPECIFIC ISSUES/ERRORS:
  • 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. "rak'Gol". 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.
    7. Mapname is a number e.g. "3", in this case the interteleports won't work. change it to e.g. "m3" or "map 3" to change it into a string, then it will work.
  • 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. Next to that, the interteleports (teleport between maps) will not work for numeric named maps. So make sure that the map name cannot be recognized as a number by adding a alphabetical character to the number e.g. 01m, 02m, etc. also.
  • ISSUE: Switch Map and Token Handout macros won't work for one ore more players. This happens when one or more of the players has non-alphanumerical characters in their name e.g. "R@k'Gol (The Terr!ble)" and/or the number '1'. So "Player1" for a user will also break, "Player2" will work. (no clue why).
-
Changes in version 35
Error Checks
New macro that checks ALL maps and ALL (lib)tokens for potential issues. It checks whether token names contain non-alphanumerical characters and checks the libs for the same and owner ship and visibility. Any errors are rendered in a frame with hyperlinks that lead you to the token.

Changes in version 34
TABLES
Macros in the BoT menu:
- Create Table: this macro opens a form in which you can copy paste a table straight from excel. Beneath it you can set the title of the table. The checkbox enables you to view the table afterwards and edit it. This is NOT a maptool table but a Bag of Tricks table. It will be stored on lib:EventMacros. The advantage is that its dynamic and it allows multiple columns.
- Show Table: this macro shows you a list of available tables. The one you pick is shown in a form in which you can edit the values.
- Delete Table: this macro shows you a list of available 'Bag of Tricks' tables that you created using 'Create Table'. The one you pick is will be deleted from lib:EventMacros

Functions, these only work for the 'Bag of Tricks' Tables, stored on lib:EventMacros:
- bot_table(): with this function you can retrieve a value from the stored BoT Tables.Usage: bot_table('name of table', optional: 'column', 'row', ). Both 'column' and 'row' can either be an index number or the name of the row/column. Leaving them empty will result in a random choice.
- bot_listBoTtables(): returns a list with the stored BoT Tables.
- bot_listMTtables(): returns a list with the stored Maptool Tables.
- bot_getRows('table name'): returns the row names of the given BoT table
- bot_getColumns('table name'): returns the column names of the given BoT table

In addition the following functions are available, originally created by Craig, updated by LMarkus001 and slightly tinkered by me.
- json.path(jsonObject): returns the nested keys from a json object
- json.pget(jsonObject): returns the requested value. Usage: json.pget(jsonObject, 'key1\key2\etc')
- json.pset(jsonObject): sets a value for the given key. Usage: json.pset(jsonObject, 'key1\key2\etc', value)
Changes in version 33
Geometric functions - The Geometric functions allow you to:
- create shapes on the map (bot_show...),
- check whether a point or token is on the shape (bot_pointOn...) and
- select all tokens within the shape (bot_selectOn...).

for different types of shapes:
- Circle,
- Cone,
- Triangle,
- Square and
- Line
other changes:
- Added extra check to see if lib:eventmacros is to be found in the campaign file.
- Added functions bot_round2Grid() and bot_dpc2GridCoord to the functions manual.
- updated OCL text for doors.
- small fix in set vbl stamp.

Changes in version 32
- Added new functions Benchmark.
- made sure that removeVBL() does not render any errors when run
- fixed switch map in virtual bot menu
- updated limit movement macro on the evenmacros lib to allow for properties and added more comment
- updated settings movement limitation tooltip
- Updated vblGrenade to both a function that can be called and a function that when given the argument 1 it automatically clears vbl on selected tokens. Also added that function to the input screen.
- set door updated. check for present VBL and if there, add checkbox that allows to clear the VBL on door. It was not possible to clear just the door VBL but it IS possible to clear ALL vbl on the door.
- set door now detects the presence of a double door and checks the box if one is found
- fixed blank line issue ontokenmove
- added eventMacroPreTokenMove and eventMacroPreMultipleTokenMove to the settings and ontokenmove events. This allows to insert code AFTER initialization but BEFORE code execution
- changed 'west' to 'east' for door handles
- added option in doors to add door name to gm notes
- added none to the roof halo colors in the settings
- fixed key hole and window door view
- added new util: Pad Explorer. Shows all special pads on current map
- added quick selection links to the initialize pad results
- corrected halo option for linked pads
- further improvements to useDisguise (if multiple tokens on map have the same image, only one is shown. Self is NOT shown and if no visible images on map then the tab is not shown)
- added warning for non square doors
- updated use disguise to also use polymorph table and visible images on map
- several text updates on suggestion of Oryan
- Added setting where you can set the roof halo color (in the settings)
- summon token no longer shows empty lists
- fixed issue with initialize pads

Changes in version 31
- compatibility with b89 (but no VBL operations support, this is reserverd for b90).
- full check and LOTS of fixes in the doors VBL (my god that was buggy)
- dito for VBL stamps, still had issues with remnants of VBL remaining with rotated tokens
- full VBL support check
- added delete all props to BoT menu
- use red color during OCL to indicate errors
- minor rewrite of the BoT virtual menus
- moved 'difficult' settings to 'system' tab in settings
- create 'scale teleportation' settings, so teleporting from the lower right of a enormous teleport, will put you on the lower right of a huge teleport. (instead of the relative position of the upper left corner of the teleport
- expanded setting 'change to map after inter teleport' with the option to store coords of interteleport pads first. This way you can use the option without reloading the map. Drawback is that need to rerun initialize maps after moving the teleport.
- fixed alt init pads coords value
- alt init lib coords pads are removed if alt init process is aborted (under usual circumstances)
- initialize pads now also checks for the existence of lib:coord files and if there, warns the user.
- added new function (also documented in manual): bot_findDuplicates() which returns all duplicate token(name)s from all layers on the current map.
- fixed initalization bug in shadowpad

Changes in version 30
New feature: Added shadowpads. This allows to watch token movement on map A from map B. Typical use is a 2 story building where you can watch the ground floor from the first floor through a gap in the floor (and vice versa). See vid tutorial for more details.
- updated manual
- fixed when you teleport from an activated roof, the roof is de-activated

changes before v 30 can be found in the old log file



__________________________|DOWNLOAD LINKS|__________________________

MT Build 90-Beta: maptool-1.3.b90-beta.zip You'll need this to fully make use of the BoT version 26+

Rptok file: Wolph42 - Bag of Tricks v34.rptok (= lib:OnTokenMove)
b89+ compatible. Latest version, latest features and bug fixes. However the VBL operations (like removing VBL when opening doors) will only work in b90. (They will be disabled in b89)
Rptok file: Wolph42 - Bag of Tricks v25.rptok (= lib:OnTokenMove)
b87+ compatible. Older version, but makes use of the VBL operations as supported in b89 for e.g. removing VBL when opening doors.
In case its not clear whether you should downlod v 25 or the latest version:
the bag of tricks supports several Vision Blocking Layer (VBL) operations. To name a few:
- automatically remove/replace VBL when opening/clsoing a door
- atuomatically place VBL for treetrunks
- turn on/off VBL for e.g. entire forests
- Apply VBL 'stamps' to tokens which move and rotate along with the token
These features are fully supported when you use MT b90 and the latest BoT version. Now b90 is MORE STABLE then b89. I know I tested it for the last few months. However, some people prefer to be using lower versions. If you are one of those people then the following:
<b87: you can try version 25 but no clue if or what will work
b87: you can use v25 safely. You *can* also use the latest version but a couple of things won't work or work badly. VBL upport will be disabled
b89: you can use v25 safely AND it will support VBL operations. You *can* use the latest version which will have more features (like the bridge and tunnels) but will NOT support VBL operations
TURN OFF SMILEYS IN MTb89 PREFERENCES, ITS BUGGED AND THE BOT WILL NOT WORK !!! This bug is fixed in b90, which is one of the reasons why b90 is more stable
b90: use the latest version and everything will work.


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


Special pads zip file: Wolph42 - Bag of Tricks - The Special Pad Tokens.zip (last updated for version 31)
This zip contains:
  • 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
LIVE VERSION! 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.
'Live' means that when I'm making changes or creating something new I do that in this version and save it inbetween. This means that its possible to download this file while Im making changes.

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.

_________________
My stuff
Excel Tools: Table editor and Illumination Generator
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II and onMouseOverEvent
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade and Only War, SET Card Game
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow

New Launcher


Last edited by wolph42 on Mon Jul 16, 2012 8:37 am, edited 267 times in total.

Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Sep 11, 2007 6:31 pm
Posts: 5362
 Post subject: Re: Cewl feat: fully auto teleports
PostPosted: Fri Sep 10, 2010 10:25 am 
Cools stuff! Make more better easier....heh..

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..


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 7191
Location: Netherlands
 Post subject: Re: Cewl feat: fully auto teleports
PostPosted: Fri Sep 10, 2010 12:29 pm 
jfrazierjr wrote:
Also, perhaps you could create a "trap" builder macro....

_˅_
. |
¯¯¯

_________________
My stuff
Excel Tools: Table editor and Illumination Generator
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II and onMouseOverEvent
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade and Only War, SET Card Game
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow

New Launcher


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Sat Jun 21, 2008 12:07 am
Posts: 1950
 Post subject: Re: Cewl feat: fully auto teleports
PostPosted: Fri Sep 10, 2010 12:34 pm 
wolph42 wrote:
jfrazierjr wrote:
Also, perhaps you could create a "trap" builder macro....

_˅_
. |
¯¯¯
Hey, didn't you know? Doing something only proves you can do more stuff! :)

_________________
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 7191
Location: Netherlands
 Post subject: Re: Cewl feat: fully auto teleports
PostPosted: Fri Sep 10, 2010 1:39 pm 
plothos wrote:
wolph42 wrote:
jfrazierjr wrote:
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

</hmpfff>

_________________
My stuff
Excel Tools: Table editor and Illumination Generator
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II and onMouseOverEvent
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade and Only War, SET Card Game
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow

New Launcher


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Sep 11, 2007 6:31 pm
Posts: 5362
 Post subject: Re: Cewl feat: fully auto teleports
PostPosted: Fri Sep 10, 2010 2:17 pm 
Soo... I can expect the trap builder by the end of the weekend? :mrgreen:

_________________
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  
 
User avatar  Offline
Deity
 
Joined: Tue Sep 11, 2007 6:31 pm
Posts: 5362
 Post subject: Re: Cewl feat: fully auto teleports
PostPosted: Fri Sep 10, 2010 3:12 pm 
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..


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Sep 11, 2007 6:31 pm
Posts: 5362
 Post subject: Re: Cewl feat: fully auto teleports
PostPosted: Fri Sep 10, 2010 3:42 pm 
wolph42 wrote:
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. :P

_________________
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  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 7191
Location: Netherlands
 Post subject: Re: Cewl feat: fully auto teleports
PostPosted: Fri Sep 10, 2010 5:39 pm 
jfrazierjr wrote:
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.

_________________
My stuff
Excel Tools: Table editor and Illumination Generator
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II and onMouseOverEvent
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade and Only War, SET Card Game
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow

New Launcher


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 7191
Location: Netherlands
 Post subject: Re: Cewl feat: fully auto teleports
PostPosted: Fri Sep 10, 2010 5:40 pm 
jfrazierjr wrote:
wolph42 wrote:
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. :P

Yes that is a problem... :P o thee twister of words...

_________________
My stuff
Excel Tools: Table editor and Illumination Generator
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II and onMouseOverEvent
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade and Only War, SET Card Game
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow

New Launcher


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Sep 11, 2007 6:31 pm
Posts: 5362
 Post subject: Re: Cewl feat: fully auto teleports
PostPosted: Fri Sep 10, 2010 5:55 pm 
wolph42 wrote:
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..


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 7191
Location: Netherlands
 Post subject: Re: Cewl feat: fully auto teleports
PostPosted: Sat Sep 11, 2010 2:04 am 
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.

_________________
My stuff
Excel Tools: Table editor and Illumination Generator
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II and onMouseOverEvent
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade and Only War, SET Card Game
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow

New Launcher


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Sun Aug 12, 2007 9:49 am
Posts: 1362
Location: Midsomer Norton, (Near Bath), UK
 Post subject: Re: Cewl feat: fully auto teleports
PostPosted: Sat Sep 11, 2010 3:22 am 
It would involve some extra work on other maps, but this would work well for buildings and floors.

You wouldn't be able to fight across different levels, but otherwise it should work (till 1.4 if it has multi level support

_________________
Cweord

This message has been spell checked by Freudcheck - any mistakes are purley a figment of your imagination.
-------
My Tokens Directory
http://gallery.rptools.net/v/contrib/Cweord/Character_Tokens/


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 7191
Location: Netherlands
 Post subject: Re: Cewl feat: fully auto teleports
PostPosted: Sat Sep 11, 2010 3:26 am 
Cweord wrote:
It would involve some extra work on other maps, but this would work well for buildings and floors.

You wouldn't be able to fight across different levels, but otherwise it should work (till 1.4 if it has multi level support

There is another post here with multimap support. So that's also already done. I'll update the first post later.

_________________
My stuff
Excel Tools: Table editor and Illumination Generator
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II and onMouseOverEvent
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade and Only War, SET Card Game
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow

New Launcher


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 7191
Location: Netherlands
 Post subject: Re: Cewl feat: fully auto teleports
PostPosted: Sat Sep 11, 2010 7:25 am 
I'm in need of some help:

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).
Quote:
[h:'<!--Teleports Starts A to B-->']
[h, for(i,1,numInterPads+1), CODE:{
[teleportStartName = "interPad " + i]
[teleporterTriggered = movedOverToken(teleportStartName,lastPath)]
[if(json.contains(teleporterTriggered,currentLocation)), CODE:{
[Token(teleportStartName): newMap = pairedMap]
[teleportEndName = "interPad " + i]

[Token(teleportStartName): offsetCentreX = CurrentX - coordX]
[Token(teleportStartName): offsetCentreY = CurrentY - coordY]

[moveTokenToMap(currentTok, newMap, 0, 0, 0)]
[setCurrentMap(newMap)]

[Token(teleportEndName): endCentreX = coordX]
[Token(teleportEndName): endCentreY = coordY]
[NewX = endCentreX + offsetCentreX]
[NewY = endCentreY + offsetCentreY]

[h:'<!--The pause is necessary, or the new coords wont be set-->']
[Text = "Entering map: "+newMap]
[pause("Text")]

[moveToken(NewX, Newy , 1 )]
[goto(currentTok)]
[abort(0)]
};{}]
}]

_________________
My stuff
Excel Tools: Table editor and Illumination Generator
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II and onMouseOverEvent
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade and Only War, SET Card Game
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow

New Launcher


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 1262 posts ]  Go to page 1, 2, 3, 4, 5 ... 85  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 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





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

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman