Creating a new object with DSAs
Moderator: Zyx
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
I want to use a DSA to emulate T0Mi's example
on dmwiki about the torch maker.
I have 2 pushbuttons that react to special objects.
Sticks let the first pushbutton send (set, north) S0 and
ashes let second pushbutton send (clear, north) C0 to
this DSA:
Description = return excess stickS or ashes and wait or yield torch and reset
State = 0
StateLocation = 0
GroupID = 0
Number of States = 3
First Displayed State = 1
Number of non-empty states = 3
State Number = 0
Number of Actions = 2
S0 = 1N
C0 = 2N
State Number = 1
Number of Actions = 2
S0 = L1 &NEG LB L1 LA L15 L32 F &ADD
C0 = 0L1 &NEG LB L0 LA L15 L32 F &ADD
State Number = 2
Number of Actions = 2
C0 = L1 &NEG LB L2 LA L15 L1024 F &ADD
S0 = 0L1 &NEG LB L0 LA L15 L32 F &ADD
signature = D183EA6FD180450465519E5ABCFA7C31
I have a cell (LA) where I put the stuff to be copied.
Ashes (L2)below a Stick(L1) below a Torch(L0).
Position is irrelevant(L15 = north1+east2+south4+west8)
Torch is on top, Stick next and Ashes on the bottom of the pile.
Problems:
The DSA does not have the cursor as a resulting spot
where the torches or the excess sticks or excess ashes
should definitely appear.
Instead they appear on the ground and
only with some strange time delay!
I guess the &neg is somehow omitted.
I cannot remove the space between L1 &NEG
Furthermore I think something is wrong, because
I cannot add &OBJECTID &DROP after each productive line
as some examples showed.
like this:
L1 LB L0 LA L15 L1024 F &ADD &OBJECTID &DROP
(this example was from move key from A to B)
I don't get why use &OBJECTID and &DROP it
afterwards from the stack but that just for a side note.
------------------------------------------------------
------------------------------------------------------
Long talk, I turned on Tracing and DSATrace and
it seems the possession of my cursor gets duplicated.
I was so close
on dmwiki about the torch maker.
I have 2 pushbuttons that react to special objects.
Sticks let the first pushbutton send (set, north) S0 and
ashes let second pushbutton send (clear, north) C0 to
this DSA:
Description = return excess stickS or ashes and wait or yield torch and reset
State = 0
StateLocation = 0
GroupID = 0
Number of States = 3
First Displayed State = 1
Number of non-empty states = 3
State Number = 0
Number of Actions = 2
S0 = 1N
C0 = 2N
State Number = 1
Number of Actions = 2
S0 = L1 &NEG LB L1 LA L15 L32 F &ADD
C0 = 0L1 &NEG LB L0 LA L15 L32 F &ADD
State Number = 2
Number of Actions = 2
C0 = L1 &NEG LB L2 LA L15 L1024 F &ADD
S0 = 0L1 &NEG LB L0 LA L15 L32 F &ADD
signature = D183EA6FD180450465519E5ABCFA7C31
I have a cell (LA) where I put the stuff to be copied.
Ashes (L2)below a Stick(L1) below a Torch(L0).
Position is irrelevant(L15 = north1+east2+south4+west8)
Torch is on top, Stick next and Ashes on the bottom of the pile.
Problems:
The DSA does not have the cursor as a resulting spot
where the torches or the excess sticks or excess ashes
should definitely appear.
Instead they appear on the ground and
only with some strange time delay!
I guess the &neg is somehow omitted.
I cannot remove the space between L1 &NEG
Furthermore I think something is wrong, because
I cannot add &OBJECTID &DROP after each productive line
as some examples showed.
like this:
L1 LB L0 LA L15 L1024 F &ADD &OBJECTID &DROP
(this example was from move key from A to B)
I don't get why use &OBJECTID and &DROP it
afterwards from the stack but that just for a side note.
------------------------------------------------------
------------------------------------------------------
Long talk, I turned on Tracing and DSATrace and
it seems the possession of my cursor gets duplicated.
I was so close
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Oh, what fun. But you have selected
a nice example. I will install your DSA
and see what I can discover about its
inner workings. One does not read this
stuff as one would read a newspaper
column.
to tell the graphics engine that something
changed.
a nice example. I will install your DSA
and see what I can discover about its
inner workings. One does not read this
stuff as one would read a newspaper
column.
I wonder if this is because nobody botheredthey appear on the ground and
only with some strange time delay!
to tell the graphics engine that something
changed.
That usually only happens with items in the hand/inventory since the refresh is only supposed to happen when items transfer I guess, items on the floor appeared instantly whenever I did anything
First question - what is LB? What value have you assigned this, or have you actually assigned it?
I remembered the negative numbers were body positions for &add - so are your hands full when you try to add the item? If so, it will appear on the ground. Odd about the time delay though, it should be instant
I assume the getting bject ID must be a diagnostic tool or a hook so you can tell what item you have created or go on to monitor it with another DSA?
First question - what is LB? What value have you assigned this, or have you actually assigned it?
I remembered the negative numbers were body positions for &add - so are your hands full when you try to add the item? If so, it will appear on the ground. Odd about the time delay though, it should be instant
I assume the getting bject ID must be a diagnostic tool or a hook so you can tell what item you have created or go on to monitor it with another DSA?
Beo thanks for your tips and questions.
LB is a selected cell in the dungeon and also a number.
see:
http://members.at.infoseek.co.jp/danmas ... %20Integer
It is the "target location" of the DSA.
THe place where the thing's ID (from F)
should be &ADDed to the cursor
All I want is to put things(stick and ashes) into the grate.
Then get a torch in return to cursor.
The thing is, I wanted to give excess sticks and ashes back
to the player's hand when the DSA had already received
a message from the pushbutton corresponding to the item.
(Ashes or Stick)
So you put the stick in the pushbutton (grate)
and if you already put one there before, you
would (instantly?) get a stick back to your cursor.
So the theory... I had the cursor not occupied.
I think there is no time to collect something ..
Then again, if the cursor would be full, it would only
make sense to have some location to put the things,?LB?
even if the party moved in the meantime.
I reckon the F's purpose is to get the OBJECTID for
&ADD command of an existing object.
see:
http://members.at.infoseek.co.jp/danmas ... ntax.htm#F
http://www.dianneandpaul.net/CSBwin/doc ... mmand.html
(here you get info about the output. That is right to the "...")
http://members.at.infoseek.co.jp/danmas ... ator%20add
http://www.dianneandpaul.net/CSBwin/doc ... rator.html
I don't know of any way to copy things out of nowhere.
here an overview page, because it does not hurt much:
http://www.dianneandpaul.net/CSBwin/doc ... guage.html
I do not know about monitoring etc..
LB is a selected cell in the dungeon and also a number.
see:
http://members.at.infoseek.co.jp/danmas ... %20Integer
It is the "target location" of the DSA.
THe place where the thing's ID (from F)
should be &ADDed to the cursor
All I want is to put things(stick and ashes) into the grate.
Then get a torch in return to cursor.
The thing is, I wanted to give excess sticks and ashes back
to the player's hand when the DSA had already received
a message from the pushbutton corresponding to the item.
(Ashes or Stick)
So you put the stick in the pushbutton (grate)
and if you already put one there before, you
would (instantly?) get a stick back to your cursor.
So the theory... I had the cursor not occupied.
I think there is no time to collect something ..
Then again, if the cursor would be full, it would only
make sense to have some location to put the things,?LB?
even if the party moved in the meantime.
I reckon the F's purpose is to get the OBJECTID for
&ADD command of an existing object.
see:
http://members.at.infoseek.co.jp/danmas ... ntax.htm#F
http://www.dianneandpaul.net/CSBwin/doc ... mmand.html
(here you get info about the output. That is right to the "...")
http://members.at.infoseek.co.jp/danmas ... ator%20add
http://www.dianneandpaul.net/CSBwin/doc ... rator.html
I don't know of any way to copy things out of nowhere.
here an overview page, because it does not hurt much:
http://www.dianneandpaul.net/CSBwin/doc ... guage.html
I do not know about monitoring etc..
- 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
position isn't integer!?
So all you have to take care for is, in case of F:
posMsk
Then N(wall) is NW(open space) , each would be 1.
Depending on the cell you put things they would be
N or NW and so on..
There is no N + NW !! Only N+E or NW +NE
Code: Select all
N | E | S | W
Default is N.
A position within a dungeon cell. In a wall it means North, East, South, or West. In an open cell it is NW, NE, SE, or SW. When converted to numbers, N is 0, E is 1, S is 2, and W is 3.
posMsk
Code: Select all
<integer>
This integer is a bit mask. The bits and their respecive values are:
0 1 North
1 2 East
2 4 South
3 8 West
You add values to specify more than one allowed position. For example, to specify positions East and South you would write the sum of the values of East and South. 2 plus 4. In other words 6. To specify North or West you would write the sum of 1 and 8. That is 9.
Depending on the cell you put things they would be
N or NW and so on..
There is no N + NW !! Only N+E or NW +NE
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Ooh, while my desktop PC is actually online:
Right, this was my two handed weapon check sub-routine (i simply G48 to it at the start of the party attack filter). You can see how I comment my DSAs - I use the L to create harmless parameter calls
So, there is the recogniseable left hand check first. In my case, if the left hand was free, who cared. In your case zoom, you wanted to have more damage done with a free hand on certain weapons, so you would want to jump to a separate routine where you then checked for one handed weapons that could do more damage now.
Anyway, I then do the right handed check, I had split weapons into several categories, ones that just needed two hands to use or else(jump directly to C1), ones that needed a very high strength (above 130) to use one handed (S1 check) and ones where a high-ish strength (70) or fighter level (master) could bypass the two handed requirement (C0/T0 checks)
The C0 call is checking for a high enough fighter level. If it doesn't find that it moves on to the 70 strength check. Not finding that, on to C1
Similarly, the S1 check is just looking for 130 strength.
C1 is the reject line - if you don't meet the requirements for that weapon, then it negattes the attack, but first prints to screen a message using &SAY. I think simply 'you need two hands to use this item'
Code: Select all
S0: L0 &@ L0 &CHPOSS L1 &NEG &= ?J0T3 L0 &@ L1 &CHPOSS &TYPE ??{(50004,C0)(50017,C0)(50021,C0)(50024,S1)(50029,C1)(50035,C1)(60006,C1)}
C0: L0 &@ L0 L3 &MASTERY L10 &< ?JT0
T0: L0 &@ L30 L12 &CHAR@ L41 &@ L256 &% L70 &< ?JC1
S1: L0 &@ L30 L12 &CHAR@ L41 &@ L256 &% L130 &< ?JC1
C1: L$ L15 &SAY L1 L1 &!
T3: LT LW LO LH LA LN LD LE LD LC LH LE LC LK LS
So, there is the recogniseable left hand check first. In my case, if the left hand was free, who cared. In your case zoom, you wanted to have more damage done with a free hand on certain weapons, so you would want to jump to a separate routine where you then checked for one handed weapons that could do more damage now.
Anyway, I then do the right handed check, I had split weapons into several categories, ones that just needed two hands to use or else(jump directly to C1), ones that needed a very high strength (above 130) to use one handed (S1 check) and ones where a high-ish strength (70) or fighter level (master) could bypass the two handed requirement (C0/T0 checks)
The C0 call is checking for a high enough fighter level. If it doesn't find that it moves on to the 70 strength check. Not finding that, on to C1
Similarly, the S1 check is just looking for 130 strength.
C1 is the reject line - if you don't meet the requirements for that weapon, then it negattes the attack, but first prints to screen a message using &SAY. I think simply 'you need two hands to use this item'
have to read that carefully slice by slice.
Many new things there!
all in all nice ideas, Beo. 130 Str is overkill!
As said, I only quickly read through.
(you could circumvent this STr check
by quaffing str potions, neh?
Would there be a way to refer to
normal , initial str of a champion?)
I would like to tell the players a bit
more about what to expect roughly from weapons.
readme or in game.. finding the str thing out by
oneself would be a bit hard. But on the other
hand no need to tell players everything
Many new things there!
all in all nice ideas, Beo. 130 Str is overkill!
As said, I only quickly read through.
(you could circumvent this STr check
by quaffing str potions, neh?
Would there be a way to refer to
normal , initial str of a champion?)
I would like to tell the players a bit
more about what to expect roughly from weapons.
readme or in game.. finding the str thing out by
oneself would be a bit hard. But on the other
hand no need to tell players everything
Eh, think you can see the unmodified strength, but i think the point of a strength potion is to allow you do do these feats. I think to see thier unmodified strength it is the next number across, or perhaps it is the other half of that number (I can't recall why I used the L256 &% to get the first half of the number now)
You can always hint by putting &SAY for failure the first time (Saying ' i don't feel strong enough to weild this')
But yes, sometimes funto let the players work stuff out themselves (liek conflux does)
You can always hint by putting &SAY for failure the first time (Saying ' i don't feel strong enough to weild this')
But yes, sometimes funto let the players work stuff out themselves (liek conflux does)