Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Autodestroy update

9 views
Skip to first unread message

David T. Blackston

unread,
Mar 9, 2000, 3:00:00 AM3/9/00
to

Hi all,

Just a couple of addenda to my previous posting. I was able
to incorporate my changes into Zang2.2.8 and there were almost
no differences than the changes to Zang2.2.2d. These differences
are documented in

http://www.cs.berkeley.edu/~davidb/angband/SQUELCH.TXT

I also have uploaded an executable that contains these changes.
This executable is based on Zang2.2.8 and is for DOS. This
can be found at

http://www.cs.berkeley.edu/~davidb/angband/zang-squ.exe

Feel free to give this a try. It shouldn't affect your
save files at all though any changes made in the squelch menus
will be lost if the normal zangband executable is run with
the savefile generated by zang-squ.

Please let me know if you find any bugs -- I'm sure there are
probably still some in there someplace -- or if you have any other
feedback.

Regards,

Dave

Ed Cogburn

unread,
Mar 9, 2000, 3:00:00 AM3/9/00
to


Good stuff. I haven't tried it, just looked thru it. Using the bit
flag in the byte holding "aware" and "tried", thus avoiding changing
the savefile format was slick, I wish I had seen that.
Your avoiding the quality (great/good/normal) issue with
weapons/armor is understandable. Its a difficult problem. Avoiding
it though means players, at least early on, won't be able to risk
squelching anything for risk of squelching an ego item for example.
They may never squelch any boots due to the risk of squelching a speed
item. Like I said its a difficult problem.
My only question is about the change in get_obj_num(). It doesn't
look like you're checking whether the player is already "aware" of the
item (He knows the "silver wand" is a "Wand Of Death")? Don't you
need to check k_ptr->aware too? Am I reading this wrong? (It
wouldn't be the first time. (-: )


--
"It is dangerous to be right when the government is wrong." - Voltaire

Ed C.


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----

David T. Blackston

unread,
Mar 9, 2000, 3:00:00 AM3/9/00
to
In article <38C73D7E...@greene.xtn.net>,

Ed Cogburn <ecog...@greene.xtn.net> wrote:
>"David T. Blackston" wrote:
>>
>> Hi all,
>>
>> Just a couple of addenda to my previous posting. I was able
>> to incorporate my changes into Zang2.2.8 and there were almost
>> no differences than the changes to Zang2.2.2d. These differences
>> are documented in
>>
>> http://www.cs.berkeley.edu/~davidb/angband/SQUELCH.TXT
>>
>> I also have uploaded an executable that contains these changes.
>> This executable is based on Zang2.2.8 and is for DOS. This
>> can be found at
>>
>> http://www.cs.berkeley.edu/~davidb/angband/zang-squ.exe
>>
>> Feel free to give this a try. It shouldn't affect your
>> save files at all though any changes made in the squelch menus
>> will be lost if the normal zangband executable is run with
>> the savefile generated by zang-squ.
>>
>> Please let me know if you find any bugs -- I'm sure there are
>> probably still some in there someplace -- or if you have any other
>> feedback.
>
>
> Good stuff. I haven't tried it, just looked thru it. Using the bit
>flag in the byte holding "aware" and "tried", thus avoiding changing
>the savefile format was slick, I wish I had seen that.

Thanks. I happened to be glancing through types.h at the
right time and saw the tried flag. Once I figured out how
and where that was stored, the rest followed.

> Your avoiding the quality (great/good/normal) issue with
>weapons/armor is understandable. Its a difficult problem. Avoiding
>it though means players, at least early on, won't be able to risk
>squelching anything for risk of squelching an ego item for example.
>They may never squelch any boots due to the risk of squelching a speed
>item. Like I said its a difficult problem.

I avoided squelching on quality for two reasons. First, I thought that
it could lead to balance issues. Also, as currently implemented
the objects that are squelched are the objects that would simply
be destroy (or ignored) anyway, so there is no real effect on the
gameplay.

The second reason is that it would be messy to code. ;-)

