Checking if you have a recipe

Idran

Member
Are there any ASH commands to check specifically if you potentially have the ability to make something; that is, if it's an item that has a recipe, and you have the recipe or not. Since the "create" CLI command will return a specific error message if you don't have a recipe for an item you're trying to make, the capability seems to be there in Mafia, but I'm not sure how to access it in ASH. I know creatable_amount will return 0 if you have enough parts but you don't have the recipe for an item, but it also returns 0 if you can create an item but you just don't have the parts for it, and I need something that can distinguish between the two even if you don't have enough parts on hand to create the item.
 

lostcalpolydude

Developer
Staff member
Mafia has a preference for each recipe that you have to know to make the item in the form of unknownRecipe[itemnumber] = true|false where false means you can make it. I'm pretty sure mafia updates these whenever it sees the recipe on a discoveries page, maybe at other times too.
 

Bale

Minion
I'm pretty sure mafia updates these whenever it sees the recipe on a discoveries page.

Before the April Shower and any amazing ideas were implemented by mafia I learned a recipe that way and mafia did not know I learned it. After the recipes were implemented I visited the discovery page and mafia announced my discovery in the CLI, so I can verify that this works very well.

Now mafia recognizes my amazing idea as soon as I learn it in the shower.
 

Idran

Member
That worked perfectly, thanks! The only slight annoyance is now I need to keep a set of all item ids of items with recipes, but that's hardly anything to deal with. Although, is there any way to match get_property with a wildcard in some way, out of curiosity?

Edit: Wait, I'm an idiot, no I don't, I can just check for every item id I'm on and only look for "false". Never mind, and thanks again!
 
Last edited:
Top