help with DSAs!

Discuss Chaos Strikes Back for Windows and Linux, an unofficial port of Chaos Strikes Back to PC by Paul Stevens, as well as CSBuild, an associated dungeon editor.

Moderator: Zyx

Forum rules
Please read the Forum rules and policies before posting.
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

help with DSAs!

Post by Adamo »

help !! I need some DSAs for my dungeon. But such a dumb like me doesn`t know, how to write them :oops: anyone can help me ?? :?

I need:

1. a DSA, that is responsible for leaving things by monsters after their death. I know it is possible for some creatures in ADGE (monster leaving editor), but not for all. When I need, for example, every spider to leave one bread after death, there`s no way to do this except DSAs, I guess (well, unless I change all the bitmaps of, say, a screamer monsters to spider ones and change all the screamer values to the spider ones. Because screamers can leave things and spiders cant. But I bet there`s easier way by DSAying to do this).

2. a DSA, that would be responsible for setting X tile each time, when monster Y dies on level Z. For example, each time when a screamer dies on level two, an actuator on tile 2(4,16) is toggled.

Thanx !!!
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

1. Use the death filter combiend with the add command - both are described in Pual's documentation, and someone like me can help you properly later

2. Again, the death filter can be used to register when a creature dies, and in this case you would just send the basic message

Index of docs for link to death filter, and if you follow the geenraldSA help from thedocumentatuion ontop the syntax/language of DSA add command is explained
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

you mean:
http://www.dianneandpaul.net/CSBwin/doc ... ilter.html

is "monter death filter" the same as "monster delete filter"?
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

I actually did the first thing a while ago. It's not the height of sophistication, but it works well:

Code: Select all

0S0:
L8 L0 &PARAM@ L4 &@ ??{(3,1S0)}

1S0:
L0 &@ L10 L2 &MONSTER@ L11 &@ ??{(10,3S0)}

2S0:
L15 L1 &@ L10 &SHIFT L2 &@ L5 &SHIFT &+ L3 &@ &+ L0 L99 &@ L15 L65535 F &%ADD

3S0:
LA L99 &! J2
Right now, whenever a mummy (monster number 10, hence the jump to state 3) is killed, it leaves behind a copy of whatever's at parameter A (the code in 3S0)... from that, you can probably modify it to do what you want, and add support for additional monsters.
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

so the complete DSA code for all 27 kind of monsters would look like this...? :

Code: Select all

0S0:
L8 L0 &PARAM@ L4 &@ ??{(3,1S0)} 
1S0:
L0 &@ L10 L2 &MONSTER@ L11 &@ ??{(0,3S0)(1,4S0)(2,5S0)(3,6S0)(4,7S0)(5,8S0)(6,9S0)(7,10S0)(8,11S0)(9,12S0)(10,13S0)
(11,14S0)(12,15S0)(13,16S0)(14,17S0)(15,18S0)(16,19S0)(17,20S0)(18,21S0)(19,22S0)(20,23S0)
(21,24S0)(22,25S0)(23,26S0)(24,27S0)(25,28S0)(26,29S0)} 
2S0:
L15 L1 &@ L10 &SHIFT L2 &@ L5 &SHIFT &+ L3 &@ &+ L0 L99 &@ L15 L65535 F &%ADD 
3S0:
LA L99 &! J2 
4S0:
LB L99 &! J2 
5S0:
LC L99 &! J2 
6S0:
LD L99 &! J2 
7S0:
LE L99 &! J2 
8S0:
LF L99 &! J2 
9S0:
LG L99 &! J2 
10S0:
LH L99 &! J2 
11S0:
LI L99 &! J2 
12S0:
LJ L99 &! J2 
13S0:
LK L99 &! J2 
14S0:
LL L99 &! J2 
15S0:
LM L99 &! J2 
16S0:
LN L99 &! J2 
17S0:
LO L99 &! J2 
18S0:
LP L99 &! J2 
19S0:
LQ L99 &! J2 
20S0:
LR L99 &! J2 
21S0:
LS L99 &! J2 
22S0:
LT L99 &! J2 
23S0:
LU L99 &! J2 
24S0:
LV L99 &! J2 
25S0:
LW L99 &! J2 
26S0:
LX L99 &! J2 
27S0:
LY L99 &! J2 
28S0:
LZ L99 &! J2 
29S0:
L??? L99 &! J2 
I`m not sure which letter to use in the last 29S0 line..?
Last edited by Adamo on Thu May 18, 2006 7:06 pm, edited 1 time in total.
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Except for the extraneous color tags, that looks fine. However, it's messy! And, I don't know what to use for the last line either...

I will complicate things further by saying that for lots and lots of monster types this can all be duplicated with:

Code: Select all

0S0: 
L8 L0 &PARAM@ L4 &@ ??{(3,1S0)} 

1S0: 
L0 &@ L10 L2 &MONSTER@ L11 &@ L10 &NEG &+ LA &+ L99 &! J2

2S0: 
L15 L1 &@ L10 &SHIFT L2 &@ L5 &SHIFT &+ L3 &@ &+ L0 L99 &@ L15 L65535 F &%ADD 
The only downside is that your items will have to be in a straight vertical column. If you've got some space in your dungeon though this is much easier than setting up lots of parameters. Just point param A at the first thing and you're set.
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

big thanx Sophia, that sounds good!!! :D at least much better than DSA with 27 parameters!
(btw I knew that these colours in the code was a bad idea...) ;)
I assume that all items should be placed in the nw (north-west) in the tile?
by vertival tiles you mean 0(00,00), 0(01,00), 0(02,00), 0(03,00), 0(04,00), 0(05,00), 0(06,00) etc.?
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

