DSA errors, tips and tricks - discuss

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. You may Image to help finance the hosting costs of this forum.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4322
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

zoom wrote:I vote to continue the lessons
Well, good buddy....All of your questions
are 100% valid. Lesson 2 will cover many
of them. Keep those questions and stupid
misunderstandings coming :wink: Sorry---
just kidding. There ain't no such thing as
a stupid misunderstanding. These DSAs
have a very steep learning curve but once
you get over a certain level of understanding
then you will find that you can commonly
solve difficult problems with simple code.

We had to start somewhere and I chose to
start with the concept of the 'stack', without
which anything else would be total gibberish.
TOMi wrote:9 of 10 people are to shy to ask on the forum for help
I hope you are wrong. zoom may have helped
a few of these people get over their shyness by
throwing out a bunch of questions. Keep it up.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4322
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

I forgot to say:

A great feature of the wiki :!:

Feel free to inject questions directly
into the wiki. Maybe put in red so
they are more obvious. That will
give me a chance to insert a few
more words of explanation or perhaps
a link to more detail.
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

User avatar
Paul Stevens
CSBwin Guru
Posts: 4322
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Those are tremendous resources! Where
is the gentleman who owns these? I would
very much like to reference them from the
wiki. Are they referenced from the
encyclopaedia? Are they in any danger of
disappearing? Should we make copies rather
than reference them where they are?
Is this project still being maintained?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4322
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

TOMi has added a 'DSA Examples' page to the
wiki. Thanks, TOMi.
User avatar
beowuuf
Archmastiff
Posts: 20686
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Kentaro comes and goes, I cannot imagine him having a problem with the information being amalgamated, espcially as I do not know if they are secure or could disappear. I apologise if this site is not referenced somewhere easily, especially explaining the syntax his work is very impressive.

The pages are based on the oldest of the DSA language, which is fine for the beginners though of course it misses some of the great new work.
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

