OCD Inventory control

My script counts what Mafia tells it. That is why refreshing the inventory fixed the problem. There might be some mafia issue that caused the miscount. I've got no idea what you got from the deck or why mafia was misled into believing that you got a rickety old unicycle. Perhaps a session log could shed some light on this quirk.
Sorry for me being indistinct again. :(

I suspected that glitch is inherited from Mafia right from the start. So because of that I didn't say about error in script, but asked where do you get numbers. Can you explain somewhat more how can I check this numbers myself? I plan to check all possible sources of counted item, but I am not competent enough. So far I know only about inventory/closet in relay browser (looks good) and /count command (works good too). Obviously, you are getting your numbers somewhere else.

And no, I didn't see anything suspicious in log. But I didn't check it too much, because only yesterday I found what exactly produce the error (in previous days I noticed it only at the end of my day, when I run OCD).

Thank you again.
 
In the gCLI, something like:
inventory_amount rickety old unicycle; available_amount rickety old unicycle; equip rickety old unicycle
inventory_amount rickety old unicycle; available_amount rickety old unicycle; cheat random
repeat 14
inventory_amount rickety old unicycle; available_amount rickety old unicycle
 
Found it. Thank you, Theraze!

If you are interested, for some reason, Mafia adds one unicycle into my inventory after any Deck-induced battle. Only once, regardless of the amount of battles. But if I'll refresh session, unicycle will be added again after next battle. I'd better report it, I think...
 
Found it. Thank you, Theraze!

If you are interested, for some reason, Mafia adds one unicycle into my inventory after any Deck-induced battle. Only once, regardless of the amount of battles. But if I'll refresh session, unicycle will be added again after next battle. I'd better report it, I think...

How many unicycles are reported in kol's available combat items during such combats?
And does it (=mafia thinking you have extra unicycles) also happen after non-deck battles?

(presumably it only happens when the unicycle is equipped? - in which case I would guess that this is mafia seeing that kol reports 1 unicycle in combat usable items, and readjusting the (non-equipped) inventory count to 1, in addition to the 1 equipped)
 
How many unicycles are reported in kol's available combat items during such combats?
I didn't check it yet.
And does it (=mafia thinking you have extra unicycles) also happen after non-deck battles?
Never seen it before. But it can be some _very_ specific circumstances. Because I seen it trice in row, wrote this post above, then checked the same set in the random standard battle - without errors - and after that all Deck-induced battles self-fixed too. :/ So I need more research here...
(presumably it only happens when the unicycle is equipped?
Yes, of course.
- in which case I would guess that this is mafia seeing that kol reports 1 unicycle in combat usable items, and readjusting the (non-equipped) inventory count to 1, in addition to the 1 equipped)
Again: yes, I'll try to check it.
 
No. I honestly don't have any thoughts about how that would fit into this script at all.

If you want to regularly put your stuff into the Hod Dog Stand, I'd recommend adding it to your logoutScript. You'll have to use visit_url() to make that work. I'd also recommend a can_interact() check to make sure you don't do it in run.

I'd be glad to help you with that if you want, but I'd need to know exactly what you wanted to do before I could write that.
 
I don't know exactly how the hot dog stand works (despite owning one) but from what I've gathered you just deposit wads (or the other desired item), right? It would just be a new option to add for the 10 or so items that it can take. Whether or not that's worth the work it would take is of course entirely up to you; I don't have a clue how easy the backend for the stand is.
 
We can add items to the stand's stockpile from either inventory or from Hangks. All I can think is that he wants to add all of those items to the stand that happen to end up in his inventory. But I cannot think of why anyone would want to do that. It's easy just to add them to the stand every time you eat a hot dog. Even in hardcore it isn't an issue because you can buy from the mall as needed and then add them to the stand from Hangks.

That's why I'm really somewhat puzzled that this option is actually desired. Perhaps he has some need or desire I just don't get.
 
I guess what would really be a good solution there isn't a Mafia thing, but a KoL thing. It would be nice if the hot dog stand looked at the clan stash as well as being able to pull from your inventory.
 
Hey Bale.
It can't be said enough, so thank you again for this amazing script. I can't even begin to guess how much time it's saved me over the years. I'd like to suggest one enhancement for when you're really bored... it would be great if it offered recommendations for actions. I know there's the "apply default" option, but if you added a column to the list that showed me the recommended actions, that'd be helpful. And, since I'm writing out my wish list, it'd be great to have a way to have it reevaluate the list in case something that was one very-profitable has since become an autosell commodity. I've been trying to do this with ManageStore but recently it stopped doing anything to my store inventory, and I'm just as OCD about that, sadly. Again, thanks for making Mafia awesome!
 
The work behind "recommended options" is pretty significant. Just considering items that can be sold in the mall, the script has to look at the current price, the current price of anything the item can be crafted in to (which means the price and availability of all ingredients), whether the character has the skills to do the crafting, value of wads if pulverized, expected value if it can be zapped and so on.

That said, there used to a be a script that did a lot of that. I don't recall the name but it might have been priceGun or something similar. It did many of the above calculations and optionally plugged the results into the files that OCD used. I personally stopped using it because it needed more support than I was willing to give and it was using excessive amounts of wall clock time making calculations that at best gained me a little meat. I also have found that scripting that reacts to mall prices is not worth the effort unless one is willing to adopt the market timing strategies used in the real world stock market. if I am going to go through that much trouble I'm going to back it with real money. Years ago Jick, or someone pretending to speak with his authority said "The Mall is Not the Game". I did not agree then but I do now.

That said, if there is enough interest in finding and resurrecting the old script I'd consider putting in some time to see whether it is worth updating.
 
I believe you're thinking of aqualectrix's excellent PriceAdvisor, which relied on the now unnecessary SmashLib. It didn't always give perfect advice but it was usually reliable, and a far cry from the other options (nothing). I also shared the bare skeleton of a script either in that thread or this one called PAtoOCD that would automatically configure OCD with PA's advice for all your uncategorized items. That was quite a while ago so I'm not sure whether that script still works but it could be made to fairly easily.

Hmmm... for convenience, here are both scripts. I've updated PriceAdvisor to no longer require SmashLib (for my own OCDing), but I have not touched the PAtoOCD script in ages. Use at your own risk.
 

Attachments

For some reason, this script will not allow me to craft stench nuggets into a stench wad. Same with sleaze nuggets. "craft into a..." is not a possibility.
 
Okay, that is darn weird. I have the option to craft nuggets of type twinkly, cold, hot, spooky & sewer while not being able to do it with nuggets of type sleaze and stench.

I don't have any time now to track this down so I'll look into it much later since it's probably not going to be easy to find the problem..
 
I found the bug. It was weirder than I anticipated.

Turns out that it there a bug which allowed twinkly, cold, hot and spooky nuggets to be malused. The lack of crafting for sleaze and stench nuggets was the code actually working as coded, although not as intended. Until now, the first bug kept me from noticing the the second bug since I didn't think to check all possible nuggets when I tested the code. (Oddly enough the sewer nuggets being crafted into sewer wads worked perfectly and bug free.) This all happened because of the fact that mafia does not support the cooking of wads into different wads.

Anyway, it was fixed so please update OCD.

PS. While I was fixing that bug I took the opportunity to make the code much more efficient and removed a related (previously undetected) bug I discovered in the process so it was a definite win.
 
Last edited:
Back
Top