spell filtering

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
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

spell filtering

Post by Zyx »

Suggested texts for the spell filter function:
This spell is too difficult.
The spell fizzles and dies.

For the parameter 10 - "Unused 1", of the spell filter, could it be "objects held in hand".

I don't know why but the horn of fear is hard to pick with the hand/mouse. there's no effect when cliking on the upper part of the horn graphic.

I get an "illegal load command" when I try L32768 with a DSA (I need this value for the <object type mask> , the CLOUD bit is 15). I guess it should be a long instead of an integer.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4319
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

I'll add the suggested texts.

"Objects held in hand"????? Plural? Which hand? Do you want the code
to pretend that this object is held in the hand? Or do you want to know what
object is in the hand? You can do the latter by looking at the caster's
possessions.

I have noticed that many objects must be picked up by clicking on the
lower part, or at least not right at the top. I have never had difficulty
with the horn myself.

32768 should work. I'll make it work.

I owe you an answer about &ADD. And I am working on &ADD
of monsters. They are hard because it depends on the level and they
have additional records associated with them (like timers and group descriptors).
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Paul Stevens wrote:Or do you want to know what
object is in the hand? You can do the latter by looking at the caster's
possessions.
Yes, that's what I want to know. (so I can check if the caster is holding the cleric symbol, or an empty flask, etc.) How do I look at the caster's
possessions?

Just a side note: I think &ADDing a monster not allowed on the level should make it die, leaving its possessions. (like if the monster was teleported on this level). Do you agree?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4319
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

How do I look at the caster's possessions?
Isn't there a function to do this? I had always planned a function
to retrieve the n'th possession (there are 30). Something like
&Possessiion (<character> <possession number> ... <possession>)
I've added it to my list

I think &ADDing a monster not allowed on the level should make it die
Most assuredly. Monsters CANNOT survive on levels where they are not allowed.
Did this work properly when a monster dropped another monster? I don't
think I ever tried it.
leaving its possessions
Oh, dear. I stripped the ADDed monster of its possessions. Leaving its
possessions makes things even harder. The Screamer carring a chest, in the
chest a Dragon, the Dragon carryng .......etc......... Oh, dear. I will have to
rearrange the code to allow for such recursions.
User avatar
cowsmanaut
Moo Master
Posts: 4378
Joined: Fri Jun 30, 2000 12:53 am
Location: canada

Post by cowsmanaut »

Most assuredly. Monsters CANNOT survive on levels where they are not allowed.
Did this work properly when a monster dropped another monster? I don't
think I ever tried it.
wouldn't this mean that if you killed the monster above that it would then drop the monster? Meaning that you'd see the puff of smoke and there would be the other mosnter staring at you. :/ (just a stray thought)

so teleporting a monster to a different level kills them as well.. hmm.. I wondered about that. I always though you could put a monster teleporter above a pit to make them survive the fall... oh well.

moo
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Paul Stevens wrote:I stripped the ADDed monster of its possessions. I will have to rearrange the code to allow for such recursions.
Not that I need them currently, I have no plans with monsters possessions, except "predefined possessions".
But I guess this request would happen soon or late.
cowsmanaut wrote:wouldn't this mean that if you killed the monster above that it would then drop the monster? Meaning that you'd see the puff of smoke and there would be the other mosnter staring at you.
Yes, this is exactly what happens.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

&ADDing an actuator doesn't work.

&ECF! doesn't leave a trace in the timertrace

I can't erase footprints with &ECF!
Since &ECF!(1 location) leaves footprints, I tried &ECF!(0 location)...
User avatar
Paul Stevens
CSBwin Guru
Posts: 4319
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

This morning, whilst examining the &ADD monster code, I
predicted that you would want to &ADD actuators. How was I
able to do that? :wink: I don't see any reason
right now that would make that unreasonable.

I add the ECF! trace

Yes. Zero should erase them. I'll check it and fix.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4319
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

CSBuild154 and the latest Size4Demo have:

--Stack contents delimited in trace
--Suggested failed spell texts.
--ECF! trace
--&ADD actuators (happy puzzle designing....wow!)
--&ADD monster (with possessions)
--Erase Footprints
--Retrieve Character possessions
--DSA L32768 command works
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

woohoo!
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

It seems &ECF@ returns the location instead of the flags. And it leaves no timertrace.

&TYPE (-1) gives an index error message. It should be silent
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

&LEVEL, &X, &Y, &POS are not recognized when designing a DSA.

Is is possible to &ADD and &DEL an item in the party inventory? (maybe with a special "location", like -2,-3,-4,-5?)

I assume &ADD makes a copy, not a clone. Am I right?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4319
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

I assume &ADD makes a copy, not a clone. Am I right?
Boy, I hope so.
Is is possible to &ADD and &DEL an item in the party inventory? (maybe with a special "location", like -2,-3,-4,-5?)
What about the object held in the cursor? That could be -1.
-100 through -129 for first character possessions.
-200 through -229 for second character possessions.
etc.

