diff --git a/_posts/0000-01-01-Maps.html b/_posts/0000-01-01-Maps.html new file mode 100644 index 0000000..96330b6 --- /dev/null +++ b/_posts/0000-01-01-Maps.html @@ -0,0 +1,86 @@ +--- +layout: ikrpg +tags: [ Version 1 ] +--- + + + +

+ This map builder lets you create, save, and print your own IK maps made with the official Iron Kingdoms tiles + and tokens that can be downloaded for free at + http://privateerpress.com/boostyourexperience. + Game masters may use it to create printouts of their planned encounter setups. +

+ + + + +
+ +
+ +
+ +

Image Library

+ +

Tiles 16x21

+ + +

Tokens 1x1 S

+ + +

Tokens 10x3

+ + +

Tokens 4x3

+ + +

Tokens 1x1 L

+ + +

Small Bases

+ + +

Medium Bases

+ + +
+ +
+ + +

+ | Save As | + +

+ + + + +
+ + + + + + + + + + +
Map NameLoadDelete
+
+ + + \ No newline at end of file diff --git a/ikrpg.appcache b/ikrpg.appcache index 27f53a3..8ebce64 100644 --- a/ikrpg.appcache +++ b/ikrpg.appcache @@ -1,5 +1,5 @@ CACHE MANIFEST -# 2016-05-01v2 +# 2016-05-02 CACHE: @@ -17,6 +17,9 @@ CACHE: # Character Generator /Character-Generator/ +# Map Builder +/Maps/ + # Moons of Caen Tool /Constellations/ /static/images/constellations/shadow.png diff --git a/index.html b/index.html index af65f93..6110ab2 100644 --- a/index.html +++ b/index.html @@ -18,6 +18,7 @@ tags: [ Version 4 ]
  • Publication Index (an index of all official Iron Kingdom resources)
  • Character Generator (fillable online Full Metal Fantasy and Unleashed character sheets and character generator)
  • Character Cards (fillable online character sheets in warmahordes cards format)
  • +
  • Map Builder (build maps with the official Unleashed Adventure Kit tiles and tokens)
  • Moons of Caen Constellations (simulation of caen's three moon phases)
  • Unleashed Heroes for Warmahordes (play Zocha, Longchops, Lurk, Gullin, Knor, and Morrg in your Warmahordes games)
  • Application Settings (change this website's background image)
  • @@ -188,24 +189,18 @@ tags: [ Version 4 ]
  • Notes
  • -

    Changelog

    -

    Version 4.0

    - -

    Version 3.0

    - - -

    Old Versions

    +

    Map Builder

    - Version 3 was a complete redesign of the character cards. - The old version 2.0 cards will be removed eventually but can still be found here for now. + We use the Iron Kingdoms Unleashed Adventure Kit tiles and tokens for most combat encounters. + Previously, when planning combat encounters, our GMs used to setup the tiles and tokens at home and brought a photo to the session. + Not any more! + The Map Builder lets you create, save, and print your own IK maps made with the official Iron Kingdoms tiles + and tokens that can be downloaded for free at + http://privateerpress.com/boostyourexperience. + Game masters can now plan encounters even when they do not have access to their physical tiles. + They may then use it to create printouts of their planned encounter setups.

    diff --git a/static/images/maps/bases/medium/Longchops.png b/static/images/maps/bases/medium/Longchops.png new file mode 100644 index 0000000..d5cbf00 Binary files /dev/null and b/static/images/maps/bases/medium/Longchops.png differ diff --git a/static/images/maps/bases/small/Farrow-Brigand.png b/static/images/maps/bases/small/Farrow-Brigand.png new file mode 100644 index 0000000..5e1a07f Binary files /dev/null and b/static/images/maps/bases/small/Farrow-Brigand.png differ diff --git a/static/images/maps/bases/small/Gullin.png b/static/images/maps/bases/small/Gullin.png new file mode 100644 index 0000000..5b9b6bd Binary files /dev/null and b/static/images/maps/bases/small/Gullin.png differ diff --git a/static/images/maps/bases/small/Knor.png b/static/images/maps/bases/small/Knor.png new file mode 100644 index 0000000..81bc3c3 Binary files /dev/null and b/static/images/maps/bases/small/Knor.png differ diff --git a/static/images/maps/bases/small/Lurk.png b/static/images/maps/bases/small/Lurk.png new file mode 100644 index 0000000..9bd3195 Binary files /dev/null and b/static/images/maps/bases/small/Lurk.png differ diff --git a/static/images/maps/bases/small/Razor-Boar.png b/static/images/maps/bases/small/Razor-Boar.png new file mode 100644 index 0000000..50cea98 Binary files /dev/null and b/static/images/maps/bases/small/Razor-Boar.png differ diff --git a/static/images/maps/bases/small/Slaughterhouser.png b/static/images/maps/bases/small/Slaughterhouser.png new file mode 100644 index 0000000..cd65126 Binary files /dev/null and b/static/images/maps/bases/small/Slaughterhouser.png differ diff --git a/static/images/maps/bases/small/Warlord-Morrg.png b/static/images/maps/bases/small/Warlord-Morrg.png new file mode 100644 index 0000000..12ccd78 Binary files /dev/null and b/static/images/maps/bases/small/Warlord-Morrg.png differ diff --git a/static/images/maps/bases/small/Zocha.png b/static/images/maps/bases/small/Zocha.png new file mode 100644 index 0000000..8e04e76 Binary files /dev/null and b/static/images/maps/bases/small/Zocha.png differ diff --git a/static/images/maps/tiles/HW-Board-A01.png b/static/images/maps/tiles/HW-Board-A01.png new file mode 100644 index 0000000..48c7f46 Binary files /dev/null and b/static/images/maps/tiles/HW-Board-A01.png differ diff --git a/static/images/maps/tiles/HW-Board-A02.png b/static/images/maps/tiles/HW-Board-A02.png new file mode 100644 index 0000000..fec8d3f Binary files /dev/null and b/static/images/maps/tiles/HW-Board-A02.png differ diff --git a/static/images/maps/tiles/HW-Board-A03.png b/static/images/maps/tiles/HW-Board-A03.png new file mode 100644 index 0000000..5452694 Binary files /dev/null and b/static/images/maps/tiles/HW-Board-A03.png differ diff --git a/static/images/maps/tiles/HW-Board-A04.png b/static/images/maps/tiles/HW-Board-A04.png new file mode 100644 index 0000000..506765a Binary files /dev/null and b/static/images/maps/tiles/HW-Board-A04.png differ diff --git a/static/images/maps/tiles/HW-Board-A05.png b/static/images/maps/tiles/HW-Board-A05.png new file mode 100644 index 0000000..b2df998 Binary files /dev/null and b/static/images/maps/tiles/HW-Board-A05.png differ diff --git a/static/images/maps/tiles/HW-Board-A06.png b/static/images/maps/tiles/HW-Board-A06.png new file mode 100644 index 0000000..217ad58 Binary files /dev/null and b/static/images/maps/tiles/HW-Board-A06.png differ diff --git a/static/images/maps/tiles/HW-Board-A07.png b/static/images/maps/tiles/HW-Board-A07.png new file mode 100644 index 0000000..a65fdca Binary files /dev/null and b/static/images/maps/tiles/HW-Board-A07.png differ diff --git a/static/images/maps/tiles/HW-Board-A08.png b/static/images/maps/tiles/HW-Board-A08.png new file mode 100644 index 0000000..5d7d8ca Binary files /dev/null and b/static/images/maps/tiles/HW-Board-A08.png differ diff --git a/static/images/maps/tiles/HW-Board-A09.png b/static/images/maps/tiles/HW-Board-A09.png new file mode 100644 index 0000000..f0e8146 Binary files /dev/null and b/static/images/maps/tiles/HW-Board-A09.png differ diff --git a/static/images/maps/tiles/HW-Board-B01.png b/static/images/maps/tiles/HW-Board-B01.png new file mode 100644 index 0000000..2bc60cd Binary files /dev/null and b/static/images/maps/tiles/HW-Board-B01.png differ diff --git a/static/images/maps/tiles/HW-Board-B02.png b/static/images/maps/tiles/HW-Board-B02.png new file mode 100644 index 0000000..e8af857 Binary files /dev/null and b/static/images/maps/tiles/HW-Board-B02.png differ diff --git a/static/images/maps/tiles/HW-Board-B03.png b/static/images/maps/tiles/HW-Board-B03.png new file mode 100644 index 0000000..f2b68be Binary files /dev/null and b/static/images/maps/tiles/HW-Board-B03.png differ diff --git a/static/images/maps/tiles/HW-Board-B04.png b/static/images/maps/tiles/HW-Board-B04.png new file mode 100644 index 0000000..308ebd3 Binary files /dev/null and b/static/images/maps/tiles/HW-Board-B04.png differ diff --git a/static/images/maps/tiles/HW-Board-B05.png b/static/images/maps/tiles/HW-Board-B05.png new file mode 100644 index 0000000..50a2265 Binary files /dev/null and b/static/images/maps/tiles/HW-Board-B05.png differ diff --git a/static/images/maps/tiles/HW-Board-B06.png b/static/images/maps/tiles/HW-Board-B06.png new file mode 100644 index 0000000..5751e6e Binary files /dev/null and b/static/images/maps/tiles/HW-Board-B06.png differ diff --git a/static/images/maps/tiles/HW-Board-B07.png b/static/images/maps/tiles/HW-Board-B07.png new file mode 100644 index 0000000..aaa00a0 Binary files /dev/null and b/static/images/maps/tiles/HW-Board-B07.png differ diff --git a/static/images/maps/tiles/HW-Board-B08.png b/static/images/maps/tiles/HW-Board-B08.png new file mode 100644 index 0000000..2502205 Binary files /dev/null and b/static/images/maps/tiles/HW-Board-B08.png differ diff --git a/static/images/maps/tiles/HW-Board-B09.png b/static/images/maps/tiles/HW-Board-B09.png new file mode 100644 index 0000000..fb0924f Binary files /dev/null and b/static/images/maps/tiles/HW-Board-B09.png differ diff --git a/static/images/maps/tokens/elongated/HW-A03.png b/static/images/maps/tokens/elongated/HW-A03.png new file mode 100644 index 0000000..2a0e6fe Binary files /dev/null and b/static/images/maps/tokens/elongated/HW-A03.png differ diff --git a/static/images/maps/tokens/elongated/HW-A10.png b/static/images/maps/tokens/elongated/HW-A10.png new file mode 100644 index 0000000..3744bbd Binary files /dev/null and b/static/images/maps/tokens/elongated/HW-A10.png differ diff --git a/static/images/maps/tokens/elongated/HW-A17.png b/static/images/maps/tokens/elongated/HW-A17.png new file mode 100644 index 0000000..528b6c4 Binary files /dev/null and b/static/images/maps/tokens/elongated/HW-A17.png differ diff --git a/static/images/maps/tokens/elongated/HW-A24.png b/static/images/maps/tokens/elongated/HW-A24.png new file mode 100644 index 0000000..a5c6b00 Binary files /dev/null and b/static/images/maps/tokens/elongated/HW-A24.png differ diff --git a/static/images/maps/tokens/elongated/HW-B03.png b/static/images/maps/tokens/elongated/HW-B03.png new file mode 100644 index 0000000..754bed3 Binary files /dev/null and b/static/images/maps/tokens/elongated/HW-B03.png differ diff --git a/static/images/maps/tokens/elongated/HW-B10.png b/static/images/maps/tokens/elongated/HW-B10.png new file mode 100644 index 0000000..7c5d4d0 Binary files /dev/null and b/static/images/maps/tokens/elongated/HW-B10.png differ diff --git a/static/images/maps/tokens/elongated/HW-B17.png b/static/images/maps/tokens/elongated/HW-B17.png new file mode 100644 index 0000000..618e380 Binary files /dev/null and b/static/images/maps/tokens/elongated/HW-B17.png differ diff --git a/static/images/maps/tokens/elongated/HW-B24.png b/static/images/maps/tokens/elongated/HW-B24.png new file mode 100644 index 0000000..81b916b Binary files /dev/null and b/static/images/maps/tokens/elongated/HW-B24.png differ diff --git a/static/images/maps/tokens/large/HW-A01.png b/static/images/maps/tokens/large/HW-A01.png new file mode 100644 index 0000000..65f1675 Binary files /dev/null and b/static/images/maps/tokens/large/HW-A01.png differ diff --git a/static/images/maps/tokens/large/HW-A08.png b/static/images/maps/tokens/large/HW-A08.png new file mode 100644 index 0000000..7caf1d7 Binary files /dev/null and b/static/images/maps/tokens/large/HW-A08.png differ diff --git a/static/images/maps/tokens/large/HW-A15.png b/static/images/maps/tokens/large/HW-A15.png new file mode 100644 index 0000000..79f4c14 Binary files /dev/null and b/static/images/maps/tokens/large/HW-A15.png differ diff --git a/static/images/maps/tokens/large/HW-A22.png b/static/images/maps/tokens/large/HW-A22.png new file mode 100644 index 0000000..060fe75 Binary files /dev/null and b/static/images/maps/tokens/large/HW-A22.png differ diff --git a/static/images/maps/tokens/large/HW-B01.png b/static/images/maps/tokens/large/HW-B01.png new file mode 100644 index 0000000..d58bef3 Binary files /dev/null and b/static/images/maps/tokens/large/HW-B01.png differ diff --git a/static/images/maps/tokens/large/HW-B08.png b/static/images/maps/tokens/large/HW-B08.png new file mode 100644 index 0000000..ed54b29 Binary files /dev/null and b/static/images/maps/tokens/large/HW-B08.png differ diff --git a/static/images/maps/tokens/large/HW-B15.png b/static/images/maps/tokens/large/HW-B15.png new file mode 100644 index 0000000..a6a366e Binary files /dev/null and b/static/images/maps/tokens/large/HW-B15.png differ diff --git a/static/images/maps/tokens/large/HW-B22.png b/static/images/maps/tokens/large/HW-B22.png new file mode 100644 index 0000000..a0a42b0 Binary files /dev/null and b/static/images/maps/tokens/large/HW-B22.png differ diff --git a/static/images/maps/tokens/medium/HW-A02.png b/static/images/maps/tokens/medium/HW-A02.png new file mode 100644 index 0000000..0d6853b Binary files /dev/null and b/static/images/maps/tokens/medium/HW-A02.png differ diff --git a/static/images/maps/tokens/medium/HW-A09.png b/static/images/maps/tokens/medium/HW-A09.png new file mode 100644 index 0000000..bfeda52 Binary files /dev/null and b/static/images/maps/tokens/medium/HW-A09.png differ diff --git a/static/images/maps/tokens/medium/HW-A16.png b/static/images/maps/tokens/medium/HW-A16.png new file mode 100644 index 0000000..7216e15 Binary files /dev/null and b/static/images/maps/tokens/medium/HW-A16.png differ diff --git a/static/images/maps/tokens/medium/HW-A23.png b/static/images/maps/tokens/medium/HW-A23.png new file mode 100644 index 0000000..4daddc2 Binary files /dev/null and b/static/images/maps/tokens/medium/HW-A23.png differ diff --git a/static/images/maps/tokens/medium/HW-B02.png b/static/images/maps/tokens/medium/HW-B02.png new file mode 100644 index 0000000..37d7647 Binary files /dev/null and b/static/images/maps/tokens/medium/HW-B02.png differ diff --git a/static/images/maps/tokens/medium/HW-B09.png b/static/images/maps/tokens/medium/HW-B09.png new file mode 100644 index 0000000..25f850f Binary files /dev/null and b/static/images/maps/tokens/medium/HW-B09.png differ diff --git a/static/images/maps/tokens/medium/HW-B16.png b/static/images/maps/tokens/medium/HW-B16.png new file mode 100644 index 0000000..9160f60 Binary files /dev/null and b/static/images/maps/tokens/medium/HW-B16.png differ diff --git a/static/images/maps/tokens/medium/HW-B23.png b/static/images/maps/tokens/medium/HW-B23.png new file mode 100644 index 0000000..f726a64 Binary files /dev/null and b/static/images/maps/tokens/medium/HW-B23.png differ diff --git a/static/images/maps/tokens/old-elongated/HW-A03.png b/static/images/maps/tokens/old-elongated/HW-A03.png new file mode 100644 index 0000000..c296163 Binary files /dev/null and b/static/images/maps/tokens/old-elongated/HW-A03.png differ diff --git a/static/images/maps/tokens/old-elongated/HW-A10.png b/static/images/maps/tokens/old-elongated/HW-A10.png new file mode 100644 index 0000000..aa77fe1 Binary files /dev/null and b/static/images/maps/tokens/old-elongated/HW-A10.png differ diff --git a/static/images/maps/tokens/old-elongated/HW-A17.png b/static/images/maps/tokens/old-elongated/HW-A17.png new file mode 100644 index 0000000..79cef6a Binary files /dev/null and b/static/images/maps/tokens/old-elongated/HW-A17.png differ diff --git a/static/images/maps/tokens/old-elongated/HW-A24.png b/static/images/maps/tokens/old-elongated/HW-A24.png new file mode 100644 index 0000000..02a9ca6 Binary files /dev/null and b/static/images/maps/tokens/old-elongated/HW-A24.png differ diff --git a/static/images/maps/tokens/old-elongated/HW-B03.png b/static/images/maps/tokens/old-elongated/HW-B03.png new file mode 100644 index 0000000..fa5c43e Binary files /dev/null and b/static/images/maps/tokens/old-elongated/HW-B03.png differ diff --git a/static/images/maps/tokens/old-elongated/HW-B10.png b/static/images/maps/tokens/old-elongated/HW-B10.png new file mode 100644 index 0000000..1b018e4 Binary files /dev/null and b/static/images/maps/tokens/old-elongated/HW-B10.png differ diff --git a/static/images/maps/tokens/old-elongated/HW-B17.png b/static/images/maps/tokens/old-elongated/HW-B17.png new file mode 100644 index 0000000..972eb60 Binary files /dev/null and b/static/images/maps/tokens/old-elongated/HW-B17.png differ diff --git a/static/images/maps/tokens/old-elongated/HW-B24.png b/static/images/maps/tokens/old-elongated/HW-B24.png new file mode 100644 index 0000000..98536d5 Binary files /dev/null and b/static/images/maps/tokens/old-elongated/HW-B24.png differ diff --git a/static/images/maps/tokens/old-medium/HW-A02.png b/static/images/maps/tokens/old-medium/HW-A02.png new file mode 100644 index 0000000..81cd442 Binary files /dev/null and b/static/images/maps/tokens/old-medium/HW-A02.png differ diff --git a/static/images/maps/tokens/old-medium/HW-A09.png b/static/images/maps/tokens/old-medium/HW-A09.png new file mode 100644 index 0000000..485edfe Binary files /dev/null and b/static/images/maps/tokens/old-medium/HW-A09.png differ diff --git a/static/images/maps/tokens/old-medium/HW-A16.png b/static/images/maps/tokens/old-medium/HW-A16.png new file mode 100644 index 0000000..1a9951e Binary files /dev/null and b/static/images/maps/tokens/old-medium/HW-A16.png differ diff --git a/static/images/maps/tokens/old-medium/HW-A23.png b/static/images/maps/tokens/old-medium/HW-A23.png new file mode 100644 index 0000000..cf80034 Binary files /dev/null and b/static/images/maps/tokens/old-medium/HW-A23.png differ diff --git a/static/images/maps/tokens/old-medium/HW-B02.png b/static/images/maps/tokens/old-medium/HW-B02.png new file mode 100644 index 0000000..0e4b742 Binary files /dev/null and b/static/images/maps/tokens/old-medium/HW-B02.png differ diff --git a/static/images/maps/tokens/old-medium/HW-B09.png b/static/images/maps/tokens/old-medium/HW-B09.png new file mode 100644 index 0000000..d01c80d Binary files /dev/null and b/static/images/maps/tokens/old-medium/HW-B09.png differ diff --git a/static/images/maps/tokens/old-medium/HW-B16.png b/static/images/maps/tokens/old-medium/HW-B16.png new file mode 100644 index 0000000..070f093 Binary files /dev/null and b/static/images/maps/tokens/old-medium/HW-B16.png differ diff --git a/static/images/maps/tokens/old-medium/HW-B23.png b/static/images/maps/tokens/old-medium/HW-B23.png new file mode 100644 index 0000000..365b511 Binary files /dev/null and b/static/images/maps/tokens/old-medium/HW-B23.png differ diff --git a/static/images/maps/tokens/small/HW-A04.png b/static/images/maps/tokens/small/HW-A04.png new file mode 100644 index 0000000..d2fec01 Binary files /dev/null and b/static/images/maps/tokens/small/HW-A04.png differ diff --git a/static/images/maps/tokens/small/HW-A05.png b/static/images/maps/tokens/small/HW-A05.png new file mode 100644 index 0000000..0c77d54 Binary files /dev/null and b/static/images/maps/tokens/small/HW-A05.png differ diff --git a/static/images/maps/tokens/small/HW-A06.png b/static/images/maps/tokens/small/HW-A06.png new file mode 100644 index 0000000..74ae0de Binary files /dev/null and b/static/images/maps/tokens/small/HW-A06.png differ diff --git a/static/images/maps/tokens/small/HW-A07.png b/static/images/maps/tokens/small/HW-A07.png new file mode 100644 index 0000000..307ba6c Binary files /dev/null and b/static/images/maps/tokens/small/HW-A07.png differ diff --git a/static/images/maps/tokens/small/HW-A11.png b/static/images/maps/tokens/small/HW-A11.png new file mode 100644 index 0000000..8cc3340 Binary files /dev/null and b/static/images/maps/tokens/small/HW-A11.png differ diff --git a/static/images/maps/tokens/small/HW-A12.png b/static/images/maps/tokens/small/HW-A12.png new file mode 100644 index 0000000..47cff9b Binary files /dev/null and b/static/images/maps/tokens/small/HW-A12.png differ diff --git a/static/images/maps/tokens/small/HW-A13.png b/static/images/maps/tokens/small/HW-A13.png new file mode 100644 index 0000000..272be76 Binary files /dev/null and b/static/images/maps/tokens/small/HW-A13.png differ diff --git a/static/images/maps/tokens/small/HW-A14.png b/static/images/maps/tokens/small/HW-A14.png new file mode 100644 index 0000000..7c13608 Binary files /dev/null and b/static/images/maps/tokens/small/HW-A14.png differ diff --git a/static/images/maps/tokens/small/HW-A18.png b/static/images/maps/tokens/small/HW-A18.png new file mode 100644 index 0000000..8070ec4 Binary files /dev/null and b/static/images/maps/tokens/small/HW-A18.png differ diff --git a/static/images/maps/tokens/small/HW-A19.png b/static/images/maps/tokens/small/HW-A19.png new file mode 100644 index 0000000..060b9ee Binary files /dev/null and b/static/images/maps/tokens/small/HW-A19.png differ diff --git a/static/images/maps/tokens/small/HW-A20.png b/static/images/maps/tokens/small/HW-A20.png new file mode 100644 index 0000000..14b00ae Binary files /dev/null and b/static/images/maps/tokens/small/HW-A20.png differ diff --git a/static/images/maps/tokens/small/HW-A21.png b/static/images/maps/tokens/small/HW-A21.png new file mode 100644 index 0000000..504645e Binary files /dev/null and b/static/images/maps/tokens/small/HW-A21.png differ diff --git a/static/images/maps/tokens/small/HW-A25.png b/static/images/maps/tokens/small/HW-A25.png new file mode 100644 index 0000000..0e8fac0 Binary files /dev/null and b/static/images/maps/tokens/small/HW-A25.png differ diff --git a/static/images/maps/tokens/small/HW-A26.png b/static/images/maps/tokens/small/HW-A26.png new file mode 100644 index 0000000..c88218f Binary files /dev/null and b/static/images/maps/tokens/small/HW-A26.png differ diff --git a/static/images/maps/tokens/small/HW-A27.png b/static/images/maps/tokens/small/HW-A27.png new file mode 100644 index 0000000..16a0a34 Binary files /dev/null and b/static/images/maps/tokens/small/HW-A27.png differ diff --git a/static/images/maps/tokens/small/HW-A28.png b/static/images/maps/tokens/small/HW-A28.png new file mode 100644 index 0000000..cc17b4c Binary files /dev/null and b/static/images/maps/tokens/small/HW-A28.png differ diff --git a/static/images/maps/tokens/small/HW-B04.png b/static/images/maps/tokens/small/HW-B04.png new file mode 100644 index 0000000..30f4b00 Binary files /dev/null and b/static/images/maps/tokens/small/HW-B04.png differ diff --git a/static/images/maps/tokens/small/HW-B05.png b/static/images/maps/tokens/small/HW-B05.png new file mode 100644 index 0000000..f22db1c Binary files /dev/null and b/static/images/maps/tokens/small/HW-B05.png differ diff --git a/static/images/maps/tokens/small/HW-B06.png b/static/images/maps/tokens/small/HW-B06.png new file mode 100644 index 0000000..dc7e314 Binary files /dev/null and b/static/images/maps/tokens/small/HW-B06.png differ diff --git a/static/images/maps/tokens/small/HW-B07.png b/static/images/maps/tokens/small/HW-B07.png new file mode 100644 index 0000000..188e664 Binary files /dev/null and b/static/images/maps/tokens/small/HW-B07.png differ diff --git a/static/images/maps/tokens/small/HW-B11.png b/static/images/maps/tokens/small/HW-B11.png new file mode 100644 index 0000000..44eb390 Binary files /dev/null and b/static/images/maps/tokens/small/HW-B11.png differ diff --git a/static/images/maps/tokens/small/HW-B12.png b/static/images/maps/tokens/small/HW-B12.png new file mode 100644 index 0000000..ac1b9ec Binary files /dev/null and b/static/images/maps/tokens/small/HW-B12.png differ diff --git a/static/images/maps/tokens/small/HW-B13.png b/static/images/maps/tokens/small/HW-B13.png new file mode 100644 index 0000000..3b359f0 Binary files /dev/null and b/static/images/maps/tokens/small/HW-B13.png differ diff --git a/static/images/maps/tokens/small/HW-B14.png b/static/images/maps/tokens/small/HW-B14.png new file mode 100644 index 0000000..5cf474c Binary files /dev/null and b/static/images/maps/tokens/small/HW-B14.png differ diff --git a/static/images/maps/tokens/small/HW-B18.png b/static/images/maps/tokens/small/HW-B18.png new file mode 100644 index 0000000..c163d03 Binary files /dev/null and b/static/images/maps/tokens/small/HW-B18.png differ diff --git a/static/images/maps/tokens/small/HW-B19.png b/static/images/maps/tokens/small/HW-B19.png new file mode 100644 index 0000000..3458e28 Binary files /dev/null and b/static/images/maps/tokens/small/HW-B19.png differ diff --git a/static/images/maps/tokens/small/HW-B20.png b/static/images/maps/tokens/small/HW-B20.png new file mode 100644 index 0000000..35dafd0 Binary files /dev/null and b/static/images/maps/tokens/small/HW-B20.png differ diff --git a/static/images/maps/tokens/small/HW-B21.png b/static/images/maps/tokens/small/HW-B21.png new file mode 100644 index 0000000..cb269ee Binary files /dev/null and b/static/images/maps/tokens/small/HW-B21.png differ diff --git a/static/images/maps/tokens/small/HW-B25.png b/static/images/maps/tokens/small/HW-B25.png new file mode 100644 index 0000000..1c11cb7 Binary files /dev/null and b/static/images/maps/tokens/small/HW-B25.png differ diff --git a/static/images/maps/tokens/small/HW-B26.png b/static/images/maps/tokens/small/HW-B26.png new file mode 100644 index 0000000..e9182cd Binary files /dev/null and b/static/images/maps/tokens/small/HW-B26.png differ diff --git a/static/images/maps/tokens/small/HW-B27.png b/static/images/maps/tokens/small/HW-B27.png new file mode 100644 index 0000000..be9443e Binary files /dev/null and b/static/images/maps/tokens/small/HW-B27.png differ diff --git a/static/images/maps/tokens/small/HW-B28.png b/static/images/maps/tokens/small/HW-B28.png new file mode 100644 index 0000000..da9893e Binary files /dev/null and b/static/images/maps/tokens/small/HW-B28.png differ diff --git a/static/javascripts/maps.js b/static/javascripts/maps.js new file mode 100644 index 0000000..442e321 --- /dev/null +++ b/static/javascripts/maps.js @@ -0,0 +1,422 @@ +// global +// var ikrpg + +var ikrpg = ikrpg || {}; + +(function() { + + var db2 = new PouchDB('maps.ikrpg'); + + listMaps(); + + fillLibrary(); + + makeRemover($('#img-library')); + + $('#img-library .lib-img.tile').each(function(index, el) { + var $el = $(el); + makeDraggableCreator(8, '#map-area .tile', 90, 250)($el); + }); + + $('#img-library .lib-img.token, #img-library .lib-img.base').each(function(index, el) { + var $el = $(el); + makeDraggableCreator(1, '#map-area .token, #map-area .base', 22.5, 125)($el); + }); + + makeMapSaver($('#save-as')); + + + + function fillLibrary() { + appendTiles(); + append10x3tokens(); + append1x1Stokens(); + append4x3tokens(); + append1x1Ltokens(); + appendSmallBases(); + appendMediumBases(); + + function appendTiles() { + $.each(['01', '02', '03', '04', '05', '06', '07', '08', '09'], function(i, id) { + $.each(['A', 'B'], function(j, key) { + $('#tiles').append('\ +
  • \ +

    HW Board '+key+id+'

    \ + \ +
  • \ + '); + }); + }); + } + + function append10x3tokens() { + $.each(['03', '10', '17', '24'], function(i, id) { + $.each(['A', 'B'], function(j, key) { + $('#tokens10x3').append('\ +
  • \ +

    HW '+key+id+'

    \ + \ +
  • \ + '); + }); + }); + } + + function append1x1Stokens() { + $.each(['04', '05', '06', '07', '11', '12', '13', '14', '18', '19', '20', '21', '25', '26', '27', '28'], function(i, id) { + $.each(['A', 'B'], function(j, key) { + $('#tokens1x1s').append('\ +
  • \ +

    HW '+key+id+'

    \ + \ +
  • \ + '); + }); + }); + } + + function append4x3tokens() { + $.each(['02', '09', '16', '23'], function(i, id) { + $.each(['A', 'B'], function(j, key) { + $('#tokens4x3').append('\ +
  • \ +

    HW Board '+key+id+'

    \ + \ +
  • \ + '); + }); + }); + } + + function append1x1Ltokens() { + $.each(['01', '08', '15', '22'], function(i, id) { + $.each(['A', 'B'], function(j, key) { + $('#tokens1x1l').append('\ +
  • \ +

    HW '+key+id+'

    \ + \ +
  • \ + '); + }); + }); + } + + function appendSmallBases() { + $.each(['Farrow-Brigand', 'Gullin', 'Knor', 'Lurk', 'Razor-Boar', 'Slaughterhouser', 'Warlord-Morrg', 'Zocha'], function(i, name) { + $('#bases-small').append('\ +
  • \ + \ +
  • \ + '); + }); + } + + function appendMediumBases() { + $.each(['Longchops'], function(i, name) { + $('#bases-medium').append('\ +
  • \ + \ +
  • \ + '); + }); + } + } + + function makeRemover($el) { + $el.droppable({ + accept: 'img', + drop: function(event, ui) { + $(ui.draggable).remove(); + } + }) + } + + function makeDraggableCreator(step, stackSelector, angle, duration) { + return function($el) { + $el.click(function(event) { + var $img = createImg($el.attr('class'), $el.attr('src')); + + $img.offset({ + top: event.pageY - $img.height() / 2, + left: event.pageX - $img.width() / 2 + }); + + makeDraggable(step, stackSelector)($img); + makeRotateable(angle, duration)($img); + disableContextMenu($img); + }); + }; + } + + function makeMapSaver($el) { + $el.click(function(event) { + event.preventDefault(); + var map = currentMapData(); + var _id = $('#map-name').val(); + + var json = { '_id': _id, 'data': map }; + + db2.get(_id, function(error, doc) { + if(error) { // map not in db yet + doc = json; + doc["_id"] = _id; + db2.put(doc); + } else { // map already in db + json["_id"] = doc["_id"]; + json["_rev"] = doc["_rev"]; + db2.put(json); + } + listMaps(); + $('#map-area img').remove(); + setTimeout(function() { + fill(false, json); + }, 300); + }); + }); + } + + function listMaps() { + $("#load-maps > tbody").remove(); + + $("#load-maps").append(""); + + db2.allDocs({include_docs: true}, function(error, results) { + if(!error) { + var rows = results.rows; + + $.each(rows, function(index, row) { + var map = row.doc; + + function appendTr() { + $("#load-maps > tbody").append(""); + } + + function appendTd() { + $("#load-maps > tbody > tr:last-of-type").append(""); + } + + function lastTd() { + return $("#load-maps > tbody > tr:last-of-type > td:last-of-type"); + } + + appendTr(); + appendTd(); + lastTd().text(map["_id"]); + appendTd(); + lastTd().html("Load"); + lastTd().find('a').click(showMap(map['_id'])); + appendTd(); + lastTd().html("Delete"); + lastTd().find('a').click(deleteMap(map['_id'], map['_rev'])); + }); + } + }); + } + + function showMap(_id) { + return function(event) { + event.preventDefault(); + $('#map-name').val(_id); + db2.get(_id, fill); + }; + }; + + function fill(error, json) { + if(!error) { + var map = json.data; + $('#map-area img').remove(); + var mapAreaOffset = $('#map-area').offset(); + + $.each(map, function(index, img) { + var top = img.top; + var left = img.left; + var angle = img.angle; + var src = img.src; + var classes = img.classes; + + var $img = createImg(classes, src); + + console.log('up', mapAreaOffset.top, mapAreaOffset.left) + + // TODO: SUUUPER dirty! Refactor this! + if(classes.indexOf('tile') > 0) { + makeDraggable(8, '#map-area .tile')($img); + makeRotateable(90, 250)($img); + } else if(classes.indexOf('token') > 0 || classes.indexOf('base') > 0) { + makeDraggable(1, '#map-area .token, #map-area .base')($img); + makeRotateable(22.5, 125)($img); + } + + $img.offset({ + top: top + $('#map-area').offset().top, + left: left + $('#map-area').offset().left + }); + + $img.css({ transform: "rotate(" + angle + "deg)" }); + $img.data('angle', angle); + + disableContextMenu($img); + }); + } + } + + function deleteMap(_id, _rev) { + return function(event) { + event.preventDefault(); + if(confirm("This will delete your map. Do you want to proceed?")) { + db2.remove(_id, _rev, function(error, code) { + var map = currentMapData(); + listMaps(); + $('#map-area img').remove(); + var json = { 'data': map }; + setTimeout(function() { + fill(false, json); + }, 300); + }); + } + }; + }; + + function createImg(classes, src) { + var $img = $(''); + $img.addClass(classes); + $img.attr('src', src); + $('#map-area').append($img); + return $img; + } + + function makeDraggable(step, stackSelector) { + return function($el) { + $el.draggable({ + cursor: 'crosshair', + cursorAt: { left: $el.width() / 2, top: $el.height() / 2 }, + opacity: 0.5, + drag: grid(), + stack: stackSelector + }); + + function grid() { + var $parent = $el.parent(); + var parentOffset = $parent.offset(); + + var compensation = { + top: parentOffset.top % step, + left: parentOffset.left % step + }; + + return function(event, ui) { + var remainder = { + top: ui.position.top % step, + left: ui.position.left % step + }; + + ui.position = { + top: ui.position.top - remainder.top + compensation.top, + left: ui.position.left - remainder.left + compensation.left + }; + }; + }; + }; + }; + + function makeRotateable(degree, duration) { + return function($el) { + // Idea: If $el is clicked but not moved, it is rotated + + $el.data('angle', 0); + + $el.mousedown(function(event) { + var offset = $el.offset(); + $el.data('moved', false); + }); + $el.mousemove(function(event) { + $el.data('moved', true); + }); + $el.mouseup(function(event) { + var offset = $el.offset(); + if(!$el.data('moved')) { + // Rotate element clockwise if it did not move. On right click, rotate counterclockwise. + rotateElement($el, event.button === 2 ? -degree : degree, duration); + } + $el.removeData('moved'); + }); + + return $el; + }; + + function rotateElement($el, degree, duration) { + var w = $el.css('width'); + var h = $el.css('height'); + + var currentAngle = getCurrentRotationAngle($el); + var angle = currentAngle + degree; + + $({deg: currentAngle}).animate({deg: angle}, { + duration: duration, + step: function(now){ + $el.css({ transform: "rotate(" + now + "deg)" }); + } + }); + + $el.data('angle', angle); + } + + function getCurrentRotationAngle($el) { + var st = window.getComputedStyle($el[0], null); + var tr = st.getPropertyValue("-webkit-transform") || + st.getPropertyValue("-moz-transform") || + st.getPropertyValue("-ms-transform") || + st.getPropertyValue("-o-transform") || + st.getPropertyValue("transform") || + 'none'; + + if(tr === 'none') { + tr = 'matrix(0.0, 0.0, 0.0, 0.0, 0px, 0px)'; + } + + var values = tr.split('(')[1].split(')')[0].split(','); + var a = values[0]; + var b = values[1]; + + var scale = Math.sqrt(a*a + b*b); + var sin = b/scale; + var angle = Math.round(Math.atan2(b, a) * (180/Math.PI)); + + return angle; + } + }; + + function disableContextMenu($el) { + $el[0].oncontextmenu = function() { return false; } + } + + function currentMapData($mapArea) { + var data = []; + + var $mapArea = $('#map-area'); + + var areaOffset = $mapArea.offset(); + $mapArea.find('img').each(function(i, img) { + var $img = $(img); + $img.css('width', 0); + $img.css('height', 0); + $img.css({ transform: 'rotate(0deg)' }); + var imgOffset = $img.offset(); + + console.log('down', areaOffset.top, areaOffset.left) + + var entry = { + top: imgOffset.top - areaOffset.top, + left: imgOffset.left - areaOffset.left, + angle: $img.data('angle'), + src: $img.attr('src'), + classes: $img.attr('class') + }; + + data.push(entry); + }); + + return data; + } + +})(); \ No newline at end of file diff --git a/static/javascripts/sheet.js b/static/javascripts/sheet.js index 048748a..86092df 100644 --- a/static/javascripts/sheet.js +++ b/static/javascripts/sheet.js @@ -47,37 +47,39 @@ var ikrpg = ikrpg || {}; $("#characters").append(""); db2.allDocs({include_docs: true}, function(error, results) { - var rows = results.rows; + if(!error) { + var rows = results.rows; - $.each(rows, function(index, row) { - var character = row.doc; + $.each(rows, function(index, row) { + var character = row.doc; - function appendTr() { - $("#characters > tbody").append(""); - } + function appendTr() { + $("#characters > tbody").append(""); + } - function appendTd() { - $("#characters > tbody > tr:last-of-type").append(""); - } + function appendTd() { + $("#characters > tbody > tr:last-of-type").append(""); + } - function lastTd() { - return $("#characters > tbody > tr:last-of-type > td:last-of-type"); - } + function lastTd() { + return $("#characters > tbody > tr:last-of-type > td:last-of-type"); + } - appendTr(); - appendTd(); - lastTd().text(character["hero-name"]); - appendTd(); - lastTd().text(character["archetype"]); - appendTd(); - lastTd().text(character["race"]); - appendTd(); - lastTd().text(character["careers"]); - appendTd(); - lastTd().html("Load"); - appendTd(); - lastTd().html("Delete"); - }); + appendTr(); + appendTd(); + lastTd().text(character["hero-name"]); + appendTd(); + lastTd().text(character["archetype"]); + appendTd(); + lastTd().text(character["race"]); + appendTd(); + lastTd().text(character["careers"]); + appendTd(); + lastTd().html("Load"); + appendTd(); + lastTd().html("Delete"); + }); + } }); } diff --git a/static/stylesheets/content/maps.css b/static/stylesheets/content/maps.css new file mode 100644 index 0000000..fcccb92 --- /dev/null +++ b/static/stylesheets/content/maps.css @@ -0,0 +1,176 @@ +#maps { + font-size: 0; +} + +#maps #map-area img { + position: absolute !important; +} + +#maps #map-area img.tile { + width: calc(1600px / 6.25); + height: calc(2100px / 6.25); + z-index: 1; +} + +#maps #map-area img.token, +#maps #map-area img.base { + z-index: 10000; +} + +#maps #map-area img.token10x3 { + width: calc(500px / 3.3); + height: calc(150px / 3.3); +} + +#maps #map-area img.token1x1s { + width: calc(250px / 3.3); + height: calc(250px / 3.3); +} + +#maps #map-area img.token4x3 { + width: calc(500px / 3.3); + height: calc(375px / 3.3); +} + +#maps #map-area img.token1x1l { + width: calc(550px / 3.3); + height: calc(550px / 3.3); +} + +#maps #map-area img.base-small { + width: calc(119px / 3.3); + height: calc(119px / 3.3); +} + +#maps #map-area img.base-medium { + width: calc(158px / 3.3); + height: calc(158px / 3.3); +} + +#maps #map-area { + display: inline-block; + width: calc(1600px / 6.25 * 3); + height: calc(2100px / 6.25 * 3); + background-color: white; +} + +#maps #img-library { + display: inline-block; + width: 212px; + height: calc(2100px / 6.25 * 3 - 1em); + padding-bottom: 1em; + overflow-y: auto; +} + +#maps #img-library img.lib-img { + z-index: 50000; + cursor: pointer; +} + +#maps #img-library h2 { + font-size: 24px; + text-transform: uppercase; +} + +#maps #img-library h3 { + font-size: 20px; +} + +#maps #img-library h2, h3 { + margin: 0 0 1em 0; + font-family: 'Cabin', sans-serif; + + color: #2C2C2C; + font-weight: bold; + text-align: center; +} + +#maps #img-library ul { + display: block; + margin: 0 auto 16px auto; + padding: 0; + width: calc(1600px / 10); +} + +#maps #img-library ul li { + display: inline-block; +} + +#maps #img-library ul li h4 { + font-size: 16px; +} + +#maps #img-library ul#tiles li.tile img { + width: calc(1600px / 10); +} + +#maps #img-library ul#tokens10x3 li.token10x3 img { + width: calc(1600px / 10); +} + +#maps #img-library ul#tokens1x1s li.token1x1s:nth-of-type(2n-1), +#maps #img-library ul#bases-small li.base-small:nth-of-type(2n-1), +#maps #img-library ul#bases-medium li.base-medium:nth-of-type(2n-1) { + margin-right: 1px; +} + +#maps #img-library ul#tokens1x1s li.token1x1s:nth-of-type(2n), +#maps #img-library ul#bases-small li.base-small:nth-of-type(2n), +#maps #img-library ul#bases-medium li.base-medium:nth-of-type(2n) { + margin-left: 1px; +} + +#maps #img-library ul li.token1x1s img, +#maps #img-library ul li.base-small img, +#maps #img-library ul li.base-medium img { + width: calc(1600px / 10 / 2 - 2px); +} + +#maps #img-library ul li.token4x3 img { + width: calc(1600px / 10); +} + +#maps #img-library ul li.token1x1l img { + width: calc(1600px / 10); +} + + +#map-name { + font-size: 24px; + width: 200px; +} + +#import-export { + display: none; +} + +#import-export:target { + display: block; +} + +#import-export textarea { + display: block; +} + + +@media print { + + div#maps div#img-library { + display: none; + } + div#maps, div#maps div#map-area { + position: absolute !important; + margin: 0 !important; + padding: 0 !important; + top: 0 !important; + left: 0 !important; + } + div#maps, div#maps div#map-area, div#maps div#map-area img { + display: block !important; + } + div#maps div#map-area img { + display: block; + margin-top: -480px !important; + margin-left: -150px !important; + } +} \ No newline at end of file