Feature - Implemented Talisman o' Nam needs 2 recipes!

Bale

Minion
Mafia does not support having two recipes for one item. This means that if I get the Copperhead Charm and Copperhead Charm (rampant) I need to meatpaste them manually in the relay browser.

I suppose there are two ways to solve this problem. The quick and dirty, but viable solution is that when one of those Copperhead Charms is acquired, mafia checks to see if it has the other and if so, meatpastes them automatically.

The fancier solution would be for mafia to actually support multiple recipes.

Extra: Don't automatically meatpaste a Talisman o' Nam (either recipe) if the character already has a Talisman o' Nam.
 

Fluxxdog

Active member
If there's support for multiple recipes, at least 2 other items that have multiple recipes are the makeshift SCUBA gear and the Staff of Ed.
 

Winterbay

Active member
Those aren't so much different recipes as different orders of combining the same things to the same results. Though I guess they should be included for completeness.
 

Fluxxdog

Active member
Well, the big issue is: How does the Talismon o' Nam untinker? Does it untinker in to what was actually used to make it or does it always default to snakehead charrrms? I figured not only completeness, but a way of testing that can be easily worked with without worrying about losing your actual ingredients, since the staff and tank always break down completely to the base ingredients.
 

Darzil

Developer
It untinkers to snakehead charms. For that reason I'd not want it to autocreate, but I would like to see if in the create list and support creating it.
 

Terion

Member
since the staff and tank always break down completely to the base ingredients.

Not quite; it takes two untinkers to get to the base ingredients, just as it takes two pastes to get from the three base ingredients to the final result (paste any two of them, then paste that pairing with the remaining piece.) The makeshift SCUBA tank always untinkers into the hosed tank and fishbowl, even if you created it from the hosed fishbowl and the fishtank. Similarly, the Staff of Ed always untinkers into the Staff of Fats and the headpiece of the Staff of Ed (a fact I use after opening the pyramid, to help keep control of the pool table in my clan.)

I haven't created a Talisman with the copperhead charms yet, but I assume that it would always untinker into one type of charm, probably the snakehead (and Darzil supports this.) TPTB's method seems to be to pick one option as the result for untinkering, as there isn't any way to look at an item and tell what ingredients were used to create it (without making different versions with unique ID numbers.)

