How to use Tiled

Content and general development discussion, including maps, quests, and server code from the development team.
User avatar
swimmy
Novice
Novice
Posts: 439
Joined: 17 Oct 2008, 09:53
Location: Japan
Contact:

How to use Tiled

Post by swimmy » 21 Mar 2010, 10:39

screenshot(2010-03-21 18.34.29).png
screenshot(2010-03-21 18.34.29).png (160.59 KiB) Viewed 2013 times
Can you tell me how to use it? I can make it, but don't know how to edit.
who was...
User avatar
lien
Novice
Novice
Posts: 446
Joined: 30 Oct 2008, 09:59
Location: France

Re: How to use Tiled

Post by lien » 21 Mar 2010, 13:44

swimmy wrote:
screenshot(2010-03-21 18.34.29).png
Can you tell me how to use it? I can make it, but don't know how to edit.
when you're on the object layer , when you're mouse is just on the object
right click
Image
"properties..."
Image
User avatar
swimmy
Novice
Novice
Posts: 439
Joined: 17 Oct 2008, 09:53
Location: Japan
Contact:

Re: How to use Tiled

Post by swimmy » 21 Mar 2010, 14:03

Oh got it. Thanks. :)
who was...
User avatar
swimmy
Novice
Novice
Posts: 439
Joined: 17 Oct 2008, 09:53
Location: Japan
Contact:

Re: How to use Tiled

Post by swimmy » 21 Mar 2010, 14:21

2010-03-21 22.19.44).png
2010-03-21 22.19.44).png (18.91 KiB) Viewed 1977 times
Well, what's this mean, "dest_x" or "dest_y" ?
I thought it was a tile, but seems not.
who was...
User avatar
enchilado
Warrior
Warrior
Posts: 972
Joined: 06 Mar 2009, 02:21
Location: evermore a GUY

Re: How to use Tiled

Post by enchilado » 21 Mar 2010, 14:37

-> Note: I haven't done this on a Mac, but it should be the same.

Adding Tiles

First of all, you need to tell Tiled what image you're going to use for your tileset. So, hit the button that says Map and select New Tileset...

Choose the image you want, and give it a name - anything will do. Make sure that Tile Width and Height are set to 32, and that Margin and Spacing are both 0.

A box should now appear alongside the Layers dialogue with all the tiles in it you can use. This is just the image you selected cut up into bits. Place the tiles where you want them, but remember to use the layers correctly according to the Mapping Guidelines on the Wiki. To add a layer, go Layer -> Add Tile Layer....


Adding Objects

Select Layer in the whatever-that-bar-is-called-on-a-Mac, then New Object Layer.... Now just click on the map wherever you want your object to appear and drag it to the right size.


Warp Points

Right-click the object and select Properties.... Fill it out like this:

Code: Select all

Name: toYourMap
Type: warp
You'll need three properties for a warp. Add them, and fill out the Name sides like this:

Code: Select all

dest_map
dest_x
dest_y
Then fill out the Value column:

Code: Select all

mapname
x coordinate (pixels)
y coordinate (pixels)
For example, if you wanted the warp to send you to the steps of Auldsbel's house, which in tiles is 51x 68y: because you need the coordinates in pixels, just take your tile coordinates and multiply by 32 (tiles are 32 pixels across), then add 16 so the player appears in the centre of the tile.

Code: Select all

Name: toWoodland
Type: warp
dest_map | 011-1
dest_x | 1648
dest_y | 2224
You can find the coordinates of a tile by holding the cursor over the tile you want in-game or in Tiled. In-game, hit F10 to display the Debug window, which has the map name and coordinates of the tile on it note that this is the tile with the cursor over it, not the tile you are standing on.
In Tiled, the coordinates should be displayed somewhere. On Ubuntu it is in the bottom left, I can't see the bottom left corner of Tiled in that screenshot but I assume it is the same.


Monster Spawn Points

Code: Select all

Name: Monstername
Type: spawn
This time, you'll need to put some properties like this:

Code: Select all

eA_death
eA_spawn
max_beings
monster_id
eA_death gives the minimum delay before respawning after the death of the entire mob, and eA_spawn is the minimum delay between spawns - both in milliseconds, probably.
Max_beings is the highest number of monsters allowed to spawn from that point, and monster_id is of course the monster's ID. A (probably) complete list of monsters and their IDs can be found here.
For example, three squirrels that take a while to respawn if you kill them all, but respawn very quickly if you only kill one:

