Full Version : XmlSpawner2 v3.19 [RunUO 2.0] released
xmlspawner >>XMLSpawner - Releases & Updates >>XmlSpawner2 v3.19 [RunUO 2.0] released
<< Prev | Next >>
ArteGordon- 02-27-2007
New to version 3.19
updated 2/27/07
Bug Fixes
Modified Features
- Name tests have been modified to support a special wildcard "*" that will match any name. (thanks to Kaon for the suggestion)
There are three types of name argument that can be used in tests and keywords
1) standard non-empty name argument (match specific named objects)
2) empty name argument (match only unnamed objects)
3) special * name argument (match objects with any name)
This should work anywhere that a name argument is normally required.
So, for example using a TriggerOnCarried string of
*,heavycrossbow
would allow triggering when the player was carrying a heavy crossbow regardless of the name.
- added the AllowCarried flag to the XmlUse attachment that toggles the ability to use an item when carried by the player using it. (true by default).
New Features
- added support for a new xmlspawner.cfg file in the Data folder of the main RunUO installation. This configuration file can be used to specify certain default values without having to modify the settings in xmlspawner scripts themselves. This can simplify upgrading to new revisions since custom settings can now be specified outside of upgraded scripts and so will be maintained when those scripts are replaced.
If you do not wish to use this configuration feature, you do not have to add an xmlspawner.cfg file. In that case, the standard system defaults will be used just as they have in the past. This new feature is completely optional.
Below is an example of a configuration file illustrating the current support for some of the common xmlspawner and xmldialog settings.
Data/xmlspawner.cfg

QUOTE
# This is a sample xmlspawner configuration file # comments can be added anywhere in the file using the # at the beginning of the line # sections are specified with [section] # individual setting assignments have the form 'name=value'. Spaces can be placed around the '='
# empty lines are ignored and can be placed anywhere
[XmlSpawner]
XmlSpawnDir=Spawns
DiskAccessLevel=Administrator
SmartSpawnAccessLevel=Administrator
defMinDelay=5
defMaxDelay=10
defHomeRange=5
defSpawnRange=5
defRelativeHome=true
[XmlDialog]
XmlQuestNPCDir=XmlQuestNPC
defProximityRange=3
defResetTime=60
defSpeechPace=10

Other systems can also make use of the configuration file by simply specifying their configuration settings in a custom named section. These custom sections will have no effect on any other settings in other sections.
For other systems to make use of the configuration file, the following call would be added to their Initialization method which would load in the settings from the named section during initialization. Individual settings would be processed using the specified custom method.

CODE
XmlSpawner.LoadSettings(new XmlSpawner.AssignSettingsHandler(AssignSettings), "XmlDialog");

where "XmlDialog" would be replaced with a string identifying the section name in the configuration file used to hold the settings for the system.
"AssignSettings" is a custom public static method that would be scripted to process each setting. An example is shown below from the XmlDialog system.

CODE
public static void AssignSettings(string argname, string value) { switch (argname) { case "XmlQuestNPCDir":
DefsDir = value;
break;
case "defResetTime":
defResetTime = TimeSpan.FromSeconds(XmlSpawner.ConvertToInt(value));
break;
case "defProximityRange":
defProximityRange = XmlSpawner.ConvertToInt(value);
break;
case "defSpeechPace":
defSpeechPace = XmlSpawner.ConvertToInt(value);
break;
}
}

- added the new MEFFECT keyword that allows moving effects to be specified. The syntax is
MEFFECT,itemid[,speed][,x,y,z][,x2,y2,z2]
When x,y,z is specified the moving effect will start at the location and move toward the target object. This syntax must be used as a modifier of a spawned object. If x,y,z is omitted, then the starting location will be the location of the spawner.
For example, to have an fireball move from the spawner location to a triggering player,
SETONTRIGMOB/MEFFECT,14036,3
To have it move from a specified location such as (1500,1100,10) to the triggering player
SETONTRIGMOB/MEFFECT,14036,3,1500,1100,10
Note that the z coordinate should be above ground level to avoid the appearance of ground clipping.
When x2,y2,z2 is also specified the moving effect will start at x,y,z and end at x2,y2,z2 allowing the effect to move between two arbirary locations in the world. This syntax can be used as a standalone keyword. For example the following entry would create a fireball travelling between the two locations.
MEFFECT,14036,3,1500,1100,10,1520,1120,10