Fuse Choas Does Effect other than End as Victory(CSBuild)

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
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

You could have &ADD F in the DSA if you loaded the stack correctly. Please ignore the joke if it's too confusing!

Remember, to &ADD you need three things
<position mask> <location> <original item ID> &ADD

For example

L15 L0 L7 &ADD

Position mask = the section of the tile you want to put the item on. 1 = north, 2 = east, 4 west 8 south. Adding two of these together gives the ADD a random choice - L15 is all four added, so would put it on any of the four cells.

Location - the square of the dungeon you want to add to. Multiple the level by 1024, add (the X value times 32) then add the Y value - in my case L0 is the very first tile of level 0

Object ID - the ID of an item identical to one you want to create (so to Add you must have something existing in the dungeon to copy). In my example, whatever item 7 is. If you were copying the Lord Chaos you had, then this would be L736. A new Chaos, with stats equal to that one, would appear

Good luck!
User avatar
ADDF_Toxic
On Master
Posts: 623
Joined: Wed Apr 27, 2005 2:43 pm
Location: Canada
Contact:

Post by ADDF_Toxic »

Agh! Id of order 092b. I don't know if I can figure this out with the b in there.
Oh man, I'd better pay attention to Zyx.
Parameter 2 in &DEL, my guy is moving around that I wanna DEL. What should I do?
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Windows' calculator is your friend here. Ask him for a scientific display, then choose the HEX option.
Type: 92B
Choose the DEC option.
Now you see the number in decimal.

-----
As for the location of &DEL, could you tell me if your monster is free to move, if you want to delete while attacking it, pressing a button, casting a spell, while it is moving, or attacking you, etc.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

a = 10, b = 11 etc to f = 15 btw

You cannot delete a monster (I couldn't do it before, nor with chests!) Use an '&move' for now

L1 L16 L15 LA L0 L1 L16 L15 LB L0 &MOVE

You need the 10 literals loaded first - 5 for destination, five for source. Basically 'move from dungeon tile(1), type of monster(16), from any cell position (15), from location A, first instance in cell (0)
The last five literals are the same, except placing it in location B

You could then set A and B of your DSA to be the locations you wish to move to and from. Best to make B a level that doesn't support it's monster type (instant death)

Locating the position of a monster, even if you have its ID, is tricky. You need to be using a monster filter to get a live update of where it is standing, and you can then use this information to create the location for your &move command. Are you using a monster movement/attack filter?
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Lol Beo, you said it three times in this post! I was waiting for Paul S to pop up and tell us if this not &DELeting a monster will be permanent or fixed.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Yet people are still trying to &DEL stuff : )

And lol, Paul seems to be hiding - rl I guess!
User avatar
PaulH
Ghastly gastropod
Posts: 3763
Joined: Wed Aug 07, 2002 10:27 pm
Location: Level 6

Post by PaulH »

This Paul is definatley in hiding...
User avatar
Paul Stevens
CSBwin Guru
Posts: 4319
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

The first thing I'm going to do is disallow manipulation
of a monster's existence or location during a filter operation.
After that, we can work on finding a method of &DELing
monsters. Certain things in the dungeon should not
change while a filter is active. &MOVEing a monster in a
filter also gets us into recursion problems if there is a
Monster Movement Filter.

Monters can be in strange states. For example, if a monster
drops through a pit on top of another monster, it is placed
in a kind of limbo. It has no location. A special timer is
created that keeps trying to place the monster into the dungeon.
Complicated stuff. So we could not find it to delete it without
also searching the timer queue. Etc.
User avatar
ADDF_Toxic
On Master
Posts: 623
Joined: Wed Apr 27, 2005 2:43 pm
Location: Canada
Contact:

Post by ADDF_Toxic »

Awsome calculator move, Zyx. It was a bit hard since I don't always use it, but I figured it out. One question though. The ID was 092b. So, you always take away the 0 if it's at the front?

Now, for the location. Well...lets see if I can draw the room that he is in when you battle him, when you've got the firestaff in your mind. The symbol picture thing didn't work. The top is 19 spaces. 15 down the sides. 3 along the bottom points. 2 up from those points. 13 between bottom points.