That's correct, provided you're using a Level(Y,X) coordinate system.

Or, in other words, I mean up-to-down, not left-to-right. ;)
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

The fetch ID function sophia is using (F) actually can be told which sub-areas of the tile to look at for objects, and which object types. So with the code she has you are looking for any type (L65535) on any of the four corners (L15) not just north-east. Also note the tile could be a wall, the F command doens't care! (if this helps you sneak it into a dungeon better)

If you are finding space a problem, there would be a way to compress it by up to four - but no need to confuse the issue unless you need it! : )
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

beowuuf wrote:no need to confuse the issue unless you need it! : )
Aww, but it's a neat idea!

I'd be curious how to do it. :D
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

<number> L<value> &/ gives the mod of a number, and &% gioves the mod remainder. So you could use the &% to get the sub-tile value (though that would be a little tricksier so less complicated to hard code that)
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Ok here's a quick mod to the code using &type and modulus instead of the monster command, and using a quarter of the y-column through modulous aswell. So in this case nw = 1, ne =2, se = 3, sw = 4. Also, added a loop so that you could have multiple items dropped by a creature if you liked by piling them up in the same sub-tile area.

Code: Select all

0S0:
L8 L0 &PARAM@ L4 &@ ??{(3,1S0)}

1S0:
L0 &@ &TYPE L40000 &% &DUP L4 &/ &NEG LA &+ L99 &! L4 &% G1C0 L98 &! J2

1C0:
&1+ &DUP L3 &< ?J1T0 &1+ &DUP L4 &= ?J1T0 L3 &+  

2S0:
L1 &@ L10 &SHIFT L2 &@ L5 &SHIFT &+ L3 &@ &+ L97 &! L0 L96 &! J3

3S0:
L15 L97 &@ L96 &DUP &1+ L96 &! L99 &@ L98 &@ L65535 F &DUP L1 &NEG &= ?J3T0 &%ADD J3
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Adamo, I think I made a bit of a mistake in the DSA I shared with you in Flashchat. This one should do what you want:

Code: Select all

0S0: 
L8 L0 &PARAM@ L4 &@ ??{(3,3S0)} 

1S0: 
L11 &@ L10 &NEG &+ LA &+ L99 &! J2 

2S0: 
L15 L1 &@ L10 &SHIFT L2 &@ L5 &SHIFT &+ L3 &@ &+ L0 L99 &@ L15 L65535 F &%ADD 

3S0:
L0 &@ L10 L2 &MONSTER@ L1 &@ ??{(4,4S0)} J1

