Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools

Difference between revisions of "Dungeon Draw API"

From Roll20 Wiki

Jump to: navigation, search
m (Player's Bookmark)
m
 
(44 intermediate revisions by one user not shown)
Line 1: Line 1:
{{script overview
+
==Overview==
|name=Dungeon Draw
+
[[File:DungeonDrawOverview.png]]<br />
|author={{user profile|135636|Stephen S.}}
+
<br />
|version=3
+
'''Menu Overview'''
|lastmodified=2015-06-17}}
+
* Flatten and Raise tools: Add tokens to the Map layer with token action to raise or flatten a section of the map.
 +
* Current Tiles: You can see the tile pack that is loaded. Each image is direct access to placing a tile. Tile will be placed in the center of the map.
 +
* Utility Tiles: Each image is direct access to placing a tile. Tile will be placed in the center of the map.
 +
* Doors: Single and Double. Each image is direct access to placing a tile. Tile will be placed in the center of the map. These tiles block light.
 +
* Light Sources: Large light source and wall mounted light source. Each image is direct access to placing a tile.
 +
* Bares or Gate: Each image is direct access to placing a tile. Tile will be placed in the center of the map. These tiles do not block light.
 +
* Stairs Each image is direct access to placing a tile
 +
* a. If you place a path on the map layer in the wrong spot, use the "Undo-Path" action.
 +
* b. To clear the map layer use the "Clear-Map" action.
 +
* c. Once you have placed your paths, click the "Dungeon-Draw" action.
 +
* d. To set the map color based on the loaded pack use the "Set-Map_color" action.
 +
* e. "Change-Texture" bring up a list of all installed textures.
 +
* f. Toggle "Dungeon-Draw" off or on. This will allow you to draw paths on the map layer that are not converted by the API.<br />
 +
<br />
 +
 
 +
== Demo Video ==
 +
 
 +
Fastest dungeon mapping with Roll20 API and "Dungeon Draw" Roll20 market tiles.
 +
 
 +
{{#evp:youtube|8lNXPsDs4UE|Dungeon Draw Demo|center|700}}
 +
 
 
==Rectangle and Polygon/Line Tools==
 
==Rectangle and Polygon/Line Tools==
[[File:Drawing_Tool.jpg|thumb|right]]
+
[[File:Drawing_Tool.jpg|thumb|right|Circles and freehand not supported.]]
 
This script leverages the '''Rectangle''' and '''Polygon/Line''' Tools to create dungeon maps based on a selected set of tiles in the API. The WIKI provides more information on the Drawing Tools and can be found here: [[Drawing_Tools|Drawing Tools]]
 
This script leverages the '''Rectangle''' and '''Polygon/Line''' Tools to create dungeon maps based on a selected set of tiles in the API. The WIKI provides more information on the Drawing Tools and can be found here: [[Drawing_Tools|Drawing Tools]]
 
* Rectangle are supported.
 
* Rectangle are supported.
Line 16: Line 36:
  
 
==Split the Party & Player's Bookmark==
 
==Split the Party & Player's Bookmark==
more text here
+
[[File:Splitpartyss.jpg|thumb|right|Recommend using the party split feature to select the page you wish to edit.]]
 +
[[File:DungeonDrawMistake.jpeg|thumb|right|Avoid this!! Easy mistake is you (GM) being a page different from your party split avatar.]]
 +
This script leverages the "Split the Party" and "Player's Bookmark" to determine the active page for editing.<br />
 +
<br />
 +
Its is prefered that controlling GM drag-and-drop the "Player Avatar" to the page they which to map with Dungeon Draw. All changes by the API will be applied to that page.<br />
 +
<br />
 +
If the controlling GM has not done this, the Player's Bookmark will act as the active page.<br />
 +
<br />
 +
'''Caution:''' Easy mistake is you (GM) being a page different from your party split avatar (notice the BLUE border.)<br />
 +
<br />
 +
[[File:PageToolbar_SplitThePartyExample.gif]]<br />
 +
<br />
 +
See [[Page_Toolbar|Page Toolbar]] for more information.<br />
 +
<br />
  
 
==Loading the Script==
 
==Loading the Script==
On and on
+
# Getting the scripts installed:
 +
# Start a new campaign
 +
# Install the three scripts found here: [https://github.com/BaldarSilveraxe/Dungeon-Draw Dungeon Draw] Scripts
 +
# Enter the API command "!DungeonDrawMenu"<br />
 +
<br />
  
 
==Updating URLs in the Code==
 
==Updating URLs in the Code==
The hard part
+
1) Download Complete Set the pack from the market.<br />
 
+
2) Use the Market bulk uploader<br />
==Overview==
+
[[File:MarketBulk.PNG]]
Some info
+
<br />
 +
3) Open the API editor in one tab.<br />
 +
