Jump to content

Variable Crafting Recipes


spot10

Recommended Posts

How would you offer different recipes without offering them? Imagine for a second that you could do anything by just describing it, what would it look like, how would it work?

 

I ask because if the player meets the requirements for more than one way to craft an item -- in ways that might make a difference to them, say using 100 fusion cells or 1 fusion core -- you'd have to list the different recipes anyway. Either it's a long flat list, or a lot of submenus (i.e. a dedicated category for each item, with all the recipes for it), or not actually having the choices.

My first thought to answer that would be to look to fillable bottles in survival mode.

The game already understands that it's crafting a dirty water, and simply picks the first valid bottle it finds in your inventory.

Something like that. The crafting recipe has some way to simply find the first valid item and use it.

Link to comment
Share on other sites

Inventory items we see through the interface are populated by the native code slightly before OnMenuOpenCloseEvent is received. In some of my mods, with F4SE, I was able to trick the code to repopulate ("refresh") the inventory list while the menu is open. (I'll paste the code here when I'm at my PC). I used it to make items appear in / disappear from the menu but I suppose it should serve conditionalizing purposes too: make items appear in / disappear from the crafting menu depending on their respective conditions.

Link to comment
Share on other sites

My first thought to answer that would be to look to fillable bottles in survival mode.

The game already understands that it's crafting a dirty water, and simply picks the first valid bottle it finds in your inventory.

Something like that. The crafting recipe has some way to simply find the first valid item and use it.

 

Yeah, if it's more about what type of scrap item gets used, and not something where the player cares what exact recipe is used, that'd be perfect I guess.

Link to comment
Share on other sites

Creating dirty/purified water with bottles is not a crafting recipe but a HC_WaterBottleScript that uses GetItemCount(HC_FillableWaterBottlesList)

 

Converting WaterDirty into WaterPurified at the cooking station is just that.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...