OCD Inventory control

Winterbay

Active member
I look forward to actually using the script once I've managed to get through listing all the 1700 items I have left to set actions for...
 

tgetgel

Member
I look forward to actually using the script once I've managed to get through listing all the 1700 items I have left to set actions for...

It would be interesting to see the different lists (how folks set up their selections) and to know the reasons why they did it in a certain way. I mean the differences could be a useful instructional aid to the less experienced, to those that might want to change their style of play, or to ascend under a different class. What do you think about posting the OCD_name_data.txt file for a few of the experienced users? I could go through them and find the differences, then have a discussion on the merits of the various items and their uses as it relates to ascending under various classes in a separate thread.
 

Cieka

New member
I look forward to actually using the script once I've managed to get through listing all the 1700 items I have left to set actions for...

I've been using the script since, well, before it was posted and I'll give you my advice if you want it.

Go throught and set actions for any ultra rates, iotms, ascension rewards, etc first. The most valuable stuff that is very obvious to pick out of the list.

Then, ascend. Categorized your items at the end of every day, there really aren't many and you'll knock out a ton of items this way. Easily a couple hundred by the end of your ascension. Then, in aftercore do as many as you can stand, I was able to pick out about 100 before my eyes started to go crazy wicked tired. Ascend again and repeat. That's what I did at least, and I knocked it out after 3-4 ascensions. Forced breakup is the way to go. :)

--Cieka