4S0:
L11 &@ L15 &NEG &+ ?J1 MSB J1
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Here it is in a format you can import. I will comment
it for you in a few days.

Code: Select all

Description = Monster Dropping                                                               
State = 0
StateLocation = 0
GroupID = 0
Number of States = 5
First Displayed State = 0
Number of non-empty states = 5
State Number = 0
Number of Actions = 1
S0 = L8 L0 &PARAM@ L4 &@ ??{(3,3S0)}
State Number = 1
Number of Actions = 1
S0 = L11 &@ L10 &NEG &+ LA &+ L99 &! J2
State Number = 2
Number of Actions = 1
S0 = L15 L1 &@ L10 &SHIFT L2 &@ L5 &SHIFT &+ L3 &@ &+ L0 L99 &@ L15 L65535 F &%ADD
State Number = 3
Number of Actions = 1
S0 = L0 &@ L10 L2 &MONSTER@ L1 &@ ??{(4,4S0)} J1
State Number = 4
Number of Actions = 1
S0 = L11 &@ L15 &NEG &+ ?J1 MSB J1
signature = 2299DF30CFEB584C32BA5E8114974A11
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

THANX !!! :D

a DSA above, wchich Sophia gave me on a flaschat. It is responsible for setting X tile each time, when monster Y dies on level Z: in this case each time when a worm dies on level four, an actuator on tile descripted by parameter B is set.
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

