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

ArteGordon

Wanderer
you can do things like

[global set mindelay 2 maxdelay 5 where xmlspawner

and to respawn you can use either

[global set dorespawn true where xmlspawner

or

[xmlspawnerrespawnall

which is more verbose, displaying a message for each spawner that is being respawned
 
oh i was hoping there was a command to set defaulta via gump before i spawned world, ill just edit the script, that will be easier.
thanks


one more Q, when i make a .def file how do i bring it back up so i can use it?
 

ArteGordon

Wanderer
when you run [xmladd there is a textentry box near the bottom of the gump, next to the save/load buttons. You can bring up your named defs file by entering its name there and then hitting the "Load" button

Note, if you save the defaults without entering a name there, it will save them as your user defaults. These are the default values that will be loaded up for that user whenever you do a "Load" defs without a name.

The default user defs file is named "accountname-username.defs"

The defs files can be placed either in the mian RunUO installation directory, or in the SpawnerDefs folder in the installation directory, if it exists.
 

ArteGordon

Wanderer
SphericalSolaris said:
Is there a command that will reset defaults on spawners instead of going into script?

Like i want to reset all spawners min/max delays and then spawn the world.

ah, I think I misunderstood you when I responded the first time. I thought you were referring to changing settings on spawners that had already been placed.

To change the defaults that are applied when you add new spawners, bring up the [xmladd gump, enter the default values that you want, and then hit the "Save" button down near the bottom of the gump. This will save the user-specific default values in a .defs file for that user. The .defs files can be restored using the "Load" button in [xmladd

Note, those default values will only apply to use of [xmladd. If you place spawners by doing "[add xmlspawner" those will still use the script defaults.
 
So when i do [xmlimportspawners itll spawn all *.map's and have my .def defaults?

Also i have found a bug i think... Some of the spawners are turning into hidden ship's masts.. why would that be, I have used these spawners for a while and have never run into that, it is just happening on 1.0.0.
 

ArteGordon

Wanderer
SphericalSolaris said:
So when i do [xmlimportspawners itll spawn all *.map's and have my .def defaults?

Also i have found a bug i think... Some of the spawners are turning into hidden ship's masts.. why would that be, I have used these spawners for a while and have never run into that, it is just happening on 1.0.0.

no, when you import spawners it will just use the settings in the .map files

The .defs defaults only get applied for spawns added with the [xmladd interface.

The hidden masts are displayed when you issue the [xmlshow command (same as [xmlspawnershowall) to make it easier to see the spawners. You can switch back to the magic crystals by issuing the [xmlhide command.
If you are finding that they are switching to the hidden mast display without doing an [xmlshow let me know.

What might have happened is that at one point you did an [xmlshow and it switched the current spawners to masts. If you then began adding new spawners, they would still be created with the default magic crystals.
You might have then come across those previous spawners.

Do an [xmlhide and everything should go back to crystals.
 

ArteGordon

Wanderer
One thing to remember about those masts is that even though they are hidden to players, they will still block movement, so you dont want to leave them as masts.
 
ok.

I am having a new issue, last time i used the spawner system i was able to pint one of the commands to a directory with 15 *.map files, and it spawned all the *.map files in the directory, but for some reason I cant for the life of me remember how to do that.
I keep getting a that directory does not exist.
So what is the proper command to load up a full directory?

**EDIT**
Neverming i figure it out, i kep doing \Data\Monsters\tokuno instead of Data\Monsters\tokuno, you cant put that first backslash in.
 
ArteGordon said:
you can do things like

[global set mindelay 2 maxdelay 5 where xmlspawner

I just did that exact command and it set all spawners to 2 hrs and 5 hrs, i want minutes, how would i do that?


**EDIT**
lol i just tried [global set mindelay 002 maxdelay 005 where xmlspawner
and now its 2 days and 5 days.....

**EDIT2**
Ok just tried:
[global set mindelay 0.0:2 maxdelay 0.0:5 where xmlspawner
and it set it to 2 seconds - 5 days
wait i see an error in my command ill try again

ok just did
[global set mindelay 0.0:2 maxdelay 0.0:5 where xmlspawner
and that did 2min-5mins, thanks for the help but i got it :)
 

ArteGordon

Wanderer
mindelay and maxdelay are TimeSpan type properties so you assign them time values in the format of dd:hh:mm.s

so 00:05 would be 5 minutes

[set mindelay 00:05
 

RJO

Sorceror
Arte, first I want to say WOW this script kicks butt, it is simply amazing!

I'd like to ask something, is there an example script or document that I can look at to learn how to do quests, etc? I'm just starting out with RunUO and im sorta wow'd with everything so I'm sure its right in front of my face, if someone could point me in the right direction I'd appreciate it huge
 

ArteGordon

Wanderer
RJO said:
Arte, first I want to say WOW this script kicks butt, it is simply amazing!

I'd like to ask something, is there an example script or document that I can look at to learn how to do quests, etc? I'm just starting out with RunUO and im sorta wow'd with everything so I'm sure its right in front of my face, if someone could point me in the right direction I'd appreciate it huge

Well, there isnt a document yet that specifically walks you through the quest making process. I'm slowly generating more comprehensive and organized documentation so it will show up eventually.

xmlspawner2.txt basically describes all of the xmlspawner2 features, just in a dense chronological way instead of a clear, nicely organized way. If you go through that file, you will find descriptions of all of the features.
There is also the file xmlspawner2doc.txt that is incomplete but documents some of the basic xmlspawner2 properties.

Your best bet is to take a look at the example quests such as

dracondarquest.xml
boboquest.xml
katarquest.xml
blather3.xml
blather2.xml
blather.xml
killtask.xml
repeatquest.xml
questbook.xml
questnpc.xml
blazequest.xml

if you do a search for these in the file xmlspawner2.txt you will find more info on them. Here is a walkthrough of katarquest.xml from the file:

Description of katarquest.xml:
This spawns an orc and two talking NPCs, one is a TalkingBaseEscortable. One spawner (KatarQuest#1) sets up the NPCs and the other is for delivering the reward when the quest objectives have been met (KatarQuest#2).

spawner (KatarQuest#1)
0 orc/x/INC,40/ADD/<longsword/name/Shemps Blade/hue/32>
0 talkingbaseescortable,0/name/Shemp/destination/britain graveyard
1 xmlquestnpc,1/name/Katar/configfile/katar quest/loadconfig/true

The first entry creates an orc and then moves him 40 tiles away. It also adds the quest item named "Shemps Blade" to his pack.
The second entry creates the escortable NPC named Shemp (the zero arg passed to the constructor forces him to be male) and assigns his escort destination to the "britain graveyard" which is a defined region name.
The third entry creates the talking NPC Katar (the arg of 1 passed to the constructor forces her to be female) and loads it with the conversational configuration file named "katar quest.npc"

spawner (KatarQuest#2)
1 SETONSPAWN,KatarQuest#1,1/SAY/Thank you for your help! Here is your reward
1 TAKE/Help Shemp
1 GIVE/LOOTPACK,filthyrich

TriggerOnCarried "Help Shemp"
ProximityRange 5
MinDelay 1 sec
MaxDelay 1 sec

The first entry has the Katar NPC (subgroup 1 on Spawner KatarQuest#1) say something
The second entry takes the "Help Shemp" questnote from the player.
The third entry gives a random lootpack reward of the filthyrich level to the player.

Katar quest.npc

This file contains the conversation that drives the quest, and also has the npc handing out the questnote for the quest.
There are 5 random banter entries.

When a player initiates a conversation with any of the keywords "hello,greetings,hi,help,trouble", Katar describes the situation and then gives the player a questnote through the html entry in katar quest.npc

<Action>GIVE/&lt;questnote/name/Help Shemp/titlestring/Shemp/notestring/Return Shemp's sword and take him to visit his mother's grave./objective1/ESCORT,Shemp/objective2/GIVENAMED,Shemp,Shemps Blade&gt;</Action>

which GIVES the player a questnote named "Help Shemp" with the objectives "ESCORT,Shemp", and "GIVENAMED,Shemp,Shemps Blade".
To satisfy these objectives, the item Shemps Blade must be taken from the orc that carries it and given to Shemp by dragging and dropping it onto him. Then Shemp must be escorted to his destination location.
 

ArteGordon

Wanderer
RJO said:
Ok I'll follow up with another stupid question ... how would I get this to spawn then?

for all of the examples you use the [xmlload command, so

[xmlload killtask.xml

would load that example to its original location, which happens to be in green acres.

If you wanted to force it to load the example to your current location use the [xmlloadhere commmand

[xmlloadhere killtask.xml
 

ArteGordon

Wanderer
Here is a little tip for those of you spawning paragons.
You may find situations where you would prefer that certain spawns never spawn as paragons, such as boss mobs, quest mobs, etc.

To allow you to prevent paragon spawning just add this piece of code to your BaseCreature.cs

Code:
        // ARTEGORDONMOD
        // the NoParagon flag can be set on individual spawns at spawn time to prevent them from going Paragon
        private bool m_noparagon;

        public bool NoParagon
        {
                get { return m_noparagon; }
                set 
                {
                        m_noparagon = value;
                        if(m_noparagon == true)
                        {
                                IsParagon = false;
                        }
                }
        }

and then when you spawn them, use this as your spawn entry

balron/noparagon/true

This will spawn a balron, and then set the NoParagon property to true which will keep it from ever spawning as a paragon.

Of course, you can still set other properties along with the noparagon property if you wish, such as

balron/name/The Wimp/noparagon/true

(edit)

just a reminder, this only applies to 1.0.0
 

RJO

Sorceror
Ok this should be my last question... I've almost got this figured out now ;)

Using the Katar quest as an example... lets say I'd like to have Katar spawn at 0,0 but I want the orc to spawn at 100,100 (as opposed to from 40 tiles away)

How would I go about setting up the orcs spawn point? And instead of having the orc spawn tied to Katar could I just make another <points> entry to spawn the orc seperate?
 

ArteGordon

Wanderer
RJO said:
Ok this should be my last question... I've almost got this figured out now ;)

Using the Katar quest as an example... lets say I'd like to have Katar spawn at 0,0 but I want the orc to spawn at 100,100 (as opposed to from 40 tiles away)

How would I go about setting up the orcs spawn point? And instead of having the orc spawn tied to Katar could I just make another <points> entry to spawn the orc seperate?

if you want to spawn something at a specific location, you can just set the its x,y coordinates in the spawn entry, like this

orc/x/100/y/100

this will spawn the orc and then move it to 100,100

Now, the orc's Home location will still be where it was actually spawned.
If you wanted to change that as well, you would do

orc/x/100/y/100/home/(100,100,0)

where (100,100,0) is how you would specify a Point3D type of property (thats what Home is).

If you didnt change the home, then it would move to 100,100 and then proceed to wander back to the original home location, which is the little trick that is used in katarquest to start the mob 40 tiles away and then have it wander back.

(edit)

note that you can also set the Location property (which is a Point3D) to move it instead of setting x and y separately, like this

orc/location/(100,100,0)
 

ArteGordon

Wanderer
actually in thinking about it, with the new paragon system there is an even easier way to achieve this without having to make any BaseCreature.cs mod

Just spawn them like this


balron/isparagon/false


and it will never spawn paragon

The converse also works, and that is if you want to force a paragon spawn, even on a map that doesnt normally have spawning paragons. Just do


balron/isparagon/true


and it will always spawn paragon.
 
Top