OCD Inventory control

Oh, I didn't say it was a bug in the message you quoted. I was just pointing out that it was doing exactly what the script was telling it to, based on available_amount, and if you wanted to avoid it, you could, either by turning off stocking, or satisfy with stash. :)

Edit: For a constructive suggestion, how about you try to replace this line in stock:
Code:
   tot = full_amount(it);
with this:
Code:
   tot = available_amount(it);
Since it's using retrieve_item, which works based on available_amount, that should actually work properly to get more items. Unless it's supposed to pull from the clan stash to stock, in which case you'd want to replace this line
Code:
   if(tot < stock[it].q && !retrieve_item(stock[it].q - tot + available_amount(it), it)) {
with this:
Code:
   if(tot < stock[it].q && !retrieve_item(stock[it].q - tot + full_amount(it), it)) {

The big thing is that you just have to call the same function for both... either you use full_amount top and bottom and it will pull items from clan stash, or you use available_amount top and bottom and it will actually get new stuff for you.
 
Last edited:
It is definitely a bug. My script doesn't handle it well when you want to auto-satisfy from the clan stash.

The problem is that I want it to consider items in the closet regardless of the closet being allowed as a location to retrieve items from. (Since the closet goes into Hangks this makes sense.) When you allow items to be retrieved from the clan stash it gets a bit more complex.

I'll fix this when I can. In the meantime I can only suggest that it would work if you turned off auto-satisfy with the clan stash. :(
 
No big deal. I wouldn't have brought it up again, except I had the mistaken idea that you had posted a fix. It's no problem working around it. In fact, the script eventually completes the stock & disposal lists when you keep re-running it. And it does use the stash to some degree, pulling ingredients to create things that it could just pull from there pre-made ! :D
 
OCD Inventory Control Updated!

  • Fixed the stash stocking bug for AlbinoRhino!


AlbinoRhino, sorry that I wasn't able to fix that promptly. I had only addressed the much simpler bugs that were reported by Banana Lord. In the end I believe I found a rather elegant solution to the problem you reported. The script actually got simpler than it was before so I hope my math didn't become confused. :)

Please test the new version for me and let me know if I did indeed fix it.
 
Last edited:
I will bust out MeatBall (my softcore character) and give it a try right now. Whether it works or not, you're still awesome Bale !

Edit:

Looking good ! MeatBall was already fully stocked. He has Mae West x5 and thin black candle x8 on his stock list. The candles are one of your default stock items that I noticed the script purchasing when there were over 1600 of them in the stash. The Mae West was an item I added to the stock list and the script was creating when there were 50-some in the stash.

I put 2 candles in my closet and autosold six. I put 5 Mae West in my mall store. Then I ran the script.

Stocking up on requred items!
Pulling items from stash...
You acquire Mae West (5)
Removing items from closet...
You acquire thin black candle (2)
Pulling items from stash...
You acquire thin black candle (4)
Nothing to do. I forsee no additional meat in your future.
Requests complete.

It appears to be all sorted out. My little test was unable to defeat your wizardry, but if you have a more complicated test in mind that you want me to try, just let me know.
 
Last edited:
It was overlooked.
On an unrelated note, at what point did OCD stop sending nuggets and powders to Wadbot if you don't have access to the Malus (or if you don't have Pulverize)?

I cannot see any reason that it would be true. The code actually checks if you have pulverize so that it can send stuff to wadbot if you don't have it... You are sure of this problem?
 
I noticed that on my multi last time I ran the script it sent messages to Wadbut but not all of them contained items (I got a message back form Wadbot stating just that), no idea why since another message just before that worked just fine.
 
Well I found a buildup of ~1900 nuggets in my inventory. On checking my database it seems that nuggets and powders were in my Keep section, not my Pulverize one (incidentally, it's slightly counterintuitive to 'pulverize' a nugget or powder into a wad isn't it?). I don't remember changing their categorisation, nor can I think of any reason why I would do so, but it's quite possible this was human error.
 
Last edited:
It was overlooked.


I cannot see any reason that it would be true. The code actually checks if you have pulverize so that it can send stuff to wadbot if you don't have it... You are sure of this problem?

I saw this a couple of times. Messages were sent to wadbot with no attached items. Didn't seem important enough to try and debug or reproduce at the time.
 
Bug: OCD does not seem to take items equipped to my familiars into account when deciding how many of a given fam equip I should keep. For example, I have the script configured to keep one tiny bindle in my inventory. Running OCD while I have one equipped to my monkey and another in my inventory does nothing, but after removing the bindle OCD mallsells one of them as expected.

