OCD Inventory control

Banana Lord

Member
Yep all fixed, thanks Bale!

Another one for you :p On my Pulverize tab I've somehow ended up with a couple of items (old sweatpants and mood ring) showing up marked as uncategorized (including mood ring, which is not pulverizable). Hitting save, reloading etc. had no effect. Changing the action for old sweatpants 'fixed' the problem (ie: I could set it to closet, display etc., or back to uncategorized so that it showed up under the Add Items tab), but I don't seem to be able to choose to pulverize it anymore. I did the same for the mood ring, and it seems to have vanished from my database altogether.
 
Last edited:

Bale

Minion
Well, the old sweatpants and mood ring should not have a pulverize option since they pulverize into useless powder, so that is working correctly. At least mafia believes that the mood ring should pulverize into useless powder, if that is incorrect please post a KoLmafia bug report.

Code:
[COLOR="#808000"]> ash get_related($item[mood ring], "pulverize")[/COLOR]

Returned:     aggregate int [item]
useless powder => 1000000
 

Ferdawoon

Member
Is it possible to get a little flag for the items listed in Create, where if the meat spent to get materials is more than what I would win on selling the item, just add a little dot next to the line or something?

Had this happen before: I had over 500 BRICKO-eyebricks. The PA->OCD wanted me to make cathedrals out of each of them, which ment way more BRICKO-bricks than I had so it started to suck everything out of the Mall. Luckily I stopped it before too much damage had been done and could edit it out of the What to do-list. What I would lke then is that if the profit of turning one or all of my eyebricks into Cathedrals, compared to just selling the eyebricks in the Mall, is lower than what I would spend in buying bricks to make them, then flag.
 

Bale

Minion
Actually, the change I've been thinking of is to have a flag to only create if you have all the necessary materials in inventory without purchasing anything. I don't intend to get into price comparisons with OCD.
 

Banana Lord

Member
The meat gained from using items (like warm subject gift certificates) is not added to todaysFarming, bug or feature?

EDIT: Also, can I specify a map rather than a file for OCD's second parameter? ie: ocd_control(False, some_map);
 
Last edited:

Bale

Minion
The meat gained from using items (like warm subject gift certificates) is not added to todaysFarming, bug or feature?

I cannot possibly judge that as a feature. It's not really a bug either though. It's more like a lack of a feature. I don't really want to capture my_meat() before and after to check the difference.

EDIT: Also, can I specify a map rather than a file for OCD's second parameter? ie: ocd_control(False, some_map);

If you specified a map it would not work. If you're asking me to add that as a feature, I'd rather not since that is non-trivial and I don't see a particular reason for you to dislike doing that. You need to save the map as a file anyway or else you would need to download it again tomorrow.
 

Banana Lord

Member
I cannot possibly judge that as a feature. It's not really a bug either though. It's more like a lack of a feature. I don't really want to capture my_meat() before and after to check the difference.
OK, I'll work around it.

If you specified a map it would not work. If you're asking me to add that as a feature, I'd rather not since that is non-trivial and I don't see a particular reason for you to dislike doing that. You need to save the map as a file anyway or else you would need to download it again tomorrow.
Rather than give it to you piecemeal I'll just tell you what I'm trying to do. I want OCD to use the data in the file specified by the second parameter ONLY if the user has no existing data for that item (ie: they haven't categorised it yet). Basically the file contains default data for a bunch of items so that people can use my script without having to trawl through their inventories just to run a farming script (it also provides some direction as to what to do with those items, as often people don't know what the most profitable course of action is). I thought that I could have my script load a user's OCD data file to a map, add data for any items not in the database, and then pass the data on to OCD itself (I thought it was a bit too risky to have NCF.ash directly alter the OCD data file). Does that make sense?

I'm not entirely sure where that leaves me, but if you have any ideas I'd love to hear them.
 

AlbinoRhino

Active member
Code:
> call scripts\OCD Inventory Control.ash


Stocking up on requred items!
[B]Pulling items from stash...
You acquire Mae West (51)[/B]
Verifying ingredients for Mae West (4)...
Verifying ingredients for rabbit punch (4)...
Pulling items from stash...
You acquire bottle of Domesticated Turkey (4)
Pulling items from stash...
You acquire raspberry (4)
Creating rabbit punch (4)...
You acquire rabbit punch (4)
You lose some of an effect: Inigo's Incantation of Inspiration
Successfully created rabbit punch (4)
Creating Mae West (4)...
You acquire Mae West (4)
You lose some of an effect: Inigo's Incantation of Inspiration
Successfully created Mae West (4)
Nothing to do. I forsee no additional meat in your future.

This issue appears to still exist.
 

