Full Version : PuzzleBridge
xmlspawner >>XMLSpawner - Tutorials >>PuzzleBridge


<< Prev | Next >>

godfood- 01-18-2006
This Tutorial will walk you through how to use an XMLSpawner to make a randomly changing bridge. This tutorial is written so just about anyone should be able to set one up regardless of XMLSpawner Experience.

Topic's I will cover.

QUOTE
Part 1: Getting the Spawner Ready

xmlspawner/blue.gif Adding an XMLSpawner to the world.

xmlspawner/blue.gif Accesing and changing the Props Gump.

xmlspawner/blue.gif Properly Defining the "Spawnable" area using the X1_Y1 & X2_Y2 Props.


Part 2: Adding the floor to the Spawn Entry's and editing the Sequential Spawn information

xmlspawner/blue.gif Adding item's to the spawner and setting the "Z" property of the items at the time of spawn.

xmlspawner/blue.gif Changing the Sequential Spawn Information.



I have also made an example Spawner which can be downloaded Here. You MUST have the optional MULTIADDON patch that can be found Here to use this file. Put the puzzlebridge.txt in your Main RunUO folder. and the puzzlebridge.xml in your RunUO/spawns folder. Then type [self set map trammel, then type [go 5476 1232 0. You should now be in green acres. Now you can type [xmlload puzzlebridge.xml.


Part 1: Getting the Spawner Ready

First thing you do is type in [add xmlspawner and click the ground where you want your xmlspawner/Crystal2.gif Spawner to be. You do NOT have to have it underneath the area you want your moving floor to be. We will be using the X1_Y1 and X2_Y2 props to define the area for the floor.

The next thing you do is double click the xmlspawner/Crystal2.gif Spawner to bring up the Main Spawn Gump.

user posted image

Then you want to click the xmlspawner/scroll.bmp Props button to bring up the Props Gump.

user posted image

Once we have the Props Gump up we want to change a few property's. To change one of the Property's just Click on the xmlspawner/right22.gif button to the right of the property you want to change.

This is how we want our spawner set up for this.


xmlspawner/bluebutton.gif 1) MaxDelay & MinDelay: Set both of these to 1 second.

user posted image


xmlspawner/bluebutton.gif 2) SequentialSpawn: Set this to any number higher than 0, in this example I used 1.

user posted image


xmlspawner/bluebutton.gif 3) X1_Y1: Click the xmlspawner/right22.gif Button just to the right of where it says X1_Y1 in the Props Gump. Then you want to click the xmlspawner/right22.gif Button to the right of where it says Target a Location. You should now have a Target Cursor. Click the ground at the North Western most square of the area you want your "Bridge" to cover.

user posted image


xmlspawner/bluebutton.gif 4) X2_Y2: Click the xmlspawner/right22.gif Button just to the right of where it says X2_Y2 in the Props Gump. Then you want to click the xmlspawner/right22.gif Button to the right of where it says Target a Location. You should now have a Target Cursor. Click the ground 1 tile east and 1 tile south of the South Eastern most square of the area you want your "Bridge" to cover. (I don't know why the spawner Behaves this way, but it does.)

user posted image

Now that we have our props set up, you can close the Props Gump by right clicking on it.

Part 2: Adding the floor to the Spawn Entry's and editing the Sequential Spawn information.

Ok, After closing the Props Gump you should be looking at the Main Spawner Gump. We want to start adding our "Floor" Now. Click the xmlspawner/scroll.bmp Button to the right of the First Spawn Entry Line as Shown in the Image Below.

user posted image

This will bring up the Text Book. This is where we can easily add and edit longer spawn entry's. we will be adding the same lines to both the first and second spawn entry's. So type this into the Text Book.
CODE
stonepaversdark/z/5

What this does is it tell's the spawner to spawn stonepaversdark, It then tell's it to set the "Z" level of the stonepaversdark to 5 when they spawn.

Now we can close the book by right clicking on it. It should then add this entry to the first spawn entry line.

Repeat the previous step for the second spawn entry line

Once you have your spawn entry's entered, click the xmlspawner/right22.gif Arrow in the bottom right hand corner of the Main Spawner Gump to expand the gump to look like this.

user posted image

Next we want to click in the first box under MAX and type in 8. Do the same for the second box under MAX. Next, do the same for both of the PER boxes, setting them both to 8 as well. What this does is tell the spawner to spawn 8 stonepaversdark (MAX), and to spawn all 8 of the at the same time (PER).

And Finally we want to change the first box below SUB to 1, and the second box below SUB to 2.

Once you've done that, hit the xmlspawner/fastscroll.bmp Refresh Button. Your spawner should now look like this.

user posted image

The Last thing to do before we test it is to change the "Spawer's" total to 8. I've indicated the location of this in the image above with the cursor.

Your spawner should now be ready for testing. Hit the xmlspawner/3people.bmp Respawn button, and close the Main Spawner Gump by right clicking on it.

You should now see this.

user posted image

Congratulations, You've completed the Puzzle Bridge Tutorial!

ArteGordon- 01-19-2006
very cool wink.gif

godfood- 01-19-2006
QUOTE
Click the ground 1 tile east and 1 tile south of the South Eastern most square of the area you want your "Bridge" to cover. (I don't know why the spawner Behaves this way, but it does.)


It's not a big deal, but any idea why the spawner works this way?

ArteGordon- 01-19-2006
do you mean why that is the position of the bridge?
You can see the location of the the 'handle' by setting the itemid of your multi to something visible. This is what determines the location of the multi that you have to position.
In your case is somewhere in the upper left corner of your bridge.

user posted image

godfood- 01-19-2006
Sorry, I guess I could have been more clear smile.gif. When you are defining the X2_Y2 props, You need to target the ground x+1 and y+1 from where you want the "Floor" to spawn.

Example. You want your floor to go from (200,200,0) to (210,210,0). You set X1_Y1 to (200,200,0) But for X2_Y2 you need to set it to (211,211,0) not (210,210,0).

ArteGordon- 01-19-2006
ah, ok. I'll take a look at that.

Zigamus- 01-29-2006
I'm a little confused on this project.

I have followed your instructions exactly, and yet I get a max of 4 tiles. sad.gif

Also when I first loaded the xml for this, it created only 1 of the entries. I had to create the other by hand. I wouldnt mention this except that I examined the xml file and it appears that it should have created BOTH entries itself.

If I have missed something or made a mistake, please correct me. (I dont know if this is pertanent but I am running Win 98 SE and RunUO 1.0.0 and the Client is patched to 5.0.1h)

ArteGordon- 01-29-2006
the reason that they are being combined is because the two entry strings are identical, and the spawner automatically combines them when they are added. It is an annoying feature that I still have to change. If you just make the strings different by adding a '/' to the end of one entry, then that wont happen.

The reason they are only coming in groups of 4 is because for some reason the Pack Range is being set to 1 when they are loaded in.

I'll have to look into that.

(edit)

The posted version 3.07a update will fix the pack range problem.

ArteGordon- 02-09-2006
QUOTE (godfood @ Jan 19 2006, 05:50 AM)
Sorry, I guess I could have been more clear smile.gif. When you are defining the X2_Y2 props, You need to target the ground x+1 and y+1 from where you want the "Floor" to spawn.

Example. You want your floor to go from (200,200,0) to (210,210,0). You set X1_Y1 to (200,200,0) But for X2_Y2 you need to set it to (211,211,0) not (210,210,0).

this will be fixed in the next version. You can also see this post for more details
http://xmlspawner.15.forumer.com/index.php?showtopic=263

Lara- 06-27-2006
This is great, I am working on setting up something similiar ... however it wont spawn over water, I'm looking for a work around, any suggestions?

ArteGordon- 06-27-2006
QUOTE (Lara @ June 27, 2006 10:25 am)
This is great, I am working on setting up something similiar ... however it wont spawn over water, I'm looking for a work around, any suggestions?

to allow things to spawn on otherwise invalid (impassable) surfaces, just precede the spawn specification with an asterisk, so instead of

stonepaversdark

use

*stonepaversdark

Lara- 06-27-2006
Wonderful, thank you!

Deathbringer- 08-02-2006
Hehe I made that bridge on my play server I run locally, and it turned out quite nice, the only issue I'm hitting is that the lava is passable, and I cannot figure out how to make it impassable =/

I'm also trying to figure out how to make it so that if you fall you take damage instead of just teleporting back.

And eventually, I wanna add an NPC that you give an item to, and the bridge activates for 30 seconds, and if you don't cross in that time the spawner turns off and you have to retrieve the item again =/

Quite fun, and a brilliant idea

Xerrox- 08-22-2006
Deathbringer see this topic for help on this http://xmlspawner.15.forumer.com/index.php?showtopic=823

Also i have a problem if i add a Regioncontrol flag that covers the area of the bridge, all the tiles in the bridge will gather over the xmlspawner, any way to fix this ?

ArteGordon- 08-22-2006
I'm guessing that your region controller is not allowing spawns with its AllowSpawn method. That will cause the spawner to fail in its attempts to find a valid location, and so just places it at the location of the spawner (which is the location of last resort).