Tool Tiled improvement (searchable tile sets)

Discussion in 'Starbound Modding' started by Monijir, Jan 13, 2016.

  1. Monijir

    Monijir Scruffy Nerf-Herder

    I was playing around with Tiled a while back and realized the Stamps feature can be used for a makeshift object database. We just have to generate a .stamp file for every tile and name the .stamp after one of the tile properties (the short description field seems reasonable). This is a huge advantage in work flow and I think the idea has value. I can get a stamp set to serve as a proof-of-concept on my system - but it would need to be drastically reworked to be of any use to other modders. Is anyone interested on working with me to make this feature a reality for the rest of the community?
     
    The | Suit likes this.
  2. lazarus78

    lazarus78 The Waste of Time

    I could use a little more explanation on what they are. Ive only done minor toying with Tiled. Anything that helps workflow I am in favor of... except GIMP's stupid decision to change image exporting... that was a stupid decision...
     
  3. Monijir

    Monijir Scruffy Nerf-Herder

    Not sure if this is communicated super well but here's anInfo dump :

    Well in tiled you have a couple views enabled by default but not all of them. From View > Views and Toolbars > Stamps you can enable the stamps window. It lets you copy a selection and save it under a name. Once you've saved the selection as a stamp it will show up in the stamp view and you can select it to draw with just like it was another tile. It can also be used for creating objects from tile (I tested) so it works for our current object style. There's a filter field on the top of the view so you can find what you need in a large pool of stamps. So you could grab a single tile of 'foobar' and create a stamp named 'foobar' so you could pull it up through the filter instead of having to look it up by hand. If you open a new map you still have access to that 'foobar' stamp. You can actually use it on the new map without the external tile set all ready being referenced and the tile set will be automatically added (referenced not imported) to the new map.

    So I started looking into what the .stamp format is about to see if I could write a script that generated a .stamp file for each tile in each tile set. The stamp window interface is pretty dodgy on my set up - I have a hard time renaming existing stamps, and I often accidentally create 'variations' instead of new entries.

    Unfortunately, they don't work like tile sets - there's no file format for a collection of stamps just a directory that contains .stamp files (I think its a user directory by default and on my last Tiled build it was through the user preferences that you could find the folder itself.) The .stamp format is actually just a tiny map file so since we'd only be using it for a single layered 1x1 map a lot of it is really just junk data. They're saved in a human-readable text format. I've only ever seen them formatted as JSONs but I think if they were saved from a map using the standard .tmx format they'd come out in xml. They use zlib and b64 by default so they look pretty strange when you open them in a text editor - but you can use CSV with no compression as well . They reference their source tile set with a relative path - so you'd be wanting to either generate them specifically for the system you're using or keep your projects' map files in the same directory relative to the tile sets. There's like 0 chance this will work between different users when the default directory for the stamps isn't in the Starbound directory.
     
  4. lazarus78

    lazarus78 The Waste of Time

    Interesting. Id be interested in tinkering with them.
     
  5. Monijir

    Monijir Scruffy Nerf-Herder

    Since this wasn't very well explained here's a screenshot of what I'm getting at :
    [​IMG]
    That's a blank new file. I can type whatever I want to find in the top of the stamp view to quickly get whatever object / tile I'm looking for. When I draw with it or add it as a tile object Tiled automatically adds the correct tile set reference to the map file.
    Right now it runs too slow to be practical - I guess it's loading a few thousand files at once lol.
     

Share This Page