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

Eating filter (CSBwin)

Post by Zyx »

Is it possible?

The idea is to trigger events and manipulate the food gain when eating an edible object.

Some parameters could be:
index of character
object ID
food gain
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Yes.

Plus WATER. HEALing potion, etc.

You have the weirdest ideas. Conflux is obviously
going to be a bit different from your standard DM.

"YOU BETTER NOT EAT THAT. STAMM DIED FROM EATING SUCH A THING"
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Ooh, some nice ideas going on here... amazing how far things have progressed from plain vanilla DM.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

CSBuild169.rar and CSBwin98v25.rar.
Also documented at CSBwin/documentation
(Over 20 parameters! Eating is complicated.)

Now, by using the Feeding Filter and the Spell Filter, your champions
can learn new spells by eating scrolls. Or gain strength by eating
bones. Or have an inexhaustible supply of water when a certain
Waterskin is found. Or fill an empty stomach by eating a Solid Key.
Or make a door open when a compass is swallowed. Or teleport the
party when they eat a Dagger. You will undoubtedly think of something
else even more clever.

I have done minimal testing of the 'normal' eating modes. Some potions,
Waterskins, Worm Rounds, WaterFlask. But I have not tried to change any of
the parameters with a filter. So you are going to do the testing. Good Luck!
User avatar
Des
Um Master
Posts: 461
Joined: Wed Jun 11, 2003 11:58 pm
Location: Southampton, UK

Post by Des »

Mad but groovee :D

I will *have* to use this in my dungeon at some point. Not sure how just yet but I'll think of something - my brain is not as warped as Zyx's :wink:
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

1) If I set the HP of a monster to 0 using &MONSTER!, it doesn't die.
------------------
Feeding filter:

2) If I decrease the HP of a character to 0, he doesn't die.

3) When decreasing stats like strength I cannot go below 30. (Maximum is 170 which seems reasonnable enough).

4) There is no antimagic and antifire adjustment, is it normal?

5) Decreasing shield I get this message:
[Character] shield decreased to 50
[Character] shield decreased to 100
[Character] shield decreased to 150
and so on... Is it for debugging purposes?

6) Negative values of water or food will decrease the bars down to the yellow threeshold only. They should be able decrease the bars to the zero value: when the bar is red and one pixel wide.

7) I think there are several word/byte problems... Here are some symptoms:

a) If I decrease the mana by any value it drops immediately to 0. If I increase it it rises to 900. Or maybe it has something to do with the previous or following parameter...

b) If I decrease the HP by any value at design time it really decreases by 1 at run time. Increasing doesn't work. Or maybe it has something to do with the previous or following parameter...

c) If I decrease the stamina by any value at design time it really decreases by 1 at run time (or 0.1 since stamina is divided by 10 when displayed). Increasing doesn't work. Or maybe it has something to do with the previous or following parameter...

d) If I decrease the shield by any value at design time it really decreases by 1 at run time. Increasing doesn't work. Or maybe it has something to do with the previous or following parameter...

e) Changing parameter 14 (stamina) seems to affect shield instead. Or maybe it has something to do with the previous or following parameter...


f) About parameter 21 (empty hand):
Edible items should come with this parameter in 1, but it is set to 0.
In any case, changing it has no effect.

g) Parameter 22 (chew):
It is stated it's boolean but i comes with the 65536 value!
In any case, changing it has no effect.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

OK. So you got a problem or two.

I guess my day is shot.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Try 9.8v26

1) It ain't easy to kill a monster. What I have done is set his HP to
zero and then the next time he moves I attempt to remove him from
the game. So there is a shor delay. You still cannot kill invincible monsters.

2) Character now dies if HP = 0.

3) That is the limit applied by the original FTL code. There is both a
minimum and a maximum.

4) There were no potions to affect anti-magic and anti-fire. But I have
added parameters for you. See new documentation.

5) Fixed, I think

6) Fixed I think. These can go as low as -1023;

7) and up. There was a bad problem with data alignment. I fixed this
and hope that many of these problems will go away. Let me know what
still does not work.
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! Everything seems to work fine, except:
After a certain amount of decreasing shield,a shield appears around the character.
Stamina can goes to negative values. It should stay at zero, the excedent should decrease HP.
Normal food comes by default with "no chew".

-----------------------------
When I get "Scrolls-2484 Valid Indirect Pointer is nowhere referenced", could I know the text of the scroll?
When I get "Weapons-2038 Valid Indirect Pointer is nowhere referenced", could I know the kind of weapon? (same for misc, clothes, potions, etc.)
When I get "chests-4258 Valid Indirect Pointer is nowhere referenced", could I know the content of the chest?

The button Browse in the "edit global info dialog" doesn't work.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

When depleted, waterskins get filled again!

Edible objects should come with the feed action paramater set to true by default. (by edible I mean objetcs with the tag "Consumable")

Last but not least, could you add broken and poisonned tags to misc objects?
Could CSbuild to allow to check and uncheck those tags?
Could you add &GETPOISONNED and &SETPOISONNED operations?
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 that waterskins and potions come with the same old chewing parameters as in the previous feeding operation.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Last but not least,
What do you mean by 'Last'? I was beginning to relax there for an hour or so. ;-)
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

could you add broken and poisonned tags to misc objects
What if we quit this business of adding one thing at a time?
How about I implement a method of adding an arbitrary number
of <property,value> pairs to ANY object in the dungeon?

Then you could have a Dagger that was "Blessed by Zeus". Or
a Gold Key that "Needs Repair". You could implement a
"Key Repair Shop" or an "Item Identification Facility".
Or a Rabbit's Foot with 17 "Charges"
remaining. In actuality, all I would provide is a list
of <property,value> integer-pairs and you could interpret them as you
please. The DSA commands would be something like:

