Forum rules - please read before posting.

Crafting Questions

Hey there,

I am looking to create with a system where items can be put into slots to essentially unlock an ability that can be used as an item. You'd have different "recipe" pages with abilities you could use by slotting items for specific categories.

To this end, there are a few questions I'd like to ask:

1. Is there any way to have item crafting be non-destructive? That's to say that putting items in slots does not either remove them from your inventory or destroy them when you craft? 

2. Is there a way to make crafting work with categories as opposed to specific items? For instance if you need something cold you can choose among different applicable items throughout the game for one recipe?

3. Would this be easier with an alternate system? 

Thanks for the help!

Comments

  • 1. Recipes will replace the ingredients with the newly-crafted item.  If they were to remain, it would be possible to create infinite items.  However, you can assign an ActionList asset to run whenever a particular recipe is run - meaning you could theoretically just re-add the missing items to your inventory.

    2. The only way you can currently limit what items are placed in a crafting menu is to limit what inventory items are available to the player, by providing them with a separate InventoryBox element that only shows items from a specific category.

    Adding a "limit to category" option to the crafting element should be possible in an update, however - I'll look into that.

    3. Hard to say!  If the answers above help to make things easier, probably best to go down the crafting route.
  • Thanks Chris. Perhaps a simpler question: is there a way to run an action list anytime an item is put in an inventory box? That way I could run a check if certain items were right or wrong or give a response if you chose the wrong type of item.

    For instance, lets say you are making a sandwich and there's a box for bread, for cheese types, and for meat. You slot the bread and that's right... but then you put a toy mouse instead of cheese, which prompts the response "that won't make for a very good sandwich" and unslots the inventory box.

    Is such a thing possible, or am I just dreaming at this point?
  • edited April 2017
    ummm... I know there's an scripting event for when an Item is added to an inventory but I can't recall there been any regular Actions that can do that. It would probably need a bit of scripting. If you are up to it, the event is OnInventoryAdd, which takes a method/delegate with two parameters(InvItem inventoryItem, int quantity). Going that route would probably have you keep an object with the script (in a manager fashion), using the "name" of the inventoryItem would allow you to know which item was just put in to decide what to do.

    Otherwise it's usually best to find a way to "fake" the effect. Nothing says you have to use the crafting system for this, you could even use a regular inventory, maybe even do it by way of regular combine mechanics (which would make it a lot easier). So by "combining" items in stages (bread+mustard, then breadWithMustard+Ham) you could make progressively more complex items in a rather easy manner.
  • Thanks for the reply, Alverik! Definitely would be easier with combine mechanics, I think I found the solution by creating an in-scene "menu" that uses hotspots to simulate the mechanics I mentioned! As you said, faking the effect is probably the simplest!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.