4) Open the campaign in another tab.<br />
 +
5) Use the in game image tool to get to your library.<br />
 +
6) Search for the "key" you want.<br />
 +
6) Right click the one you want and copy the URL.<br />
 +
<br />
 +
[[File:API_Copy_URL.PNG]]
 +
<br />
 +
7) Edit the script.<br />
 +
8) Save... script.<br />
 +
9) In the game reload that texture pack and see if it looks right.<br />
 +
10) Repeat for each key<br />
 +
<br />
 +
Its painful and I am sorry for that hopefully we can get access to image tags (be sure to [https://app.roll20.net/forum/post/1749220/api-tags-api-access-to-image-tags#post-1749220 VOTE])<br />
 +
<br />
 +
'''HINT:''' Take your time. Do one or two, save and refresh the script. Check as you go.<br />
 +
<br />
 +
'''Important Note:''' Tile DD_016 (the diagonal tile) repeats three times in the array. This tile is not water marked, however if you choose to replace it you will need to place the same URL in each case. <br />
 +
<br />
 +
<pre>
 +
Code and URL shorted in this example
 +
        ....
 +
        {url: 'https.../thumb.jpg?1430172145', key: 'DD_015', value: 85,  mask: 255, dlBits: 85,  diag: false},
 +
        {url: 'https.../thumb.png?1430172900', key: 'DD_016', value: 248, mask: 255, dlBits: 248, diag: true },
 +
        {url: 'https.../thumb.png?1430172900', key: 'DD_016', value: 240, mask: 255, dlBits: 240, diag: true },
 +
        {url: 'https.../thumb.png?1430172900', key: 'DD_016', value: 120, mask: 255, dlBits: 120, diag: true },
 +
        {url: 'https.../thumb.jpg?1426895538', key: 'DD_017', value: 255,  mask: 0,  dlBits: 255, diag: false},
 +
        ....
 +
</pre><br />
 +
<br />
  
 
==Water Mark Tile replacement==
 
==Water Mark Tile replacement==
marketstuff
+
{|
 +
|-
 +
| [[File:DungeonMapper.png|thumb|none|text-bottom]] ||  Water Mark tile replacements:<br />
 +
* [https://marketplace.roll20.net/browse/set/522/dungeon-mapper Dungeon Mapper]
 +
* [https://marketplace.roll20.net/browse/set/537/dungeon-draw Dungeon Draw]
 +
* [https://marketplace.roll20.net/browse/set/544/dungeon-draw2 Dungeon Draw 2]
 +
|-
 +
| [[File:DungeonDrawMarket.PNG|thumb|none|text-bottom]] || [[File:DungeonDrawMarketSample.PNG|thumb|none|text-bottom]]
 +
|-
 +
| [[File:DungeonDrawIIMarket.PNG|thumb|none|text-bottom]] || [[File:DungeonDrawMarketIISample.PNG|thumb|none|text-bottom]]
 +
|}
 +
[[Category:Old Pages]]

Latest revision as of 22:50, 31 January 2021

Contents

[edit] Overview

DungeonDrawOverview.png

Menu Overview

  • Flatten and Raise tools: Add tokens to the Map layer with token action to raise or flatten a section of the map.
  • Current Tiles: You can see the tile pack that is loaded. Each image is direct access to placing a tile. Tile will be placed in the center of the map.
  • Utility Tiles: Each image is direct access to placing a tile. Tile will be placed in the center of the map.
  • Doors: Single and Double. Each image is direct access to placing a tile. Tile will be placed in the center of the map. These tiles block light.
  • Light Sources: Large light source and wall mounted light source. Each image is direct access to placing a tile.
  • Bares or Gate: Each image is direct access to placing a tile. Tile will be placed in the center of the map. These tiles do not block light.
  • Stairs Each image is direct access to placing a tile
  • a. If you place a path on the map layer in the wrong spot, use the "Undo-Path" action.
  • b. To clear the map layer use the "Clear-Map" action.
  • c. Once you have placed your paths, click the "Dungeon-Draw" action.
  • d. To set the map color based on the loaded pack use the "Set-Map_color" action.
  • e. "Change-Texture" bring up a list of all installed textures.
  • f. Toggle "Dungeon-Draw" off or on. This will allow you to draw paths on the map layer that are not converted by the API.


[edit] Demo Video

Fastest dungeon mapping with Roll20 API and "Dungeon Draw" Roll20 market tiles.

Dungeon Draw Demo

[edit] Rectangle and Polygon/Line Tools

Circles and freehand not supported.

This script leverages the Rectangle and Polygon/Line Tools to create dungeon maps based on a selected set of tiles in the API. The WIKI provides more information on the Drawing Tools and can be found here: Drawing Tools

  • Rectangle are supported.
  • Polygon/Line are supported
  • Circles and freehand not supported.
  • Using shift helps
  • Also use transparent fill, this will help when closing a polygon path and gives a visual confirmation the path has be accepted by the API.


Recommendations: Hold the Shift key while using the Shapes tool and have the grid enabled. This will cause your shape to snap to the grid. Use transparent fill, this will help when close a polygon path and give a visual confirmation the path has be accepted by the API.

[edit] Split the Party & Player's Bookmark

Recommend using the party split feature to select the page you wish to edit.
Avoid this!! Easy mistake is you (GM) being a page different from your party split avatar.

This script leverages the "Split the Party" and "Player's Bookmark" to determine the active page for editing.

Its is prefered that controlling GM drag-and-drop the "Player Avatar" to the page they which to map with Dungeon Draw. All changes by the API will be applied to that page.

If the controlling GM has not done this, the Player's Bookmark will act as the active page.

Caution: Easy mistake is you (GM) being a page different from your party split avatar (notice the BLUE border.)

PageToolbar SplitThePartyExample.gif

See Page Toolbar for more information.

[edit] Loading the Script

  1. Getting the scripts installed:
  2. Start a new campaign
  3. Install the three scripts found here: Dungeon Draw Scripts
  4. Enter the API command "!DungeonDrawMenu"


[edit] Updating URLs in the Code

1) Download Complete Set the pack from the market.
2) Use the Market bulk uploader
MarketBulk.PNG
3) Open the API editor in one tab.
4) Open the campaign in another tab.
5) Use the in game image tool to get to your library.
6) Search for the "key" you want.
6) Right click the one you want and copy the URL.