that DSA works ok firts time only, when I kill a worm on level 4, but next time, when I kill next worm, the game crashes :( sometimes, when I kill a worm by 2nd time, sometimes by 3rd, sometimes by 4th, but always crashes.

I have two DSA actuators on the "special location - monster death filter" tile; firts DSA is Sophia`s one (responsible for leaving things by monsters), wchich works ok, and second is Sophia`s one, responsible for setting X tile when monster Y dies on level Z (descripted above). When I kill a worm on lev4, the game crashes, so it seems that second DSA doesn`t work ok. I use parameter B in global state. Parameter A is set to an empty tile.
Last edited by Adamo on Sat May 20, 2006 1:13 pm, edited 2 times in total.
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Adamo, sophia added to her code to include the set, option there are not two different DSAs

So you have the drop DSA working, then a drop/set DSA working, without a valid tile pointer.

Try and delete the inital DSA and see if it crashes still
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

OMG I`ve got it now! it`s not about the DSAs!!! when I made that actuator to be set by different way (not by DSA), it still crashes!!! It must have been an internal problem!

now I`m absolutely sure that these DSAs works ok! IMHO it`s a problem of what my actuator (that one wchich is set by DSA when monster dies, or in any different way) do, but not the DSAs itself.
:x

I`ll try to rebuild this level, but it seems there`s a bug in CSBwin!

anyway, I`ll try to do in a different way what I wanted to do, so *maybe* the game won`t crash! But to do it, I need your help (another DSA!):
I need a DSA, wchich kills all the giggs on level 4 every time when a pressure pad at 4(x,y) is touched. (the best would be if it kills them with some delay). Is that doable?
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Here is a start at commenting the DSA. But I am
confused. Perhaps I don't understand. This does
not seem to do what Adamo wanted. The subtraction
of 10 from the 'Monster Type' bothers me the most
and would seem to lead to negative values. In 1S0.

Code: Select all

# This is a 'Monster Death Filter' that will cause
# an arbitrary object to be dropped when a monster
# dies.  Like 'Screamer Slices' when a Screamer dies.
# In this case a Scorpion drops an arbitrary object.
#########################################################
Description = Monster Dropping                                                               
State = 0
StateLocation = 0
GroupID = 0
Number of States = 5
First Displayed State = 0
Number of non-empty states = 5
#
########################################
# Here is where we start when any monster kicks the bucket.
########################################
State Number = 0
Number of Actions = 2
#First we gather the information about the monster that died.
#We put the information into the first 8 array entries.
S0 = L8 L0 &PARAM@ 
#Now we get Array Entry [4].  This is the reason the monster died.
#We check if it died of damage.  If so we go to 3S0.  Otherwise we do nothing and exit.
S0+ = L4 &@ ??{(3,3S0)}
#
#
#
State Number = 1
Number of Actions = 3
# At this point we know that a monster has died of damage.
# If it was a Worm on level 4 then we have sent a 'Set Message'
# to the location specified by paramter B.
# Now we get the Monster Type again to determine what should 
# be dropped.
# Get the Monster Type and subtract 10.
S0 = L11 &@ L10 &NEG &+ 
# Now we add parameter A to the 'monster type - 10'
S0+ = LA &+ 
S0+ = L99 &! J2
#
#
#
State Number = 2
Number of Actions = 1
S0 = L15 L1 &@ L10 &SHIFT L2 &@ L5 &SHIFT &+ L3 &@ &+ L0 L99 &@ L15 L65535 F &%ADD
#
#
#
State Number = 3
Number of Actions = 2
#At this point we know a monster has died of damage.
# First we get the Monster's ID and fetch 2 two bits of
# information about that monster.  The number of monsters int
# the group goes to array entry [10] and the monster type goes 
# to array entry [11].
S0 = L0 &@ L10 L2 &MONSTER@
# Now we get the level of the dungeon on which the monster died.
# If it was level 4 then we go to state 4S0.  If not level 4 then
# we go to state 1S0.
S0+ = L1 &@ ??{(4,4S0)} J1
#
#
#
State Number = 4
Number of Actions = 2
# At this point we know that a monster has died of damage on level 4.
# We get the monster type.
S0 = L11 &@ 
# Now we check to see if it was a Worm that died.
# If it was a Worm we Send a 'Set Message' to the location
# specified by parameter B.  The we proceed to state 1S0.
S0+ = L15 &NEG &+ ?J1 MSB J1
signature = 2299DF30CFEB584C32BA5E8114974A11
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Paul Stevens wrote:Here is a start at commenting the DSA. But I am
confused. Perhaps I don't understand. This does
not seem to do what Adamo wanted. The subtraction
of 10 from the 'Monster Type' bothers me the most
and would seem to lead to negative values. In 1S0.
I don't know why I do it either! I think I had somehow convinced myself that 10 was the lowest monster type. Right now it still works, provided it's targeted at what to drop when a mummy dies, not a scorpion. This makes it backward compatible with my old DSA but somewhat weird.

Probably another bug!

Incidentally, what is this format that you're writing the DSA in? :)
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

what is this format
The Export/Import format.

Programs for a State can be extended with 'S0+', 'C0+',
et cetera. You have to include these additional lines in the
'Number of Actions' count.

Lines starting with '#' are comments. When you get it
all working you 'Import' it, write down the signature, and
edit the signature into the text file.

It is easiest if you put something into all the states and
'Columns' that you think you will need using CSBuild. Then
Export it and edit it.
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Adamo wrote:I need a DSA, wchich kills all the giggs on level 4 every time when a pressure pad at 4(x,y) is touched. (the best would be if it kills them with some delay). Is that doable?

Code: Select all

Description = Kill All
State = 0
StateLocation = 0
GroupID = 0
Number of States = 5
First Displayed State = 2
Number of non-empty states = 5
State Number = 0
Number of Actions = 1
S0 = LA &DUP L64512 &AND L97 &! &DUP L992 &AND L98 &! L31 &AND L99 &! J1
State Number = 1
Number of Actions = 3
S0 = L99 &@ L89 &! J2
C0 = L89 &@ ?JT0 L98 &@ ?J4 J5
T0 = L89 &@ &1- L89 &! J2
State Number = 2
Number of Actions = 2
S0 = L0 L97 &@ L98 &@ &OR L89 &@ &OR L15 L16 F &DUP L88 &! ?JC0 J1C0
C0 = L88 &@ &TYPE ??{(40002,3S0)} J1C0
State Number = 3
Number of Actions = 1
S0 = L88 &@ &DUP L0 L6 &MONSTER@ L0 L2 &! L0 L6 &MONSTER! J1C0
State Number = 4
Number of Actions = 1
S0 = L99 &@ L89 &! L98 &@ L32 &NEG &+ L98 &! J2
signature = F022A871ED47BC7A4E777E6F6ECFCF21
Set parameter A to be the lower right corner of the level you want to target. In this case, probably 4(32,32), or whatever your coords are. Then it'll kill all the gigglers on that level.
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

help!!!
I`ve got the problem with DSA "monster leaving additional stuff"..! I used Beo`s DSA (unluckily, Sophia`s doesnt work well).

