OCD Inventory control

If the stocking part could modify the hold amounts for mall sell/pulverize/display case when you update the stocking amounts and say to stock those, would that make it so in the future I wouldn't accidentally get rid of those items? If I'm stocking them all the time then it won't matter, but if I turn off stocking it'd be nice to accumulate that stuff in case I wanted to run the stocking portion again in the future for doing a SC run down the road.

I'm well ahead of you! I anticipated such a need. If you want to stop stocking stuff, but don't want to dispose of it either there is an option for that.

At the top of the Stock tab it asks, "What to do with items on this list?" You can choose the option to "Keep them... if they happen to be in inventory".

That's what you wanted, right? I feel cool when I've already anticipated such a thing
 
Last edited:
Got a bit of nasty surprise today when I went to pull a couple of star key lime pies and discovered that I didn't have any in storage. I double checked OCD and it's definitely set up to acquire four (actively acquire that is, not just keep on-hand). OCD also seems to have skipped buying a clockwork maid (though perhaps mafia stepped in to prevent that?) and the disassembled clovers that I included in my stock list. This is only a 'try various things' sort of ascension so I'm not too worried, but the missing pies might cost me a day, which is a pain (though again, my fault for not checking manually before ascending). As always this may well turn out to be user error, but on the off chance that it's a bug I thought I'd mention it.
 
It just restocked my star key lime pies a few hours ago since I used them during my last ascension. I don't know why it did not do so for you. Did you disable purchasing from any stores? Are you sure those items are on your stock list? All I know for sure is that those things work for me.
 
I did not, and they are. I'll finish this ascension and then run it again before my next one and check to see if it behaves as expected or not, that's probably the simplest solution anyway.
 
Finally set up things to use your script and boy, is it a humdinger! (Is that what the kids are saying nowadays? Humdinger? Anyway...) Found an oddity though. I have it set up so if I have base booze ingredients, it makes their fermented version. Then I saw this:
Code:
transform 5 bunch of square grapes into boxed wine

Verifying ingredients for boxed wine (5)...
Searching for "fermenting powder"...
Search complete.
Purchasing fermenting powder (2 @ 70)...
You acquire fermenting powder (2)
You spent 140 Meat
Purchases complete.
Creating boxed wine (5)...
You acquire boxed wine (6)
Successfully created boxed wine (6)
It should have made 15 boxed wines. One of those "half the distance but we round" sort of scenarios, no major issue. Though it does beg the question why creatable_amount() isn't used. Was that function skipped intentionally?
 
The problem with creatable_amount() is that it would have returned 0 until the fermenting powder was purchased. That's why I did not use it.

I'll put this on my list of problems with the CREATE option. There are several. I really need to dig in and fix it, but none of the problems have very simple solutions or severe penalties so it's on the back burner.
 
Code:
> prefref npc

autoSatisfyWithNPCs (global, now 'true', default 'false')

> ash item_amount($item[bunch of square grapes])

Returned: 3

> ash item_amount($item[fermenting powder])

Returned: 0

> ash creatable_amount($item[boxed wine])

Returned: 9
This leaves me wondering if there's something glitchy with me (only source of fermenting powder is NPC, none in inventory or clan stash) or if it's been updated since you last used it. I have a couple item tally functions that use creatable_amount to count as having the items and it's been working fine for me.

Eh, the script still works great and that's the important part. Thanks ^^
 
If you have aSWN on, creatable_amount will list purchased items from NPCs as counting towards creatable_amount. Believe the same works with coinmasters as well... they have creatable_amounts up to whatever amount of tokens you have.
 
Interesting, but it still won't consider amount creatable if it requires mall purchase which is necessary to buy limes for key lime pies -- that's important.

Still, good for me to know.
 
Now that is an interesting example! The cause of the problem is obvious. You can pulverize the colander, but you cannot trade it. So you can only pulverize it if you actually have the skill.

That makes this a script problem since it cannot deal wadbotting untradeable pulverizeables. I guess I'll need to add an is_tradeable() check if you are trying to use wadbot so that it just leaves the colander in inventory without trying to mail it.
Question: Came across the previous comment while looking at an empty wadbot message. Should this insertion at line 368 keep everything working as it should or will removing it here mess with other parts of the code?
Code:
	boolean wadbot(int [item] pulverize) {
		boolean malusOnly = true;
		foreach thing, quant in pulverize{ <==Needs brackets
==>			if(!thing.is_tradeable()) remove pulv[thing];
			if(thing.is_wadable()) {
				quant -= quant %5;
				if(quant < 1) remove pulv[thing];
			} else malusOnly = false;}  <==
 
Last edited:
Maybe if you change the following line from if to else if... else you're going to run into map modified during foreach.
 
Oh dear. I thought I'd fixed that problem. Sorry about my negligence. My solution is a bit different. Rather than remove the item from the map it is better never to add it in the first place.


OCD Inventory Control Updated!


That'll take care of it.
 
I'm having this weird glitch which requires me to click the "save" button twice before anything is actually saved. It does show the status message that goes "Saved at ...", but only on the second pressing items actually get categorized. At times random items I've categorized and attempted to save lose their category so I have to re-categorize them again. Latest KoLMafia, script and relay. Firefox 6.0, Windows XP.
 
??

Try something for me. Categorize an item and click save once. It should still be listed there even if that item was just categorized. It doesn't go away until you click the button a second time. Don't click the save button a second time.

Then restart relay OCD and tell me if it is definitely not categorized.
 
I think the problem is that it doesn't reload the list after you click save (i.e. have uncategorized items, put it in a category, save, it will still be there, reload the tab, it will be gone).
 
Indeed, my bad. It does save the items after the first click, but it doesn't refresh the list so it looks like nothing has happened. If I'll catch that second glitch I've described ( items randomly ( and rarely ) losing their category ), I'll let you know.

Thanks for the wonderful script in the meantime, Bale ;)
 
I know I've resisted adding automatic trades to OCD and I still think that is the right decision since they'll block ascension. However I decided to add a TODO list for them so that it can point out to me to do those trades myself if I have time.

5inrC.png


Does anyone else know any other good deals I might want to add for myself?
 
That seems like a good compromise, actually. Would you consider adding a 'propose trade' button next to each of those reminders to allow semi-automated trading? It would be per player, and would require some modification to the layout you have there (a value column and a player column, rather than the todo column).
 
So I'm not familiar at all with scripting, and that's why I let all you wonderful people do it...

I keep getting the following error when I run the script: Bad location value: "king's chamber" (zlib.ash, line 419)

How do I fix this?
 
Back
Top