OCD Inventory control

Ouch. Sorry. For some reason I was sure that kolmafia forum will notify me by email if you'll answer. Never happened. My problem. Ok...

I found and fixed a bug that occurs if an item is in your stock list AND in the closet. Perhaps that is your bug?
Sounds similar - but it's not it. As bug still happens.

If you still have the problem please tell me exactly how many you have in inventory and closet.
Inventory: 1 tiny plastic barrrnacle
Closet: 548 tiny plastic barrrnacle (it no matters, actually, any amount from closet will be "virtually added" to mall batch)
Tell me exactly what OCD is set to do to that item (including quantities).
...Oh, found another error by the way. I am not sure, if it is not my Opera-related, but still. Running OCD dB Manager without items that need categorization ends with inability to enter any page under "Edit database" entry. I can see "Keep", "Mall", "Use", etc, but pressing it simply returning me back to "Information" page. Longstanding bug - I seen it many times already.

Can be fixed in that circumstances with selecting "Item to Stock" page. After that Manager fixes itself and works as intended. Until next re-run.

Returning to topic: it is set to "Mall sale", keep 0. Also, I can see this 548 barrrnacles in italic there, as if it was in my inventory. Is it normal?

If that item is in your stock list tell if the list is set to acquire, keep or ignore and how many should it stock?
It set to "Ignore this stock list". And there is no plastic in list anyway.
Finally, tell me if KoLmafia is set to "Take items from the closet whenever needed"?
Yes. And removing this check immediately fixes error with amount. But I need it. :) It's my daily useless trinket savings here! :)
 
OCD Inventory Control Updated!

svn update bale-ocd

Changelog: Please read!
  • Functional change for equipped items!
    No longer will OCD unequip items before execution. I finally solved the problems that were caused by having items equipped so that feature is unnecessary.
    Now it will OCD the items you are equipped with also. If people don't like this I am willing to add an option to never OCD equipped items.

  • Added option to not send stuff to kBay. It will keep this stuff in inventory instead.
    This is untested since I am in-run at the moment. Please let me know it if works. I suspect my solution was less than perfect.


Sounds similar - but it's not it. As bug still happens.

Just a minute. The bug is that it is trying to sell off all your tiny plastic barrrnacles and it is set to sell off all your tiny plastic barrrnacles? You have mafia set to remove items from the closet, so it is doing that? If I understand you correctly, that isn't a bug — it's a user error. Change OCD's setting to KEEP all tiny plastic barrrnacles and it will stop trying to sell them in the mall.

Okay, I probably don't understand something important here so please tell me what you want. Explain why you don't have it set to KEEP them. I might have difficulty understanding so please don't go into an unrelated issue in the middle of your explanation.


...Oh, found another error by the way. I am not sure, if it is not my Opera-related, but still.

It's not an Opera bug. I use Opera almost exclusively and have never seen that bug. You are talking about regular Opera, not Opera Next, right? Opera Next is a whole other issue which currently has me in a deep funk. I'll worry about this later.
 
Is there a right way to make changes to my local copy so svn won't overwrite those changes when it updates? I've been just opening the file in Notepad++ to edit it. Is there a better place on this forum to ask this question?

Edit: In case your wondering, I edited the relay script to allow me to pulverize items that would result in "useless powder" since I'm now trying to collect it. I also edited OCD to use a different pricing scheme.
 
Is there a right way to make changes to my local copy so svn won't overwrite those changes when it updates? I've been just opening the file in Notepad++ to edit it.

  1. Acquire the most recent version using svn update
  2. Open the script's working copy in the project's /svn directory, and make your edits. Always make sure the project in /svn has your changes
  3. Use the command svn sync to push your modifications in the working copy to the local copy in the /scripts or /relay directory
  4. Update as usual. You can use svn update bale-ocd to update just this script, or svn update to update all your scripts or just check the box in SVN preferences to make it happen automatically once a day.
  5. Whenever the script is updated SVN will magically merge your changes into the working copy in the /svn folder and then push those changes into the local copy. This is magic! This will happen every single time you use svn to update the script without needing your intevention. The CLI will display a "G" for merGing the script instead of a "U" for Updating it when this happens.
  6. If you ever want to modify your changes or add to them, just repeat step 2 and 3.

  7. If an update to a script changes it so severely that it cannot be merGed with your modifications, it will show "C" for Conflict and produce several files in the working copy to help you solve the problem:
    • myfile - will have some inline markup at the location of the conflict ( look for <<<<<< and >>>>> markup) showing you both what your text was and what the repo's text was.
    • myfile.mine - Your version before the update.
    • myfile.rOld - The pristine repo versions from before the update.
    • myfile.rNew - The pristine repo versions from after the update.
    With all of these files, you can pretty easily figure out where the problem line(s) are, and how to fix them. Sometimes you'll just want to use rNew and discard your local changes, sometimes you'll want to do something else. Copy/pasting between the different files is straightforward.