As far as tgetgel's request, I'll post mine. It may not be the best list, but as Bale said earlier, I actually commissioned him for this script and paid him to write it. He did, of course, add a TON of ideas and made it something to be really as impressive as it is. So have a lot of other people (the reason I asked him to go ahead and make it public, although I didn't know at the time it would overwrite the old OCD Inventory Control). So, for whatever that's worth, I have a lot invested in the script and have put a lot of work into my database file, and just like the script itself, sharing only makes it a better resource for me too since I'm likely to get comments. :)

View attachment OCD_cieka_Data.txt
 

Cieka

New member
The only feature that doesn't exist because I didn't think to ask for it at the time is a BUY or ALERT action that will make sure you have said items once the script is done running.

I currently have another script that I also run that makes sure I have everything I could possibly want to pull for a SC ascension. Tower items, gate, quest items, food, booze, etc.

My original idea for this script was something quite different from what it became (ok, actually it's very, very different), so having two scripts for the same thing is sort of annoying.

Say for example I want to mall sell any sonar-in-a-biscuits I have over 3. Then, I'm going along and I update my buy script to make sure I have 3. Later, during review I realize, oh wait, I might need 4 technically (not that I'd ever pull them, but there's no reason not to have every quest item in hagnk's) because I could also need one for the tower. So I go back and change my script to buy 4, then re-run OCD inventory control and it sells the 4th one.

While that example is easy, stuff like this happens when I'm trying to reconcile my two scripts all the time. I'm not even sure the best way to do it, to be honest. However, I assume the easiest way technically would be to have a checkbox to the right of every item that says ensure keep value.

Then, if you have sonar-in-a-biscuit marked as MALL 4, the secondary thing would MALL any that you had over 4, but would also throw an alert and warn you if you didn't have at LEAST 4. It would eliminate the need for that second script completely. An option is setup could also tell it to buy those items from the mall, but overall I think that's a very bad idea. I have the ability to do that in my other script, but I also had to modify it to make two passes and have items it would mall buy and items it wouldn't automatically mall buy. Tower items and cheap things I have no problem with a script mall purchasing. Some things, you don't ever want mafia buying for you automatically (Speaking of which, anyone need an extra zombie pineal gland? Anyone? Bueller?)

--Cieka
 

Bale

Minion
Despite all our discussion about what the script to do, you never did ask for that. I'll think about adding it here for you, as an option.

Or maybe I should just make a buy script for you that can read the same data file. :D
 
Last edited:

AlbinoRhino

Active member
So I decided to give this a try. However, when I select the OCD_dB_Manager from the scripts menu in the relay browser; nothing happens. This appears in the gCLI :

Function 'updatevars( )' undefined. This script may require a more recent version of KoLmafia and/or its supporting scripts. (relay_OCD_dB_Manager.ash, line 655)

Using the most recent .jar (r8683).

Any ideas about what's wrong ?
 

Theraze

Active member
But updatevars() is a part of zlib, hence the message you reported getting comes from either not having zlib, or not having it in the right folder...
 

AlbinoRhino

Active member
But updatevars() is a part of zlib, hence the message you reported getting comes from either not having zlib, or not having it in the right folder...

It's in the scripts folder. Has been for a long time. The error from the gCLI refers to a line in the relay portion of the script. Does that have any significance ? I will try a fresh download of zlib anyway and see what happens. Thanks for your help.

Edit:
That fixed it. It appears my copy of zlib was way out of date ... r17. Perhaps I'm mistaken, but I seem to recall, in the past, getting some kind of notice when it needed updated. Is that correct ? Or do I just have to monitor the zlib thread to know when ? It seems strange that I could miss several versions and never have any problems until now. Thanks again for your help, Theraze.
 
Last edited:

Bale

Minion
Perhaps I'm mistaken, but I seem to recall, in the past, getting some kind of notice when it needed updated. Is that correct ? Or do I just have to monitor the zlib thread to know when ?

You're not mistaken. Unfortunately zlib's update function won't work if a script uses a function from a new version that isn't in the version you have. Unfortunate, but there's no way around that.
 

tgetgel

Member
Off topic, but is there a way to have a batch file or something check the versions of the local scripts all at once?
 

Bale

Minion
Well, there's a way to do so... it's just annoying.

You'd need to create a script that checks the update functions of all scripts whose status you want to check.
 

tgetgel

Member
As far as tgetgel's request, I'll post mine.
--Cieka

Thanks, Cieka. I compared db files and found that the ultra rates, iotms, ascension rewards, etc (the most valuable stuff) is generally the same. There are hundreds of other items that are distinct between the inventories. One of my characters has 376 items that are not in Cieka's db; as yet they are uncategorized, so they must not be 'valuable stuff'. ;) Looks like I have more work to do on my list before I post it.
 

Banana Lord

Member
When calling OCD from another script (via cli_execute) the script doesn't seem to have been autoselling any of my items (despite showing "132 items to autosell") lately (though my daily profit records indicate that it may have done so sporadically, and it certainly has done in previous versions). It gets to mallselling, then stops. Calling the script manually seems to work perfectly (though that could be because it only works on a second running?) Running the latest daily build etcetera etcetera.
Code:
Total sale price = 55,611
Transferring items to store (request 1 of 3)...
Items offered up for sale.
Transferring items to store (request 2 of 3)...
_version_BaleOCDrelay => 1.25
Items offered up for sale.
Transferring items to store (request 3 of 3)...
Items offered up for sale.
Unexpected error, debug log printed.

EDIT: Oh and if the debug log'd help let me know.
 
Last edited:

Bale

Minion
I wouldn't know how to read the debug log, but maybe someone else could decipher it for me if you posted it here.

I've never called it from another script using cli_execute. I call it from another script using import. That's a much saner way to do things. Please check main() for how to call it. The boolean parameter informs the script if it should stop execution if it finds unknown items. (Sometimes it's nice to know that there won't be any prompts to halt execution.)
 
Last edited:

Banana Lord

Member
A quick tutorial (or a helpful link) on using import properly would be like an early Christmas present :D

Remind me, is there some dire warning about not posting debug logs publicly because it contains your password hash? Or is that something else? I just get a weird tickling at the back of my skull when I go to upload one.
 

Veracity

Developer
Staff member
Your password hash is only valid for a particular session; it is different every time you log in. It cannot be back-engineered to find your password.

In other words, it's not a problem if your log contains it.
 

Bale

Minion
A quick tutorial (or a helpful link) on using import properly would be like an early Christmas present :D

As always I am glad to refer people to the KoLmafia wiki: import

Here's some information specific to using it with this script. At the top of your script you use the line

PHP:
import "OCD Inventory Control.ash";

Where you want to use the script, you invoke it with

PHP:
ocd_control(true);

Or if you want to ensure that it will execute without a troublesome confirmation prompt upon finding unknown inventory:

PHP:
ocd_control(false);
 
Top