API Copy URL.PNG
7) Edit the script.
8) Save... script.
9) In the game reload that texture pack and see if it looks right.
10) Repeat for each key

Its painful and I am sorry for that hopefully we can get access to image tags (be sure to VOTE)

HINT: Take your time. Do one or two, save and refresh the script. Check as you go.

Important Note: Tile DD_016 (the diagonal tile) repeats three times in the array. This tile is not water marked, however if you choose to replace it you will need to place the same URL in each case.

Code and URL shorted in this example
        ....
        {url: 'https.../thumb.jpg?1430172145', key: 'DD_015', value: 85,  mask: 255, dlBits: 85,  diag: false},
        {url: 'https.../thumb.png?1430172900', key: 'DD_016', value: 248, mask: 255, dlBits: 248, diag: true },
        {url: 'https.../thumb.png?1430172900', key: 'DD_016', value: 240, mask: 255, dlBits: 240, diag: true },
        {url: 'https.../thumb.png?1430172900', key: 'DD_016', value: 120, mask: 255, dlBits: 120, diag: true },
        {url: 'https.../thumb.jpg?1426895538', key: 'DD_017', value: 255,  mask: 0,  dlBits: 255, diag: false},
        ....


[edit] Water Mark Tile replacement

DungeonMapper.png
Water Mark tile replacements:
DungeonDrawMarket.PNG
DungeonDrawMarketSample.PNG
DungeonDrawIIMarket.PNG
DungeonDrawMarketIISample.PNG