Filter limitations (CSBwin)

Dead posts cluttering up the front page of certain non-RTC forums are kept here. Threads have the forum subject attached, except custom dungeon threads (which are obvious)
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

Filter limitations (CSBwin)

Post by Paul Stevens »

CSBwin version 9.8v67 implements limitations on
what DSA filters can do. A MessageBos pops up if
you exceed the limits. In general, you cannot do
things that are capable of adding or deleting objects
in the dungeon. Filters were not intended to be general-
purpose. Doing such things breaks with the basic
design philosophy of the program as created by the
origianl designers. And it makes it very difficult
to come even close to confident that the result will
be consistent and not crash the whole thing.

A filter was meant to provide a way to notice events
that occur and to modify those events. NOT TO CAUSE
COMPLETELY INDEPENDENT EVENTS. Like eating
an apple should not cause a monster to be added to
the dungeon.

******BUT NOTICE VERY CLEARLY*******
Eating an apple can cause a Filter to send a message
to another DSA with the necessary parameters to
add the Monster. This is in keeping with the basic
program structure. And the monster will appear in the
same Clock Tick so that the result is nearly the same.

The latest CSBuild (2.09) lists, in the DSA editor help window,
the functions that cannot be used in a filter. This change
may be annoying but the added stability will be worth the
annoyance, I assure you. And I am open to relaxing these
restrictions in cases where it can be shown that the effects
will not be detrimental to stability.

Now I don my fireproof cloak and await responses.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

La remil contrisima madre que lo pario!
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Well, that was a reponse! "Your mother feels more sadness than an oar can bear?" "Rowing with an oar is more than you can bear?" "A bear ate my owl and my mother is sad?"
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Something like "damn it!" : )
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

LOL. What language? I tried translations in spanish, italian, latin, esperanto (in desperation french and english) but nothing worked for more than one word!
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

In Spanish from Argentina... But you would hardly find "remil" and "contrisima" in a dictionary!
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

The closest was 'remi' for 'to row' and i think contrisma was 'sadness' but yes the spanish translation left those words well alone!

So, missing stuff from the filters, huh? I reckon all the exceptions are reasonable, although of course I've not got existing dungoens being broken : ) Apart form a rogue createcloud or so I've treated filters as something you need to get out of as soon as possible
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Remil would be something like "super thousand times" and contrisima "very quadruple" (it comes from a card game named "truco").

I tried to gather all my DSA stuff in the filters, so this means a lot of changes, and several weeks of work. Ah well, it will give time to Paul to get rid of his pile of cards.

BTW, the &message description in the inbuilt help is outdated.

EDIT: what about the &THROW comand? and the &CELL!
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

I've treated filters as something you need to get out of as soon as possible
Amen.
what about the &THROW comand? and the &CELL!
Certainly &THROW must be added to the list. &CELL! is more
marginal but really ought to be included to be consistent.
I tried to gather all my DSA stuff in the filters
And it was this 'abuse' of the system that brought me to the
conclusion that things had to change. It is my fault for
not understanding earilier that the danger existed. But all of this
was being thrown together as fast as we could dream it up.
It has worked rather well for something constructed so willy-nilly.
Paul to get rid of his pile of cards
The 'Afine Transformation' has floated to the top.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

The &MESSAGE doesn't leave a trace. Besides, it seems it doesn't send anything, the targetted DSA doesn't get activated.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Well, that ain't nice. I'll see that something gets done
within the hour.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

O posted CSBwin98v69.

It has the trace. And the only reason I can see that
your &MESSAGE did not work is that perhaps you tried
to pass more than 29 parameters. I added a warning
in the trace for that condition. Surely you don't need
to pass more than 29 32-bit values????? The entire
DM/CSB engine got along with a maximum of 8 bytes
( Two 32-bit values ).
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

It occurs to me that perhaps we could make things easier
by providing a selection of words like:

&%MOVE
&%CHAR!
&%THROW

etc.

These would automatically take the parameters off
the stack, put them into a &MESSAGE, and send it
off to a 'pre-defined' location (defined like we define
the filter locations). You could put a DSA there with
a 'case' statement to do the actual operation.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Ah, yes I was sending 100 parameters, i order to create an all-cases function to call during the filters.

&%MOVE, etc., would be extremely useful. furthermore, it would allow some readability: I tried to replace all the forbidden commands by &MESSAGE, and the code became harder to understand at first glance.
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. I said I would try to help overcome this
limitation.

You are using external text files and then importing
them, are you not? You could use a preprocessor
to make macros. You could simply:

#define &MOVE L5 &! L4 &! . . . &PARAM! . . . &MESSAGE

but that would be very much less efficient than the
'indirect' operations and could not be used in the CSBuild
editor except through the preprocessor/import route.

I will put together the indirect forms of these words today.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

CustomGraphicsDemo13 has a new CSBuild and CSBwin
with a demonstration of the &%INDIRECT. Kill the
worm and step into his cell and the death cloud will be
&MOVEed to the cell behind you. You gottas step
and turn quickly if you want to see it.

The 'Indirect Action' ( &%INDIRECT) is documented
in the DSA_Language page.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

If multiple &% commands might not be acted on in sequence would it be possible to add an initial parameter to the commands that sets the delay in the &message sent?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

I'll add a &%DELAY that will apply to the next &%xxxxxx
word and then default back to zero. I don't want to
put it in the &%MOVE, for example, because then the
documentaion would be different for &MOVE and &%MOVE.

But it seems to me that it would be better to avoid this
problem. It may be difficult but it may be trivial. I would
think that if the effects are not closely associated with the
filter ( they must not be if you can tolerate a delay ) then
there is a better way to get it done. Maybe we should have
an open discussion of some of these problems so that we
can put our heads together, find solutions, and let everyone
see what and how things can be done.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

CustomGraphicsDemo15 implements and
deonstrates the &%DELAY word.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

&%DELAY leaves no trace.
Also, indirect commands like &%MONSTER all leave the same trace: "&MESSAGE"
Could you add something like:
"&MESSAGE (&MONSTER)"
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

CSBwin 9.8v72
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

What will happen if, in the Party Attack Filter, a &%MONSTER! is issued, but the monster dies because of the attack?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

CrashVille, in general.

What do you want to change? Perhaps we can allow
certain changes within filters.

A completely general solution is to make a DSA to
do the change and send it a MESSAGE with the monster's
location.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Hmm yes, I will do that.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

&%THROW leaves a wrong trace:

Code: Select all

  &%DELAY MESSAGE 0000a0 timer create         042 01 DLY=0001 65 00 01 1d 00 00 cd9e8ec8
 ()
Post Reply