Bug - Fixed Unable to cook despite having Inigo running when out of turns

xKiv

Active member
I was afraid of that question. I don't know, but ..
wiki says:
> Will not kick in with bartenders-in-the-box, chefs-in-the-box, or Innabox.

Also, it doesn't kick in for the Wok.
It does kick in for armorcrafting, weaponsmithing a jewelrycrafting (that one is 3 adventures, so 15 turns of inigo per step), FWIW (not relevant to box protection, relevant for crafting at 0 adventures remaining).
 

Theraze

Active member
So only works if you don't have anything else? Guess it doesn't need another preference then, unless we want it to autocast.

Edit: Distracted myself ripping/cataloging my music collection again. May still end up doing this but just wanted to note that I'm wandering at the moment. :D
 
Last edited:

Theraze

Active member
Okay, here's a patch. Basically just makes the getAdventuresUsed() return Math.max(0, turns needed - (inigo turns / 5 (or 3 for jewelry))). This should make it properly display everywhere... well, everywhere that uses that function to decide how much it will take. Should also, due to the Math.max bit, not think you'll get adventures back if you have enough Inigo active. Heh.

Can't easily make it display in the Ingredients Used tab, since that just calls ConcoctionDatabase.getQueuedIngredients, which specifically checks for the values being items. I could munge it and add the effect onto the array, and have it make wild guesses in terms of which of the 3 sets of ingredients will end up using Inigo... but it wouldn't be accurate if you queued up all your tabs and then activated them without reactivating Inigo between segments. And it's just not... right. :) I'll code that if someone who actually commits code tells me to, but until then it just reduces the chance of any patch getting approved. :D
 
Last edited:

Theraze

Active member
Nope. My patch works for the following: Smith, SSmith, Jewelry, Cook Fancy, Mix Fancy. Jewelry is 3 rounds of Inigo, the other 4 are 5 rounds.
 

Ethelred

Member
Nope. My patch works for the following: Smith, SSmith, Jewelry, Cook Fancy, Mix Fancy. Jewelry is 3 rounds of Inigo, the other 4 are 5 rounds.

Are you sure you're interpreting that correctly? Jewelry normally takes 3 turns to craft, so would use up 15 turns of Inigo's to prevent any turn loss. At least that's how I read the wiki.
 

Theraze

Active member
Ahh... okay, here's a new patch with Inigo using its normal rules on Jewelry, after the *3 instead of before. Just had the wrong brackets. Sec...

Edit: Okay, new patch is uploaded. This one should now provide the following for jewelry:
Math.max(0, ((3*quantity) - (inigo/5)))

So if you have 5 inigo, jewelry will cost 2 adventures. As is reported in the talk page on the Wiki... well, actually it was 10 inigo and it cost 1, but same difference.
 

Attachments

  • InigoAdventures.patch
    2.8 KB · Views: 29
Last edited:

Hairy

New member
I came here intending to say that it'd be nice if Mafia counted active turns of Inigo's as equivalent to having an in-a-box, and found this thread when I checked for earlier suggestions on the matter. I imagine this is a fiddly area to work with, but extra Inigo's-related features in Mafia would be really handy. It's certainly a widely-used skill these days.

(I'm not in a position to test Theraze's patch, unfortunately, as I don't compile my own copy of Mafia.)

Cheers
Hairy
 

Theraze

Active member
Well, here's an updated version of the patch. The "ability to check Inigo being active" got rolled in, so this just says that if you have Inigo active, adventures required are 0. Same rules as above, just a bit tinier due to only needing to update 1 file instead of 2 now. Still probably 2-4 weeks away from being able to test though.
 

Attachments

  • InigoAdventures.patch
    1.6 KB · Views: 33

roippi

Developer
I added it up and I've lost no fewer than 10 adventures to Inigo's mistakes over the last 3 ascensions. This makes me so angry at myself every time I do it :(

On the other hand I imagine that crafting protection is not a whole barrel of fun to code.
 

Theraze

Active member
Could make a preference where, if adventures required > 0 after Inigo/boxen reduction, it fails... Besides that, not too much else that would work well without spamming the user 300 times if running EatDrink or something similar.
 

Theraze

Active member
So, anyone actually try out the patch above to see if it properly makes mafia aware that 5 turns of Inigo removes one adventure from the crafting cost?
 

Orbrisa

Member
Theraze - I'd love to be able to test the patch as I run into this a lot. (I'm dumb and always forget, and then I end up having to craft manually.) However, do I understand correctly that since I don't compile my own copy of mafia, this won't be possible?
 

Winterbay

Active member
I finally managed to get myself together and apply a patch. I'll let you know if it works out for me :)

So: This does not appear to be working for me. I tried it today with the following result:

Code:
> ash my_adventures()

Returned: 0

>     ash have_effect(to_effect("Inigo"))

Returned: 10

>     inv monkey wrench

monkey wrench

>     inv coconut shell

coconut shell (3)

>     create 1 ocean motion

Verifying ingredients for ocean motion     (1)...
Auto-repair was unsuccessful.

auto-repair is set to off, as is "require in-a-boxes".

Given that I'm now at work and cannot double check if the patch actually went in thehre (even though it looked that way when I did the patchign yesterday) it can be a user error, but it would be great if someone could make sure it is compatible with the latest Mafia-version.

Edit, edit: It does however show the crafting as taking 0 turns when enqueued in the item manager. It just doesn't create it when I press the create/consume buttons.
 
Last edited:

Winterbay

Active member
This is a bump since I don't think edits show up as "new posts" and as such the given information might be missed :)
 

Theraze

Active member
I'll look for what the auto-repair fail message means later today. The only change I had was subtracting adventures needed, as I thought it would craft if adventures needed matched or more were available... Heh.
 

Darzil

Developer
Not sure if it's worth putting here or worth a new thread, but if crafting something with Inigo's running it will fail if there is a counter due to expire, even if no Inigo's running. Perhaps this won't happen with your patch?
 
Top