OCD Inventory control

Aye, that is the best way to see what it does, I was just suggesting that that be added to the first post. (I would have seen that screen already, but it glitched when I tried to run the script on my laptop, so I'll do some troubleshooting later.)

Edit: Or, since there's an image limit per post, links to those two posts. That'd work too.
 
Last edited:
Glancing at this thread, it looks like this script will be incredibly useful. However, without actually reading the entire thread (it is 24 pages long), I'm not 100% sure of what the features are.

Now, I did download it and plan to use it, and in said use I'm sure that I'll find out what the features are, but it might be useful to have, in the first post, a list of the features that is edited as the features are edited.

Also, does the script check for updates automatically? 'cause people (like me) who probably won't be obsessively checking this thread could very well miss an update (or two or ten). If it does, awesome, but that'd be one of the benefits of the feature list in the first post, I'd not have to dig through 24 pages of thread to find the answer.
It is impossible for a script file to auto update its own script file but it can check for updates. Other then that not being able to auto update. there is one part of the script that is always possible to auto update and that would be its data files. the databases like structured files on all info about game and such or even just settings...

Auto Update Data topic

It may be possible and i don't know so don't just take my word on it... I am not entirely 100% sure

That would be interesting for you to look at if you want auto update files..
 
Okay, so, I got it working. Kinda. As in, I'm not getting errors, not as in actually working.

So the inventory control says "Don't run this until you break the prism", like it should. And zlib is working now (I'm not getting an annoying error about a desert bus pass), but the relay script doesn't do anything. Not a single sole "Hi!" or anything.

Now, since I've never run the script before, is it looking for something that hasn't been created? That's my only guess, but something's obviously not quite working. I'd look at the .ash, but I've never done anything with .ash files ever before, so that probably wouldn't help much.
 

Bale

Minion
I suspect your problem is one of these two steps:

  • Download relay_OCD_dB_Manager to your /relay directory.
  • Invoke OCD dB Manager from your relay browser's top menu.

A relay script is called from within the relay browser and needs to be in the /relay directory.
 
Last edited:
I suspect your problem is one of these two steps:



A relay script is called from within the relay browser and needs to be in the /relay directory.

Oh, wow. I'm blind, sorry. And normally I'm one of the *good* people when it comes to reading instructions...
 

lostcalpolydude

Developer
Staff member
I just grabbed this script and decided to start categorizing some stuff that's in my inventory mid-run. I got to yeti fur, which I would normally convert to hippopotamus skins before autoselling (to go from 92 to 98 meat each). I realize it's a special case that might not fit in well with everything else, but hopefully someone has an elegant idea for how to add it.
 

slyz

Developer
I spend a few hours classifying things in my inventory yesterday, using a mix of personal preferences and PriceAdvisor advices. I'll finally be using this script regularly - and I wanted to join the chorus of grateful users.

My store is now loaded with items (some of which I never even heard about - damn you, Heap diving), and I was generally satisfied with OCD using mall_price() for pricing items.

To help out people who, like me, have 1000+ unclassified items in their inventory, I'm posting the result of my classification. I'll let people find the best way to merge my data with theirs, and advise them to carefully go over every entry to check for things they would have done differently.

I think there were a couple of special cases, specifically items that have to be multi-used to yield something useful (duct tape, mummy wrappings...). I'll leave it up to Bale if he wants to play around with the script some more to account for those.

EDIT: updated 4/4/11
 

Attachments

  • OCDdata_slyz.txt
    51.7 KB · Views: 252
Last edited:

Bale

Minion
I think there were a couple of special cases, specifically items that have to be multi-used to yield something useful (duct tape, mummy wrappings...). I'll leave it up to Bale if he wants to play around with the script some more to account for those.

Multi-use items have already been dealt with. Put those on the create tab and say what you want the item to be turned into. Not the use tab.
 

nymall

New member
This script is by far the most awesome and usefull thing I have come across since I discovered both mafia's "tower to shadow" and the "win game" cli command. Great job!
 

Winterbay

Active member
I'm in the process of adding my items to the database (which will take a while) however when I came to the "filet of tangy gnat ("fotelif")" I decided I wanted that turned into "gnatloaf casserole" but the drop down does not allow "craft into a" as an option. Anything that cna be done about that?
 

slyz

Developer
In concoctions.txt:
Code:
gnatloaf	COOK	[2528]	ancient spice

Apparently the "filet of tangy gnat ("fotelif")" is the only exception (aside from the "[0]" item, which must mean $item[ none ]). This results in crafty[ $item[ gnatloaf ] ].mix1 being $item[ none ].

I don't see any way to fix this in a generic way, apart from importing concoctions.txt in a record of strings, stripping '[' and ']', and using to_item() on all the values. A simpler (but which might need maintenance) solution, is to add this line after line 35:
PHP:
crafty[ $item[ gnatloaf ] ].mix1 = to_item(2528);
 

Bale

Minion
I suppose you cannot be terribly surprised that fotelif is a special case with those quotes in its name. Ick.

I figured out how to handle it in a generic way (despite slyz's statement to the contrary - I already needed string handling due to multi-use items like duct tape) and updated the relay script in the first post. Now you should be able to make as much gnatloaf casserole as you like.
 
Last edited:

slyz

Developer
Now I'm surprised that doing item_name(value.mix1) worked when value.mix1 was an item, since item_name() was defined as:
PHP:
item item_name(string doodad)

Apparently, defining a function that accepts strings is a way to make a generic function for all data types:
PHP:
string test( string input )
{
	return input;
}

boolean bol = true;
print( test( bol ) );
int i = 1;
print( test( i ) );
float flt = 1.5;
print( test( flt ) );
string str = "test string";
print( test( str ) );
buffer buf; buf.append( "test buffer" );
print( test( buf ) );
string[string] agg; agg["key"] = "value";
print( test( agg ) );
record test_rec{ string str; int i;}; test_rec rec; rec.str = "record string"; rec.i = 2;
print( test( rec ) );
print( test( $class[ Pastamancer ] ) );
print( test( $effect[ Empathy ] ) );
print( test( $element[ cold ] ) );
print( test( $familiar[ grue ] ) );
print( test( $item[ spices ] ) );
print( test( $location[ Spooky Forest ] ) );
print( test( $monster[ Triffid ] ) );
print( test( $skill[ pastamastery ] ) );
print( test( $slot[ hat ] ) );
print( test( $stat[ moxie ] ) );
gives:
Code:
> call test.ash

true
1
1.5
test string
test buffer
aggregate string [string]
record test_rec
Pastamancer
Empathy
cold
Grue
spices
Spooky Forest
Triffid
Pastamastery
hat
Moxie

Is this just me re-discovering fire? I guess this is why you can use print() on anything, but I assumed something was happening in print() and wouldn't work for any function taking a string as input.
 
Last edited:
Bale, I've come across a bug. When trying to set the mall pricing to 999,999,999 meat, it doesn't save that setting the next time I enter the configure script tab. When running the script it does the auto pricing no matter what I choose in the settings.

But it's an awesome script. I love it. It's made me get rid of all my spreadsheets I've previously used to organize my inventory. I'm about 40% the way through my 2000 items, but it's already got me over 1.5 million in autosells that i never thought about autoselling until the script made me categorize these worthless things.
 

Alhifar

Member
Is this just me re-discovering fire? I guess this is why you can use print() on anything, but I assumed something was happening in print() and wouldn't work for any function taking a string as input.

All functions in ash that accept strings seem to implicitly convert to strings.
 
Top