And I want it to happen when Chaos is trapped in fluxcage and the fuse command is used(Or of course the double wall trick he can be trapped in too, showed in Dungeon Master Adventurer's Handbook last page)

Now, let me talk to beowuuf. Your question about monster filters. It is something that I am not understanding what it is, no I am not using any right now(unless I am misunderstanding and one is on by default)
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Answers -
1) Yes, you take away the 0, just liek you would if you saw decimal written 001234 = 1234

2) Room locations are taken with top left corner = 0,0, and for level HoC = 0. So, for point 4 squares along (X) and 9 squares down (Y) on level 5, this co-ordinate is written (3,8)5. As may have been said before, to get the 'location' number, you take level x 1024 add (X x 32) and add Y - so in this example 1024x5 + 3x32 + 8 = location.

3) Yes, working out what is around chaos and then activating the fuse, that's the real trick isn't it? Since I've done a dungeon with this, on the custom forum, you can look at it to see how I did it to get ideas. Basically you need to capture the location of Chaos, then check each square around him (one square above subtract 1 from location number, square below add 1, square left subtract 32, square right add 32). To check the square you use the &cell command to see if the cell has a wall, then if it hasn't you can use the fetch (F) command to ask for the ID of any clouds (fluxcages count as clouds!) on the cell, and then the &type command on the ID you receive to see if that cloud was a fluxcage. If you get 'yes' to the above for each cell, then you go ahead and recreate the fuse how you want it.

4) Filters - you can tell CSBwin (in the global settings) to send a message to a certain square of the dungeon when a monster moves, or if a monster attacks, or if the party attacks. They are not on by default. Now, you can then put a DSA at the location where this message is sent, and use the &PARAM@ command to see the information of an attack, etc. So for the monster movement filter, you can use it to see where Chaos was each time he moved. You can use the &Message command to send this information on somewhere else.

So you can use a 'party attack filter' (just a DSA at the right location) to block the real fuse attack and tell your main DSA a fuse was attempted. You can use the monster movement filter to keep track of where Chaos is (no other commands let you find this out). Personally i also used the monster movement and attack filters to stop the buggers moving when I started fusing them, so they couldn't run off or attack me.

If you read through Paul's documentation through his site, there are pages on the filters and what type of message they receive, with what information.
User avatar
ADDF_Toxic
On Master
Posts: 623
Joined: Wed Apr 27, 2005 2:43 pm
Location: Canada
Contact:

Post by ADDF_Toxic »

Okay.
I should bookmark this topic. This topic is a real help. Thanks for all the help(that I'm still getting, just incase I made it sound like I'm done getting help).
I did find your thread about that fuse thing. I looked with CSBuild at the DSA, didn't see anything that looks like what we're talking about here though. I didn't quite see all DSA's though yet. I saw fuse Chaos simulation, it didn't look like the &DEL and the &ADD thing, just a bunch of strange DSA code that I am not able to understand yet.
I'll see what I can figure out.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

