Eating filter (CSBwin)
Moderator: Zyx
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
Eating filter (CSBwin)
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
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
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
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!
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!
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.
------------------
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.
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
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.
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.
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.
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.
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?
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?
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
What if we quit this business of adding one thing at a time?could you add broken and poisonned tags to misc objects
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.
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
I think that I will allow a 'repair' and the result will be that you canValid Indirect Pointer is nowhere referenced", could I know the text of the scroll
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.
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
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?
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?
Thank you for the quick update.
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)
This seems great! What would do a $GETPROP to a property that has been $DELPROPed?Paul Stevens wrote: $GETPROP(Id property ... value 1) or (Id property ... 0)
$SETPROP(Id property value ... )
$DELPROP(Id property ... )
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)
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Return a zero: $GETPROP(ID property ... 0)$GETPROP to a property that has been $DELPROPed?
The list would be hard coded in CSBwin?
The propertys are integers that you provide. The values areIn actuality, all I would provide is a list
of <property,value> integer-pairs and you could interpret them as you
please.
integers that you provide. Here is the complete list:
0,1,2,3,4,5, ... ,4294967294,4294967295
Sure. But we really need a &PARTY@ and an &CHARACTER@Could you do also a &PARTY@ command?
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.
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.
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Perhaps we need an 'Eye' filter. Then you could say whatever you pleaseplayer would read if he/she examines the object with the eye.
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."
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Quite. But we need some formatting capability other thanWith a function similar to &SAY
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.
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.
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.
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
I have been looking at this. I think I could wake up the party.Would it be possible to use a &PARTY! to change the sleep state?
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).