Code: Select all

eA_spawn | 500
eA_death | 120000
max_beings | 3
monster_id | 36

Hope this helped, and thanks Freeyorp for showing me most of this :)
Last edited by enchilado on 21 Mar 2010, 21:48, edited 1 time in total.
User avatar
swimmy
Novice
Novice
Posts: 439
Joined: 17 Oct 2008, 09:53
Location: Japan
Contact:

Re: How to use Tiled

Post by swimmy » 21 Mar 2010, 14:41

Okay, thanks for your help :)
who was...
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 17:08
Location: Germany

Re: How to use Tiled

Post by Crush » 21 Mar 2010, 15:30

The target coordinates for map warp areas are in pixel coordinates, not tile coordinates. To get the pixel coordinates multiply the tile coordinates with 32.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
swimmy
Novice
Novice
Posts: 439
Joined: 17 Oct 2008, 09:53
Location: Japan
Contact:

Re: How to use Tiled

Post by swimmy » 21 Mar 2010, 15:34

Okay. I understand.
This topic is good for everyone also.
who was...
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: 01 Nov 2007, 18:35
Location: Internet

Re: How to use Tiled

Post by Jaxad0127 » 21 Mar 2010, 16:11

Crush wrote:The target coordinates for map warp areas are in pixel coordinates, not tile coordinates. To get the pixel coordinates multiply the tile coordinates with 32.
Adding 16 too is preferred so characters land on the center of the tile. Most warps don't at the moment.
Image
User avatar
swimmy
Novice
Novice
Posts: 439
Joined: 17 Oct 2008, 09:53
Location: Japan
Contact:

Re: How to use Tiled

Post by swimmy » 22 Mar 2010, 00:19

To be center, I calculated <tile number>*32-16. Or, <tile number>*32+16 preferred?
who was...
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 17:08
Location: Germany

Re: How to use Tiled

Post by Crush » 22 Mar 2010, 00:41

plus 16
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
enchilado
Warrior
Warrior
Posts: 972
Joined: 06 Mar 2009, 02:21
Location: evermore a GUY

Re: How to use Tiled

Post by enchilado » 22 Mar 2010, 01:00

Actually, wouldn't -16 be better? If you want the player to appear on 2,2 then if you add 16 he's going to be on 3,3.
plusorminus.png
plusorminus.png (28.42 KiB) Viewed 1921 times
Blue shows 48,48 (minus 16) and red shows 80,80 (plus 16). 48,48 is actually on the 2,2 tile, whereas 80,80 is the tile to the top right of that.
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 17:08
Location: Germany

Re: How to use Tiled

Post by Crush » 22 Mar 2010, 01:04

Poison ivy, two things are wrong in your line of reasoning.

1. Our coordinate system begins in the upper left corner, not the lower left.
2. Our coordinate system counts from 0, not from 1.

The upper left tile is tile 0:0.

The upper left pixel, which is the upper left corner of tile 0:0, is also 0:0.

Thus the center of the tile 0:0 is pixel 16:16.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
enchilado
Warrior
Warrior
Posts: 972
Joined: 06 Mar 2009, 02:21
Location: evermore a GUY

Re: How to use Tiled

Post by enchilado » 22 Mar 2010, 01:32

I had the red in the bottom corner at first, then thought that was probably wrong. it doesn't matter anyway.

And okay, so it starts from zero. But what if I count the tiles beginning with zero? Use the same image. I count the first tile as zero, and the second as one; I want to make my player appear on 1,1. Same thing.

If you count the first tile as zero when counting out the tile, take 16; add 16 if you count the first tile as one.

If you get your tile coordinate from the game via the debug window, take 16, since this takes the tiles as they are numbered (beginning at zero).
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 17:08
Location: Germany

Re: How to use Tiled

Post by Crush » 22 Mar 2010, 03:00

poison_ivy wrote:If you count the first tile as zero when counting out the tile, take 16; add 16 if you count the first tile as one.
Maybe you mean the other way around?

When you have tile 0:0 and you would subtract 16 you would be at -16.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
Post Reply