Sign in to follow this  
Flubb

Recipe/Affinity Database Tool - Recording and finding affinities across multiple characters

Recommended Posts

Greetings, Wurmians.

 

I'll cut to the case where I'm coming from with this: With the introduction of food affinities I quite immediately started making records of what affinities I can get on which characters, of which I have 3, with which meal. As a sort of "affinity hunt". (I'm aware some people have data mined the crap out of it and can predict affinities somehow, but personally, where's the fun in that?)

First iteration was a spreadsheet. A quick and dirty approach that gets the job done somehow. But finding duplicates in this mess is almost impossible and using multiple tabs to separate types of food to bring some order into the long list of clutter only makes searching for affinities take more time. Also, I had resorted to abbreviating a lot just not to be typing a minute before cooking. Granted, you could probably set up a spreadsheet to make this all more comfortable, but I wanted a more streamlined approach.

 

Which I implemented in a small WPF application that uses combo boxes to cut all the typing short and make searching for a recorded affinity a few clicks away from results. This was made for personal use mostly, but I decided I might aswell put it up for the 3 people who might use it aswell.

https://github.com/StandbyMode/WurmRecipeManager/releases

 

Requirements:

This is a .NET application, so naturally you'll need that. You'll likely have a fitting version anyway unless you are still stuck on Windows XP. .NET Core appearantly doesn't support WPF, though, so that won't work.

And no, Mono won't cut it either by a long shot. But the sources are up in the repo, if someone wants to do a Mono port, permissions is hereby granted as long as the original source is credited or you send me a request to incorporate your solution to be put up on the release page. (In which case, the porter is being credited, obviously)

 

Installation:

Extract the contents of the .zip anywhere you like, it should be able to run as is.

Before you run the application, open "consumers.txt" and enter your characters names whose affinities you want to record, one line per character.

 

Usage:

You'll find 3 tabs to work with, which will allow you to assemble meals, record their affinities on your characters that are listed in "consumers.txt", and let you search for affinities or given names respectively.

A quick rundown of each tab:

 

Workbench:

workbench.PNG

 

What do?

Give your meal a name; or don't. Names are only used later in the searching function and solely for user convenience/recognition. Duplicate names are allowed, as long as the recipe is different. Empty names will default to "Generic Food". I'm creative like that.

Choose a container this meal is cooked in, then add ingredients. The big "+" button will conjure comboboxes to choose an ingredient from, alternatively you can press CTRL+A, unless your cursor is currently in the text box.

Tip: I specifically used combo boxes so one can enter the first few letters of an ingredient and have it jump to the best match. Modifiers like "chopped" and "diced" are thus placed in parenthesises behind the ingredient so I could just use the arrow keys to select the modifier after I selected my basil or canine meat. All combo boxes do this by default.

You can also press TAB to circle through the boxes, so that using the mouse is obsolete up until finishing the recipe by clicking "Cook Recipe".

This will check if any such recipe cooked in this container with these ingredients are already in your database and make avoiding duplicate records an absolute no-brainer. If the recipe is new, it is moved into the next tab.

 

Consumers:

consumers.PNG

This is pretty straightforward; the recipe is cooked and up for tasting. My 3 characters have had a bit of fried troll here. If someone were missing at a given time, worry not; closing the program will not delete recipes listed here and preserve them as you left them. There's also a non-skill "Unassigned", for when you have any reason not to taste a meal with some character. You can still search for "Unassigned" later on like any normal skill and change it. (See next tab.)

When you want to save the recipe with the recorded affinities for good, click the ugly little "->", which is tooltipped with "move to archive", which is what we'll do now.

 

Archive:

archive.PNG

The troll based recipe is now in the archive and could be found - for instance - by searching for the "Baking" affinity on my main character "Flubb". Alternatively, I could enter "troll" in the text box and search by name using the obvious button.

In the left column, this will return the results of any given search. The middle column will tell you how to reproduce the meal, and the right column shows all the recorded affinities for this recipe.

A selected recipe can be deleted for good ("Delete from archive") or moved back to the Consumers-Tab ("Reassign affinities") in case you have an unassigned affinity you want to record after archiving a recipe or when you realize affinities have changed for a meal after an update.

 

Troubleshooting:

An ingredient I want to use is not in the list!

Like your characters, ingredients are loaded from a textfile. Notice the "Lists" menu in the top bar? Here you can choose "Open ingredients file" to open your standard text editor with "ingredients.txt", which is shipped in the .zip and needs to be in the same directory as the executable. Add your ingredient, or change the list to your hearts content, and save. No need to restart the application though, just go back into the menu "Lists" and select "Reload ingredient list".