that`d be good if all of DSA-relating stuff was in one place, and ready to print. You say this is wiki?
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
T0Mi
Expert
Posts: 324
Joined: Thu Dec 27, 2007 10:21 pm
Location: schland

Post by T0Mi »

Custom dungeon creating is eating up a lot of time. I really hope that fun it provides right now won't wear off too soon and I guess on many harddrives there are rotting quite a few unfinished dungeons that could have been nice. I wonder about just why people put that much time into an old game and mostly I wonder about myself doing it. I think this is not something that lasts for a few month, but will turn out to be a 'hobby' that will be entertaining for much longer. Anyhow, right now there is still a lot of pain in it, creating a dungeon 'in a flow' is sadly still far from reach.

It's not 'just' getting into CSBuilt and DSA (which is a task of its own), but also (and this is what I'm doing most with that little time I have) the work to be put into creating graphics. Old DOS games like Heretic can be a great source for nice ones and as only a very limited number of colors are displayed, screenshots can be easily used as base for nice wallsets with little work to do on them afterwards.

With the lessons Paul provided and the various links found and posted here I finally understood how DSAs are working at least on a basic level and even Pauls older documentations till now mysterious to me, for the most part are understandable now. Never thought that would be possible. But DSA alone won't built a dungeon. Still for me lots of quite basic things leftover and again information is vastly scattered. Its easy to miss things and still someone might then point to a 'almost sticky' thread, embarrassing for those who asked.

People do come in many colors. But most people stick to the colors they have 'picked'. It's unlikely a coder can create eyepopping graphics, just as unlike as an artist could also be an experienced close-to-the-machine-programmer. It happens of course, otherwise we won't ever have seen Conflux. Design is nothing without code and code is nothing without design.

aaahhh... babbling again. Surely there are many things that could be seen differently.

T0Mi


EDIT:
STUPIDO found out! :-)
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

Successfully creating custom dungeons is
-to some extent- team work.

I guess everyone needs help with
some tasks sooner or later
(be it general questions, advanced dsa logic,
graphic rigging or finally playtesting).
User avatar
T0Mi
Expert
Posts: 324
Joined: Thu Dec 27, 2007 10:21 pm
Location: schland

Post by T0Mi »

I will try to document my learning process and add instructions on the wiki while building my custom dungeon.
But this is a very slow process. Surly I will ask fo help if I'm really stuck.
The oldhands can sit back for a while and watch the newbies grow up. One day, I'll make it out of the HOL . 8)

T0Mi

P.S.
Sophia added a page for DSB. Great and far from being luazy. ;-)
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Here's an example:
this DSA must point to a text (generally hidden inside a wall).
When the DSA receives a SET message, the text will be displayed in the text area.
If parameter B is not defined, default is 15 (white).

You can disable the DSA with a T3 message (=Toggle west)

Code: Select all

Description = Say text at A --- B (optional): text color
State = 0
StateLocation = 0
GroupID = 0
Number of States = 1
First Displayed State = 0
Number of non-empty states = 1
State Number = 0
Number of Actions = 4
0S0 = LA LB ?G0C0:GT0 &SAY
0C0 = LB
0T0 = L15
0T3 = 1N
signature = 5546F283163100749C0793E7C57CFD1C
This one is to teleport the party to A when receiving a SET msg.

Code: Select all

LA &TELEPORTPARTY
This one will allow you to send messages to another level, it acts as a relay:

Code: Select all

Description = Relay MSG to A
State = 0
StateLocation = 0
GroupID = 0
Number of States = 1
First Displayed State = 0
Number of non-empty states = 1
State Number = 0
Number of Actions = 12
0S0 = MS
0C0 = MC
0T0 = MT
0S1 = OP1 MS
0C1 = OP1 MC
0T1 = OP1 MT
0S2 = OP2 MS
0C2 = OP2 MC
0T2 = OP2 MT
0S3 = OP3 MS
0C3 = OP3 MC
0T3 = OP3 MT
signature = 6CA154E3E39DC49E47B507873F9DA710
This one plays sound A (A is the ID of the sound in CSBgraphics.dat)
Sound is only played if the party is on same level as the DSA instance.
SET msg: sound is played with a volume inversely proportional to distance. So you should put the DSA instance right where the origin of the sound is supposed to be, or very near.
CLOSE msg: sound is played at full volume, no matter the distance.
TOGGLE msg: sound is played with a volume inversely proportional to distance, with a random chance. B parameter is the chance not to be played.

Code: Select all

Description = Sound A
State = 0
StateLocation = 1
GroupID = 0
Number of States = 2
First Displayed State = 0
Number of non-empty states = 2
State Number = 0
Number of Actions = 8
0S0 = G0C1 &= ?J0C3
0C0 = G0C1 &!= ?J0C2 LA L0 L0 &SOUND
0T0 = LB &RAND &NOT ?J0S0
0C1 = L$ &LOC2ABSCOORD &DROP &ROT L0 L4 &PARTY@ L1 &@
0C2 = N
0T2 = &NEG
0C3 = V3@ &NEG &+ &DUP L0 &< ?G0T2 &SWAP V2@ &NEG &+ &DUP L0 &< ?G0T2 &+ J0T3
0T3 = LA &SWAP L0 &SOUND
State Number = 1
Number of Actions = 0
signature = CBE01B63751F56C2396378DE8423B9E0
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

Here is my first DSA :shock: :D
I have made a dungeon with 3 pushbuttons,
each send different Set messages to this DSA.
Button 1 sends SET east,
Button 2 set north
Button 3 set south

The DSA targets in Parameter A a closed door.

It works!! It took a while, and I encountered some
difficulties but it went well in the end.

Code: Select all

Description = Sequence pushbutton
State = 0
StateLocation = 0
GroupID = 0
Number of States = 3
First Displayed State = 2
Number of non-empty states = 3
State Number = 0
Number of Actions = 3
S0 = 1N
S1 = N
S2 = N
State Number = 1
Number of Actions = 3
S1 = 2N
S0 = 0N
S2 = 0N
State Number = 2
Number of Actions = 3
S0 = 0N
S1 = 0N
S2 = 3MS
signature = 04D948B6498624D867D2D612771779EE
However, I don't know what's
First Displayed State = 2
User avatar
Paul Stevens
CSBwin Guru
Posts: 4322
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

zoom wrote: However, I don't know what's
First Displayed State = 2
I think.....when you edit the DSA, that is
the state that you will see.

Congratulations. You are on your way
to big things. We anticipate that your
new dungeon will have more than four
characters, each with very special talents.
'Rope Climber', 'Speed Skater', 'Power Glove',
'Chef' (Nutritious snacks from poison apples),
'Brewmaster', 'Blacksmith'. What else?
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

Paul, thanks for telling.

So far it is fun to fiddle with csbuild
:)
T0Mi enjoys it as well, I reckon !

Always keeping an ear open to the
mind boggling engine-tweaking potential.
:twisted:
User avatar
T0Mi
Expert
Posts: 324
Joined: Thu Dec 27, 2007 10:21 pm
Location: schland

Post by T0Mi »

yeah... its fun. I hear the beat of that drummer. :)

Had quite a few a-ha times with CSBuild. To learn something new, a real task is needed, something with an instant "wow, it works. now what if...".
Sadly this week will be full of RL matters, so no dungeon-building until the weekend. :-(
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

second DSA
(great help and thanks Beo)
it does not give you a message or any clue what's going on,
but as a start..

Code: Select all

Description = party attack filter
State = 0
StateLocation = 0
GroupID = 0
Number of States = 2
First Displayed State = 0
Number of non-empty states = 2
State Number = 0
Number of Actions = 1
S0 = L23 L0 &PARAM@ L0 &@ L1 &CHPOSS &TYPE ??{(50010,1S0)}
State Number = 1
Number of Actions = 1
S0 = L4 L0 &@ &CHPOSS L1 &NEG &= ?J0T3 L1 &NEG L1 &! L23 L0 &PARAM!
signature = 1AC072B6116A5573A509560780494E3A
explanation :
(to be continued)
prevent attacks with SWORD if the left hand of attacking
character is not empty.
User avatar
beowuuf
Archmastiff
Posts: 20686
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Oh, where did that L4 come from? And why the negative 1 comparison?

For State 1, I thought you needed:
L0 &@ L0 &CHPOSS L65335* &= ?J0T3 L1 &NEG L1 &! L23 L0 &PARAM!

*Not sure this number is correct, need to look into the general docs to see what the null value returned for no item is
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

L4 is the attacking character..
it would not work and a Parameter was missing for &CHPOSS.

The -1 I got from DSA Trace , it would be -1 if the lhand was
empty not 65335. never was able to get 65335
*chrug
User avatar
beowuuf
Archmastiff
Posts: 20686
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

The variable in L0 is the character who initiatd the attack (just as the previous CHPOSS)

As I had said, I could not recall exactly the number used - hadn't remembered it was -1 in that case, other cases 65335 or some variant is used. Glad you found it in the trace!
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

F says:

objectID Result - This is the unique object ID for the object found in the 'virtual' pile of objects. If no object exists at the specified depth then the resulting objectID will be 0xffff ( 65535 ).
However -1 works, 65535 .uh,uh just noticed its
65335!!

in &CHPOSS it says:

&CHPOSS(<char num> <index> ...<objectID>)
<char num> = 0 to 3; <index = 0 to 29>
<char num> == 4 means 'Active Character'
<char num> == -1 means object in cursor
User avatar
beowuuf
Archmastiff
Posts: 20686
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Yeah, so as long your party leader attacked, you would be ok. It's good you could check to see if the active member say possesed the staff of macguffin, if the active member is 'brandishing

Cool, I forget you could query the mouse :D
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

I think I don't know what active character means.
please explain
User avatar
beowuuf
Archmastiff
Posts: 20686
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

The party leader ,the one that is highlighted
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

I thought active member was the one that has
the weapon active, ready to strike... :?
User avatar
beowuuf
Archmastiff
Posts: 20686
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Nope, it's the party leader I'm afraid! :D

In order to activate the party attack filter, you have to have made an attack, hence the menu will have already closed

You find out which member attacked by querying the message and looking at the first value
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

ok, I should test and change it, as well as add some
explanations...
User avatar
T0Mi
Expert
Posts: 324
Joined: Thu Dec 27, 2007 10:21 pm
Location: schland

Post by T0Mi »

Sorry folks,

I can't keep up this pace.
You're miles away and right now I'm quite in a struggle to get some RL issues sorted out.
(some good and some bad ones. won't go into detail.)

However, I will continue adding stuff to the wiki whenever I'm feeling funny.

Cya! :-)
Roquen
Artisan
Posts: 179
Joined: Fri Jul 11, 2008 11:34 am
Location: Biarritz, France

Post by Roquen »

Is there a complete formal specification of DSAs somewhere?
User avatar
Sophia
Concise and Honest
Posts: 4306
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Roquen wrote:Is there a complete formal specification of DSAs somewhere?
Wouldn't that be nice!

There is some documentation on Paul's web site as well as internal to CSBuild, but, nothing complete or formal.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4322
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

http://www.dianneandpaul.net/CSBwin/doc ... Index.html

If you have read all that stuff and still have
questions, let us add a FAQ to this page.
Post Reply

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