Feature requests:
• Use option for degrassi knoll shopping list (script only tries to use it if user has a meatcar in inventory)
• Page reload for Items to Stock tab. Having to manually switch to a different tab and back again to add more items is a pain (currently the script leaves any items you've just added in the text boxes at the bottom after you click Save).
• Ability to closet items to 'keep'. Say I want to keep one of each chefstaff in my inventory and pulverize the rest. I very rarely want to use a chefstaff, so I'd quite like to put all the ones that I keep on-hand into my closet. Perhaps a checkbox next to each item for 'do you want to closet kept items?' (rather than a dropdown listing all possible actions) would be the neatest way to do this.
 
Last edited:
Bug: OCD does not seem to take items equipped to my familiars into account when deciding how many of a given fam equip I should keep.

Known issue, but more annoying to fix than I like. item_amount() does not count equipped familiar equipment.available_amount() does count it, but it may also (depending on settings) also count stuff in your closet or stash. Oh well, I guess I'll just do something annoying to fix it soon.

Use option for degrassi knoll shopping list (script only tries to use it if user has a meatcar in inventory)

LoL! Are you sure that is best? If you use the shopping list it won't vanish unless you actually have a meatcar in inventory. It won't vanish if you are using the desert bus pass.

Page reload for Items to Stock tab.

Agreed. Someone once posted a nice bit of javacode to reload the page, but I do not recall it. Could someone please post it again?

Ability to closet items to 'keep'.

This is low on my list. I might or might not do this. Sorry.
 
LoL! Are you sure that is best? If you use the shopping list it won't vanish unless you actually have a meatcar in inventory. It won't vanish if you are using the desert bus pass.
Sure, like I said, as long as the script checks to make sure the user has a meatcar in their inventory why not? You opened a can of worms with this whole "cater to OCD personalities" thing :D

This is low on my list. I might or might not do this. Sorry.
No problem, if it happens I'll be happy, and if it doesn't I won't be heartbroken.
 
Last edited:
:Sure, like I said, as long as the script checks to make sure the user has a meatcar in their inventory why not? You opened a can of worms with this whole "cater to OCD personalities" thing :D

Currently, it only has the option if the user actually has a meatcar, yes? If it actually does use it post-change regardless of whether or not they have a meatcar, you're increasing server hits at that point...
 
Sorry, I'm not sure I follow you. What do you mean it currently has the option? The script doesn't currently support any quest items full stop. I can't say I know much about how mafia works internally, but doesn't it cache the user's inventory? In which case how does checking for the presence of the meatcar increase server hits?
 
If you give the option to use the item, then if the user doesn't have a meatcar, it will use the item every time OCD is run, failing to throw it away each time.

When I feel OCD about the list, I run zarqon's hardcore checklist, which also autocompletes various map quests as well as throwing the list away if it can be...
 
Sorry, I'm not sure I follow you. What do you mean it currently has the option? The script doesn't currently support any quest items full stop.

Wrong. It supports a number of quest items:

These can be made into pies:
case $item[Boris's key]:
case $item[Jarlsberg's key]:
case $item[Richard's star key]:
case $item[Sneaky Pete's key]:
case $item[digital key]:

These will be used. The script even has logic to make sure they're used correctly:
case $item[the Slug Lord's map]:
case $item[Dr. Hobo's map]:
case $item[Dolphin King's map]:


If you give the option to use the item, then if the user doesn't have a meatcar, it will use the item every time OCD is run, failing to throw it away each time.

Actually, the script could have logic to check for the presence of a meatcar and only use the item if the meatcar is present, wasting no server hits. This is as valid as using Dr. Hobo's map which I already support.
 
Last edited:
Ah, from the "doesn't support quest items" that BL said I was thinking this was going to be just "use this every time there's the chance" request as opposed to actually putting item usage intelligence behind it. :)
 
I should have known that such a broad statement would bite me. Of course OCD supports quest items >_<

@Theraze: You probably missed it, but I quote myself: "script only tries to use [the shopping list] if user has a meatcar in inventory".
 
OCD Inventory Control Updated!
Relay OCD db Manager Updated!

  • Counts familiar items in your terrarium
  • Allows use of Degrassi Knoll shopping list
  • Fixes use of 31337 scrolls
  • Some other minor bugfix I forgot about
 
Last edited:
Back
Top