Conflux III Technical Topics

Custom dungeons for CSBWin. Includes all Confux 2 and 3 discussions.

Moderator: Zyx

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Conflux III Technical Topics

Post by Paul Stevens »

I am writing publicly because I think there
are those among us who might be
interested in such things.

Zyx:::
I was looking at your 'Darkness" DSA and
found that it can be activated by several
different things, including itself. I began
to worry that the self-activation plus the
spell-activation could cause several self-
activations in a single time-step. Probably
not what you wanted.

Much study later, I discovered that you had
enabled the Global option of 'Discarding
Duplicate Timer Entries' and that by so doing
you had avoided the problem with the Darkness
DSA. (But only because it has a delay of
less than 2!)

It seems to me that 'Disabling Duplicate Timer
Entries' is a dangerous thing to do. For example,
if a counter is decremented by two different
monster-activated pressure pads and those
two pads were to fire off a message simultaneously,
then one of the decrements would be lost.
In this case it is probably not a fatal problem.
But losing a count could be a problem under
some circumstances.

So.....my question.....did you 'Disable Duplicates'
intentionally? If so, why? And if so, is there
something we could do to make this unnecessary?
In the case of the Darkness DSA, for example,
maybe we could fix the problem by adding a
way to delete existing timer entries. Then, before
sending the message that activates itself, the DSA
could first delete any such entries, thereby
assuring that only one such timer entry could
exist at a time.

I have run across this problem myself and fixed
it rather clumsily (the DSA became much more
complicated). Being able to delete any timer aimed
at a particular location would also be a neater
solution the problem of shutting down some
repetitive process than having to dirty up
the DSA with special cases and states.

Also, searching the timer database for duplicates
for EVERY timer entry created is wasteful of
CPU time. Especially since we have made the
number that exist very much larger than in the
original DM/CSB.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Could the Darkness DSA not toggle itself into a duplicate state where the self-activation is not possible, and at the end of a specified time restore to the original activation state.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Yes. But that is what I meant by
dirtying the DSA with special
cases/states. And it is not totally
satisfactory in more complicated
cases.

Say that you go into this state
you describe where you ignore the
self-activation that is due to arrive.
Then the DSA is restarted by a
spell or whatever. You know that the
self-activation is still going to happen
but you want to schedule a self-activation
at a later time. So you have to know to
ignore one self-activation and respond
to the second. In general, you need a
counter to keep track of this 'Ignore-count'.
This will work, but it is kinda dirty
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

I have no memory about why I disabled duplicates, only that I couldn't solve the problem otherwise...
I could try to enable them again and check what happens.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Oh, dear. I don't think I would do
that. Who knows what might break???
Things like that break in very rare and
non-reproducible ways.

If, on the contrary, something is found
to be broken BECAUSE you discard the
duplicates, we can provide some way
to override that behaviour temporarily.

At any rate, it is something to keep in
mind when chasing bugs.

Primum non nocere.
Post Reply