I'm doing it this way because including EVERYTHING from the get go would be tedious and there are also recipes that use other things that need to be cooked first, like pastry based recipes. I don't know how deep that rabbit hole goes, so I decided to do it the lazy way; if I don't need it yet, I'm not missing it yet. Though ideally everything that fits in a FSB should be already in the ingredients.txt in shipping state.

You forgot a container in the list!

Any missing container can be added the same way ingredients can.

A skill is missing in the list of affinities!

Turns out copypasting the wikipage for skills didn't include them all. Just to be sure, I just put all the skills in a textfile instead of hardcoding them into the program. Who knows if any new skills will be introduced in the future aswell. So basically: See both points above to fix that.

I want to add a new character.

Well, you know what to do by now I hope. Though with consumers I should warn you that it might be a bit finnecky and buggy. I tried to cover all ends theoretically that I could think of but didn't delve into a lot of testing. To be sure, try not to have any active recipes in the "Consumers" tab while reloading it or even better, make sure to have your characters listed prior to starting the application for the first time. Restarting the application should solve most situations of bindings going haywire, but make a backup of your "recipes.sqlite" file prior to modifying the consumers.txt nonetheless. Until I can be bothered to really try and break ###### and fix it in the next update, the safest bet is to just not modify "consumers.txt" while the application is running. With every other list, it should be totally safe though.

 

Patch history:

1.0.1: (Minor update, just extract it over your installation to update)

- Hovering over names in the consumer tab shows its ingredients and container.

- Ingredient list in the archive is sorted alphabetically to line up better with a sorted FBS' content.

- Some fixes

 

1.1.0: Improved recipe handling

This update itnroduces a few new buttons to let you move recipes across processing stages more freely. Namely you can now click "<-" to move a recipe from Consumers back to Workbench, in case you find you've done a mistake in the setup. Double clicking the name will make it editable, so renaming doesn't require a recipe to be moved back to the workbench.

Similiarly, the archive now lets you "Adapt a new recipe". This will copy the recipe back to the workbench where you can make slight adaptions to create a new recipe without the hassle of entering all the ingredients again.

The "Fork Recipe" button will similiarly make mass inventign recipes easier, as this will copy the recipe to the Consumers tab without clearing the workbench.

 

TODO: (For when I can be bothered to do anything on this at all.)

- Possibly review the handling of adding consumers, if problems arise.

- Make icons for the buttons in the consumers tab.

 

Any feedback can be left in this thread, if any reasonable TODOs arise from it I'll add them to the list. In that case even with actual priority, not the half-baked "I could do this but probably won't" points I add myself.:P

 

Happy affinity hunting, with or without this tool.

Edited by Flubb
  • Like 4

Share this post


Link to post
Share on other sites

rare containers shouldn't make any difference, but rare cookers (e.g. oven) do - they add 1 to the skill for rare, 2 for supreme, 3 for fantastic.

Share this post


Link to post
Share on other sites

Following for interest and proper read-through when i get home.

Free bump for you, sir!

Share this post


Link to post
Share on other sites
1 hour ago, Flubb said:

Greetings, Wurmians.

 

. (I'm aware some people have data mined the crap out of it and can predict affinities somehow, but personally, where's the fun in that?)