Attachments

  • OCDkBay.txt
    4.4 KB · Views: 102
  • OCDdata_MeatBall.txt
    29.4 KB · Views: 802
  • OCDstock_MeatBall.txt
    6.3 KB · Views: 57
Last edited:

Theraze

Active member
It's only pulling from the stash because you told KoLmafia that it can acquire items from the stash at will. It obeys that preference.

So, AlbinoRhino, your problem is that it's still following the preferences you've set? And when it tries to retrieve_items, and does what you've told it to (pull items from clan stash if possible), and it does... that's a bug with the script? And once it's finished pulling the items from your clan, and they aren't in anymore, it runs fine?

The script-problem is...?
 

AlbinoRhino

Active member
So, AlbinoRhino, your problem is that it's still following the preferences you've set? And when it tries to retrieve_items, and does what you've told it to (pull items from clan stash if possible), and it does... that's a bug with the script? And once it's finished pulling the items from your clan, and they aren't in anymore, it runs fine?

The script-problem is...?

Read more carefully Theraze. My stock list includes Mae West x 4. The script pulled 51 Mae west from stash (all that were in the stash). Then it pulled the ingredients for 4 Mae West and created them. Then on the next run, it put the 51 Mae West it had taken back into the stash. Ideally, the script should have just pulled 4 Mae West to begin with and been done with stocking them. I would think.
 

shazbot

Member
Code:
> call scripts\OCD Inventory Control.ash


Stocking up on requred items!
[B]Pulling items from stash...
You acquire Mae West (51)[/B]
Verifying ingredients for Mae West (4)...
Verifying ingredients for rabbit punch (4)...
Pulling items from stash...
You acquire bottle of Domesticated Turkey (4)
Pulling items from stash...
You acquire raspberry (4)
Creating rabbit punch (4)...
You acquire rabbit punch (4)
You lose some of an effect: Inigo's Incantation of Inspiration
Successfully created rabbit punch (4)
Creating Mae West (4)...
You acquire Mae West (4)
You lose some of an effect: Inigo's Incantation of Inspiration
Successfully created Mae West (4)
Nothing to do. I forsee no additional meat in your future.

This issue appears to still exist.

I don't think Bale addressed it yet due to the complexity of the fix.
 

Banana Lord

Member
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)?
 

Theraze

Active member
Read more carefully Theraze. My stock list includes Mae West x 4. The script pulled 51 Mae west from stash (all that were in the stash). Then it pulled the ingredients for 4 Mae West and created them. Then on the next run, it put the 51 Mae West it had taken back into the stash. Ideally, the script should have just pulled 4 Mae West to begin with and been done with stocking them. I would think.

As I said, it has to do with your available_amount.
Code:
   if(tot < stock[it].q && !retrieve_item(stock[it].q - tot + available_amount(it), it)) {
If you have it set to put 51 in your clan, then the put_stash on repeat makes sense... otherwise, it's doing what you want based on your available amount. Anytime you call retrieve_item, it will work based off everything you've told it. Alternatively, if you don't want it to do that, disable BaleOCD_Stock again...
 

AlbinoRhino

Active member
As I said, it has to do with your available_amount.
Code:
   if(tot < stock[it].q && !retrieve_item(stock[it].q - tot + available_amount(it), it)) {
If you have it set to put 51 in your clan, then the put_stash on repeat makes sense... otherwise, it's doing what you want based on your available amount. Anytime you call retrieve_item, it will work based off everything you've told it. Alternatively, if you don't want it to do that, disable BaleOCD_Stock again...

OCD Inventory Control Updated!
This is a new feature release! OCD Inventory now handles stocking items for softcore runs. After you inform the dB manager in the relay script what items to stock, OCD will keep those items in inventory, even if it would otherwise sell off those items. This means you can keep a stock list separate from OCD's item dispersal information and OCD will integrate the two lists for you.

This is just the first phase. I am going to be adding special TPS handling for stocking, for people who have a TPS. I'm also adding a feature to deal with expensive items in case someone wants to buy things over the item price limit.

Please tell me anything I did wrong. I'm sure there will be negative comments as this feature is still new.

I'm aware of that. I want it to use the stash. However, it is pulling the total amount of items from the stash, rather than just what it needs, then it is obtaining what it needs by other methods (buying, creating) even though the requirement is satisfied (way over-satisfied) by what it took from the stash. Then on the next run it places the items taken from the stash back into the stash. Do you need the OCD file or the stock file data ? Or both ? Should I just attach them here ?

Oh. I've found the reason for the bug. It's really annoying. Unfortunately I don't have the time and concentration to fix it right now. I'm going to have to make it more complicated than I originally thought.

Hopefully I'll fix it later, but no promises since my computer is broken right now and I'm on a friend's computer. :(

Hmmm...the script's author thinks it's a bug. But not you. Odd that.
 
Top