Is there a better place on this forum to ask this question?

I did just try to answer it, but if you need more information there's a forum for Community Support to ask questions about mafia like this one. Or if you have a questions about how to write or modify a script, there is a Scripting Discussion forum.
 
I did just try to answer it...

Thank you. That is exactly what I needed to know. I had changed the copy in /scripts directly and the latest update wrote over those changes. Remembering to edit the copy in /svn in the future will make life easier. Luckily, the changes I made were minor so it wasn't difficult to redo.
 
  1. Acquire the most recent version using svn update
  2. Open the script's working copy in the project's /svn directory, and make your edits. Always make sure the project in /svn has your changes
  3. Use the command svn sync to push your modifications in the working copy to the local copy in the /scripts or /relay directory
  4. Update as usual. You can use svn update bale-ocd to update just this script, or svn update to update all your scripts or just check the box in SVN preferences to make it happen automatically once a day.
  5. Whenever the script is updated SVN will magically merge your changes into the working copy in the /svn folder and then push those changes into the local copy. This is magic! This will happen every single time you use svn to update the script without needing your intevention. The CLI will display a "G" for merGing the script instead of a "U" for Updating it when this happens.
  6. If you ever want to modify your changes or add to them, just repeat step 2 and 3.

  7. If an update to a script changes it so severely that it cannot be merGed with your modifications, it will show "C" for Conflict and produce several files in the working copy to help you solve the problem:
    • myfile - will have some inline markup at the location of the conflict ( look for <<<<<< and >>>>> markup) showing you both what your text was and what the repo's text was.
    • myfile.mine - Your version before the update.
    • myfile.rOld - The pristine repo versions from before the update.
    • myfile.rNew - The pristine repo versions from after the update.
    With all of these files, you can pretty easily figure out where the problem line(s) are, and how to fix them. Sometimes you'll just want to use rNew and discard your local changes, sometimes you'll want to do something else. Copy/pasting between the different files is straightforward.




I did just try to answer it, but if you need more information there's a forum for Community Support to ask questions about mafia like this one. Or if you have a questions about how to write or modify a script, there is a Scripting Discussion forum.

Should this be added to the thread about what SVN means to users or perhaps C&P to the wiki? It is really too useful to remain buried in a script specific thread and I can't recall reading all of this in one place elsewhere.
 
Okay, I probably don't understand something important here so please tell me what you want. Explain why you don't have it set to KEEP them. I might have difficulty understanding so please don't go into an unrelated issue in the middle of your explanation.
Ouch. I am sorry. I will try to be more clear in the future and not mix several questions in one. Sorry again.

I can see two possible right outcomes with selling:

1. If I am setting OCD to "sell everything", it really sells everything.

It not works. OCD pretends that it sells everything, but actually it takes only inventory items. Not items in closet.

2. If I am setting OCD to "sell everything", it sells what it can from inventory only. It doesn't touch closet. (And it is exactly how I need it.)

It works that way. If you'll ignore wrong reports about it.

Speaking about "why": I am trying to keep set amount of items in my store. As OCD cannot be set for it, I simply removing all excess items into closet and allow OCD to do the rest. :)

It's not an Opera bug. I use Opera almost exclusively and have never seen that bug. You are talking about regular Opera, not Opera Next, right?

Right. Regular Opera v.12.15.

Let me to explain it again.

1. If I have uncategorized items, and I am pressing "OCD dB Manager" in Relay browser of Mafia, it starts on page "Add Items", and everything works as intended.

2. If I haven't such items, Manager starts on page "Information". If I am pressing "Edit Database", it opens second set of pages (Keep, Mall, etc.) No page here works at all. Pressing any one simply returns me to first, "Information" page.

If I am simply selecting "Item to Stock" or "Configure Script" page, even without doing anything here, then "Edit Database" starts to work as intended afterwards. Button "Save all" on "Add Items" page fixes Manager too. Until next run of Manager through menu in Relay browser that resets everything back.
 
1. If I have uncategorized items, and I am pressing "OCD dB Manager" in Relay browser of Mafia, it starts on page "Add Items", and everything works as intended.

2. If I haven't such items, Manager starts on page "Information". If I am pressing "Edit Database", it opens second set of pages (Keep, Mall, etc.) No page here works at all. Pressing any one simply returns me to first, "Information" page.

If I am simply selecting "Item to Stock" or "Configure Script" page, even without doing anything here, then "Edit Database" starts to work as intended afterwards. Button "Save all" on "Add Items" page fixes Manager too. Until next run of Manager through menu in Relay browser that resets everything back.

I have noticed similar behavior in Firefox 22. I've just gotten used to clicking each top tab starting from the right before actually trying to change or categorize anything in the OCD db Manager relay script. It has been intermittent and I haven't been able to track down a way to reliably reproduce the behavior.
 
Ouch. I am sorry. I will try to be more clear in the future and not mix several questions in one. Sorry again.