It seems Beo`s DSA it`s not working properly either. Anyway, I made a DSA with Beo`s code:

Code: Select all

0S0: 
L8 L0 &PARAM@ L4 &@ ??{(3,1S0)} 
1S0: 
L0 &@ L10 L2 &MONSTER@ L11 &@ ??{(0,3S0)(1,4S0)(2,5S0)(3,6S0)(4,7S0)(5,8S0)(6,9S0)(7,10S0)(8,11S0)
(9,12S0)(10,13S0) (11,14S0)(12,15S0)(13,16S0)(14,17S0)(15,18S0)(16,19S0)(17,20S0)(18,21S0)(19,22S0)(20,23S0)(21,24S0)
(22,25S0)(23,26S0)(24,27S0)(25,28S0)} 
2S0: 
L15 L1 &@ L10 &SHIFT L2 &@ L5 &SHIFT &+ L3 &@ &+ L0 L99 &@ L15 L65535 F &%ADD 
3S0: 
LA L99 &! J2 
4S0: 
LB L99 &! J2 
5S0: 
LC L99 &! J2 
6S0: 
LD L99 &! J2 
7S0: 
LE L99 &! J2 
8S0: 
LF L99 &! J2 
9S0: 
LG L99 &! J2 
10S0: 
LH L99 &! J2 
11S0: 
LI L99 &! J2 
12S0: 
LJ L99 &! J2 
13S0: 
LK L99 &! J2 
14S0: 
LL L99 &! J2 
15S0: 
LM L99 &! J2 
16S0: 
LN L99 &! J2 
17S0: 
LO L99 &! J2 
18S0: 
LP L99 &! J2 
19S0: 
LQ L99 &! J2 
20S0: 
LR L99 &! J2 
21S0: 
LS L99 &! J2 
22S0: 
LT L99 &! J2 
23S0: 
LU L99 &! J2 
24S0: 
LV L99 &! J2 
25S0: 
LW L99 &! J2 
26S0: 
LX L99 &! J2 
27S0: 
LY L99 &! J2 
28S0: 
LZ L99 &! J2 
(I didn`t use 29S0 line (responsible for Grey Lord, because there`s not a letter higher than "z").

I made that DSA in the "DSA global", and then used 13 DSAs on one tile, where I also set "monster death filter". Each of these DSAs leads to the tile with a special object, that given monster is supposed to leave.

For example first DSA leads to 31,0 (parameter A) and 31,1 (parameter B).
Second DSA on the same tile leads to 31,2 (parameter A) and 31,3 (parameter B).
Third DSA - to 31,4 (param A) and 31,5 (param B), fourth to 31,6 (A) and 31,7 (B)
...and so on.

There are 13 DSAs from that type, so there are 26 tiles to use (as I said I don`t use 27th tile, responsible for Grey Lord, because I don`t know, wchich letter to use, besides, Grey Lord isn`t very important IMHO).

In fact, parameter A from 2nd DSA on the same tile should be threaten as parameter C,
parameter B - as param D,
param A from 3rd DSA - as param E,
param B from third DSA - as param F,
param A from 4th DSA as param G,
param B from 4th DSA as param H
...and so on..

As there is 26 letters in the alphabet I assume I can use 13 DSAs (=26 parameters in that case). I made a special object for every monster and put it in an appriopriate tile. It looks like this:

Code: Select all

