OCD Inventory control

I found something that might have caused that which I changed in the last update. Ooops. Technically, the bug is in my item stocking code, but the change I made exposed that bug. I just figured that it would be easier for me to revert the change and see if that fixes things. If so, I'll make the better change later.

If I'm correct, you might have to fix the corrupted data. After updating to the latest version. Please let me know how it works out.
 
What a troublesome issue. I changed something for purely aesthetic reasons without giving it due consideration.

Sorry about that.
 
Any chance you can change it back so that hitting enter in a field when adding new items to the data-file saves what you've entered so far again? I think it stopped doing this when you added the search box.
 
Any chance you can change it back so that hitting enter in a field when adding new items to the data-file saves what you've entered so far again? I think it stopped doing this when you added the search box.

I'm not doing that. Two reasons:
1) It didn't save if you clicked the "Search" button. Only if you hit enter in a field (such as the search field). It is counter-intuitive that those two things act differently. It's a clear bug.
2) Nobody should ever expect that it would save data because you entered data when there is an explicit save button.

This certainly isn't the first time in the history of computing that someone said, "Please give me back that bug because it is included in my work flow." There's an xkcd based on that concept here. The answer though is not to reintroduce the bug, but to improve your work flow.
 
I think you slightly misunderstand what I am asking for. Before you added the search-field, if you hit enter while in a field - either the one for how many to keep or the one appearing after the item-name, the script saved the data entered so far. This was useful because it saved you from scrolling to the top or bottom of the list in order to find the save-button. I suppose you may consider it a bug, but I wouldn't consider it counterintuitive - when I fill in a form on the net, I do expect it to submit if I hit enter while in a field. A very simple example would be the login-form for the kingdom. I'd say I hit enter after entering my password more often than I actually click the login-button (strictly speaking I log in using mafia, but the principle is sound). Anyway, from the previous discussion in the thread it seems this isn't a very simple thing to fix, and if you also consider it an unwanted feature / bug, then I understand why I can't have my way :) At any rate, thanks a lot for having created this script - I have no idea how I'd have dealt with my inventory without it!
 
I understood that, actually. Once I figured out the cause of the bug in the search form, it was clear to me that it would have the same affect anywhere else that used a text field. I suppose I can see why you might think it makes sense to save after filling in the number of items to keep and hitting enter, but it is definitely not obvious that information I might have entered would be saved if I decide to search again instead of saving.

It is possible to detect when I am currently in a search form and treat it differently... though I don't like when different parts of the same UI behave in different ways. That way likes madness. (Mine, not necessarily anyone else's.) I'd like to do it your way for your sake, but it would be troublesome. The best solution is to delete a line from svn so that it behaves differently for you. I'll look up that line later when I am at home.
 
I guess it's partially like the way some browsers (eg IE) tend to interpret enter as submit, whereas others (eg Firefox) do not.

Depending which you use, hitting enter to save might seem intuitive or not.
 
ereinion, I am home now so that I can look that up.

Before you added the search-field, if you hit enter while in a field - either the one for how many to keep or the one appearing after the item-name, the script saved the data entered so far.

Line 941 says this...
Code:
	page.append("<input type='submit' name='no show' value='donothing' style='position: absolute; left: -9999px'/>");  // Catches enter in a text field without saving

Go to the SVN copy of /relay/relay_OCD_dB_Manager.ash and either delete that line or comment it out. Then in mafia's CLI type svn sync
 
Thanks a lot :) Truly I don't change the setup of OCD's data all that often, so I would have been fine with it staying the way it is too, but I am very grateful for you going out of your way to fix this for me. As for it being a browser specific behavior, I very much doubt that it doesn't happen in FireFox as that is the browser I am normally using.
 
There's a bug in the dB manager script's add page: when you have a stock list configured, it inserts one too many td elements in the add items table, resulting in an extra empty column inbetween the stock count and price. Fix is:

Index: relay/relay_OCD_dB_Manager.ash
===================================================================
--- relay/relay_OCD_dB_Manager.ash (revision 36)
+++ relay/relay_OCD_dB_Manager.ash (working copy)
@@ -457,7 +457,7 @@
page.append("<td align=center>");
if(stock contains doodad) page.append(stock[doodad].q);
else page.append("0");
- page.append("</td><td align=center>");
+ page.append("</td>");
}
page.append("<td align=right>");
if(historical_price(doodad) > 0)
 
Just wanted to check in before I do anything I might regret: is there anything actually dangerous about running this script in ronin/hardcore, or is that just a safeguard to stop people accidentally getting rid of items that may be difficult to acquire in-run? Because I'm not particularly concerned about speed, but I do like having a clean inventory. If it's just a check, then I assume I can safely comment out that bit, correct?
 
just a safeguard to stop people accidentally getting rid of items that may be difficult to acquire in-run

This.

It's just because I personally did not want to risk getting rid of stuff before breaking the prism. If you want to comment that out it will be quite safe. Just make sure you don't have it set to mall stuff you'll want to help you ascend. Since you cannot mall quest items it cannot stop you from doing anything irreparable.
 
I'm trying to get this to craft a Boris's Key into a Boris's Key Lime.
But once I hit 'save' it seems to want to make a Boris's Key into a "Boris" dropping all the text after the apostrophe.

this also happens with a Jarlsberg's key.

Am I doing something wrong?
 
Am I doing something wrong?

No. I understand the problem. I'll look into how it can handle both double-quotes and single-quotes. In the meantime you can directly edit the correct information into your OCDdata file. Sorry.
 
Hi, Bale.

Can you tell, how does your script count amount of an any item? Because third day in row I have the strange issue:

1. Equip rickety old unicycle (others equip is inaffected - or, at least, I didn't found any other such equip).
2. Use 15 shots of random Deck of every card.
3. OCD thinks that I have _two_ unicycles!

I found it because OCD failed while trying to put this extra unicycle to my DC, and finding nothing, obviously. I cannot see extra false unicycle anywhere in my inventory, and /count return "nothing found", because unicycle is equipped.

Mafia "refresh session" fixing the issue.
 
No. I understand the problem. I'll look into how it can handle both double-quotes and single-quotes. In the meantime you can directly edit the correct information into your OCDdata file. Sorry.

Update on this: the relay script works in Chrome, but this behaviour is happening in Microsoft Edge.
 
Oy. So... Well, I'm glad that it was working on browsers that I thought it should work for. I've got no idea how/why Edge would be different and my cute Windows XP machine cannot test in Edge anyway.


Can you tell, how does your script count amount of an any item? Because third day in row I have the strange issue:

1. Equip rickety old unicycle (others equip is inaffected - or, at least, I didn't found any other such equip).
2. Use 15 shots of random Deck of every card.
3. OCD thinks that I have _two_ unicycles!

I found it because OCD failed while trying to put this extra unicycle to my DC, and finding nothing, obviously. I cannot see extra false unicycle anywhere in my inventory, and /count return "nothing found", because unicycle is equipped.

Mafia "refresh session" fixing the issue.

My script counts what Mafia tells it. That is why refreshing the inventory fixed the problem. There might be some mafia issue that caused the miscount. I've got no idea what you got from the deck or why mafia was misled into believing that you got a rickety old unicycle. Perhaps a session log could shed some light on this quirk.
 
Back
Top