I can see two possible right outcomes with selling:

1. If I am setting OCD to "sell everything", it really sells everything.

It not works. OCD pretends that it sells everything, but actually it takes only inventory items. Not items in closet.

2. If I am setting OCD to "sell everything", it sells what it can from inventory only. It doesn't touch closet. (And it is exactly how I need it.)

It works that way. If you'll ignore wrong reports about it.

Speaking about "why": I am trying to keep set amount of items in my store. As OCD cannot be set for it, I simply removing all excess items into closet and allow OCD to do the rest. :)

I think I am starting to understand what you mean and desire. To confirm my understanding before I commit anything, please post the CLI output. I want to see what OCD actually does and claims to do about your barrrnacles.


1. If I have uncategorized items, and I am pressing "OCD dB Manager" in Relay browser of Mafia, it starts on page "Add Items", and everything works as intended.

2. If I haven't such items, Manager starts on page "Information". If I am pressing "Edit Database", it opens second set of pages (Keep, Mall, etc.) No page here works at all. Pressing any one simply returns me to first, "Information" page.

If I am simply selecting "Item to Stock" or "Configure Script" page, even without doing anything here, then "Edit Database" starts to work as intended afterwards. Button "Save all" on "Add Items" page fixes Manager too. Until next run of Manager through menu in Relay browser that resets everything back.

You were very explicit so I tried to follow your instructions. Sorry. I cannot replicate that bug with Opera v 12.15
 
Last edited:
I think I am starting to understand what you mean and desire. To confirm my understanding before I commit anything, please post the CLI output. I want to see what OCD actually does and claims to do about your barrrnacles.

Ok, here it is.

Situation:

Mall: 100 tiny plastic barrrnacles
Closet: 668 tiny plastic barrnacles
Inventory: 1 tiny plastic barrrnacle

Settings: put barrrnacles on mall, save 0.

Starting script:

> call scripts\OCD Inventory Control.ash

autoSatisfyWithCloset => false
You need 668 more tiny plastic barrrnacle to continue.
autoSatisfyWithCloset => true
mallsell 669 tiny plastic barrrnacle
Sale price for this line: 133*800

Total mall sale = 133*800
Transferring items to store...
Items offered up for sale.

Anticipated monetary gain from inventory cleansing: 133*800 meat.

Results:

Mall: 101 tiny plastic barrrnacles
Closet: 668 tiny plastic barrnacles
Inventory: 0 tiny plastic barrrnacles

Also, current "autoSatisfyWithCloset" messages appeared just day ago. It wasn't anything like it before.

You were very explicit so I tried to follow your instructions. Sorry. I cannot replicate that bug with Opera v 12.15

Hmm. Seems, there is something wrong with my settings then, or way that script interacts with them. Ok, thank you for trying.
 
I tried to fix your problem. I tried and tried. Finally it frustrated me so much that I killed it. My final solution wasn't elegant, but the bug is very dead. I'm confident now that I fixed your issue. I fixed every single closet problem that has ever annoyed me and fixed every closet problem that might annoy me in the future.

svn update bale-ocd
 
I tried to fix your problem. I tried and tried. Finally it frustrated me so much that I killed it. My final solution wasn't elegant, but the bug is very dead. I'm confident now that I fixed your issue. I fixed every single closet problem that has ever annoyed me and fixed every closet problem that might annoy me in the future.

*Smiling Spectre makes deep bow in fear*

Thank you! I hope, you didn't kill closet itself by the way. :eek:
 
One minor annoyance for me is that sometimes I can't remember what I set up OCD to do to a particular item (especially if I did whatever the suggested default is). And so I have to click through to every tab to look for this item.

How much trouble might it be to add an 'all' tab?
 
It's probably just as easy for you to open up the OCDData-file in the /data folder and search for the item there.
 
Winterbay's solution is probably better than an "all" tab considering the length of the list. It's also what I do.
 
OCD thinks I only have 5 bubblin' crude when I have 41. Also, it doesn't make the oil caps that it should.

> call scripts\OCD Inventory Control.ash

autoSatisfyWithCloset => false
transform 5 bubblin' crude into oil cap

autoSatisfyWithCloset => true

Nothing to do. I foresee no additional meat in your future.

> ash print(item_amount($item[bubblin' crude]));

41
Returned: void

The line from my OCDdata file:
Code:
bubblin' crude	MAKE	0	oil cap	true
 
Thank you for finding that bug! It took a bit of trouble to track down the darn thing, but I fixed it!

svn update bale-ocd
 
Thank you for finding that bug! It took a bit of trouble to track down the darn thing, but I fixed it!

svn update bale-ocd

Seems to be fixed now. Thank you.

> call scripts\OCD Inventory Control.ash

autoSatisfyWithCloset => false
transform 40 bubblin' crude into oil cap

Verifying ingredients for oil cap (5)...
You acquire an item: oil cap
Successfully created oil cap (1)
...
 
Back
Top