Spell filter built-in messages

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.
Post Reply
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Spell filter built-in messages

Post by zoom »

0 [spell works; default messages for spells]
1 [spell doesn't work, no message]

2 THAT IS A DIFFICULT SPELL. STUDY IT.
3 THE SPELL FIZZLES.
4 THE SPELL FIZZLES AND DIES.
5 THIS SPELL IS TOO DIFFICULT.
6 [champion] NEEDS MORE PRACTICE WITH THIS SPELL.
7 THIS SPELL REQUIRES A COMPONENT.
Edit:
8 [spell works, default messages for spells]
/Edit
9 [spell works, default messages for spells]

18 [spell works, default messages for spells]

I wonder where/how these messages can be modified
and whether a complete list is somewhere available
(if there is need for it, I could complete this list)
for getting a refresh on things visit:
http://www.dianneandpaul.net/CSBwin/doc ... ilter.html
Last edited by zoom on Mon Aug 07, 2006 12:05 pm, edited 1 time in total.
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'm looking at the code. I see cases 0 through 7.
But that is all I see. Where did you get these others?
And the documentation (written by yours truly) appears
to be a bit lacking in this regard.

You can certainly say anything you wish in a
Spell Filter by using the $SAY command.

I'm confused.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

AS far as I remember initial discussions were you had 200 entries or something available, hard coded, and currently only 0 - 7 had been filled (probably from zyx requests)

I reckon you have been practising with a spell that was iffy for your champion, hence why you think there is an 8
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

My fault, you are right, there is only 7 possiblilities:
the eighth one was when I cast 1100 for speeding things up,
since all spell messages in this example DSA are the same
for any combination of runes..
So the number 8 would work as if no filtering was in effect.
I realised that 9 and 18 would not change much, but did
not notice number 8 was also not changing anything;
forgive me, after some hours of figuring out the spell filter,
reading about stack , temporary variable 'i' and @,! -param, I got careless/did not notice)
Here is the story:

I used the mechanism for modifying (Filtering) the spell's effect
(obtained the action parameter by using the &PARAM@ command;
The parameter was modified with &! and then sent back to the runtime engine using &PARAM! .)

For clarification:
I tried to understand the spell filter dsa that is shipped with the
overlaydemo.rar, managed after some hours , and then wanted
to see what "results" there are
to be honest I first wanted to see what messages there were
built-in and ended up cracking my skull with the dsa :

Description = Disable Zo Until Scroll is Found
State = 0
StateLocation = 0
GroupID = 0
Number of States = 1
First Displayed State = 0
Number of non-empty states = 1
#Whenever a spell is cast, a 'Set 0' (set north)message
#will be sent
#to this location, that not only holds this dsa, but also
#the "Important Location" Spell Filter Location
#
State Number = 0
#normally there are only 2 actions, but when splitting lines,
#each split counts as one 'extra' action, so there are 4
Number of Actions = 4
#the following : L1 L0 &PARAM@
#will fetch L1 Parameter (L1 =integer='1') from
#the spell filter event/runtime engine and starts storing
#the value at slot 0 (L0) in the temp. variable 'i',
#which is an array if I see it correctly
#since there is only one Parameter, only one slot gets filled
S0 = L1 L0 &PARAM@
#L2 L0 &! will put an integer value='2'(L2) on slot 0(L0), #changing value of (slot L0) from 0 to 2
#I changed L2 to L3,L4,L5 for result no.3,4,5 etc
S0+ = L2 L0 &!
#we give the runtime engine back their modified parameter
#L1(=integer 1) parameter will be stored(!) starting with L0
S0+ = L1 L0 &PARAM!
#
#C0 gets activated when the scroll is found the first time #('clear 0' message will be sent to state 0, C0)
#do nothing and go to state 1 when the next message arrives;
#the next message will be a set 0 message when a spell is cast
#the dsa will be on a dead end (because it is in state 1 and
#a set 0 message will not find any instructions there)
C0 = 1N
signature = 7BFCB5F35ADB90DBF037E192792AA2E7

Timer Trace:
(I loaded 13 parameters and cast lo Zo spell,1600;
action parameter was modified to 5, gave me result:
THIS SPELL IS TOO DIFFICULT. )


DSA Disable Zo Until Scroll is Found State 0 MSG 0
(0)Execute DSA at 0(1,4) master at 0(1,4) state=0,msg=0
LOAD INTEGER 13 (13)
LOAD INTEGER 0 (13 0)
&PARAM@ { 0 1600 0 -1 -1 131 0 -1 -1 -1 -1 -1 -1} ()
LOAD INTEGER 5 (5)
LOAD INTEGER 0 (5 0)
&Store ()
LOAD INTEGER 1 (1)
LOAD INTEGER 0 (1 0)
&PARAM! 5} ()
(0)RETURN ()

(another "spell" :1310, again changed action parameter to 5)

DSA Disable Zo Until Scroll is Found State 0 MSG 0
(0)Execute DSA at 0(1,4) master at 0(1,4) state=0,msg=0
LOAD INTEGER 13 (13)
LOAD INTEGER 0 (13 0)
&PARAM@ { 0 1310 0 -1 -1 131 0 -1 -1 -1 -1 -1 -1} ()
LOAD INTEGER 5 (5)
LOAD INTEGER 0 (5 0)
&Store ()
LOAD INTEGER 1 (1)
LOAD INTEGER 0 (1 0)
&PARAM! 5} ()
(0)RETURN ()

(scroll is found)
DSA Disable Zo Until Scroll is Found State 0 MSG 1
(0)Execute DSA at 0(1,4) master at 0(1,4) state=0,msg=1
NOOP ()
(0)RETURN ()
(spell is cast, filter became inactive:)
DSA Disable Zo Until Scroll is Found State 1 MSG 0
(0)Execute DSA at 0(1,4) master at 0(1,4) state=1,msg=0
()

you get the idea how I got these messages
Anyway the list is complete now, and I updated it in my
previous post. I have to look at the say command, thanks.
Post Reply

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