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

[Crawl] Miscellaneous patches

209 views
Skip to first unread message

Darshan Shaligram

unread,
Jun 4, 2003, 1:38:11 PM6/4/03
to
A few patches for Crawl beta26:

1. Easier butchering:

The easy_butcher option is great for folks who fight with blunt weapons,
but it still wants you to have your butchering weapon in your swap
slot. Not good if, like me, you like to have a missile launcher in your
swap slot. This patch looks through your whole inventory for a suitable
butchering weapon, freeing the swap weapon slot for nobler purposes:

http://www.angelfire.com/trek/mazewest/crawl/butcher.diff

The patch also checks whether the butchering weapon can be wielded at
all, and whether it can be wielded safely - foo weapons of pain and
distortion are never used for butchering (unless you're wielding them,
of course).


2. (Auto)pickup patches:

This patch is essentially three rolled into one (because separating the
diffs is so tedious). It adds three init.txt options:

a. pickup_dropped: If set to false (it's true by default), objects you
specifically drop will not be subjected to autopickup. Handy when
visiting your stashes.

b. pickup_thrown: If set to true (it's false by default), missile
weapons you throw/fire will be open to autopickup, even if you don't
have ( in your autopickup option. Should be pretty useful for
fighter/hunter types to retrieve fired ammo from the floor.

c. ban_pickup: You can set this option to a list of strings - any item
whose name includes any ban_pickup string will not be subject to
autopickup, even if otherwise eligible. You can use multiple
ban_pickup lines in init.txt

Example:

ban_pickup=decay,degeneration
ban_pickup=curse armour

This patch is here:

http://www.angelfire.com/trek/mazewest/crawl/pickup.diff


3. Friend brand for DOS and Windows

Highlights friendly monsters (really just inverts their display colours)
for DOS and Win32 ports, if friend_brand is set to any legal value in
init.txt.

http://www.angelfire.com/trek/mazewest/crawl/dosbrand.diff


4. Travel command

This patch makes the level map a little more useful - you can move the
cursor to any location and press one of '.', ',' or '_' to travel to
that location. Travel makes your character take the shortest discovered
path to the target location (you can't travel through unexplored
territory), avoiding known traps and hostile terrain (deep water,
lava). Travel stops if you lose hp, see a hostile monster, become
hungry, or teleport.

Areas you can travel to in the level map will be blue (areas you can't
travel to will be the normal dark grey, upstairs have been made
green). You can use '<' and '>' to snap the cursor to stairs, closest
stairs first. Tab jumps between shops and portals, and '^' goes to
traps.

You can set a travel_delay option in your init.txt with the delay
between moves in milliseconds to see the path your character follows
(this doesn't work for platforms where the delay() function is a noop).

The problem with the travel patch is that I used the travel code from
NetHack 3.4.1, so there are licence complications. The Crawl licence
looks incompatible with the NetHack licence, so distributing this patch
may be illegal. Could somebody experienced in these matters confirm
whether or not it's okay to distribute a patch for Crawl with NetHack
code in it?

If distributing this patch is illegal, I'll remove it until I can
rewrite the travel code.

The travel patch is available here:

http://www.angelfire.com/trek/mazewest/crawl/travel.diff

--
Darshan Shaligram dars...@aztec.soft.net

J. Ali Harlow

unread,
Jun 4, 2003, 2:01:37 PM6/4/03
to
Darshan Shaligram <dars...@aztec.soft.net> wrote:

> The problem with the travel patch is that I used the travel code from
> NetHack 3.4.1, so there are licence complications. The Crawl licence
> looks incompatible with the NetHack licence, so distributing this patch
> may be illegal. Could somebody experienced in these matters confirm
> whether or not it's okay to distribute a patch for Crawl with NetHack
> code in it?

[I haven't looked at the Crawl license, but assuming they are incompatible]

First choice would be to ask the NetHack dev-team if they would mind
releasing this part of the NetHack code under the Crawl license.

If that doesn't fly you could try and produce your patch without including
any Crawl code in it so that you can release the patch under the NetHack
license. This would mean that it would be illegal to apply your patch to
Crawl and redistribute the result but okay for end users to apply the
patch and play the resultant game.

If it's hard to produce a patch without including any Crawl code, then
you could ask the Crawl dev-team if they would be happy to release the
part that you have to include under the NetHack license.

IANAL

--
J. Ali Harlow Email: J.A.H...@city.ac.uk
"When I consider your heavens, the work of your fingers, the moon and
the stars, which you have set in place, what is man that you are mindful
of him, the son of man that you care for him?" Psalm 8 v 3-4, NIV.

Arien Malec

unread,
Jun 4, 2003, 3:18:39 PM6/4/03
to
Darshan Shaligram <dars...@aztec.soft.net> wrote in
news:smqpzq...@aztec.soft.net:

[nifty patches]

Any hope of a Win32 compilation?

> The problem with the travel patch is that I used the travel code from
> NetHack 3.4.1, so there are licence complications. The Crawl licence
> looks incompatible with the NetHack licence, so distributing this patch
> may be illegal. Could somebody experienced in these matters confirm
> whether or not it's okay to distribute a patch for Crawl with NetHack
> code in it?

IANAL, but it looks to me as though the Crawl license *is* the NH
license, with Crawl substituted for NH and Linley substituted for Mike.
The only substative change is that the Crawl license has the clause "You
are prohibited by the terms of this License Agreement from using Crawl
for gainful purposes" added in the end paragraph. However, it is not
clear if this prohibits or permits anything not prohibited or permitted
by the NH license (in context, it appears to be a summing up, not an
additional restriction of license). The Crawl license *explicitly* gives
permission to charge a distribution fee or a warranty fee, so it's not
clear to me what that clause means.

It looks to me that if this clause makes the Crawl license more
restrictive than the NH license, then distribution would violate the NH
license, but again, it's not clear to me how much that clause does in the
Crawl license.

Probably Ali's idea is best -- get explicit permission from the NH dev-
team to incorporate the code.

Arien

Martin Read

unread,
Jun 4, 2003, 3:59:27 PM6/4/03
to
In article <bblc61$1d7$1...@canard.ulcc.ac.uk>,

J. Ali Harlow <a...@avrc.city.ac.uk> wrote:
>Darshan Shaligram <dars...@aztec.soft.net> wrote:
>> The problem with the travel patch is that I used the travel code from
>> NetHack 3.4.1, so there are licence complications. The Crawl licence
>> looks incompatible with the NetHack licence, so distributing this patch
>> may be illegal. Could somebody experienced in these matters confirm
>> whether or not it's okay to distribute a patch for Crawl with NetHack
>> code in it?
>
>[I haven't looked at the Crawl license, but assuming they are incompatible]
>
>First choice would be to ask the NetHack dev-team if they would mind
>releasing this part of the NetHack code under the Crawl license.

The Nethack and Crawl licences are functionally equivalent, AFAICT.
Hell, they're practically the same document.

Linley just lifted the text of Mike Stephenson's Nethack General Public
License and made the appropriate changes to refer to Linley and Crawl
instead of (Mike and other Nethack developers) and Nethack. Nethack, as
of 3.4.1, is still released under the terms of Mike Stephenson's licence
as composed in 1989.

ISTM that one might just need a note saying "Some portions of Crawl are
copyright Mike Stephenson and other persons holding Nethack copyrights,
and are distributed under the terms of the Nethack General Public
License." and to include a copy of the Nethack licence.

Probably best to ask the DevTeam, though.

Again, IANAL.

m.
--
\_\/_/| Martin Read - my opinions are my own. share them if you wish.
\ / | eine answeringmachine fuer letzte frage als selbstschussanlage
\/ | stuhl. letztendlich letztmalig ein hecke brennender buesche
------+ -- Einstuerzende Neubauten, "Sie"

Darshan Shaligram

unread,
Jun 5, 2003, 3:27:00 AM6/5/03
to
"J. Ali Harlow" <a...@avrc.city.ac.uk> writes:
> Darshan Shaligram <dars...@aztec.soft.net> wrote:

> > The problem with the travel patch is that I used the travel code
> > from NetHack 3.4.1, so there are licence complications. The Crawl
> > licence looks incompatible with the NetHack licence, so distributing
> > this patch may be illegal. Could somebody experienced in these
> > matters confirm whether or not it's okay to distribute a patch for
> > Crawl with NetHack code in it?

> [I haven't looked at the Crawl license, but assuming they are
> incompatible]

Crawl's licence is based on NetHack's, but, as Arien mentions, adds the
condition: "You are prohibited by the terms of this Licence Agreement
from using Crawl for gainful purposes."

Whether that condition invalidates 2c of the Copying Policies ("You may
charge a distribution fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee") is what's open to question. If it does, the licences are probably
not compatible.

Crawl's licence also states: "Crawl contains no code from Nethack in any
shape or form" which makes things doubly awkward. That statement appears
to be before the licence proper, so I don't know how much legal ice it
cuts.

> First choice would be to ask the NetHack dev-team if they would mind
> releasing this part of the NetHack code under the Crawl license.

That's what I'll do. I'll pull the patch off my web page until this is
resolved.

> If that doesn't fly you could try and produce your patch without
> including any Crawl code in it so that you can release the patch under
> the NetHack license.

Hmm, it seems to me that it might be easier to separate the NetHack code
(only findtravelpath()) into an #included file, and distribute the
#include file under the NetHack licence and the diff itself under the
Crawl licence.

Thanks all,
--
Darshan Shaligram dars...@aztec.soft.net

Darshan Shaligram

unread,
Jun 5, 2003, 3:29:19 AM6/5/03
to
Arien Malec <arien...@yahoo.com.REMOVE> writes:

> [nifty patches]
> Any hope of a Win32 compilation?

I can compile one minus the travel patch, but I'd prefer to wait until
the status of that is cleared up and just upload the binary I'm
currently using, which includes all the patches.

--
Darshan Shaligram dars...@aztec.soft.net

David Damerell

unread,
Jun 5, 2003, 8:42:43 AM6/5/03
to
Darshan Shaligram <dars...@aztec.soft.net> wrote:
>Crawl's licence is based on NetHack's, but, as Arien mentions, adds the
>condition: "You are prohibited by the terms of this Licence Agreement
>from using Crawl for gainful purposes."

This used to be in the NetHack license's explanatory text, which is where
I suspect it comes from. With the release of 3.4.0 the Dev Team decided
that having explanatory text that said something different to the actual
license was a bad plan, and removed it. I would recommend the Crawl folks
do likewise. :-)
--
David Damerell <dame...@chiark.greenend.org.uk> flcl?

Darshan Shaligram

unread,
Jun 7, 2003, 11:32:08 AM6/7/03
to
Darshan Shaligram <dars...@aztec.soft.net> writes:
> A few patches for Crawl beta26:
[...]
> 4. Travel command

I've now rewritten the travel patch to remove the NetHack code. The
patch is back up here:

http://www.angelfire.com/trek/mazewest/crawl/travel.diff


A MinGW Win32 binary with the four patches mentioned in the OP is
available here:

http://www.angelfire.com/trek/mazewest/binaries/dc400b26tr-w32.zip

Please do *not* use this binary to continue existing games - your
randart properties are very likely to get reshuffled if you do. This
isn't a feature of any of the patches, but seems to be because of the
dependence of randarts on the RNG (and the fact that I've compiled with
MinGW instead of Borland's compiler).

The init.txt in the archive has the options used by the patches, most of
them commented out.

--
Darshan Shaligram dars...@aztec.soft.net

R Dan Henry

unread,
Jun 7, 2003, 1:59:21 PM6/7/03
to
On Sat, 07 Jun 2003 21:02:08 +0530, in a fit of madness Darshan
Shaligram <dars...@aztec.soft.net> declared:

>Please do *not* use this binary to continue existing games - your
>randart properties are very likely to get reshuffled if you do.

Unless, of course, you've only found sucky randarts, in which case
that's a excellent reason to get the patched binary. :-)

--
R. Dan Henry
rdan...@earthlink.net
George Bush is my President, not my spokesman.

Arien Malec

unread,
Jun 13, 2003, 4:38:20 PM6/13/03
to
Darshan Shaligram <dars...@aztec.soft.net> wrote in message news:<y90dao...@aztec.soft.net>...

> Darshan Shaligram <dars...@aztec.soft.net> writes:
> > A few patches for Crawl beta26:
> [...]
> > 4. Travel command

After playing with Darshan's binary for a while, I hope that it gets
incorporated into the main-line release (at least the travel patch --
I haven't poked hard on the other bits). This *really* enhances
playability. Many thanks, Darshan.

A very minor nit, stemming from two good things:

1) The patch won't travel you if it would require you to cross
dangerous things (e.g., traps, water, etc.)
2) The overhead map coloring shows different colors for unreachable
areas of the map

The nit is that the patch currently shows areas as unreachable if
reaching them would require passing, say, a dart trap. This makes
contiguous areas of the map look like discontinguous (clearly the map
coloring code uses the same definition of "reachable" as the travel
code). It would be a "nice-to-have" to show these two kinds of
unreachable in different colors.

Otherwise very very nice!

Arien

Tax

unread,
Jun 13, 2003, 11:55:28 PM6/13/03
to
On 13 Jun 2003 13:38:20 -0700, arien...@yahoo.com (Arien Malec)
wrote:

>Darshan Shaligram <dars...@aztec.soft.net> wrote in message news:<y90dao...@aztec.soft.net>...
>> Darshan Shaligram <dars...@aztec.soft.net> writes:
>> > A few patches for Crawl beta26:
>> [...]
>> > 4. Travel command
>
>After playing with Darshan's binary for a while, I hope that it gets
>incorporated into the main-line release (at least the travel patch --
>I haven't poked hard on the other bits). This *really* enhances
>playability. Many thanks, Darshan.

Yes indeed, thank you Darshan! I also love autopickup, and no-pick-up
drop, and the friend brand (which makes summoners playable!). I'd love
to see all of these incorporated into the 'official' version. They're
all great timesavers.

>A very minor nit, stemming from two good things:
>
>1) The patch won't travel you if it would require you to cross
>dangerous things (e.g., traps, water, etc.)

As I understand it, this is by design.

>2) The overhead map coloring shows different colors for unreachable
>areas of the map

Again, by design, but I'm interested by the suggestion for improvement
you made below:

Tina Hall

unread,
Jun 13, 2003, 11:22:00 PM6/13/03
to
Arien Malec <arien...@yahoo.com> wrote:

> After playing with Darshan's binary for a while, I hope that
> it gets incorporated into the main-line release (at least the
> travel patch -- I haven't poked hard on the other bits). This
> *really* enhances playability. Many thanks, Darshan.

I second that. The other bits are just as nice, just try them.

With stash-handling for example, the 'pickup_dropped = false'
quickly becomes indispensable, when you just want to pick your
scrolls of remove curse out of a pile full of scrolls, or when
you check your stuff on an altar with ';' and the pile includes
something that'd otherwise be autopickuped (like a duplicated
spellbook).

Or someone firing/throwing stuff should be very happy with the
'pickup_thrown = true', the few such characters that I killed
certainly were. :)

[...]


> The nit is that the patch currently shows areas as unreachable
> if reaching them would require passing, say, a dart trap. This
> makes contiguous areas of the map look like discontinguous
> (clearly the map coloring code uses the same definition of
> "reachable" as the travel code). It would be a "nice-to-have"
> to show these two kinds of unreachable in different colors.

Isn't it easy to check whether there are connections just blocked
by traps when you're on the overmap already? (You can set the
destination to a trap with '^' too, and then go on from there.)

Tina

Arien Malec

unread,
Jun 14, 2003, 11:56:25 AM6/14/03
to
Tina...@railroad.robin.de (Tina Hall) wrote in news:MSGID_2=3A2437=
2F22.13=40fidonet...@fidonet.org:

> Arien Malec <arien...@yahoo.com> wrote:
>
>> After playing with Darshan's binary for a while, I hope that
>> it gets incorporated into the main-line release (at least the
>> travel patch -- I haven't poked hard on the other bits). This
>> *really* enhances playability. Many thanks, Darshan.
>
> I second that. The other bits are just as nice, just try them.

Yep -- just figured out where init.txt is supposed to go (not where the
Crawl installation puts it) -- very nice. I should play a summoner...

> [...]
>> The nit is that the patch currently shows areas as unreachable
>> if reaching them would require passing, say, a dart trap. This
>> makes contiguous areas of the map look like discontinguous
>> (clearly the map coloring code uses the same definition of
>> "reachable" as the travel code). It would be a "nice-to-have"
>> to show these two kinds of unreachable in different colors.
>
> Isn't it easy to check whether there are connections just blocked
> by traps when you're on the overmap already? (You can set the
> destination to a trap with '^' too, and then go on from there.)

Agreed -- once you figure it out, working with the overmap isn't a big
deal, which is why I called my issue a "nit" and why I think it's just a
"nice-to-have".

Arien

Darshan Shaligram

unread,
Jun 15, 2003, 11:41:00 PM6/15/03
to
arien...@yahoo.com (Arien Malec) writes:

> After playing with Darshan's binary for a while, I hope that it gets
> incorporated into the main-line release (at least the travel patch --
> I haven't poked hard on the other bits). This *really* enhances
> playability.

Ah, good!

> Many thanks, Darshan.

::bows:: Delighted.

> The nit is that the patch currently shows areas as unreachable if
> reaching them would require passing, say, a dart trap. This makes
> contiguous areas of the map look like discontinguous (clearly the map
> coloring code uses the same definition of "reachable" as the travel
> code). It would be a "nice-to-have" to show these two kinds of
> unreachable in different colors.

The colouring was intended to show areas that travel would be happy to
take you to (the travel code itself is used to generate the colour
info), but if it does seem useful to colour contiguous areas, that
shouldn't be hard to do. Let's see, we'll colour places that travel
can't get you to (without crossing traps, deep water or lava)
cyan. Doesn't look too bad on my display. :-)

--
Darshan Shaligram dars...@aztec.soft.net

Arien Malec

unread,
Jun 16, 2003, 12:15:05 AM6/16/03
to
Darshan Shaligram <dars...@aztec.soft.net> wrote in
news:n0gizo...@aztec.soft.net:

> arien...@yahoo.com (Arien Malec) writes:
>
>> After playing with Darshan's binary for a while, I hope that it gets
>> incorporated into the main-line release (at least the travel patch --
>> I haven't poked hard on the other bits). This *really* enhances
>> playability.
>
> Ah, good!

I've now tested the other patches, and have equally effusive praise for
them as well.

[snip]


>> It would be a "nice-to-have" to show these two kinds of
>> unreachable in different colors.
>
> The colouring was intended to show areas that travel would be happy to
> take you to (the travel code itself is used to generate the colour
> info), but if it does seem useful to colour contiguous areas, that
> shouldn't be hard to do. Let's see, we'll colour places that travel
> can't get you to (without crossing traps, deep water or lava)
> cyan. Doesn't look too bad on my display. :-)

Or florescent pink? I do think it's useful to know at a glance the
difference between "can't get to without dig/tp/etc" "can't get to
without doing something dangerous" and "can get to safely" areas. Even
the two color approach is very useful.

Thanks again,
Arien

Darshan Shaligram

unread,
Jun 16, 2003, 4:13:21 AM6/16/03
to
Arien Malec <arien...@yahoo.com.REMOVE> writes:
[...]

> I do think it's useful to know at a glance the difference between
> "can't get to without dig/tp/etc" "can't get to without doing
> something dangerous" and "can get to safely" areas. Even the two color
> approach is very useful.

The updated binary and travel patch are up at the same URLs as before;
the two-colour scheme (blue for areas you can travel to, cyan for places
travel won't go, but you can get to if you're ready to take damage or
levitate over water/lava) is in.

I haven't tested this binary much, so I'd advise caution when trying it
out; please let me know if there are any problems.

--
Darshan "No fluorescent pink!" Shaligram

Tina Hall

unread,
Jun 16, 2003, 11:57:00 AM6/16/03
to
Darshan Shaligram <dars...@aztec.soft.net> wrote:

> Darshan "No fluorescent pink!" Shaligram

Thank you! <g>

Tina (Nothing wrong with pink, but, well... Pink!?)

Arien Malec

unread,
Jun 16, 2003, 5:23:41 PM6/16/03
to
Darshan Shaligram <dars...@aztec.soft.net> wrote in
news:fzmazb...@aztec.soft.net:

> Arien Malec <arien...@yahoo.com.REMOVE> writes:
> [...]
>> I do think it's useful to know at a glance the difference between
>> "can't get to without dig/tp/etc" "can't get to without doing
>> something dangerous" and "can get to safely" areas. Even the two
>> color approach is very useful.
>
> The updated binary and travel patch are up at the same URLs as before;
> the two-colour scheme (blue for areas you can travel to, cyan for
> places travel won't go, but you can get to if you're ready to take
> damage or levitate over water/lava) is in.

Very nice. Very nice indeed.

No more requests -- everything is perfect. OK, one more request, but I
think this is a core Crawl request, rather than a travel patch request:
In travel and shift-move, you stop when you encounter a baddie. This is
good. Unfortunately, stationary non-violent baddies are counted as
baddies for the purposes of this arrestation. This is downright annoying
in the Lair (can you tell that I've quickly become adicted to use of the
travel function). 'Twould be nice if there was a list of "safe monsters"
that woudn't interrupt the traveling and shift-movement.


> I haven't tested this binary much, so I'd advise caution when trying
> it out; please let me know if there are any problems.

Works perfectly so far.

Many thanks again!

Arien

Brent Ross

unread,
Jun 16, 2003, 7:47:31 PM6/16/03
to
In article <Xns939C926EE2CD6a...@64.164.98.29>,
Arien Malec <arien...@yahoo.com.REMOVE> wrote:
// No more requests -- everything is perfect. OK, one more request, but I
// think this is a core Crawl request, rather than a travel patch request:
// In travel and shift-move, you stop when you encounter a baddie. This is
// good. Unfortunately, stationary non-violent baddies are counted as
// baddies for the purposes of this arrestation. This is downright annoying
// in the Lair (can you tell that I've quickly become adicted to use of the
// travel function). 'Twould be nice if there was a list of "safe monsters"
// that woudn't interrupt the traveling and shift-movement.


I can tell that you're addicted to the travel command, since this
behaviour does not exist with shift movement. Haven't really played or
tested these patches, but I've noticed a number of potential problems
looking at them... apparently they don't follow the same checks as
normal running/resting (these are hidden away in view.cc).

I'm very wary of patches, since there's few few people who really
understand this code... the fact that these patches have code
to avoid using weapons of pain for butchering shows that they
still need work.

Brent Ross

Arien Malec

unread,
Jun 16, 2003, 7:58:18 PM6/16/03
to
bwr...@csclub.uwaterloo.ca (Brent Ross) wrote in
news:bclkuj$8e1$1...@tabloid.uwaterloo.ca:

[travel command stops at non-agressive monsters like plants]


> I can tell that you're addicted to the travel command, since this
> behaviour does not exist with shift movement.

[snip]


> I'm very wary of patches, since there's few few people who really
> understand this code... the fact that these patches have code
> to avoid using weapons of pain for butchering shows that they
> still need work.

I dunno how the Crawl dev process works, but I really hope the Crawl dev-
team can work with Darshan on these, since the patches are quite useful.
I'm as much an enemy of code duplication as anyone, but the core
functionality is quite quite useful.

Arien

Darshan Shaligram

unread,
Jun 16, 2003, 11:40:56 PM6/16/03
to
bwr...@csclub.uwaterloo.ca (Brent Ross) writes:

[travel command]


> Haven't really played or tested these patches, but I've noticed a
> number of potential problems looking at them... apparently they don't
> follow the same checks as normal running/resting (these are hidden
> away in view.cc).

True, my knowledge of the Crawl code is distinctly sketchy, and the code
to stop travel is an icky hack. I'll look into view.cc and see if I can
pick up how shift-running works.

> I'm very wary of patches, since there's few few people who really
> understand this code... the fact that these patches have code to avoid
> using weapons of pain for butchering shows that they still need work.

Absolutely... I should have stopped with distortion after all, I
see. :-)

--
Darshan Shaligram dars...@aztec.soft.net

Brent Ross

unread,
Jun 17, 2003, 12:44:37 AM6/17/03
to
In article <fzm9xt...@aztec.soft.net>,
Darshan Shaligram <dars...@aztec.soft.net> wrote:
// bwr...@csclub.uwaterloo.ca (Brent Ross) writes:
//
// [travel command]
// > Haven't really played or tested these patches, but I've noticed a
// > number of potential problems looking at them... apparently they don't
// > follow the same checks as normal running/resting (these are hidden
// > away in view.cc).
//
// True, my knowledge of the Crawl code is distinctly sketchy, and the code
// to stop travel is an icky hack. I'll look into view.cc and see if I can
// pick up how shift-running works.

The code to not stop running for friendlies, harmless, and
mimics is also a hack. Logically (well crawl-code logically),
this is done by heavy handled mangling when monsters are drawn.

// > I'm very wary of patches, since there's few few people who really
// > understand this code... the fact that these patches have code to avoid
// > using weapons of pain for butchering shows that they still need work.
//
// Absolutely... I should have stopped with distortion after all, I
// see. :-)

Yeah, the first rule of crawl code is to never make assumptions...
always verify the type of a variable and look at what any function
actually does. There are oddly named functions with strange
side-effects lying everywhere. For example, I had the pleasure of
fixing the fact that piles of people had added changes and fixes
which called the monster magic resistance function backwards
(Murphy's Law)... oddly enough, this is the sort of thing that
players hardly notice and so it got compounded because the people
kept borrowing incorrect calls or just assuming that it worked
the logical way.

Brent Ross

Darshan Shaligram

unread,
Jun 17, 2003, 2:40:33 AM6/17/03
to
bwr...@csclub.uwaterloo.ca (Brent Ross) writes:
> In article <fzm9xt...@aztec.soft.net>,
> Darshan Shaligram <dars...@aztec.soft.net> wrote:
[...]
> // I'll look into view.cc and see if I can pick up how shift-running
> // works.

> The code to not stop running for friendlies, harmless, and mimics is
> also a hack. Logically (well crawl-code logically), this is done by
> heavy handled mangling when monsters are drawn.

Ah, just found the code.

> // bwr...@csclub.uwaterloo.ca (Brent Ross) writes:

> // > the fact that these patches have code to avoid


> // > using weapons of pain for butchering shows that they still need

> // > work.

> // Absolutely... I should have stopped with distortion after all, I
> // see. :-)

> Yeah, the first rule of crawl code is to never make assumptions...
> always verify the type of a variable and look at what any function
> actually does.

:-) Will do. Thanks for pointing out the pain-brand error.

--
Darshan Shaligram dars...@aztec.soft.net

Darshan Shaligram

unread,
Jun 17, 2003, 4:26:27 AM6/17/03
to
Arien Malec <arien...@yahoo.com.REMOVE> writes:
[travel stops when sighting a monster]

> Unfortunately, stationary non-violent baddies are counted as baddies
> for the purposes of this arrestation. This is downright annoying in
> the Lair

Mostly fixed, thanks to Brent's suggestion elsewhere in the
thread. Fixed binary and patch are up at the usual places.

The problem now is that the travel code won't search _around_ plants and
fungi, so if the travel route happens to have a plant in the way, travel
will just stop once you reach the plant (it won't bother trying to
detour around the plant). I'm not sure how to resolve this without
peeking at the monster grid while figuring out the travel route, which
feels like a vaguely evil thing to do.

Anyways, the travel behaviour should be nicer now.

--
Darshan Shaligram dars...@aztec.soft.net

0 new messages