However, the question remains: How does Mafia handle the makeshift SCUBA tank and the Staff of Ed, as those items each have two Meatpasting recipies of "different" items that can create them. More broadly, there are also the items that can be crafted with either ketchup or catsup: the Meatsmithing recipies for the dripping meat crossbow, staff, and sword, and the meatloaf helmet; and the cooking recipies for the pr0n cocktail. It would be a sensible assumption (for one like me who doesn't know all the internal workings of Mafia) that the Talisman would be handled the same way as these others; it's certainly not the first item with multiple possible recipies.
 

lostcalpolydude

Developer
Staff member
However, the question remains: How does Mafia handle the makeshift SCUBA tank and the Staff of Ed, as those items each have two Meatpasting recipies of "different" items that can create them.
You start with the same ingredients regardless of which path you use, so mafia doesn't need to know about the alternate recipes. I expect that if you manually started making it using a different recipe, mafia would not know that it could finish making the item.

The "easy" method that comes to mind to provide any support for this is to automatically submit the URL directly when the second copperhead charm drops, and "manually" subtract copperhead charms from inventory, only with autoCraft enabled of course.
 

Terion

Member
Code:
> make scuba gear

Verifying ingredients for makeshift SCUBA gear (1)...
Verifying ingredients for hosed tank (1)...
Creating hosed tank (1)...
You acquire an item: hosed tank
Successfully created hosed tank (1)
Creating makeshift SCUBA gear (1)...
You acquire an item: makeshift SCUBA gear
Successfully created makeshift SCUBA gear (1)

> untinker scuba gear

Untinkering makeshift SCUBA gear...
untinker * makeshift SCUBA gear
You acquire an item: fishbowl
You acquire an item: hosed tank
Successfully untinkered makeshift SCUBA gear

> untinker hosed tank

Untinkering hosed tank...
untinker * hosed tank
You acquire an item: fishtank
You acquire an item: fish hose
Successfully untinkered hosed tank

> make hosed fishbowl

Verifying ingredients for hosed fishbowl (1)...
Creating hosed fishbowl (1)...
You acquire an item: hosed fishbowl
Successfully created hosed fishbowl (1)

> make scuba gear

Verifying ingredients for makeshift SCUBA gear (1)...
Verifying ingredients for hosed tank (1)...
You need 1 more fish hose to continue.

Ah, you are correct. (Staff of Ed does the same thing if you make the "Staff of Ed, almost" and then try to make the Staff of Ed.) Mafia seems to deal with the two recipies by ignoring the one.

Huh, interesting... apparently Mafia does know there are two recipies for the pr0n cocktail, however:
Code:
> inv ketchup; inv catsup

antique packet of ketchup (7)
ketchup hound (207)

> acquire ketchup

Pulling items from storage...
Searching for "chewing gum on a string"...
Search complete.
Purchasing chewing gum on a string (1 @ 50)...
You acquire an item: chewing gum on a string
You spent 50 Meat
Purchases complete.
Using 1 chewing gum on a string...
You acquire an item: worthless gewgaw
Finished using 1 chewing gum on a string.
Visiting the Hermit...
You acquire an item: ketchup
Hermit successfully looted!

> make pr0n cocktail

Verifying ingredients for pr0n cocktail (1)...
Creating pr0n cocktail (1)...
You acquire an item: pr0n cocktail
Successfully created pr0n cocktail (1)

> acquire catsup

Searching for "catsup"...
Search complete.
Pulling items from storage...
Searching for "chewing gum on a string"...
Search complete.
Purchasing chewing gum on a string (1 @ 50)...
You acquire an item: chewing gum on a string
You spent 50 Meat
Purchases complete.
Using 1 chewing gum on a string...
You acquire an item: worthless trinket
Finished using 1 chewing gum on a string.
Visiting the Hermit...
You acquire an item: catsup
Hermit successfully looted!

> make pr0n cocktail

Verifying ingredients for pr0n cocktail (1)...
Creating pr0n cocktail (1)...
You acquire an item: pr0n cocktail
Successfully created pr0n cocktail (1)

Anyone who can look at the code, can you tell how Mafia handles the multiple recipies for pr0n cocktail? The same method may be able to be used for the Talisman (as well as for the SCUBA gear and the Staff), unless there's some critical difference between cooking and meatpasting.
 

Veracity

Developer
Staff member
There's a critical difference between combining 3 items via two separate paths for the Staff of Ed or the scuba tank and cooking an item with one of two other items to make a pr0n cocktail. "catsup" and "ketchup" are hardcoded as interchangeable cooking ingredients.
 

Darzil

Developer
Anyone who can look at the code, can you tell how Mafia handles the multiple recipies for pr0n cocktail? The same method may be able to be used for the Talisman (as well as for the SCUBA gear and the Staff), unless there's some critical difference between cooking and meatpasting.

Quite a few hard coded entries (some in a function that only appears to call itself). It looks like it updates the concoction database to have the recipe be made of whichever of ketchup and catsup you have more of (mall cheapest if you have both). There is also code for other interchangeable stuff (Schlitz/Willer - with exception for staff making recipe, Cloaca/Dyspepsi Cola, Titanium/Goatskin umbrellas).
 

Terion

Member
Ah, I see; so where one of the ingredients is known and constant, the other can be hardcoded as "one of these two equivalents."

In the case of the Staff and the Scuba, it's instead a case of "this pair of ingredients, or this other pair of ingredients." Gotcha. Learn something every day. ;)
 
Mafia doesn't know how to make a Talisman O Nam from copperhead charms

I had the copperhead charm and the copperhead charm (rampant) in inventory. I tried to create the Talisman from item manager and it was not an option.
 

lostcalpolydude

Developer
Staff member
This is now fixed for us (and for KoL) with snakeheads being usable items instead of meatpastable. This should be a simple mafia change, which I can take care of when I get home if no one beats me to it.
 

lostcalpolydude

Developer
Staff member
Actually, this doesn't fix things, it's just a recipe change, which still leaves two recipes that can make the same item.
 

lostcalpolydude

Developer
Staff member
14097 fixes this specific case of multiple recipes. When the second copperhead charm piece drops, the internal recipe for the talisman is changed from using snakehead pieces to copperhead pieces. This means that if you have autoCraft set to false, and you close and reopen mafia, it won't know how to make a talisman from them any more. I believe this also means that if you get both copperhead pieces, then switch characters (without closing mafia) and get snakehead pieces, those will fail to auto-craft, but I'm not really worried about supporting that case.
 
Top