Kazetsukai / onetech

Automated Crafting Guide for One Hour One Life
MIT License
31 stars 24 forks source link

Recipe page too complex #91

Closed ryanb closed 6 years ago

ryanb commented 6 years ago

The recipe page looks quite complicated when there are multiple parallel paths with one transition each. For example the Three Sisters Stew

It would look much clearer if the parallel parts were together, since you generally do them together. For example, all the steps to grow the squash and chop it should be together, all the steps to make the crock, the bowl of corn, etc.

We could hide the steps by default and show them when clicked. For example:

screen shot 2018-06-09 at 9 46 05 am

Clicking "12 steps" would expand this transition into a sub-list of transition steps. This would need to look more like a button

Here is a way to implement this:

  1. At each step, check if the nodes have different parents. Consider collapsing all but one of those parents.
  2. Collect the sub nodes for each parent. A sub node is one that does not have multiple parents (it is exclusive to that path) and is not an ingredient/tool.
  3. Find the deepest sub node for each group. Collapse all but the parent with the deepest subnode.
  4. Don’t collapse sub nodes which have 2 or less depth. Those are simple enough to understand in place.

This will result in a much more linear recipe. Basically all branching paths wich are not the longest one will be collapsed.

In the case of the stew recipe, making the crock, beans, corn and burning coals would all be collapsed. Creating the squash would not be collapsed because that is the longest branch.

Kinrany commented 6 years ago

Should items that are used in combination with time be expanded automatically?

ryanb commented 6 years ago

@Kinray, at the moment, transitions with decay time are automatically collapsed and the decay time added together. The majority of the time this is just used for animation and not important to the player.

I can’t think of a time you would want to expand decay transitions, but let me know if you can think of a reason and I will consider adding that.

Kinrany commented 6 years ago

Sorry, I wasn't clear enough. And maybe it's more relevant to the tech tree view.

Three Sister's Stew tech tree has Hot Coals that are created by waiting for a Fire to decay. The 1 minute + Fire = Hot Coals recipe is just noise in this example, because either the user knows how to make a Fire and doesn't need this recipe, or she doesn't, and will need the Kindling + Burning Tinder = Fire step too.

And more generally, whenever there's a X -> A + B = X + Y expansion, and A is a timer, B can be expanded automatically.

ryanb commented 6 years ago

I think the 1 minute decay time is important to know if you don't know how to make fire.

I think what I'm doing here will solve this issue on the recipe page because, assuming they know how to make fire, they won't need to click on it to see the steps.