zarqon
Well-known member
It seems that the time is ripe for an ASH acquisition_cost(int n, item it) function, and/or a creation_cost() function. The latter is arguably better due to having more specific results.
It would return the cost of acquiring (or creating) n of it, or -1 if you are unable to acquire/create the specified number of items. The result would include the cost of adventures used in crafting (using the valueOfAdventure preference), and would consider user settings, such as whether or not to pull or purchase items (if so, the mall price of items that would be purchased would be included).
Basically, if I type acquire n it or create n it in the CLI, how much would it cost me?
This seems like it wouldn't be too hard in ASH, but it's actually quite involved. Mafia's internal item acquisition/creation algorithm is lovely and it's an awful lot of work to recreate in ASH. I made a decent bit of progress (to the point of parsing creation type and recursing ingredients) and then realized that there are more than a couple things mafia considers which are not transparent in ASH. For example, if you don't have a cocktailcrafting kit but you have the meat to purchase one, crafted drinks still appear in the item manager, but are not shown in either creatable_amount() or available_amount(). When buying items that are themselves creatable, mafia also considers the cost of buying ingredients vs. the whole item.
This logic would be lovely to have available in a predictive form.
The only information currently missing is the cost of a pull -- which it would need to consider if the user had allotted pulls for use. A valueOfPull setting would be the fairly obvious solution for this, consistent with valueOfAdventure.
Any other issues or roadblocks? A decision is required whether to include the price of cocktail kits / tenderizing hammers / ovens, but I'd say not -- those are more like a prerequisite skill acquisition than part of the cost for the specific item. Not including it is also more useful for cross-user comparisons.
Me would love this function long time. There are numerous wonderful uses for it in the item management arena -- and of course, in a script I'm currently working on.
It would return the cost of acquiring (or creating) n of it, or -1 if you are unable to acquire/create the specified number of items. The result would include the cost of adventures used in crafting (using the valueOfAdventure preference), and would consider user settings, such as whether or not to pull or purchase items (if so, the mall price of items that would be purchased would be included).
Basically, if I type acquire n it or create n it in the CLI, how much would it cost me?
This seems like it wouldn't be too hard in ASH, but it's actually quite involved. Mafia's internal item acquisition/creation algorithm is lovely and it's an awful lot of work to recreate in ASH. I made a decent bit of progress (to the point of parsing creation type and recursing ingredients) and then realized that there are more than a couple things mafia considers which are not transparent in ASH. For example, if you don't have a cocktailcrafting kit but you have the meat to purchase one, crafted drinks still appear in the item manager, but are not shown in either creatable_amount() or available_amount(). When buying items that are themselves creatable, mafia also considers the cost of buying ingredients vs. the whole item.
This logic would be lovely to have available in a predictive form.
The only information currently missing is the cost of a pull -- which it would need to consider if the user had allotted pulls for use. A valueOfPull setting would be the fairly obvious solution for this, consistent with valueOfAdventure.
Any other issues or roadblocks? A decision is required whether to include the price of cocktail kits / tenderizing hammers / ovens, but I'd say not -- those are more like a prerequisite skill acquisition than part of the cost for the specific item. Not including it is also more useful for cross-user comparisons.
Me would love this function long time. There are numerous wonderful uses for it in the item management arena -- and of course, in a script I'm currently working on.