It's exactly what we're talking about here. There is a thing called 'go-sub' (G<state> that lets you do another line of code, then come back to the line of code you are on. It's useful for doing additional things (like 'if the answer was true, do this thing then come back') but it is also useful for storing often used lines of code (Paul can tell me if there is an overhead for using it like this rather than constantly writing out the line)

If you look in state 2, you will see the adds and moves (I don't use del)

Bascially in the party attack filter, there is simple code in state 0 that checks for a fuse attack, then checks to see if it was against chaos or order - if it was, it turns the fuse attack into a harmless attack (you don't want the real ending triggering), simulates a fuse attack (creates a nice cloud) then sends a message with all the party attack filter information to the chaos simulation DSA

So you will see the first thing in the chaos simulation DSA is a &param@ command - this just unloads all the information fro mthe message. Now I can have, in this DSA, information like who just got hit with a fuse (order or chaos, since I was letting both get fused) and more importantly where the heck they are standing. I also checked the party information to get their position, and level

After that it's just a matter of setting up some variables that I can play around with when checking (including calculating the monster location number from x and y co-ordinates plus party level information)

After that i use gosubs again to check each square in turn fast, since I have five standard checks i wanted to perform - is the party blocking chaos (you might not want this one) is there a fluxcage (you'll want somethign like that) is there a monster (you won't care) is there a wall/teleporter (you'll only want the wall bit - that is using &cell to call the cell info, and seeing if the first no = 0 for 'wall' )

If all the checks are successful, then I use the jump command (j<state>) to go to state 1 and start the long process of the fuse animation - i send messages' back to the same DSA with a delay to create delays, but otherwise it is a single stream of steps.

I would suggest for your sanity making it simpler, like just having a createcloud explosion for chaos, createcloud explosion for order, then put the grey lord up

Anyway, that's basically the logic - grab message (param), set up variables, then using gosubs calculating the value for each tile in turn and chekcing various possible blocks, then seeing if all four squares are blocked, then fuse animation

Good luck with it all
User avatar
Paul Stevens
CSBwin Guru
Posts: 4319
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

There is an overhad for the G command. But if it makes
things easier to write, maintain, or understand then it
is worth doing. I suspect that the overhead is perhaps
four or five times that of a simple instruction like L5 and
less than the overhead of complicated things like &MONSTER@.
User avatar
ADDF_Toxic
On Master
Posts: 623
Joined: Wed Apr 27, 2005 2:43 pm
Location: Canada
Contact:

Post by ADDF_Toxic »

Oh, man that might help me find that.(add's and moves)

I'll get to the DSAing sometime. I'm not on as much as usual now, just check mail and leave lately, but when I get into CSBuild, I'll try this.

Question:
Location - the square of the dungeon you want to add to.
So I would do the top left corner of the room for that too?
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Just telling you how the location is worked out. The location you would use you would probably get from a movement filter.
User avatar
ADDF_Toxic
On Master
Posts: 623
Joined: Wed Apr 27, 2005 2:43 pm
Location: Canada
Contact:

Post by ADDF_Toxic »

Oh...I...see...(...Now...I'm...being...strange...)... This...is...a...very...big...puzzle...(really...the...elipsis'...(...dot...dot...dot...things...)...aren't...needed... I'm...not...confused...)
:):):):):):):):):):):):):):):):):):?: lol
User avatar
ADDF_Toxic
On Master
Posts: 623
Joined: Wed Apr 27, 2005 2:43 pm
Location: Canada
Contact:

Post by ADDF_Toxic »

When talking about location for &ADD, beowuuf, you wrote:Multiple the level by 1024
(I suppose you mean multiply)
1 question about this. HoC=1 or 0?
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

HoC = 0 , and yes I did mean multipy
User avatar
ADDF_Toxic
On Master
Posts: 623
Joined: Wed Apr 27, 2005 2:43 pm
Location: Canada
Contact:

Post by ADDF_Toxic »

Ok.
User avatar
ADDF_Toxic
On Master
Posts: 623
Joined: Wed Apr 27, 2005 2:43 pm
Location: Canada
Contact:

Post by ADDF_Toxic »

beowuuf wrote:L1 L16 L15 LA L0 L1 L16 L15 LB L0 &MOVE

You need the 10 literals loaded first - 5 for destination, five for source. Basically 'move from dungeon tile(1), type of monster(16), from any cell position (15), from location A, first instance in cell (0)
The last five literals are the same, except placing it in location B
More specificly, beowuuf wrote:'move from dungeon tile(1),
So, I am working on this. Are these numbers, like in my specific quote, like 1, just examples? Or is this what I have to write?
If it's just examples, for type of monster, is this like MT23 I think Chaos was?

And also, in your custom dungeon, for the location of B, it says D. How do you tell the thing what D is?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4319
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

My example was an example, not exactly what you needed but close. L1 is a given , L16 is a given, L15 is best, LA was an example - in reality you need to store the value of where the fuse attack went, then recall it here. L0 is a given. L1 - L15 are the same as previous, LB would be a location whre Chaos/Order couldn't survive, and L0 is also what you would use

If you add more blank DSAs under the intial one, then you can have many more parameters (automatically).

So first two in your main DSA are A and B. The next DSA below provides C and D. One after that, E and F. I just used parameters like this for ease of changing and exporting. You can just write these values instead

If you are looking at my custom dungeon, I used:
A - location of monster attack filter
B - location of monster movement filter
C - location of the successful fusing text (hidden in a wall)
D - the one you care about, the location for the move. In this case I was directing the creature off level so Chaos and Order would die after moving.
E & F are trigger on the end game - E an open (to the door) F a close (not used)
G - I - values for the Chaos, Order and Grey Lord I am duplicating using &ADD commands.
User avatar
ADDF_Toxic
On Master
Posts: 623
Joined: Wed Apr 27, 2005 2:43 pm
Location: Canada
Contact:

Post by ADDF_Toxic »

I am looking at this site. I came across a few questions:
1.
When first talking about &ADD in detail, beowuuf wrote:1 = north, 2 = east, 4 west 8 south
This site says "bit 0=north, bit1=east, bit2=south, and bit3=west" Is one of these wrong? Or is it different for different commands?

2. What does the 16 for types of objects mean?

(Ah, 15, you must mean all directions like you said before here, but that
I'm questioning because of my question)

Thanks for the site. That should be a help.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

bit 0 = north = 1
bit 1 = east = 2
bit 2 = south = 4
bit 3 = west = 8

It's the old binary going to decimal. In binary, you either have a 0 or 1 - so each column is a multiple of two.

Bit3 bit2 bit1 bit0

1 1 1 0

Imagien the above number, what it actually means is 0 x 1 + 1 x 2 + 1 x 2 x 2 + 1 x 2 x 2 x 2 = 0 + 2 + 4 + 8 = 14

And so on.

The 16 for types of objects means monster. 32 means weapon, etc

You can see how the above multiples of two numbering allows you to give unique numbers to an instance of something.
User avatar
ADDF_Toxic
On Master
Posts: 623
Joined: Wed Apr 27, 2005 2:43 pm
Location: Canada
Contact:

Post by ADDF_Toxic »

So what was with your other numbers for directions earlier, beowuuf?

Question about &PARAM@. Paul Stevens Documentation on Monster Movement Filters said
0 - Monster's dungeon level
so do I do the x 1024 thing and X x 32 thing? (The site is http://www.dianneandpaul.net/CSBwin/doc ... ilter.html )
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

I odn't know what other numbers you mean - usually 1,2,4 and 8 represent the direction

&param@ captures the parameters goign to the filter, and assigns them to temporary storage. For monter movement, the first number is monster level, second is x co-ord, third is y-cord

So if you do L7 L0 &param (take the seven parameters going to the filter, and put them in seven concurrent memory spaces, starting at '0'). then you can work out the monster position by pulling the numbers from '0' '1' and '2' and multiplying them together as you said.

In this case L0 &@ L1024 &* L1 &@ L32 &* &+ L2 &@ L3 &+
Which is take '0' multiply it by 1024, take '1' multiply it by 32 then add the result to the previous result, the take '3' and add it to that result

You could also then stick this location nu,ber into, for example, '10' for later use by using L10 &!
User avatar
ADDF_Toxic
On Master
Posts: 623
Joined: Wed Apr 27, 2005 2:43 pm
Location: Canada
Contact:

Post by ADDF_Toxic »

beowuuf wrote:L0 &@ L1024
Is this making DSA do the calculations?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4319
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

You are most assuredly coming up a bit short on these
topics. How can we proceed to exchange information
about DSAs that will not clog up the forum. Should we
use the forum for tutorials, Q&A, etc.? Should we have
an entire new subject with its own threads so that we can
give titles to the various sub-topics within the DSA topic?
Should we start something outside the forums?

It appears that we need some very basic and rather lengthy
discussion and Q&A on each of many subjects. Let us ask the
forum captains to decide how we might proceed. I am perfectly
willing to post LOTS of words and answer LOTS of (dumb?)
questions. But I would like the results to be a bit useful to
future users. Burying bits of information in topics like
"Fuse Chaos Does effect Other. . . . " ain't gonna make it.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

I think one or two tutorial posts (like zyx's monster one) would be good, but maybe reprinted from a Q & A session arranged in flashchat - save the chat and cut out the steps given that proved most useful information into a single post. Like a class, anyone interested and anyone who knows stuff should arrange to meet up at a set time.

And you are the forum captain here - this forum is your own : )

addf - L0 &@ takes the value from '0'. L1024 was the secondary number to multiply. The &* was the multiple together. With opperators like this, you put all the numbers first, THEN mutiply

So instead of '2 x 3' to get the result 6, you are doing '2 3 x'
User avatar
Paul Stevens
CSBwin Guru
Posts: 4319
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

They used to call it 'Postfix Polish' or 'Reverse Polish'
but the politically correct police decided that 'Polish'
was racist or something so now
it is referred to as Lukaszewicz notation.

http://www.polandembassy.org/Virtual_To ... cience.htm
Post Reply

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