Quality squelching
Collapse
X
-
Incidentally, I don't agree with default-squelching bad items, for one main reason: new players should discover squelching when they discover the 'k' command, not when they first identify a bad item and have it apparently irretrievably disappear.Comment
-
This is a fair point. I await takkaria's view."Been away so long I hardly knew the place, gee it's good to be back home" - The BeatlesComment
-
(1) Somehow the number of squelch qualities saved is not the same as the number loaded. In that case, the squelch code resets to nothing.
(2) Something is overwriting memory with zeros, and the overflow goes into the squelch array.Comment
-
Comment
-
I did a little debugging, and I think I've found the problem. I put in a debug message to show the value of squelch_size when saving the game, and for me, that came out to be 0. It's supposed to be the number of entries in the squelch menu. In line 102 of squelch.c, squelch_size is set to be TYPE_MAX, which is defined in squelch.h. For some reason, that seems to be silently converted to 0 on some platforms -- maybe there's some unintentional type conversion somewhere?Comment
-
I did a little debugging, and I think I've found the problem. I put in a debug message to show the value of squelch_size when saving the game, and for me, that came out to be 0. It's supposed to be the number of entries in the squelch menu. In line 102 of squelch.c, squelch_size is set to be TYPE_MAX, which is defined in squelch.h. For some reason, that seems to be silently converted to 0 on some platforms -- maybe there's some unintentional type conversion somewhere?Comment
-
I did a little debugging, and I think I've found the problem. I put in a debug message to show the value of squelch_size when saving the game, and for me, that came out to be 0. It's supposed to be the number of entries in the squelch menu. In line 102 of squelch.c, squelch_size is set to be TYPE_MAX, which is defined in squelch.h. For some reason, that seems to be silently converted to 0 on some platforms -- maybe there's some unintentional type conversion somewhere?
This is yet another bug caused by copying data. I am a true believer in organizing code according to data, and it turns out that I submitted a fix years ago when I moved the code saving/loading the squelch table into squelch.c in part to eliminate the need for the variable squelch_size, but the heretics on the dev team follow some other religion.Comment
-
The declaration of squelch_size in squelch.h is a variable definition rather than an extern. Thus, it creates a new variable initialized to 0 in each file that #includes squelch.h. Change const size_t squelch_size; to extern const size_t squelch_size; and I bet the problem will be fixed. Give it a try.Comment
-
I suggest a tweak on the default values for squelch.
Armours should not default to squelch bad.
When your worn armour gets damaged by acid it's set as squelch. No big problem so far. But when you start IDing new eq by wearing it you drop your damaged armour, and if your new armour is worse (e.g. you had on a 7,-1; you ID a 2, +1) you have to go through a whole little process to get that armour back. And the gain of starting of with all set to bad is quite negligible to start with. This only applies to armour though, so other items could still be set to squelch bad.Comment
-
I said in another thread that starting with squelch = bad is problematic to begin with. We don't want newbies to ID bad items and then have them suddenly and apparently irrevocably disappear from their inventories. Let them learn about squelch via the 'k' menu first.Comment
-
I think Magnate agreed that people should not start with squelch = badComment
-
Comment
Comment