Page 1 of 1
Filter limitations (CSBwin)
Posted: Fri Jul 15, 2005 10:11 pm
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.
Posted: Sat Jul 16, 2005 3:49 am
by Zyx
La remil contrisima madre que lo pario!
Posted: Sat Jul 16, 2005 8:05 am
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?"
Posted: Sat Jul 16, 2005 8:20 am
by Zyx
Something like "damn it!" : )
Posted: Sat Jul 16, 2005 8:35 am
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!
Posted: Sat Jul 16, 2005 8:48 am
by Zyx
In Spanish from Argentina... But you would hardly find "remil" and "contrisima" in a dictionary!
Posted: Sat Jul 16, 2005 9:05 am
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
Posted: Sat Jul 16, 2005 11:24 am
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!
Posted: Sat Jul 16, 2005 4:17 pm
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.
Posted: Sat Jul 16, 2005 6:34 pm
by Zyx
The &MESSAGE doesn't leave a trace. Besides, it seems it doesn't send anything, the targetted DSA doesn't get activated.
Posted: Sat Jul 16, 2005 6:58 pm
by Paul Stevens
Well, that ain't nice. I'll see that something gets done
within the hour.
Posted: Sat Jul 16, 2005 7:28 pm
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 ).
Posted: Sat Jul 16, 2005 7:39 pm
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.
Posted: Sat Jul 16, 2005 9:16 pm
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.
Posted: Sat Jul 16, 2005 9:31 pm
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.
Posted: Sun Jul 17, 2005 9:28 pm
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.
Posted: Sun Jul 17, 2005 10:12 pm
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?
Posted: Mon Jul 18, 2005 2:29 am
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.
Posted: Mon Jul 18, 2005 7:02 pm
by Paul Stevens
CustomGraphicsDemo15 implements and
deonstrates the &%DELAY word.
Posted: Tue Jul 19, 2005 3:27 pm
by Zyx
&%DELAY leaves no trace.
Also, indirect commands like &%MONSTER all leave the same trace: "&MESSAGE"
Could you add something like:
"&MESSAGE (&MONSTER)"
Posted: Tue Jul 19, 2005 3:45 pm
by Paul Stevens
CSBwin 9.8v72
Posted: Tue Jul 19, 2005 3:46 pm
by Zyx
What will happen if, in the Party Attack Filter, a &%MONSTER! is issued, but the monster dies because of the attack?
Posted: Tue Jul 19, 2005 6:14 pm
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.
Posted: Tue Jul 19, 2005 7:39 pm
by Zyx
Hmm yes, I will do that.
Posted: Fri Jul 22, 2005 12:04 pm
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
()