RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

XmlSpawner2

vhs

Wanderer
my world is fully spawned and i want to make a quest with xml spawner i have added the crystal and made all the spawn for that crystal how do i save just that crystal to a xml file like the examples ones, [xmlsave (filename) will just save all spawn on that map when all i want is for that crystal. thx
 

ArteGordon

Wanderer
You can save specific spawners using the prefix filter option of [xmlsave.

Name your spawners something like MyQuest#1, MyQuest#2, etc.

Then save them with

[xmlsave filename MyQuest

This will save all spawners that have names beginning with MyQuest to the file. (Note, it is case sensitive).

You can set the name of the spawners either by opening the gump and editing the name at the top, or by doing a "[set name MyQuest#1" from the command line.
 

brandon948

Wanderer
My spawner doest seem to be working?

I dbl click the spawner and type in demonKnight, then props and set it for 10sec to 30 secs min/max and they never pop up?

Also how do you set loot on the monsters you spawn? someone told me ya could?
 

ArteGordon

Wanderer
one little quirk is that when you change the min/maxdelay, it doesnt reset the current timer, so typically it is still counting down whatever the previous delay was (like the 5-10 min default values). You can check and reset this by looking at/setting the NextSpawn property.
I'll put it on the todo list for the next release.

You can add loot to a spawned mob by using the ADD keyword.

instead of just typing in the name of the mob you want spawned, put a line like

demonknight/ADD/platehelm/ADD,0.1/longsword/ADD/ARMOR,1,5/ADD/POTION/ADD/helmofinsight

or other combinations of that sort.

You can also add items and change their properties at the same time using a line like

demonknight/ADD/<platehelm/hue/500>/ADD/<longsword/durability/200/name/toughasnails>
 

nix4

Wanderer
Question regarding spawned chests

ArteGordon this script is definately an essential, I've been using it and learning its abilities for a while now and its awesome.

Reminds me of a script in Neverwinder Nights that was just as functional (that game had potential..).


Anyway, my question is the spawning of lockable containers that can contain treasure. Is this possible? The other script that I have found that does this isnt really supported by anyone and I'd rather see it in your script as I would think it would be a useful function to add.

The ability to add a container
The ability to make it locked
The ability to have the container spawn treasure.

I'm primarily looking for vendor containers so players can steal from them, rather than have their coffers be empty.

Thanks
 

ArteGordon

Wanderer
yes, in fact there are several ways to do it depending on your preferences.

APPROACH 1:
You can add a container to the spawner and then spawn it with lock and trap properties, along with contents all in one line using something like this.

metalchest/locked/true/locklevel/60/traptype/explosiontrap/trappower/50/ADD<ginseng/amount/10>/ADD/ARMOR,1,5/ADD/POTION/ADD,0.2/WEAPON,3,5/ADD/<gold/amount/RND,200,500>

that would spawn a locked chest, trap it with an explosion trap of power 50, add a stack of 10 ginseng, a random piece of armor with a level between 1 and 5, a potion, 20% of the time a weapon of level 3-5 , and a random amount of gold between 200-500.

APPROACH 2:
another approach is to have a fixed container that is already placed, and assign the SetItem property to that container. Then you can do the same things as above with the line

SET/locked/true/locklevel/60/traptype/explosiontrap/trappower/50/ADD<ginseng/amount/10>/ADD/ARMOR,1,5/ADD/POTION/ADD,0.2/WEAPON,3,5/ADD/<gold/amount/RND,200,500>

APPROACH 3:
you could also place the spawner inside of the container, assign SetItem to the container and then SET the lock and trap attributes of the container as well as fill it with stuff by just spawning as usual with multiple spawn specifications like this:

SET/locked/true/locklevel/60/traptype/explosiontrap/trappower/50
ginseng/amount/10
ARMOR,1,5
POTION
WEAPON,3,5
gold/amount/RND,200,500

If you do it that way I would probably group spawn them (set the group property or assign them to the same subgroup). If you use the group=true approach, then it wont respawn until all of the spawn is gone.
You could either wait for players to do it, or you could set the duration timer to something so that it would force respawning/resetting of the chest at defined intervals.

Note, that while the approaches are similar, they are not identical. APPROACH 1: since it will execute the SET every OnTick, it will add items each time without removing the previous items. APPROACH 2: will fully respawn the chest and all the items, APPROACH 3: will leave the chest but fully respawn the items (not just continue adding them).

(edit)
sorry, I meant APPROACH 2 will execute the SET on every OnTick and APPROACH 1 will fully respawn the chest with items.
 
Any particular reason why you ripped the idea of a help menu from Morxeton's MegaSpawner package?

Ever plan on rewriting this so it isn't so rediculously inefficient? That is... if you can...
 

ArteGordon

Wanderer
TheOutkastDev said:
Any particular reason why you ripped the idea of a help menu from Morxeton's MegaSpawner package?

Ever plan on rewriting this so it isn't so rediculously inefficient? That is... if you can...
Actually, I've never seen his package or his help menu. (help menus are a rather common features of many software packages, so I'm not sure how the idea can be "ripped off")
Sure, I'll be streamlining things. The particular features that involve significant item search are the trigger on named item and trigger on named mob features, although on testing for cpu loading using profiling on various sections of code, those functions turn out not to be nearly as load intensive as you might think.
Thanks for the helpful suggestions.
(bad day at work?)
 

nix4

Wanderer
locking chests

THANKS big time!

I'm gonna give these approaches a shot and see which best suits my needs.

Yes, megaspawner had help files which I found easier to use than XMLSpawner. However, XMLSpawner is feature rich and has good support and userbase, only makes sense that it now has built-in help thats the natural progression of things.

Nice that its got help features, NOW if it only had documentation *wink* *wink*....Like How To sections on how to properly do different spawing tricks like the chest approaches you just gave us!

Thanks again!
 

nix4

Wanderer
Using the gump

I'm attempting to do approach 1 and have a question.

using the gump menu I can successfully add a metalchest, however if I add on the switches like you have metalchest/locked/true/... I can only get the "/locked/true" on before the gump menu for xmlspawner pushes me down to a new line and blanks out the entry. How do we add extended switches like the ones below to the graphical interface?

BTW, Im still very much new to this I tried to do it in a 'single line' using various [ commands but couldnt get it to work. Could you provide more specific instructions?

Also, a comment on the help. I think the help is useful for a listing of commands for xmlspawner. However, help pertaining to what can go in what fields in the gump menu would help people like me. ie up and down arrows I had no clue what they were for till I messed around with them. But the text field? are we to add switches there or is that JUST for namespaces? and whats the scroll icon after the text field? is that for sequential spawns??

Sorry for the constant questions.



APPROACH 1:
You can add a container to the spawner and then spawn it with lock and trap properties, along with contents all in one line using something like this.

metalchest/locked/true/locklevel/60/traptype/explosiontrap/trappower/50/ADD<ginseng/amount/10>/ADD/ARMOR,1,5/ADD/POTION/ADD,0.2/WEAPON,3,5/ADD/<gold/amount/RND,200,500>
 

ArteGordon

Wanderer
no problem.
The scroll icon next to the text entry is what you want. It opens the extended text entry gump that gives you more room for typing long strings, and allows you to edit strings within a line without having to retype the whole thing. The main area of the gump is the text entry area, the first line at the bottom is the edit line for old text, the second line is for the new text, and the apply button will replace the first instance of the old text with the new.

Adding descriptions of the gump fields and buttons in the help is a good idea, I'll add it to the list.
 

ArteGordon

Wanderer
nix4 said:
THANKS big time!

I'm gonna give these approaches a shot and see which best suits my needs.

Yes, megaspawner had help files which I found easier to use than XMLSpawner. However, XMLSpawner is feature rich and has good support and userbase, only makes sense that it now has built-in help thats the natural progression of things.

Nice that its got help features, NOW if it only had documentation *wink* *wink*....Like How To sections on how to properly do different spawing tricks like the chest approaches you just gave us!

Thanks again!

I should point out that there is some nice documentation included that DeepFreez wrote (current up to 2.19) and it has examples of that sort. It is in the xmlspawner2-support.zip file.

xmlspawner2doc.txt said:
Example 6:

woodenchest/ADD/WEAPON,3,5/ADD/ARMOR,3,4/ADD/ARMOR,3,4/ADD/POTION/ADD/SCROLL,4,6/ADD,.1/<WEAPON,2,3/slayer/elementalban>

This spawns a chest with a magic weapon, two pieces of magic armor, a potion, a scroll, and occasionally a lev2-3 elemental slayer.
 

brandon948

Wanderer
ArteGordon said:
one little quirk is that when you change the min/maxdelay, it doesnt reset the current timer, so typically it is still counting down whatever the previous delay was (like the 5-10 min default values). You can check and reset this by looking at/setting the NextSpawn property.
I'll put it on the todo list for the next release.

You can add loot to a spawned mob by using the ADD keyword.

instead of just typing in the name of the mob you want spawned, put a line like

demonknight/ADD/platehelm/ADD,0.1/longsword/ADD/ARMOR,1,5/ADD/POTION/ADD/helmofinsight

or other combinations of that sort.

You can also add items and change their properties at the same time using a line like

demonknight/ADD/<platehelm/hue/500>/ADD/<longsword/durability/200/name/toughasnails>

Yup its working great now. I was running into a problem with the 4 'hat' artifacts that arent in B36. But I scripted those in and its working perfectly.

Can't tell you how awesome this is. Great work!
 

ArteGordon

Wanderer
glad its working. And thanks for reminding me about that min/maxdelay thing. I just got so used to resetting NextSpawn after changing delays that I never bothered to change it. I put it in the next version.
 

nix4

Wanderer
Gump Issues

Okay, I found out what my issues are with XMLSpawner and added extended commands.

The extended text entry gump operates oddly on my machine. In the example of the metalchest that you have provided I would enter in metalchest/locked/true/locklevel/.. then after that the text is still available but you cannot see what yoru typing anymore cuz you have typed 'off' the gump.

If I try to add a new line or if I enter in too much text a carrage return occurs and then I get 2 spawn entries that are blank instead of being 'metalchest' yet one still spawns the chest and has the command line text in it!

So basically the extended entry gump dosnt have enough room to enter in extended commands and/or dosnt handle carrage returns well and/or Im doing something wrong again... hehe
 

ArteGordon

Wanderer
are you sure you are not typing into the basic text entry area in the main gump. The extended text entry gump is what comes up when you click on the scroll button to the right of each text entry line in the main gump.
If you try to type long lines in the basic text entry area it will let you type, but you wont see text beyond the end of the single line text entry area.

If you are typing into the extended gump (has ok, apply, and X, buttons at the bottom of it) and it is not displaying text as you enter it beyond about a single lines worth, then there is something going on.
It should automatically wrap around as you type, displaying the text as you type up to about 8 lines (its a client-side text entry limit which is on the order of 200 chars).

How are you entering a carriage-return?

gump text entry is a client-side thing so you might want to check to make sure you are patched up to date.
 

nix4

Wanderer
I am entering into the extended gump,I get as far as:
metalbox/locked/true/locklevel/30 then beyond that I can continue adding text but i am unable to see it.

Also, when I get to the '30' upon entering in the extended commands the entry gets forced down a line, leaving a blank line above it.
 

ArteGordon

Wanderer
sounds like a client-side issue. Are you using the 2d or 3d client?
When I enter the line it also gets to end of the first line where I am about to type the 30. When I type the / just prior to typing 30, the cursor (the underscore) wraps to the second line and when I type 30 it appears as the first chars on the second line with the previous text still visible on the line above it.
Can you see the underscore cursor that leads your typing?
 

nix4

Wanderer
I think we are on to something..I am using the 3D client ver 4.0.1b

The text does not respond on my client as you indicated above, your response would seem more logical than the odd behavior I'm experiencing.

I see a underscore cursor I can get to:
metalbox/locked/true/locklevel/3 beyond that point my cursor goes away I can still enter 0 so the visible text entry would be:
metalbox/locked/true/locklevel/30
beyond that text entry is still possible but its not visible. No carrage return is performed.

The Metalbox entry when exceeding the visible range then gets forced down a line entirely, leaving a blank entry above it.
 
Top