CSBwin modified to add custom spell effects?
Moderator: Zyx
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
I set the spell filter zone pointing to a ANd/OR gate, activated if in state 1. so a spell should activate it. It never happens.
another thing I did was putting a DSA that only respond to a S0 message if in state 1. If I put a pressure pad, activated by party, toggling this state, it works perfectly and the DSA intercepts the spells.
If I put a pressure pad, activated by monster, toggling this state, it doesn't work!!!?
another thing I did was putting a DSA that only respond to a S0 message if in state 1. If I put a pressure pad, activated by party, toggling this state, it works perfectly and the DSA intercepts the spells.
If I put a pressure pad, activated by monster, toggling this state, it doesn't work!!!?
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Casting a Spell does not send a message in the ordinary sense.
It looks for a DSA at that location and calls it as a subroutine to
process the filter paramters before casting the spell. If you want
to set an AND/OR gate bit then you must put a DSA at the Spell
Filter Location and the DSA can send a message in the ordinary way.
The Spell Filter really becomes part of the Spell-Casting code.
Your second problem seems a bit strange. Seems impossible. No idea.
Can you send a tiny dungeon demonstrating this problem?
It looks for a DSA at that location and calls it as a subroutine to
process the filter paramters before casting the spell. If you want
to set an AND/OR gate bit then you must put a DSA at the Spell
Filter Location and the DSA can send a message in the ordinary way.
The Spell Filter really becomes part of the Spell-Casting code.
Your second problem seems a bit strange. Seems impossible. No idea.
Can you send a tiny dungeon demonstrating this problem?
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Goodness, no. It certainly is not supposed to change state
unless you tell it to. Have you looked at the TimerTrace when
you run your test?
By the way, Folks. I changed the title of this thread to remove the
digit '4' from the name of CSBwin. 'CSBwin' is a proper noun. It is not
spelled with a digit '4' thrown in between the third and fourth letters.
Just as my name is 'Paul', not 'Pa4ul'.
unless you tell it to. Have you looked at the TimerTrace when
you run your test?
By the way, Folks. I changed the title of this thread to remove the
digit '4' from the name of CSBwin. 'CSBwin' is a proper noun. It is not
spelled with a digit '4' thrown in between the third and fourth letters.
Just as my name is 'Paul', not 'Pa4ul'.
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
I posted version Alpha11 in OverlayDemo.rar.
I think the problem was that the DSA received a message for which
no program existed. Since the first command specifies the next state
and there was no first command, then the next state was undefined.
Fixed.
If your problem was different from this then you better ship me a
dungeon and playfile.log so I can investigate.
I think the problem was that the DSA received a message for which
no program existed. Since the first command specifies the next state
and there was no first command, then the next state was undefined.
Fixed.
If your problem was different from this then you better ship me a
dungeon and playfile.log so I can investigate.
I found a bug: I load a savegame with some DSA in the dungeon. I die. I reload. I get a "duplicate DSA" error and CSBwin crashes.
Other remarks:
Could you enlarge the "edit champion text" dialog?
I can't see the butons at the bottom.
Could you enlarge the "locations" dialogs, which is displayed after searching for an item?
I can't see the tiles at the bottom, and I can't see the list of locations on the right.
Other remarks:
Could you enlarge the "edit champion text" dialog?
I can't see the butons at the bottom.
Could you enlarge the "locations" dialogs, which is displayed after searching for an item?
I can't see the tiles at the bottom, and I can't see the list of locations on the right.
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
New versions of both programs have been posted.
It is fortunate that God provided us with a wealth of integers.
=====================
What is it about your machine that causes Dialogs to be differently
sized? A different system font size? A monster screen size like 2048x1536?
Whenever I specify a size for a window it fails to work properly
on some machines. I have never figured this out.
It is fortunate that God provided us with a wealth of integers.
=====================
What is it about your machine that causes Dialogs to be differently
sized? A different system font size? A monster screen size like 2048x1536?
Whenever I specify a size for a window it fails to work properly
on some machines. I have never figured this out.
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Some more research leads me to believe that you have a system
font larger than the default. This pushes everything down and to the
right in dialog boxes. I have (hopefully) fixed the immediate problem
by abandoning my efforts to resize the dialogs depending on their
contents. I now let the system do whatever comes naturally.
font larger than the default. This pushes everything down and to the
right in dialog boxes. I have (hopefully) fixed the immediate problem
by abandoning my efforts to resize the dialogs depending on their
contents. I now let the system do whatever comes naturally.
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
I just figured it out by messing with the value before reading your answer. These new features for the DSA are very powerful!
Your sample dungeon is becoming the weirdest errand I ever ran. I think we're entering the surrealistic era of DM.
Is there a way to make a DSA that at first, blocks all the spells, then allow them one at a time (ie, once you find the formula on a scroll), without using millions of states?
Your sample dungeon is becoming the weirdest errand I ever ran. I think we're entering the surrealistic era of DM.
Is there a way to make a DSA that at first, blocks all the spells, then allow them one at a time (ie, once you find the formula on a scroll), without using millions of states?
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
I anticipated that question. That is why I built the 'CASE' construct and
the message with parameters.
The answer is 'Yes and No'.
There are not 'millions' of spells. So you don't need millions of states.
My plan was to plant a DSA for each possible spell. They can all be
identical. So that is only three states. The DSA at the 'Spell Filter'
location looks like this:
Assume there are 5 spells to handle: 1,6,24,343,and 32
0s0 first rune case {(1,0c0), (2,0t0), (3,0s1),(6,0c1)} //default is do nothing
0c0 second rune case {(0,0t1)} // 1xxx
0t0 second rune case {(4,0s2)] // 2xxx
0s1 second rune case {(2,0c2),(4,0t2)} // 3xxx
0c1 second rune case {(0,0s3)} // 6xxx
0t1 message to DSA 1000
0s2 third rune case {(0,0c3)} 24xx
0c2 third rune case {(0,0t3)} 32xx
0t2 third rune case {(3,1s0); 34xx
0s3 message to DSA 6000
0c3 message to DSA 2400
et ceteraa
Each of the lines that sends a message simply loads
the target location onto the stack and jumps to a
common state that disables the spell silently and sends
the message.
So each possible spell requires about 2 more lines of code.
(Plus log base 2......sorta) But it scales approximately linearly.
And it is fast because no case statement has more than
seven possibilities and no spell requires more than three such
statements.
the message with parameters.
The answer is 'Yes and No'.
There are not 'millions' of spells. So you don't need millions of states.
My plan was to plant a DSA for each possible spell. They can all be
identical. So that is only three states. The DSA at the 'Spell Filter'
location looks like this:
Assume there are 5 spells to handle: 1,6,24,343,and 32
0s0 first rune case {(1,0c0), (2,0t0), (3,0s1),(6,0c1)} //default is do nothing
0c0 second rune case {(0,0t1)} // 1xxx
0t0 second rune case {(4,0s2)] // 2xxx
0s1 second rune case {(2,0c2),(4,0t2)} // 3xxx
0c1 second rune case {(0,0s3)} // 6xxx
0t1 message to DSA 1000
0s2 third rune case {(0,0c3)} 24xx
0c2 third rune case {(0,0t3)} 32xx
0t2 third rune case {(3,1s0); 34xx
0s3 message to DSA 6000
0c3 message to DSA 2400
et ceteraa
Each of the lines that sends a message simply loads
the target location onto the stack and jumps to a
common state that disables the spell silently and sends
the message.
So each possible spell requires about 2 more lines of code.
(Plus log base 2......sorta) But it scales approximately linearly.
And it is fast because no case statement has more than
seven possibilities and no spell requires more than three such
statements.
ah yes, you got it all planned! I'll try to fiddle with the CASE statement in the next days.
Two reports:
The poison bolts keep doing naught, at least to the party.
Also, CSBwin keeps removing "too many monsters of size 4" when loading. Remember this old bug it is now a feature to make invisible monsters
Two reports:
The poison bolts keep doing naught, at least to the party.
Also, CSBwin keeps removing "too many monsters of size 4" when loading. Remember this old bug it is now a feature to make invisible monsters
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
I am afraid that the monster business really should be considered
a bug, not a feature. But would you believe that there are five unused
bits in the monster record???? I didn't believe it. Bu I have searched
rather thoroughly and it appears to be true. We could appropriate
one of those bits for an 'invisible' flag.
CSBwin cannot use only that bit to make monsters invisible because
there may be old games in which the unused bits are non-zero. So I will
add an option in CSBuild to allow the invisible monsters
and I will add code that provides a warning if the bit is set but the
option is not selected. This will make it easier to convert old games......
First deselect the option and check that no bits are set. Then select
the option and mark any monsters that you want invisible.
Next comes the problem of monster generators. Will they be able
to create invisible monsters? I have not looked into this yet. But,
since I increased the size of ALL Actuators by sixteen bits, it should
be easy.
QED
a bug, not a feature. But would you believe that there are five unused
bits in the monster record???? I didn't believe it. Bu I have searched
rather thoroughly and it appears to be true. We could appropriate
one of those bits for an 'invisible' flag.
CSBwin cannot use only that bit to make monsters invisible because
there may be old games in which the unused bits are non-zero. So I will
add an option in CSBuild to allow the invisible monsters
and I will add code that provides a warning if the bit is set but the
option is not selected. This will make it easier to convert old games......
First deselect the option and check that no bits are set. Then select
the option and mark any monsters that you want invisible.
Next comes the problem of monster generators. Will they be able
to create invisible monsters? I have not looked into this yet. But,
since I increased the size of ALL Actuators by sixteen bits, it should
be easy.
QED
- cowsmanaut
- Moo Master
- Posts: 4378
- Joined: Fri Jun 30, 2000 12:53 am
- Location: canada
Isn't it common practice to leave open variables just incase you need them for something later? DM was rather experimental in it's time.. I would think it possible they wanted to have a lot of things done and so left it open for extra attributes.. After all there are a few unused items in the code right? That in the least should show that they tended to plan for larger than they had time to make.
sorry.. now I'm going off topic.. quick.. blame Fuzzface
moo
sorry.. now I'm going off topic.. quick.. blame Fuzzface
moo
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
The folks at FTL wasted nothing. They had a terribly difficult time putting
that game onto a single floppy and fitting it into 512 KByte. They left a
few unused things around but it was not done intentionally. Some may have
been left over from things they tried to fit into the game but were unable.
A few bits here and there are mostly the results of having to allocate in
16-bit pieces and only needing 14 or the fact that (for example) monster
generators and AND/OR gates share the same record structure but obviously
do not share ALL the same required fields. In my case, I used the 'Normally-Closed'
bit of the Monster Generator for the invisible bit because it is not needed by
Actuators that do not create messages.
The latest OverlayDemo and CSBuild 1.51 have the invisible monster capability.
Even the Monster Generators seem to work. I did not test very thoroughly so
let me know if you find problems.
that game onto a single floppy and fitting it into 512 KByte. They left a
few unused things around but it was not done intentionally. Some may have
been left over from things they tried to fit into the game but were unable.
A few bits here and there are mostly the results of having to allocate in
16-bit pieces and only needing 14 or the fact that (for example) monster
generators and AND/OR gates share the same record structure but obviously
do not share ALL the same required fields. In my case, I used the 'Normally-Closed'
bit of the Monster Generator for the invisible bit because it is not needed by
Actuators that do not create messages.
The latest OverlayDemo and CSBuild 1.51 have the invisible monster capability.
Even the Monster Generators seem to work. I did not test very thoroughly so
let me know if you find problems.
I checked the invisibility and it seems to be working.
But this is a "group invisibility" and only solves some situations.
I alos used the trick of putting several large monsters on a same tile to obtain a visible monster backed up by invisible allies. Could you prevent CSBwin to check the size of creatures if the dungeon is set as containing invisible monsters? Besides CSBwin changes the dungeon only when loading the savegame, but not during the play, so this is a discrepancy: you will get two different dungeons according to wether you keep playing or save and reload.
But this is a "group invisibility" and only solves some situations.
I alos used the trick of putting several large monsters on a same tile to obtain a visible monster backed up by invisible allies. Could you prevent CSBwin to check the size of creatures if the dungeon is set as containing invisible monsters? Besides CSBwin changes the dungeon only when loading the savegame, but not during the play, so this is a discrepancy: you will get two different dungeons according to wether you keep playing or save and reload.
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
What do you want? A group of four mummies, three visible andBut this is a "group invisibility"
one invisible?
You are right. I think you mean that two dragons can be created on thechanges the dungeon only when loading the savegame, but not during the play, so this is a discrepancy
same cell using a monster generator. I have fixed that. I give a single
warning and then subsequently fix it silently.
You simply cannot put more than one dragon (or two worms) on a single
cell. You cannot put six mummies on a single cell. The code is much too
convoluted for me to be able to guarantee the integrity of the game. Things
like the monster movement, turning, missile/monster collision are all
dependent on these rules. The fact that two dragons are invisible is
an example of the code going astray when the rules are broken. Invisibility
is harmless but it was just luck that the program did not crash.
You can have a Dragon drop an invisible Dragon when he dies.visible monster backed up by invisible allies