Hi list inhabitants!

I've just been lurking for quite some time now - been able to figure out
things lately on my own without having to ask, but this stuff has
stumpted(sp?) for quite some time, so I figured I'd ask those on the
list who seem to know every little nuance of the code about this:

affect_data

for the most part, I can "read" the code enough to figure out what it's
doing/what I need it to do - but affect_data seems to be ... I dunno -
either too large or too convuluted or something for me to be able to
handle holding it all in my head or something. For example - at one
point I thought about having objects provide perm affects (this has
actually been recently covered in the list, iirc) - so I look to the
code -- first off, some objects in stock code appear to already do this
- obj #904 from olympus (winged sandals) -- give flying affect -- not as
a spell affect with a duration of -1 however - they appear to do this by
setting the flying bit of ch->affected.  Changing it's affect type from
AFF_NONE to AFF_SPELL_AFFECT crashes the game (I see why once I run it
in gdb, and undo my changes).  I check for ANY object to have the
AFF_SPELL_AFFECT affect - none do -- olc doesn't even seem to SUPPORT
this.

Bah! I'm rambling now as I always seem to do when I send to the list.

Basically, I'm wondering if anyone can actually claim to UNDERSTAND
affect_data not in general, but in specifics - I've made notes on what
each variable in the structure MEANS - but when you try to take the
structure as a sum of it's parts - that's where it seems sometimes like
the entire structure is just a bunch of stuff added on as the need arose
-- perhaps it was :)

so - could anyone explain it? :) -- I'd be most appreciative.

don't get me wrong - I can code in a new spell that creates/assigns new
affects to a character - but I'm trying to understand the basic
underlying meaning of the structure itself - perhaps that was clearer.

Oh - while I'm at it - does anyone else have this problem? every once in
a while I just decide my code has gotten to be too ... "hackish" with my
seemingly random addons, and I tar up the whole thing, store it
somewhere, and start from clean source, trying to do it "better" only to
have the same thing happen 3, 5, 9 months down the road.  Just wondering
- seems pointless as I never get a truly good mud - just a bunch of fair
ones (and a helluva lot of experience I suppose *grins*)

Sorry to bug you all with such a long-winded pair of questions - I'll
send this off now and go back to staring stupidly at merc.h and trying
to figure out the APPLY_NONE and TO_WEAPON and the bitvector flag (which
as far as I can see is useless except to make lookups run faster).

Oops - I said I'd stop - doing so now.

Thanks for any thoughts :)

 - Brian E. Ermovick
   - midkemia.dyndns.org 4000 (the latest incarnation of amalgam)

Reply via email to