Any way to get Make It! working these days?

Plugin/Utility Releases and Community Support. Do not release software without the author's consent.
HittingSmoke
Posts: 28

Any way to get Make It! working these days?

Post #1 »

I installed it from Silo's site. It appeared to work okay until I tried to update the recipe database from the config tab. It would crash the client.

I tried downloading the recipe XML manually but after that but the client just crashed on every start until I removed Make It.

I used to love this for crafting big batches of stuff.

User avatar
HellsWrath
Site Admin
Posts: 389

Post #2 »

I haven't used MakeIt! in a long time but you could expand upon this - viewtopic.php?f=6&t=283

HittingSmoke
Posts: 28

Post #3 »

HellsWrath wrote:I haven't used MakeIt! in a long time but you could expand upon this - viewtopic.php?f=6&t=283
I'm terrified to think how large that meta would be as it would require every single item + recipe to be in the meta itself. The real problem is getting all those recipes into a meta if I can't get the meta to load and parse the existing recipe XML files.

Ideally it would work something like this. This is all very rough off the top of my head. I don't know what will and won't work here, just brainstorming, some just to get a map in front of my eyes and some to see if you think this will actually work.

Default or "listening" state.

Listens for "!automake 10 Bread"

"Bread" is then stored as a string in a variable called "Product" or something using a Chat Message Capture condition. "10" is the number I want to make. This state then calls the next state.

Comp check and crafting state

Somehow, through some sort of magic, the recipe is read by the meta and the ingredients (Baking Pan and Dough) are set to variables "source" and "target" since there are only ever two items to make one item.

This is my first hangup. I don't want a rule for every recipe for obvious reasons. I've done some web scraping before so I can script XML parsing pretty easily but translating that into the correct meta file format is beyond me. Not going to do it by hand for obvious reasons. There are just too many recipes.

So after the source and target variables are set, we need to check if they are in inventory. That's easy.

The next part is tricky because we have an indefinite number of recursive checks here. If source or target is not in inventory, we need to get the recipe for one or both and check the components of those and so on until we reach the very bottom of the pyramid. In this case, if there is no Dough in inventory, the meta checks for Flour and Water.

iif[getobjectinternaltype[wobjectfindininventorybyname[Baking Pan]]==7&&getobjectinternaltype[wobjectfindininventorybyname[Dough]]==7, actiontryapplyitem[Baking Pan, Dough], (See note below)]

If that returns False, first we would have to check which one is missing (perhaps we should just do that instead of checking for both in one if). In this case if the Bakin Pan was missing we would output an error "Buy a Bakin Pan" perhaps with the nearest NPC if that's possible with GoArrow, then halt the macro. And if the dough was missing we would need to craft it by restarting the parent if statement with Flour and Water. Any ideas on how to handle this recursion?

For the actual crafting state I imagine we could just run it continually until there are no breaking errors or false iifs since crafting the items would change the outcome of the next run of the state or expression. If we wanted to do a dry run and check if we have all materials with no crafting that would be quite a bit more complicated.

I'm not sure the best way to go about handling amounts of items to be crafted either. A "while product <= getvar[amount]" loop would be just dandy. The only way I can see it working is to set the variable "amount" from the chat command, wrap the product recipe in a iif[amount>0, (craft stuff), (Macro Complete)], while doing setvar[amount, getvar[amount]-1] every time the "Product" item is crafted successfully. Actually now that I have that typed up it sounds pretty viable.

-------------------------------------------------------

What does the "Expression" condition do and how does it work? It doesn't seem to be documented on the wiki. When the state is called is the expression run, and if True it runs the action? Like an if statement? Because that could be very useful for trimming this down a lot.

Like I said, I'm just spitballing here. The real hangup is going to be getting all of the recipes into a format that can be used by a meta. If someone can and would take the recipe XML files from Silo's site and help me get them into this meta I think I could make it work.