OCD Inventory control

Lxndr

Member
For some reason, running OCD Inventory Control.ash, in the GCLI it starts with:

autoSatisfyWithCloset => false

and ends with:

autoSatisfyWithCloset => true

---

This MIGHT be why it's ignoring the contents of my closet?
 

Bale

Minion
It isn't supposed to ignore the contents of your closet. It still counts what is there against your total items, but it is supposed to never take anything out of your closet. Temporarily turning off autoSatisfyWithCloset is the only way I could find to ensure that it didn't remove anything from your closet by accident. (There were issues due to stuff like using retrieve_item() to get familiar items off of unequipped familiars.)

I've got that inside a try-finally block to ensure that it will always restore the previous setting, even if you abort.
 

Lxndr

Member
Okay... so in order to get it working the way I hope it will, I've got to empty my closet before running the script. Got it.
 

Lxndr

Member
Alrighty, now that I've solved that problem now it's acting in a strange way. I have Wet Stew set up to mall all (keep is set to 0), but it continually closets the one I have.
 

Bale

Minion
Okay... so in order to get it working the way I hope it will, I've got to empty my closet before running the script. Got it.

That's not even slightly what I said.


Alrighty, now that I've solved that problem now it's acting in a strange way. I have Wet Stew set up to mall all (keep is set to 0), but it continually closets the one I have.

I can't say that I really remember how it works anymore, but I think you might be using the stock feature?
 

Lxndr

Member
That's not even slightly what I said.

You said it would never take anything out of my closet. Since I had 2 replica batoomerangs (And wanted to keep 1 and display any others that I happened to have around). At current behaviour, it wouldn't display either the one in my closet, or in my inventory. I'm assuming the one in inventory wasn't displayed because "Keep 1" was invoked, but it also kept the Closet one because it won't empty the closet.

So... as far as I can tell, the only way for me to make the script AS IS work as I wanted it to work (i.e. treat the inventory and the closet as one unit and automatically satisfy any of my desires by using the closet) was to empty the closet before running the script (since you turn off autoSatisfyWithCloset by default).

Maybe I missed something?


I can't say that I really remember how it works anymore, but I think you might be using the stock feature?