First iteration was a spreadsheet.

 

 I'm sorry but that really Piss's me off... i had working Spread sheet Before the Code in unlimited was even out me and few friends cooked well over 2k meals figuring it all out. its all just math.. and you want to know something  when the code came out all i had to do was just Plug the raw numbers input to and -10 to make them match up. (i talked to few Dev's and Ca about releasing it before Wurm Unlimited code. but  it would take all the Fun out of finding new Things. So i held off.
We worked this ###### out in few days after it lunched. we where doing it on paper. I spent well over a week learning Spreadsheet code getting it so it was just plug in numbers. Let alone Name's.  Befor You talk ###### about someone else Work Get Your facts Right.

  • Like 1

Share this post


Link to post
Share on other sites
29 minutes ago, icbash said:

 I'm sorry but that really Piss's me off... i had working Spread sheet Before the Code in unlimited was even out me and few friends cooked well over 2k meals figuring it all out. its all just math.. and you want to know something  when the code came out all i had to do was just Plug the raw numbers input to and -10 to make them match up. (i talked to few Dev's and Ca about releasing it before Wurm Unlimited code. but  it would take all the Fun out of finding new Things. So i held off.
We worked this ###### out in few days after it lunched. we where doing it on paper. I spent well over a week learning Spreadsheet code getting it so it was just plug in numbers. Let alone Name's.  Befor You talk ###### about someone else Work Get Your facts Right.

Woah, easy there. I wasn't ###### talking anyone or didn't intend to. All I wanted was a simple tool to record the affinities you discover get experimentally because that's how I prefer to do it. That's why I said "personally". I also seem to be missing what fact I should get "right" here. What you describe seems congruent to what I vaguely hinted at. The spreadsheet on my part was just a table I loosely punched everything in without any code, and I was dissatisfied with it and replaced it with my solution proposed above. That's all I said, not that you cannot do it with spreadsheets. I'm clarifying that because you included the spreadsheet part in the quote but I'm not sure what the problem with that is.

Edited by Flubb
  • Like 1

Share this post


Link to post
Share on other sites

Whoa, not sure where the mind melt came from icbash, but I really don't think he was referring to you personally. There has been quite a bit of talk about the whole subject matter since the release. He simply made something to make it easier on himself and decided to share with any and all that might wish to partake. While I, personally have no desire to nail the affinities down, (since my current cooking skill makes them pretty useless, lol) I see the benefit. Good Job Flubb \o/

 

  • Like 1

Share this post


Link to post
Share on other sites

If only these "smart" people would have explained how to figure out affinites. I struggle to figure it out even after looking at the code. Anyway, games that let folks use their real world skills (math based statistical testing, computer engineering, etc) ... is bad game design, imo. If I was boss, I would have released the formula and given folks a way to fetch toon's id. This way those who want to trial and error it can, but at the same time those who'd rather simulate out the results could do that also.

Share this post


Link to post
Share on other sites
1 hour ago, Wonka said:

rare containers shouldn't make any difference, but rare cookers (e.g. oven) do - they add 1 to the skill for rare, 2 for supreme, 3 for fantastic.

I just followed up on this and you are correct, a rare bowl produced the same affinity as a normal bowl. Updating the post, thanks for pointing that out. Don't know where I got that idea from.

Share this post


Link to post
Share on other sites
29 minutes ago, Flubb said:

Woah, easy there. I wasn't ###### talking anyone or didn't intend to. All I wanted was a simple tool to record the affinities you discover get experimentally because that's how I prefer to do it. That's why I said "personally". I also seem to be missing what fact I should get "right" here. What you describe seems congruent to what I vaguely hinted at. The spreadsheet on my part was just a table I loosely punched everything in without any code, and I was dissatisfied with it and replaced it with my solution proposed above. That's all I said, not that you cannot do it with spreadsheets. I'm clarifying that because you included the spreadsheet part in the quote but I'm not sure what the problem with that is.

Let me brake it down for you...

3 hours ago, Flubb said:

(I'm aware some people have data mined the crap out of it and can predict affinities somehow, but personally, where's the fun in that?)

First iteration was a spreadsheet.

I am the only person to release A tool to the Public about Predicting affinity of any KIND!!! and its in a Spreadsheet. You are calling me out in them two line Alone... Down Grading My and other Work we have done. Not just for are self but for Others. just like you did when you made this tool here. No diff then calling your program a ripoff clone of someone else tool re-branded yours. Saying you put no Real work into it..

Share this post


Link to post
Share on other sites
1 hour ago, icbash said:

I am the only person to release A tool to the Public about Predicting affinity of any KIND!!! and its in a Spreadsheet.

Seems I have picked a very unfortunate phrasing. I was saying I made a spreadsheet to loosely record my affinities (just for me, nothing to be released because there's nothing worthwhile to be shared in a simple table), but didn't like it. And it was used for something entirely different. Basically a barebone version of this tool. I was presenting a case why I did what I did and where I was coming from, which is apparent from the following sentence that you're conveniently missing in your quote. My spreadsheet has nothing to do with yours. I reckon enough people made a spreadsheet to use the tabular layout to record their affinities. But I'm repeating myself here.

 

1 hour ago, icbash said:

You are calling me out in them two line Alone... Down Grading My and other Work we have done. Not just for are self but for Others. just like you did when you made this tool here. No diff then calling your program a ripoff clone of someone else tool re-branded yours.

No, I'm not calling anyone out, you're absolutely misreading this. I was vaguely hinting that out there you could go ask some datamined oracle for the affinities, and that's fine and all, but I personally prefer experimenting and finding them out. This isn't downgrading. I respect the work that goes into working out these machinations based on data samples, I just personally prefer to explore it myself. And that's why I did nothing remotely comparable to your tool.

So you'd have to elaborate on how this is a rip off from your tool, as I understand both do completely different things? Mine is just an easier storage than a spreadsheet, while you're trying to predict affinities given certain samples? One can even use them concurrently.

 

Really, I don't get why you're gettiing your pants in such a twist other than by completely misreading just about everything that could be conceived as bashing your work.

Edited by Flubb

Share this post


Link to post
Share on other sites
4 hours ago, Flubb said:

(I'm aware some people have data mined the crap out of it and can predict affinities somehow, but personally, where's the fun in that?)

First iteration was a spreadsheet.

This right here is why I'm bitching... making it sound like i data mined to get my tool working..and put no real work into it... because it read as so.

(I'm aware some people have data mined the crap out of it and can predict affinities somehow, but personally, where's the fun in that?)

First iteration was a spreadsheet.(go back change some people with Icbash/friends)

 

First iteration was a spreadsheet. Is what keyed it to read this way..(the fact i am only person to release to the public any kind of predict tool and to top it off its a Spreadsheet... Feels very much like a personal attack...

Share this post


Link to post
Share on other sites

He said its not a personal attack - nothing to see here.

 

Looks like a nice tool, Ill give it a play later.

Share this post


Link to post
Share on other sites

First up, context: I've been working with Ic on his tool. He's done most of the legwork, since it gives me a headache, but I help work stuff out here and there. Or help break it. Same thing. So, that said:

 

Ic, we have to some degree "datamined the crap out of it".

Though, interestingly, it wasn't the case early on; I pushed for "don't trust the WU code" and we figured stuff out using algebra. Using that, an early version of the affinity predicter was ready before the WU cooking code hit.

 

And we're definitely not the only people to have done it, so your edit isn't particularly accurate (but we are the only, far as I've seen, to attempt to make such a tool public)

 

Moreover, "first iteration was a spreadsheet" seems to refer more to this tool than ours.

 

And finally, this tool appears to have very little crossover with ours. In fact, it makes a nice companion to your tool, serving as a way to save recipes calculated (and, honestly, we might be able to learn some stuff here and make the tool more user-friendly via a program like this, rather than the google docs implementation. Obviously we'd need to continue the google doc, however, since things need to be laid down before such a tool can be written).

 

So I don't really see a personal attack, but I do see a nice little tool I may just use. Thanks, OP.

  • Like 4

Share this post


Link to post
Share on other sites

This seems to be a nice feature. Will fiddle with it later, for sure. Hope it might help me keep track of my recipes in a nicer way than my spreadsheets. :P

Edited by Nordlys

Share this post


Link to post
Share on other sites

I was about to comment the same thing But the above 2 posts best me to it.. I know icbash and talk to him on a daily basis, one thing I can tell you he takes great pride in work like this where figuring things out with little to no help from trying to read code. So I think it was a misunderstanding at the op comment by him because of the real hard work he did put into it to figure out or predict affinities. 

 

With that said, everyone take a deep breath now... It looks like this is a great companion tool to go with the spreadsheet. Now you can record and save the meals easily with specific names. I feel of you guys would work together we could have a great tool to add into the wurm community. 

 

Hats off to all of you who do all the leg work and enjoy making user friendly tools be it spreadsheets or a tool to help record the findings. 

Edited by MaurizioAM
  • Like 1

Share this post


Link to post
Share on other sites

My mac says no... Any chance you will create a mac compatible version? 

Share this post


Link to post
Share on other sites

Icbash invested a lot of time and work in the spreadsheet, much more than just data mining, so I wouldn't downplay his work.  There were several of us that invested time and effort in that project.  I hope we were able to make predicting food affinities easier for everyone.  If it can make your tool better, then that's great.  Good luck!

Edited by Galatyn

Share this post


Link to post
Share on other sites
On 22.4.2017 at 5:27 AM, Galatyn said:

If it can make your tool better, then that's great.

 

It wouldn't because it does something entirely different. Read the actual post.

 

On 22.4.2017 at 4:32 AM, Eldurian said:

My mac says no... Any chance you will create a mac compatible version? 

well, this first version was just something I made for personal use, so I cut short my work using WPF because I'm on Windows anyway and I was familiar with the framework which is pretty well suited for a dynamic UI like this one. It could be rewritten in Java but with some more legwork being done by myself rather than the framework.. So...no promises just yet. :P

Edited by Flubb

Share this post


Link to post
Share on other sites

I think you lot are overthinking/reading into this too much, if some of those full-stops were comma's you wouldn't be posting this ######.

 

Tool looks great, perfect way to turn some of my own spreadsheets into a more legible and searchable medium YAY.

 

Thanks for releasing this to us mate.

Share this post


Link to post
Share on other sites

Having headdesked a few times doing stupid mistakes, I added some buttons to make moving recipes across the tabs way more direct rather than deleting something from the archive after recreating it on the workbench. To celebrate lazy convencience, I've packed it as a full release again having added some ingredients again, be wary not to overwrite your own ingredients.txt if you're upgrading and you've edited it to your liking or added ingredients of your own that you don't want to add again.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this