Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Vanilla (http://angband.oook.cz/forum/forumdisplay.php?f=3)
-   -   5 May 2011 development release(s) (http://angband.oook.cz/forum/showthread.php?t=4416)

takkaria May 19, 2011 03:27

Quote:

Originally Posted by Max Stats (Post 53030)
I have hard-coded some squelch settings into my copy of the game, so that items that I think are always useless are pre-squelched to save myself the trouble. Because of this, I have several items that are squelched before they are identified. I had an unidentified rod in my inventory, and I used the ignore command on it. My choices were:

a) This item only
b) Unignore all Iron Rod

I suspected that this meant that this was one of the rods I had "pre-squelched" so I identified it, and sure enough it was. So if you try to ignore an unidentified item that would be squelched if it were identified, you get tipped off that it is an item in your squelch list.

A very patient player could ID an item for free (assuming it had been seen in previous games to show up in the squelch list) by squelching items of the same kind, ignoring the unknown item (but aborting the command), then refining the squelch list and repeating until the item is isolated. It's not a major exploit, because it requires a lot of work for a pretty minor gain.

Hmm, did you hardcode this in the pref files or in the source code?

Max Stats May 19, 2011 20:28

Quote:

Originally Posted by takkaria (Post 53049)
Hmm, did you hardcode this in the pref files or in the source code?

I did it in the source code, as described here (I think the function names have changed since I wrote this post). Is it possible to do it in the pref files? That would probably be a better solution, since I wouldn't have to keep reinserting the code every time I update to a new version.

Spacebux May 20, 2011 22:52

Separate Squelch Issue
 
I noticed no longer is one able to say kill a certain # of a specific item from inventory or quiver. However, if you tried to say, drop x items from a stack of y in one of your slots, then kill that item on the ground, it actually does not destroy those items just dropped.

The kill code was working fine in 3.2.0, I thought... I know you guys are working hard on revamping the item-handling code, but this current revision of kill/squelch is a bit spotty.

I like the work and effort being done to increase usability of item squelch in the vanilla code, but at times it seems like for all the effort you are putting into the project, its coming out as a less useful solution to what already exists. (***Please, I'm trying to be tender here!***)

If you can cinch up the 'k'ill code a tad more, then you will have improved on the older 3.2.0 system.

-SBux-

Magnate May 21, 2011 10:55

Quote:

Originally Posted by Spacebux (Post 53128)
I noticed no longer is one able to say kill a certain # of a specific item from inventory or quiver. However, if you tried to say, drop x items from a stack of y in one of your slots, then kill that item on the ground, it actually does not destroy those items just dropped.

The kill code was working fine in 3.2.0, I thought... I know you guys are working hard on revamping the item-handling code, but this current revision of kill/squelch is a bit spotty.

I like the work and effort being done to increase usability of item squelch in the vanilla code, but at times it seems like for all the effort you are putting into the project, its coming out as a less useful solution to what already exists. (***Please, I'm trying to be tender here!***)

If you can cinch up the 'k'ill code a tad more, then you will have improved on the older 3.2.0 system.

-SBux-

I'm pretty sure this has been mentioned before, but just for clarity: we're trying to move from a system where items can actually be destroyed to one where they are actually just hidden from view (squelched). The current system has more or less moved to this new paradigm, but one of the wrinkles yet to be ironed out is that you can't squelch part of a stack, whereas you could previously destroy part of a stack. This will of course be sorted out eventually.

Spacebux May 23, 2011 16:43

Quote:

Originally Posted by Spacebux (Post 52851)
Fixed. This fixes crashes from eating a stack of food off the floor, quaffing potions off the floor, and reading scrolls off the floor when pressing 'n' or CTRL-V when the item count reaches 0.


In cmd-obj.c, insert:
void do_cmd_use(cmd_code code, cmd_arg args[])
{
int item = args[0].item;
object_type *o_ptr = object_from_item_idx(item);
int effect;

if (!item_is_available(item, NULL, (USE_INVEN | USE_FLOOR | USE_EQUIP))) {
msg("That item is not within your reach.");
return;
}

bool ident = FALSE, used = FALSE;
bool was_aware = object_flavor_is_aware(o_ptr);
int dir = 5;

Maybe that is not the best place for it, but that check prevents the code from going further, generating segmentation faults and worse.

-SBux-

Update:
My artifacts were no longer activatable...

I modified my code above to included the USE_EQUIP flag check. My items are activatable again.

-SBux-


All times are GMT +1. The time now is 23:28.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.