$GETPROP(Id property ... value 1) or (Id property ... 0)
$SETPROP(Id property value ... )
$DELPROP(Id property ... )

CSBuild would allow you to edit these.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Valid Indirect Pointer is nowhere referenced", could I know the text of the scroll
I think that I will allow a 'repair' and the result will be that you can
edit the orphaned object.

I need a test case. Can you send a dungeon with these problems?
How did these problems arise? CSBuild should not create such problems.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Get 9.8v27

I don't know what this includes but here are some of the things
I have done recently:

--FeedFilter - Fix Waterskin contents goes negative
--FeedFilter - Fix consumables should have default FeedAction = true
--FeedFilter - Fix Waterskins and Potions should not 'chew'
--FeedFilter - Fix Shield changes cause debug text output.
--FeedFilter - Fix Stamina going negative
--FeedFilter - Fix normal food should have 'chew' action.
--Fix &DEL Scroll in cursor causes crash.
--Repair 'Save and Quit'
--Trace parameter array in &Monster!
--Allow graphic size greater than 32767 bytes.

You asked about manipulating a character's Poison state.
Here is sorta how poison works:
When a character is poisoned his 'poisoned' status is increased.
A Timer is started that will decrease the poison. When an
anti-poison potion is consumed then the poisoned status is
set to zero and we search through all the Timer entries and delete
all of them that apply to this particular character.

So, if you want to manipulate 'poison' status we have to do a bit
of work. To increase it we add and start a timer. To decrease it
we have to subtract and search the timers to find the one that will
happen first and, if it is greater than the amount of the decrease, subtract.
If it is equal we delete the timer. If it is less we delete it and have
to find more timers until the sum is the amount of the decrease.

Is this what you want me to work on?
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 for the quick update.
Paul Stevens wrote: $GETPROP(Id property ... value 1) or (Id property ... 0)
$SETPROP(Id property value ... )
$DELPROP(Id property ... )
This seems great! What would do a $GETPROP to a property that has been $DELPROPed?
The list would be hard coded in CSBwin? May I suggest then ROTTEN, BLESSED, UNIQUE, MAGIC?


About the poison: yes.

Could you do also a &PARTY@ command? (I'm currently interested to access the 3 main stats)
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

$GETPROP to a property that has been $DELPROPed?
Return a zero: $GETPROP(ID property ... 0)
The list would be hard coded in CSBwin?
In actuality, all I would provide is a list
of <property,value> integer-pairs and you could interpret them as you
please.
The propertys are integers that you provide. The values are
integers that you provide. Here is the complete list:
0,1,2,3,4,5, ... ,4294967294,4294967295
Could you do also a &PARTY@ command?
Sure. But we really need a &PARTY@ and an &CHARACTER@
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Oh, I misunderstood quite a lot. Your patience is impressive...

About the properties, what I meant was what the player would read if he/she examines the object with the eye.
You're proposing invisible properties, I reckon, for which I find almost no usefulness. For unseen markers I was already using the ID and the charges. This covers all my needs, because I don't want to have too many different objects with the same name and appearance for the player.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

player would read if he/she examines the object with the eye.
Perhaps we need an 'Eye' filter. Then you could say whatever you please
when the object has the '65723098' property with value '8712009'.
We could even say a LOT about an object in the Text area of the screen.

"STAMM IS HOLDING THE VERY APPLE THAT CAUSED EVE TO LEAVE EDEN. YOU
BETTER NOT EAT IT. YOU WILL NEED IT LATER. BESIDES, IT IS POISONOUS
AND YOU WILL SIMPLY REGURGITATE IT."
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Yes, the Eye Filter is interesting! With a function similar to &SAY, I guess, to select a specific text?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

With a function similar to &SAY
Quite. But we need some formatting capability other than
substitution of character names. So you can insert numbers
perhaps: "You need to eat 2 more Apples". What else?

Also, the Eye Filter should allow a couple of words to be displayed
in the inventory screen. Where the word "CURSED" and such appear.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Actually, that's what I meant: a &SAY-like function displaying text in the "examine" screen.

We need a combination of characters like .Y. and .Z. to create parenthesis by the way "(" and ")".
And a combination like .W. to show a number from the stack, as you suggested. Did I understand correctly this time ? :)
A parameter for text palette would be neat too.

Supposing there would be &EXAMINE@ and &EXAMINE! operations, we could use this &SAY-like function to modify these parameters:
- text to be inserted/replaced:
0=before the classic text
1=name
2=consumable/full/empty/cursed/broken
3=weighs X KG.
4=after the classic text

My explanations are unclear. I hope you like puzzles.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Scrolls-2484 Valid Indirect Pointer is nowhere referenced", could I know the text of the scroll?
etc

Version 1.70 allows you to edit or delete such objects.

( 6700 actuators? Wow. )
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Could you do also a &PARTY@ command?
Get CSBuild 1.71 and CSBwin9.8v28 and new DSA documentation.

&PARTY@ is implemented. But I think what you wanted is actually &CHAR@.
That will be next. At least you now can tell how many members in the party.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

&PARTY@ seems nice. Would it be possible to use a &PARTY! to change the sleep state?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

One would think it possible. I added a card for it But I am
going to continue my work on &CHAR@ first.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

&CHAR@

See CSBuild172 and CSBwin9.8v29 and documentation.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

I couldn't find the doc about &CHAR@
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

It's right here on my C-Drive. Plain as day. I'll upload it in a couple minutes.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Would it be possible to use a &PARTY! to change the sleep state?
I have been looking at this. I think I could wake up the party.
But I don't think it is reasonable to put them to sleep.

What are you trying to accomplish. Perhaps we could do it some other
way. For example, instead of putting them to sleep we might 'paralyze'
them (make certain actions impossible).
Post Reply

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