Eating filter (CSBwin)

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
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Your level problem was fixed along with the crash.
That is what caused the crash. Your DSA was on level 2
and things got confused.

That fix has not yet been posted. Later today unless
your latest emails inspire me to fix a couple other things
first.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

It works fine now, thank you.
Ameena reported that when eating something, it heals wounds, even if the paremeter 19 - u - heal count is set to 0 in the feeding filter.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

For long texts, normally displaying when stepping on them, an &SAY will produce an error message: "text too long".
Also, is it possible to take into account the linebreaks ("/") when displaying it in the texte zone?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

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

Post by Zyx »

parameter 13 of the feeding filter affects wisdom instead of curing venom.
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 posted CSBwin95v52test4. From release notes:

--DSA - &SAY recognizes '/' as line-break
--DSA - Fixed "J10" causes state to change if state 10S0 is <empty>.
--DSA - Fixed "Text too long" error in &SAY
--DSA - Fixed &CHAR! to dead character leaves multiple bones.
--DSA - A 'Size-4' monster now drops implicit items only wwhen last monster of group dies.
--DSA - Fixed "Eating heals even when parameter 19 is zero".

Reported problems I could not fix:
Feeding filter parameter 13 affects wisdom
instead of curing poison
I tried everything I could think of and it worked for me.
Need example, I guess.
Setting monster to poisoned causes it to
become invisible
The code looks right. I tried both poisin and invisible
and they both worked for me. Need example.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

>Feeding filter parameter 13 affects wisdom instead of curing poison
It works now with the new version.


>Setting monster to poisoned causes it to become invisible
It seems to be related to the &monster! operation.

The trace shows only 6 parameters by the way:
LOAD INTEGER 7 (14033 10 7)
&Monster@ { 4 17 1000 1 1 1} ()

Also, if I kill 3 monsters out of a group of 4, their number decreases only by one:
Example:

Code: Select all

DSA:
&Monster@ { 4 17 1000 1 1 1} ()
...
&Monster! { 4 17 999 0 0 0 8} ()
(events)
DSA:
&Monster@ { 3 17 999 0 0 0} ()
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

98v52test5 fixes an array overflow problem in &MONSTER@
that could easily have caused the debug version of the
program to act differently than the release version.
So let us start with '98v52test5' and see if any of
these problem still exists.
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 the new trace:

Code: Select all

DSA:
  &Monster@ { 4 17 1000 1 1 1 8} ()
...
  &Monster! { 4 17 999 0 0 0 8} ()
(events)
DSA:
  &Monster@ { 3 17 999 0 0 0 13} ()
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

An error is generated at runtime by setting both parameters to 1 in the feeding filter:

20 - b - empty flask.
21 - b - empty hand. Remove the object from hand and delete from dungeon.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

If I understand correctly then if 21 is set I can
ignore 20?
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

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

Post by Paul Stevens »

An examination of the code does not reveal any problem here.
Nor could I reproduce it by setting both 20 and 21.
So you are doing something different than I.
I set the two flags for a ROS potion.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

As you were. Fixed.
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 a problem. I want to change special value of one type of food on the whole game (for example: I want all in-game shanks to give +5 mana everytime when eaten; while dragon steaks would increase your health... etc.).
How should I do it?
I tried to change that DSA given by Paul in his "feeding filter demo":
S0: L26 L0 &PARAM@ L4 &@ ??{(9,C0)}
C0: L200 &NEG L18 &! L4000 &NEG L5 &! L4000 &NEG L6 &! GT3
T3: L26 L0 &PARAM!
but with my little knowledge of DSAing all I could do, was to change values of an apple, wchich lies in specified (?) tile, by changing parameters and values in C0 line (it`s quite simple - replacing parameters like "food value" [5th parameter] or "hitpoint adjustment" [18th parameter] etc., and their values).
But how to cause changing selected parameters of ALL apples in the game, no matter, where are they placed?
Also - what to do in that example, if I want to change values of another food type (for example cheese)?
I feel that each type of food should have its own DSA (working in the whole game). I know, that object type number of apple = a8/168, but how to place it?

Very sorry for my ignorance - I really tried to learn DSAing, but it`s still a black magic for me.
Thanx for 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 »

S0: L27 L0 &PARAM@ L3 &@ ??{(174,1S0)}
1S0: L5 L17 &! L27 L0 &PARAM!

The problem is you were using parameter 4, which is the ID of a specific object. Instread, use parameter 3, which is the type ID - ie all shanks, apples, etc. Unlike the usual 'type' command (which has numbers like 10035 for shank) the feeding filter uses the type ID found through CSBuild (look at the number after the object ID, for shanks it is M174 for miscellaneous item, type 174

Note the ??{(174,1S0)} is a case statement. So for cheese (item id 171), you could add the bit ??{(174,1S0)(171,2S0)} and in state 2 have simple or complex code for cheese

So as you can see this way you use state 0 as a sorting area, then the ?? redirects the code to the appropriate state if it is a cheese, shank, or as you sat 168 for apple
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

big thanx for help, Beo !!!!!!

everything works fine now, but there`s one problem...
...feeding filter doesn`t work with newest CSBwin v.111 (works with that old one from "feeding filter demo" only and v.76). When I`m trying to eat "modified" food, game hangs up with no info. A bug??
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 »

If you are convinced that your DSA is not 'hanging up with no info'
then send me a copy of your dungeon and I will see what's
wrong. Even if it is your DSA at fault, maybe I can make
the thing more fool-proof. There are a lot of illegal
things I never bothered to check for.

Also, send a recording that demonstrats the problem.
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

ok, I have just sent you an email with compressed file and a description of a problem.
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 »

I posted a new FeedingFilter.zip.

It contains CSBwin version 9.8v117 and it works
much better.
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

indeed, with v.117 it works fine. Thanx!
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 »

bumped for myself - I need to get into it once again
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
Post Reply

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