I am using RunUO 2.2, and trying to attach specific NPC speech files to an XML spawner. For the record, I have read through the XML tutorial on spawning a talking NPC.

Thus far I have been able to create the NPC file (BeggarSpeech) and several entries using [xmledit. I saved the the file in the Attachments folder. I then created an XMLspawner, and entered the following (according to the tutorial): beggar/ATTACH/xmldialog,BeggarSpeech.

This successfully spawned the npc, and attached an xmldialog to it, but the file is blank. I noticed that I am able to enter any file name after xmldialog, and a blank xmldialog will be attached.

My question is, how can I attach an existing npc file with existing entries to a spawner? Thanks in advance for any help.
 
you can do lots with xml spawners, but my advice is, for something like that, it may be better to script it as a "herald" or something instead of trying to get it in a spawner. Speech is not a prop, xml spawners can only edit properties found. Hope this helps, and good luck
 
@Archaaz
You should read through the tutorials posted here. https://www.servuo.com/tutorials/xmldialog-xmledit-xmlquestnpc-killnamed-objective.9/
The tutorial you read is very old, and some of the info is a bit outdated. When you spawn an XmlTalkingNPC, you want to attach the XmlDialog to it, make changes to the file, and save it. Then place an Xmlspawner, in the line entry for the XmlTalkingNPC, you'll want to add:
Code:
ConfigFile/TheFileNameYouSaved/LoadConfig/True

For an XmlQuestNPC, the entire line entry could be something like this:
Code:
XmlQuestNPC,0/Name/Charley/Title/the Barbarian/TalkText/Hail!/ConfigFile/Charley/LoadConfig/True

@Wise Ol Kor
Xmlspawners can create their own properties, depending on how you set up the line entry for a spawn itself. For example, you could add an attachment, that blocks, or allows access to certain areas. This is not a property of the NPC, it's just a property of the attachment, but can be directly accessed. :)
 
you can do lots with xml spawners, but my advice is, for something like that, it may be better to script it as a "herald" or something instead of trying to get it in a spawner. Speech is not a prop, xml spawners can only edit properties found. Hope this helps, and good luck

Thanks for the advice. I tried this route as well, using a script for Sherry the mouse as a model.

[doublepost=1479825221][/doublepost]
@Archaaz
You should read through the tutorials posted here. https://www.servuo.com/tutorials/xmldialog-xmledit-xmlquestnpc-killnamed-objective.9/
The tutorial you read is very old, and some of the info is a bit outdated. When you spawn an XmlTalkingNPC, you want to attach the XmlDialog to it, make changes to the file, and save it. Then place an Xmlspawner, in the line entry for the XmlTalkingNPC, you'll want to add:
Code:
ConfigFile/TheFileNameYouSaved/LoadConfig/True

For an XmlQuestNPC, the entire line entry could be something like this:
Code:
XmlQuestNPC,0/Name/Charley/Title/the Barbarian/TalkText/Hail!/ConfigFile/Charley/LoadConfig/True

@Wise Ol Kor
Xmlspawners can create their own properties, depending on how you set up the line entry for a spawn itself. For example, you could add an attachment, that blocks, or allows access to certain areas. This is not a property of the NPC, it's just a property of the attachment, but can be directly accessed. :)

Thanks very much for the links and the information! I had assumed that the tutorials on ServUO were the same as the ones I had, so I did not bother reading through them. I want to explore XML more, and this is of immense help. Thanks again!
 
Last edited:
I want to explore XML more, and this is of immense help. Thanks again!

i find anything that we implement into our server, we have to rewrite especially if its older and from old run uo, as for the xml spawners themselves, i learned alot of youtube videos tbh, once i watched some videos, i spent many hours in green acres testing around.
 
@tass23, I changed the NPC from to a TalkingBaseCreature and
i find anything that we implement into our server, we have to rewrite especially if its older and from old run uo, as for the xml spawners themselves, i learned alot of youtube videos tbh, once i watched some videos, i spent many hours in green acres testing around.

I am fairly new to coding, so it is all a bit of a learning process. I have decided to stick with RunUO as I have been using it for a few years to develop this project, and it is a bit late in the game to change everything at this point.

The information @tass23 posted was of great help, both in solving my initial question, and in helping me to understand a bit more about properties, XML, etc. I simply changed the NPCs I wanted to use from BaseCreature to TalkingBaseCreature and was able to use the XMLSpawner to attach the necessary config files to the corresponding NPCs when they are spawned. This could likewise be accomplished by setting the properties in the individual NPC files. I do not much care for quests, and simply want to include a few talking NPCs for flavor and for dispensing information.

Thanks for the heads up regarding youtube and tpb! I will most definitely check them out. XML seems quite robust and useful.
 
Back