Filter limitations (CSBwin)
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Filter limitations (CSBwin)
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.
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.
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
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
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!
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!
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Amen.I've treated filters as something you need to get out of as soon as possible
Certainly &THROW must be added to the list. &CELL! is morewhat about the &THROW comand? and the &CELL!
marginal but really ought to be included to be consistent.
And it was this 'abuse' of the system that brought me to theI tried to gather all my DSA stuff in the filters
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.
The 'Afine Transformation' has floated to the top.Paul to get rid of his pile of cards
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
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 ).
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 ).
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
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.
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.
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.
&%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.
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
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.
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.
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
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.
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.
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
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.
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.
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
&%THROW leaves a wrong trace:
Code: Select all
&%DELAY MESSAGE 0000a0 timer create 042 01 DLY=0001 65 00 01 1d 00 00 cd9e8ec8
()