# ๐Ÿ“ˆ Progress Calculation Calculates progress from goals, requirements, and inventory. --- ## Calculates - [[๐Ÿ“‰ Missing Material|Missing Materials]] - [[๐Ÿ› ๏ธ Ready To Craft|Ready-To-Craft Status]] [[โœ… Completed Goal|Completion]] is named. It is not in the first slice. ## Using - [[๐ŸŽฏ Goal|Goals]] - [[๐Ÿงฑ Material Requirement|Material Requirements]] - [[๐ŸŽ’ Inventory State]] - [[๐Ÿ”Œ Recipe Provider]] (via [[๐Ÿงพ Recipe Resolution]]) --- ## Formula (first slice) ```text for each active goal: remaining = max(0, target quantity โˆ’ available(target item)) requirements += resolve(target item, remaining) aggregate requirements (same material โ†’ one row) for each material: available = sum of every interchangeable option (or that one item) missing = max(0, required โˆ’ available) ``` Owned finished goods reduce **how many to resolve**. They are not subtracted again from ingredients. A goal is [[๐Ÿ› ๏ธ Ready To Craft]] when its remaining-to-obtain is 0, or every material required for that remaining is available. `resolve` is one crafting level. No recipe โ†’ the remaining target items *are* the requirements (gather). --- ## Related Documents [[๐Ÿงพ Recipe Resolution]] [[๐Ÿ”Œ Recipe Provider]] [[โž• Material Aggregation]] [[๐Ÿ› ๏ธ Ready To Craft]] [[โœ… Completed Goal]] [[โ–ถ๏ธ Create Goal]] [[๐ŸŽ’ Inventory State]]