I'll look into it. Should be possible.
&LEVEL, &X, &Y, &POS are not recognized when designing a DSA.
I'll fix it.
&ECF@ returns the location instead of the flags
It was never implemented. It does nothing.
&TYPE (-1) gives an index error message. It should be silent
I'll figure out what to do about this. I may tell you not to do it! You should not
be asking the 'type' of nothing. But it may be convenient to return a -1 or
something.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

ok, I'll add some checks in my DSA to avoid &TYPE (-1)
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

I would really like a DSA command to send text in the text zone of the dungeonview.
Something like SAY "Welcome back brave adventurers." If it's too complicated to put text in the DSA
code, then a command like SAY (textID) where textID is an objectID corresponding to a text object.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4319
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Hmmmmm. Thought I had already done that. I had planned to.
It will work by "Saying" the text found at a location in the dungeon
so that the parameter can specify what text is to be "Said". Like this:

Code: Select all

LA &SAY
You could have four texts in the same wall location...one at each position.
Would you like to be able to specify the color of the text?
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Thank you. Personnaly I don't need to specify the color of the text.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

If I end a DSA function with some values left in the stack, are they washed up or do they stay? In the last case could you add a CLEAR STACK function?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4319
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

If I end a DSA function with some values left in the stack
Depends on what you mean. A subroutine (called from within a DSA) certainly can
leave things on the stack. Otherwise they would be useless. You might call these
'Functions'.

But the execution of a DSA always starts with an empty stack. When it receives a
message (S0, S1, .......T3) the stack is empty. When it exits, the stack is lost.

I posted CSBuild1.54 and a new CSBwin in Size4Demo.rar. Here are the notes
( I have lost track...there are so many):

--Party Location as Spell Parameter
--Move variables DrawAsSize4Monsters and invisibleMonsters to non-platform
dependent location
--Large Death Cloud for Size4 monsters
--DSA - Ability to control Footprints floor graphics.
--Walltext character name substitution
--DSA - Delimit stack contents in DSA trace
--DSA - New Failed-Spell texts
--DSA - &ECF! trace
--DSA - &ADD Actuators
--DSA - &ADD Monsters
--DSA - Retrieve Character Possessions
--DSA - Correct L32768 bug
--DSA - &ADD objects to cursor and character possessions
--DSA - &DEL objects from cursor and character possessions
--DSA - &SAY implemented
--DSA - Return -1 for &TYPE(-1) (avoid error message)
--DSA - Implement &ECF@
--DSA - Implement &LOC2ABSCOORD
--DSA - Implement &NOT
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

thank you, I'll check the new version.

I'd like to know the wizard level of the caster in the spell filtering. Is it possible?
What is 8 - Spell Byte 5?
Can I make a spell fail if I change the 7 - Skill Required?
Is there a parameter for the experience gain, and if I change it, will the caster gain it?

The spell 1300 is filtered as 1306.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

MSB command sends a message to level mod 16.
The inventory view is not updated if &ADD or &DEL commands are issued while viewing the backpack.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

&U< is not recognized

I don't know what the &SHIFT (x y ... x<<y) operation is. Could you give an example?

I can't make the &SAY (textID color) command work. I tried with color 0, color 1 and color 255. I tried with floor texts and wall texts. I just have a line in the timertrace: &SAY .

Some more suggestions for failed spells texts:
%caster% needs more practice with this spell
this spell requires a component
User avatar
Paul Stevens
CSBwin Guru
Posts: 4319
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

[know the wizard level of the caster
I'll make it possible.
What is 8 - Spell Byte 5
Darned if I know. The code uses it for something. It is the
fifth byte of the spell's description, I think.
Can I make a spell fail if I change the 7 - Skill Required
I don't know.
Is there a parameter for the experience gain, and if I change it, will the caster gain it?
I don't know. thes things will require a study of the spell-casting code.
Perhaps someday I can try to document tese things. I'm a bit busy now.
The spell 1300 is filtered as 1306.
I'll try to fix that.
MSB command sends a message to level mod 16
I'll fix that.
The inventory view is not updated if &ADD or &DEL commands are issued while viewing the backpack.
Ouch. I don't know how to fix this but I will try.
&U< is not recognized
I'll fix that
don't know what the &SHIFT
Left shift. X is shifted left y bits. Multiply by 2 to the yth power.
Examples:
5<<1 = 10
5<<2 = 20
5<<3 = 40
I can't make the &SAY (textID color) command work
The Size4Demo has an example. In the farthest cell due east of
the start. 0(9,0) I think.
suggestions for failed spells texts
I'll add these
User avatar
Paul Stevens
CSBwin Guru
Posts: 4319
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Sorry. I think I forgot to include the new sample dungeon in the Size4Demo.
It is there now. I hope. It has the example of &SAY usage.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4319
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

The spell 1300 is filtered as 1306
I cannot make this happen. I assume you mean that when the spell "13"
is cast that the spellparameters[incantation] = 1306 (decimal). If this really
happens for you I guess I will need to look at your dungeon.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4319
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Posted today:

--Spell Filter. New, default, Spell-failure messages.
--DSA - Allow messages to level 16
--DSA - Implement '&U<'
--DSA - Implement '&MASTERY' to get Fighter, Ninja, Priest, Wizard level.
--Update viewport when object added to or deleted from inventory
Post Reply

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