Yeah, wet stew was set to stock 1. But tons of other things on the stock list weren't auto-closeted. So, I was confused for a while. Some testing and I determined that if there's a number in "Keep" that's equal to the number in "stock this many" it won't closet the number of things marked 'keep.' (so if keep is 0, it closets EVERYTHING that's supposed to be stocked, but if keep is 1, it keeps one and closets the rest).
 

Lxndr

Member
Code:
You cannot transform a Sneaky Pete's key into a Sneaky Pete. There's a problem with your data file or your crafting ability.

I think I remember posting about this problem maybe a year or so ago.

I want to create a Sneaky Pete's key lime pie, but when I type in that I want to create a Sneaky Pete's key lime pie in the relay browser, it drops everything after the '. So it thinks I want to make a Sneaky Pete.

Doing some digging, apparently I discovered last time that it seems to only do this in Microsoft Edge. If I use any other browser, it works.

Unfortunately, if I set my default browser to be Chrome, mafia doesn't launch it. I know this is a quirk about my computer, but I'm sort of limited to Edge for Mafia (and it's not so bad except this one bit).
 

Bale

Minion
I know I haven't responded much lately. I'm currently in the middle of moving so it just hasn't been possible for me. I will eventually try to replicate that batoomerang problem of yours. Probably next week some time,
 

Bale

Minion
Here's the circumstances:

Code:
[8829]replica bat-oomerang	DISP	1

Now in theory this should KEEP one bat-oomerang in my inventory and display any others.

But it left the one that was gifted to me today (and was subsequently put in hangk's, and when hangk's was emptied, was put in the closet), so I wound up with one in my inventory and one in my closet.

The expected behaviour (for me) was to just put the one in the closet into my display case. And keep the one in my inventory.

But now, I've ascended and there's 2 replica bat-oomerangs in Hangk's.

I'll admit, I have no idea what marking the closet as auto-satisfy is, or where to go to set it. but a prefref 'closet' tells me that autoSatisfyWithCloset is set to true but has a default of false.

I hope that helps.

I'm sorry I took so long to get around to this. Honestly at first I completely misunderstood your problem. Then... well, it isn't important. I'm sorry despite my time management issues that it took so long for me to figure out what the problem really was.

The script is behaving as expected. I'm afraid that your solution (empty your closet) is actually the correct solution. You see, if you tell it to keep one of an item and you have one in your closet, then it is the correct behavior to count the one in your closet as the item that the script will keep. Keeping one item in the closet and one item in inventory is counted as keeping two items.
 

Lxndr

Member
Too bad. I already wrote a script called "ocdi" to empty my closet, run your script, and re-closet the things I wanted re-closeted.

I was hoping that said script would be unnecessary, but clearly it wasn't.
 
Would it be possible to modify this to multi-smash barrels to save on server hits, or would it be better to just write up a pre-script that does that and then calls this one?
 

lostcalpolydude

Developer
Staff member
Would it be possible to modify this to multi-smash barrels to save on server hits, or would it be better to just write up a pre-script that does that and then calls this one?

Code:
int barrelcount()
{
	int count = 0;
	for x from 8568 to 8577
	{
		count += item_amount( to_item( x ) );
	}
	return count;
}

for x from 8568 to 8577
{
	if ( item_amount( to_item( x ) ) > 0 )
	{
		visit_url( "inv_use.php?pwd&whichitem=" + x + "&choice=1" );
		break;
	}
}

while ( barrelcount() > 0 ) 
{
	run_choice( 2 );
}
There's probably room for improvement, but that's what I use. (I don't use OCD though.)
 

Bale

Minion
I have them all automatically opened by my postAdentureScript so that their contents will always be available for me in run. A barrel cracker really saved me a few turns against a sleazy crowd of adventurers a few days ago so I'm glad it wasn't inside a barrel where the maximizer couldn't have found it.

PHP:
	// Barrels from the barrel god
	if(get_property("barrelShrineUnlocked") == "true")
		for x from 8568 to 8577
			if(item_amount(to_item(x)) > 0 && be_good(to_item(x)))
				use(item_amount(to_item(x)), to_item(x));
 

ahhuatl

New member
Hi - I tried to use this script but I immediately got this message:

All item information is corrupted or missing. Whoooah! I hope you didn't lose any data...

Not sure what I missing here....
 

Bale

Minion
Not missing anything. If you've never run the script before, then you should comfortably know that the information is missing. It's missing because you never had any.

Start entering item information.
 

Valliant

Member
Hi - I tried to use this script but I immediately got this message:



Not sure what I missing here....

I had the same issue despite having categorized everything. "Your entire inventory has already been categorized.
Nothing to see here, please move along."

Additionally, despite editing the stock list a couple times, each time I save it, the list vanishes. But when I click to get the new default list, it comes back, with all my edits.
 
Last edited:

Magus_Prime

Well-known member
With r17536 I got a debug log when trying to run the script. I posted the debug log in the Bugs thread.

Code:
Multiple matches for "rock"; using "[8042]rock". (relay_OCD_dB_Manager.ash, line 268) Clarify by using one of:
"[2108]rock"
"[8042]rock"
Multiple matches for "rock"; using "[8042]rock". (relay_OCD_dB_Manager.ash, line 268) Clarify by using one of:
"[2108]rock"
"[8042]rock"
Multiple matches for "rock"; using "[8042]rock". (relay_OCD_dB_Manager.ash, line 268) Clarify by using one of:
"[2108]rock"
"[8042]rock"
Multiple matches for "rock"; using "[8042]rock". (relay_OCD_dB_Manager.ash, line 268) Clarify by using one of:
"[2108]rock"
"[8042]rock"
Multiple matches for "rock"; using "[8042]rock". (relay_OCD_dB_Manager.ash, line 268) Clarify by using one of:
"[2108]rock"
"[8042]rock"
Multiple matches for "rock"; using "[8042]rock". (relay_OCD_dB_Manager.ash, line 268) Clarify by using one of:
"[2108]rock"
"[8042]rock"
Unexpected error, debug log printed.
Script execution aborted (java.lang.NullPointerException): (relay_OCD_dB_Manager.ash, line 392)
 
Last edited:
Top