Scorpion    - object type 1
Slime devil - object type 2
Giggler     - object type 3
Beholder    - object type 4
Rat         - object type 5
Ruster      - object type 6
Screamer    - object type 7
Rockpile    - object type 8
Ghost rive  - object type 9
Golem       - object type 10
Mummy       - object type 11
Flame       - object type 12
Skeleton    - object type 13
Couatl      - object type 14
Vexirk      - object type 15
Worm        - object type 16
Antman      - object type 17
Muncher     - object type 18
Knight      - object type 19
Zytaz       - object type 20
Watel el    - object type 21
Oitu        - object type 22
Demon       - object type 23
Lord Chaos  - object type 24
Dragon      - object type 25
Lord Order  - object type 26
the problem is, that:
Scorpion leaves objects: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23 and 25.
Slime devil leaves: 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24 and 26.
Giggler leaves objects: 3, 5, 7, 8, 11, 13, 15, 17, 19, 21, 23 and 25.
Beholder leaves: 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24 and 26.
Rat leaves: 5, 7, 9, 11, 13, 15, 17, 19, 21, 23 and 25.
Ruster leaves: 6, 8, 10, 12, 14, 16, 18, 20, 22 and 24.
Screamer leaves 7, 9, 11, 13, 15, 17, 19, 21, 23 and 25.
Rockpile leaves 8, 10, 12, 14, 16, 18, 20, 22 and 24.
Ghost rive leaves 9, 11, 13, 15, 17, 19, 21, 23 and 25.
Golem rive leaves 10, 12, 14, 16, 18, 20, 22, 24 and 26.
Mummy leaves 11, 13, 15, 17, 19, 21, 23 and 25.
Flame leaves 12, 14, 16, 18, 20, 22, 24 and 26.
And so on...: Demon leaves 23 and 25,
etc.

PS.: DSAs 3rd and 4th, 7th and 8th, 11th and 12th, 15th and 16th, 19th and 20th, 23th and 24th are signed as "once only", while there isn`t "once only" option in DSA editor!

please help!!!
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

That's not my filter!

Anyway, will mock up a test dungeon with a working one...hang on...
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Just created a successful mock up to anyone following this thread - will post it if there are no additions in flashchat : )

Edit: Filter -

Code: Select all

0S0: L8 L0 &PARAM@ L4 &@ ??{(3,C0)}
0C0: L0 &@ L10 L2 &MONSTER@ L0 L20 &! LA L11 &@ &+ L21 &! L1 &@ L32 &* L2 &@ &+ L32 &* L3 &@ &+ L22 &! JT0
0T0: L15 L22 &@ L20 &@ &DUP &1+ L20 &! L21 &@ L15 L65535 F &DUP L1 &NEG &= ?JT3 &%ADD JT0

0T3: N
Parameter A points to the first tile containing monster items to be dropped, the rest of the tiles need to be vertically positioned below, and you still need to have an indirect filter.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Beowuuf's solution is very simple, direct,
understandable, and efficient. If it works.
If not, it can be made to work. It is easily
extended to two dimensions so that, for example,
Gigglers might drop different items under different
circumstances. This is an example of a 'Table Lookup',
a powerful device because the decisions are taken out
of the code and reside in a 'Table'.
are signed as "once only", while there isn`t "once only" option in DSA editor!
I don't understand this statement. If it is a
problem, you need to restate it for me.
Last edited by Paul Stevens on Wed Jul 05, 2006 10:26 pm, edited 1 time in total.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

This time I stopped being lazy and theorising and actually built a test dungeon - so I know it works in a simple case : ) Not obtimised by the new language options though, still haven't mastered them

And yes, you can have random chance of dropping objects, different objects available...hehe, let's not forget that with the expanded 64 levels you could even extend the look up to three dimensions...the gigglers on level 8 have a different set of objects they could drop to the gigglers on level 20 : )
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

yeah!!!
it works allright (tested) !!!
thanx!!! :D
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

help!
Can I teleport monsters by using DSAs somehow (= NOT by using ordinary teleporters)? For example: I want to teleport a monster, when it`s exactly on a tile with open door (where I can`t put a teleporter, because there cannot be two different tiletypes in one tile).

<I would normally put a monster teleporter in other position, IN FRONT OF or BEHIND the doors, but I don`t have a space there, so I need to teleport a monster EXACTLY from the doortile! I guess this can be done only by using DSAs?>

I mean something like: when a monster is on tile (DSA target A), he`s teleported to (DSA target B).

thanx!
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

DSA to move Monster from Tile-A to Tile-B.
I will create such a thing and add it to the
DSA-Library.
Post Reply

Return to “Chaos Strikes Back for Windows & Linux (CSBWin) / CSBuild”