Pathoschild / canimod.github.io

A collaborative GitHub Pages website about modding Stardew Valley.
http://canimod.com
4 stars 17 forks source link

Add Tiled instructions for tile properties & animation #15

Closed Pathoschild closed 7 years ago

Pathoschild commented 7 years ago

Per comment by @SpringsSong on https://github.com/Pathoschild/canimod.github.io/commit/201f7d02d8f5591c00b4a98b5e6385d2579086c5#commitcomment-20655114 (gyazo images attached instead):

Okay, so I have NO idea how to put this into the guide, but I figured out how to add, edit, and view tile properties in Tiled, and how to animate tiles.

The map in the screenshots is an edited version of the Lowkey Lux Slime Hutch Spa mod. It's a personal edit that makes the mod compatible with the Bath House Hot Spring mod. Presently it is for personal use only, and I have no plans to release it to the public at this time as I do not have the permission of either mod author to release it publicly.

To Add Tile Properties:

A small note: this works best when "Snap to Grid" is enabled in the "View" menu, since otherwise your objects will not be constrained to the tile grid in tIDE when you return it to tIDE to convert it from .tmx to .tbin.

  1. Create a new Object Layer (https://gyazo.com/401016e5574f327812ef85bf1238923a). Try to follow the naming scheme of the map tile layers (Back, Buildings, Front, Paths, etc)
  2. Select "Insert Rectangle" from the top bar (https://gyazo.com/aefc55eb7f8633cc4b79d00c64a2ab7e)
  3. Click and drag the rectangle over the tile. It should snap to the tile grid if you have "Snap to Grid" enabled.
  4. Switch to "Select Object" (https://gyazo.com/740ba56f1bdf7d729e96c4fa7101990b)
  5. Click on the object you want to edit. You'll know it's selected because there will be directional arrows around the box. (https://gyazo.com/eec66e746e586abfd55bd6d797dff844)
  6. Give the tile a name, if you wish. When imported from tIDE, tiles with data will be called "TileData" by default. (https://gyazo.com/b16dec6ed7ef3027fe0aeb03d821b0c7)
  7. To add custom properties, click on the plus sign underneath the custom properties. (https://gyazo.com/daa128d4b56af89c4bee9d23c8359585)
  8. Add the type of property in the window that comes up. Note, I'm not 100% certain what the other properties there are, but the ones that Stardew uses all appear to be "string" properties. (https://gyazo.com/d9803851efede58ccf42a27abfffe5de)
  9. Once you've added the property (TouchAction, for example), add the additional property (In this case, PoolEntrance) (https://gyazo.com/48076674049fc789dbfe0e7c99af11db)

To Edit/View Tile Properties:

  1. Make sure you have the corresponding object layer selected! If you don't then you won't be selecting anything.
  2. Select the object you want to edit using the "Select Object" tool. The properties should appear on the left-hand side of the screen. (https://gyazo.com/609d8da4269602af5705158155631bd1)
  3. Click on the Pencil icon (shown in the previous picture) to edit the name of the property, or double-click the second name to edit the action.

To Animate Tiles:

  1. Select the tile you want to animate in the Tilesets window. It will be highlighted blue once you select it. (https://gyazo.com/e480aeb35a056324cb9aa4b5f0df2568)
  2. Go to View > Tile Animation Editor. (https://gyazo.com/f3f360e705a21bec57d52f97bb78472e) That will bring up the Tile Animation Editor window. (https://gyazo.com/b55c9e950f32790fd1c8c86fcd1d2770). This window can be minimized and brought forward later on, if you so wish.
  3. Click and drag the tiles you want animated into the left panel. By default, the length of the animation will be 100ms; Stardew's animation lengths vary between 250ms and 1000ms. Change the animation length as desired by double-clicking on the number after it. Close or minimize the window once you have finished.
  4. You'll notice that the tile now has a little symbol over the bottom-right corner. (https://gyazo.com/357947fa43c7cde689770b125390b9db) Unlike in tIDE, you only need to apply the animation to a particular tile once--after that, all tiles placed on the map that match the one you placed the animation on will have the animation.
Pathoschild commented 7 years ago

Added to the creating an XNB mod guide, thanks!