Question Creating a warp craftable?

Bonster

Sodbuster
I'm working on a farm extension (an additional farm map based on a secret garden). Instead of having a warp location on the map, what I would like to do is to have a craftable that would create a warp, to help gatekeep the additional property until after the player has one of each of the basic metal bars (copper, iron, gold, and iridium). Alternatively, it could be an item mailed from a mysterious source after unlocking the skull cave, if making it a craftable doesn't work. Basically, an item with a warp attached, preferably one that the player crafts. Does anyone have any feedback about how I would go about this, preferably a simple method?
 

mouse

Farmer
There's not a way to do this in exactly the way you describe without a SMAPI mod, though if that option is on the table I don't think it would be very difficult. Home Sewing Kit is a simple example of a SMAPI mod that adds an object via JSON Assets (to handle dynamic IDs) then uses a SMAPI component to give it custom functionality.

I think the simplest way to do most of what you want without a SMAPI mod is to make a buildable for TMXL. It won't use the normal menus for crafting or buildings, but you can still make it require money and/or materials as well as only allow it to be built once certain conditions are met. The buildables themselves are just map pieces made in Tiled as usual, so you could make it look or work however you wanted and slap a warp tile action on it. You could send mail once the conditions are met to tell them it's available in TMXL's buildable menu and how to get it, then make the option available once they have received the mail.

Simple buildables are pretty easy to add even if you're new to TMXL, though they can of course start getting complicated the more you want to do with them. Here's an example from IF2, which has a buildable option for its normally-built-in-shed. The buildable itself is simple, but it comes in two versions depending on options chosen in a Content Patcher configuration file, which then sets some map properties, which are then checked in the conditions here (there's not a good way to read another mod's config file, and TMXL doesn't have its own). Either version can only be built on the farm, and only one copy of it can ever be built (because of the unique tag).

Hopefully something in there is helpful for what you end up doing. Don't forget to z-prefix any additional tilesheets your maps use! (And if making a buildable that can be placed in any area, z-prefix all the tilesheets it uses since you don't know in advance what they should be called.)

(You could of course also just edit the map with CP after meeting some conditions.)
 
Top