> My only question is about the change in get_obj_num(). It doesn't
>look like you're checking whether the player is already "aware" of the
>item (He knows the "silver wand" is a "Wand Of Death")? Don't you
>need to check k_ptr->aware too? Am I reading this wrong? (It
>wouldn't be the first time. (-: )

This is taken care of in squelch.c -- a player can toggle the
squelch boolean only if he/she is already aware of the item.

James W Sager Iii

unread,
Mar 11, 2000, 3:00:00 AM3/11/00
to
Does squelching a sword prevent an artifact sword from spawning of its type?


David T. Blackston

unread,
Mar 11, 2000, 3:00:00 AM3/11/00
to
In article <0smaqPq00...@andrew.cmu.edu>,

James W Sager Iii <sag...@andrew.cmu.edu> wrote:
>Does squelching a sword prevent an artifact sword from spawning of its type?
>


The current version of this code will squelch the item type before it
is even tested for being an artifact, so it will in effect squelch
artifacts of types that have been squelched.

I can see how to fix this -- it involves removing my change from
get_obj_num() and adding a test at the end of make_object() -- but
I'm not sure what the "right" thing to do here is. Making a change like
this could certainly affect balance in that the player will know
that certain items, if found, are automatically artifacts. I'd be
intersted in hearing other opinions on what is the right thing to do here.

Regards,

Dave


Ed Cogburn

unread,
Mar 12, 2000, 3:00:00 AM3/12/00
to
"David T. Blackston" wrote:
>
> In article <0smaqPq00...@andrew.cmu.edu>,
> James W Sager Iii <sag...@andrew.cmu.edu> wrote:
> >Does squelching a sword prevent an artifact sword from spawning of its type?
> >
>
> The current version of this code will squelch the item type before it
> is even tested for being an artifact, so it will in effect squelch
> artifacts of types that have been squelched.
>
> I can see how to fix this -- it involves removing my change from
> get_obj_num() and adding a test at the end of make_object() -- but


make_object() is where I hooked it.


> I'm not sure what the "right" thing to do here is. Making a change like
> this could certainly affect balance in that the player will know
> that certain items, if found, are automatically artifacts. I'd be
> intersted in hearing other opinions on what is the right thing to do here.


You aren't squelching based on the item's quality, correct, just
going by the flag in kind info, right? Without supporting squelching
by quality, you can't get around this problem, because to do this
requires an ID function, whether the ID spell or pseudo-ID. That's
your dilemma when it comes to weapons/armor. Either deal with the
quality issue in some way that is acceptable, or squelch everything of
that kind, which will obviously mean nobody will squelch
weapons/armor.

Cody Hatch

unread,
Mar 12, 2000, 3:00:00 AM3/12/00
to
David T. Blackston sneezed, and the green bits that splattered on
rec.games.roguelike.angband said:

>In article <0smaqPq00...@andrew.cmu.edu>,
>James W Sager Iii <sag...@andrew.cmu.edu> wrote:
>>Does squelching a sword prevent an artifact sword from spawning of its
>>type?
>>
>
>
>The current version of this code will squelch the item type before it
>is even tested for being an artifact, so it will in effect squelch
>artifacts of types that have been squelched.
>
>I can see how to fix this -- it involves removing my change from
>get_obj_num() and adding a test at the end of make_object() -- but

>I'm not sure what the "right" thing to do here is. Making a change like
>this could certainly affect balance in that the player will know
>that certain items, if found, are automatically artifacts. I'd be
>intersted in hearing other opinions on what is the right thing to do
>here.

I think it's okay. After all, if the player tries to destroy every sword
he finds as soon as he finds it, he'll know that any sword that sticks
around is an artifact. Same thing here. Now, if you had an option that
wouldn't squelch ego-items, say, then you'd have a problem, since there is
some free ID-ing going on that couldn't be replicated without the squelch
option.

Cody

James W Sager Iii

unread,
Mar 12, 2000, 3:00:00 AM3/12/00
to
Excerpts from netnews.rec.games.roguelike.angband: 11-Mar-100 Re:
Autodestroy update by David T. Blackston@melod
> In article <0smaqPq00...@andrew.cmu.edu>,
> James W Sager Iii <sag...@andrew.cmu.edu> wrote:
> >Does squelching a sword prevent an artifact sword from spawning of its type?
> >
>
>
> The current version of this code will squelch the item type before it
> is even tested for being an artifact, so it will in effect squelch
> artifacts of types that have been squelched.
>
> I can see how to fix this -- it involves removing my change from
> get_obj_num() and adding a test at the end of make_object() -- but
> I'm not sure what the "right" thing to do here is. Making a change like
> this could certainly affect balance in that the player will know
> that certain items, if found, are automatically artifacts. I'd be
> intersted in hearing other opinions on what is the right thing to do here.
>
> Regards,
>
> Dave


Oh yeah, this is true...
I keep forgetting the implications of squelch on create as opposed to
squelch on id.

I advocated squelch on id.

IE some cases:
You psuedo-detect the sword is cursed in your pack.(auto destroy here)
You quaff a potion of sleep. (you destroy the rest in your pack)
You see a broken stick(never generated or destroyed at some point)
You detect the scroll on the ground to be a scroll of darkness(destroy
on ground)

Maybe you want to incorporate destruction upon detection cases, but
you'd need a couple more interface sites with the main code...

Julian Lighton

unread,
Mar 14, 2000, 3:00:00 AM3/14/00
to
In article <8adt8p$r76$1...@agate.berkeley.edu>,

David T. Blackston <dav...@melody.CS.Berkeley.EDU> wrote:
>In article <0smaqPq00...@andrew.cmu.edu>,
>James W Sager Iii <sag...@andrew.cmu.edu> wrote:
>>Does squelching a sword prevent an artifact sword from spawning of its type?
>
>The current version of this code will squelch the item type before it
>is even tested for being an artifact, so it will in effect squelch
>artifacts of types that have been squelched.
>
>I can see how to fix this -- it involves removing my change from
>get_obj_num() and adding a test at the end of make_object() -- but
>I'm not sure what the "right" thing to do here is.

I would have hooked it into floor_carry, myself, but that doesn't mean
it's right. (Your method will stop squelched items from showing in
the black market, which will fill it up with un-squelched stuff.
(It'll also make the game loop forever updating the BM if some
perverse weirdo squelches everything.)

(This assumes that you're having get_obj_num() fail if it wants to
make a squelched item. I also wouldn't actually trust the game to
handle failure gracefully everywhere. Ignore me on this if you're
doing something different.)

Hooking it into floor_carry would mean that squelched artifacts would
be marked as seen in non-preserve mode, and would be generatable again
in preserve, unless you aded code to deal with artifacts specially.

>Making a change like
>this could certainly affect balance in that the player will know
>that certain items, if found, are automatically artifacts. I'd be
>intersted in hearing other opinions on what is the right thing to do here.

No artifacts should be generated if an item type is squelched. (I
think it's best to think of it as an auto-ignore, rather than a
destroy. So Ringil was there, but you dismissed it as "just another
longsword", not even looking hard enough to see the extra dice embedded
in the hilt.)
--
Julian Lighton jl...@fragment.com
/* You are not expected to understand this. */

David T. Blackston

unread,
Mar 14, 2000, 3:00:00 AM3/14/00
to
In article <8akhjv$m7g$1...@nowhere.fragment.com>,

Julian Lighton <jl...@nowhere.fragment.com> wrote:
>In article <8adt8p$r76$1...@agate.berkeley.edu>,
>David T. Blackston <dav...@melody.CS.Berkeley.EDU> wrote:
>>In article <0smaqPq00...@andrew.cmu.edu>,
>>James W Sager Iii <sag...@andrew.cmu.edu> wrote:
>>>Does squelching a sword prevent an artifact sword from spawning of its type?
>>
>>The current version of this code will squelch the item type before it
>>is even tested for being an artifact, so it will in effect squelch
>>artifacts of types that have been squelched.
>>
>>I can see how to fix this -- it involves removing my change from
>>get_obj_num() and adding a test at the end of make_object() -- but
>>I'm not sure what the "right" thing to do here is.
>
>I would have hooked it into floor_carry, myself, but that doesn't mean
>it's right. (Your method will stop squelched items from showing in
>the black market, which will fill it up with un-squelched stuff.
>(It'll also make the game loop forever updating the BM if some
>perverse weirdo squelches everything.)
>

This has been changed in the most recent version of the code where
I've changed the way in which the user interacts with the menus.
Now the menus show all of the given object type and objects are
squelched only if an item of that type has been identified, ie,
you'll have to identify the first potion of death, but all future
ones will be squelched.

In order to effect this change I had to move the failure flag from
get_obj_num to make_object (and modify a few calls to make_object in the
code). This means that the black market (and all other stores)
will still generate squelched items.

A DOS executable for a version of Zang228 with the squelch menus
included is located at

http://www.cs.berkeley.edu/~davidb/angband/zang-sq-new.exe

>--
>Julian Lighton jl...@fragment.com
>/* You are not expected to understand this. */

Thanks for the feedback!

Dave

0 new messages