Full Version : XmlSockets v1.08a [RunUO 2.0]
xmlspawner >>XMLSockets Releases and Updates >>XmlSockets v1.08a [RunUO 2.0]
<< Prev | Next >>
ArteGordon- 06-24-2006
XmlSockets
v1.08a
RunUO 2.0 version
updated 6/24/05
ArteGordon
Summary:
This set of attachments provides a system for adding sockets and socket augmentations to items and mobs. The XmlSockets attachment adds sockets that can be filled with augmentations that will enhance specific abilities. The XmlSocketable attachment enables player-addable sockets that can be added to the target object by players meeting customizable skill and resources requirements.
Recent Updates:
New to v1.08a
updated 4/13/05
- added a new powerscroll transmutation recipe to the BoxOfTransmutation that takes any 3 powerscrolls of the same level, along with a legendary diamond, legendary ruby, and legendary emerald, and creates a new random powerscroll of the same level.
- added some recipes for transmuting large and small BODs. Transmuting a small BOD and 2000 gp will give you a new random small BOD of the same type. Transmuting 20000 gp and a large BOD will give you a random large BOD of the same type.
- the XmlMobFactions recipes are now properly commented out for those that arent using that system.
New to v1.08
updated 3/10/05
- slightly modified the transmutation rules so that a recipe that specifies an ingredient in any quantity (quantity requirement of 0) still requires at least one of that ingredient.
- added the option to specify a second skill requirement for socketing (thanks to Greystar for the suggestion). The XmlSocketable attachment now has 2 additional properties, RequiredSkill2 and MinSkillLevel2. By default MinSkillLevel2 is 0 so there is no second skill requirement.
To support the requirement for a second skill, several new methods and constructors have been added. You can spawn an object with a second socketable skill requirement like this
buckler/ATTACH/xmlsocketable,2,Tinkering,115,ArmsLore,70,gold,2000
You can also randomly configure a socketed/socketable object with two skill requirements in scripts using the new ConfigureRandom overload method, like this
XmlSockets.ConfigureRandom(this, 2.0, 0.1, 0.5, 3.0, 15.0, 50.0, SkillName.Veterinary, 100.0, SkillName.AnimalLore, 90.0, typeof(Emerald), 30);
which will add a random socketable/socketed configuration to the target with a minimum 100 veterinary skill as well as a minimum 90 animal lore skill on socketing.
There is also a new XmlSocketable constructor that accepts the additional skill requirements if you wish to add socketing to items in your own scripts.
public XmlSocketable(int maxsockets, SkillName skillname, double minskilllevel, SkillName skillname2, double minskilllevel2, Type resource, int quantity)
- added the ability to recover augmentations from sockets. Specific augmentations must have the ability to be recovered enabled by defining the CanRecover and OnRecover override methods in their scripts. If these are not defined for a particular augmentation, then they will not be recoverable.
Augmentations that can be recovered and are already socketed into an item will be identified as such by clicking on their socket in the socket display gump. If the augmentation can be recovered you will see "Can be recovered" at the end of the description.
Note that it is possible for an augmentation to be recoverable in certain items and not others if you wish, or even dependent on the individual trying to do the recovery (based on karma, fame, etc.). Just put the desired conditions in the CanRecover override method for the given augmentation.
A version argument has been added to the CanRecover and OnRecover calls to allow you to make changes to augmentations but still control how older versions are handled.
If you do make changes to existing augmentations you should override the Version property for that augmentation and return an updated value (the default is zero).
If you make changes to the number of sockets used by an augmentation and previous versions of the augmentation been used, and you make the augmentation recoverable, then you should override the RecoverableSockets method and return the proper value based on the version number.
- added a new recipe to the BoxOfTransmutation for recovering augmentations from items. Transmuting an augmented item and an AncientRuby will allow a random augmentation from the item to be recovered.
- added the new HammerOfRecovery item that can be used to recover augmentations from a target. This can be used to recover augmentations from items or creatures.
- added a new recipe to the BoxofTransmutation for creating a single use HammerOfRecovery from a regular hammer and an AncientRuby. This allows players with the proper skills and resources to create a hammer that could be given to other players to allow them to remove augmentations.
- updated the crystal, radiant crystal, gem, and skull augments to support recovery.
New to v1.07
updated 2/13/05
- fixed a possible crash bug involving the display of Socket properties on items that are on the generic vendor buy lists.
- added a new transmutation container item, the BagOfResources that takes the arrow/bolt recipes and the hides/bandage recipe out of the BoxOfTransmutation. The BoxOfTransmutation now just contains augmentation related recipes.
New to v1.06
updated 1/31/05
- added an interface specification to some of the existing augments to facilitate their use in the new transmutation system.
- added the new items BoxOfTransmutation and MagicBasket. They can be made with limited or unlimited uses (setting the UsesRemaining property to a value less than zero gives unlimited use).
- added the new BaseTransmutationContainer class that allows you to make containers that can magically create objects based upon specifiable recipes. The recipes are made up of lists of ingredients that when placed into the container in exactly the right quantity and with the correct properties, can be transformed into other objects.
Each recipe can also optionally have multiple minimum skill and stat requirements.
Two examples of transmutation devices are included. To test them out just [add magicbasket, or [add boxoftransmutation. They can also be made with limited uses with e.g. [add magicbasket 50 for a 50 use basket.
The transmutation gump can be opened either by placing objects into the container, or by selecting the 'Use this device' context menu option.
The MagicBasket has one recipe defined that requires cooking skill and makes a meat pie out when the following ingredients are used: 2 raw ribs, 1 garlic, 1 bowl of flour, 1 full pitcher of milk, 4 carrots. It requires 30 cooking skill, 30 dex, and 20 int.
The BoxOfTransmutation has recipes for manipulating augments, and socketed weapons/armor, and a few other things.
Here are the recipes that it has defined:
HidesToBandages: will change any amount of hides into bandages
Req - 50 str, 30 dex
BoltsToArrows: will change any amount of bolts into half the quantity of arrows
Req - 50 ArmsLore, 70 str, 30 dex
ArrowsToBolts: will change any amount of arrows into half the quantity of bolts
Req - 50 ArmsLore, 70 str, 30 dex
UpgradeAncientAugment: will take 6 Ancient augments and convert them to a Legendary augment of the same type.
Req - 50 Alchemy, 70 str, 30 dex, 40 int
UpgradeLegendaryAugment: will take 3 Legendary augments and convert them to a Mythic augment of the same type.
Req - 70 Alchemy, 70 str, 30 dex, 40 int
UpgradeCrystalAugment: will take 3 Crystal augments and convert them to a Radiant augment of the same type.
Req - 70 Alchemy, 70 str, 30 dex, 40 int
SocketWeapon: will take any unsocketed weapon and a Rho rune augment and add a single socket to the weapon.
Req - 50 Blacksmith, 70 str, 30 dex, 40 int
SocketArmor: will take any unsocketed armor and a Rho rune augment and add a single socket to the armor.
Req - 50 Blacksmith, 70 str, 30 dex, 40 int
some additional recipes that allow various mob faction bonuses to be granted with recipes that use a combination of glimmering stone augments and gold are included. These require the XmlMobFactions system to be installed.
These are commented out by default. If you have XmlMobFactions installed and you wish to use these, just uncomment them.
An arbitrary number of additional recipes can be specified. You could also construct different transmutation container classes (derived from the BaseTransmutationContainer class) that implemented different recipe sets.
New to v1.05
updated 1/22/05
- made an adjustment to the default gump art hues for augments so that they match the item hues.
- added another gem augment (tourmaline) and updated the optional Loot.cs to reflect this.
- added a set of glimmering stone augments that grant various skill bonuses.
- updated installation instructions for 1.0.0
- updated the optional modified lootpack.cs/loot.cs files to 1.0.0
Description:
This system makes use of the XmlSpawner2 attachment system and the XmlSpawner2 package must be installed to support it. You dont need to use the xmlspawners themselves, and it doesnt matter whether you use the standard distribution spawners or any other spawning system but you do need the XmlSpawner2 package installed.
Because the attachment system neither requires nor makes any changes to serialization/deserializations of any item or mobile, it can be safely added and removed at any time now or in the future without interfering with any other systems that you might have installed.
Note, this is intended as more of a development system for people to add custom content to their shards than just a drop-and-play system with a full complement of socket augmentations. While I have included a number of augmentations in the package that can be used as-is, they are intended to illustrate its features so that users can extend them with additional content.
Features:
Note that ANY object can in principle be socketed - weapons, armor, jewelry, clothing, tools, trees, doors, fruit, creatures, players, gems - anything. You just have to tag them with the sockets/socketable attachments using one of the methods described below. It is then the responsibility of the augment to determine what it can affect and what effect it has on the socketed object.
Sockets
Sockets allow target objects to be enhanced by providing slots in which specially designed augmentations can be placed. Different augmentations will confer different abilities to the target.
Sockets can either come pre-existing on a target, or can be added by an individual with sufficient skill and resources.
Socketability
Individual objects can be flagged as being "socketable", by adding the XmlSocketable attachment which allows the maximum number of sockets, the type of skill and minimum skill level required to socket, and the resources used in socketing, to be specified. By default 100 Blacksmithing and 50 Valorite ingots are required to add a socket to a target.
Augmenting
To add an augmentation to a socket, both the augmentation and the item to be augmented must be in the players pack. To bring up the socket gump you must use the item identification skill on the item. In the gump, click on the socket and target the augmentation. By default, augmenting requires no resources and will always succeed. This behavior can be changed in the ConsumeOnAugment and OnAugment override methods for individual augmentations.
After a socket has been filled with an augmentation, clicking on the socket will display the augmentation properties.
Item Identification. This skill is used to display the sockets and socketability of target objects. Just use the skill and target an object (either items or creatures).
Examples. Examples of socketed/socketable objects including tamable creatures such as a socketable dragon are included in the example .xml file socket1.xml. To try this out, place the file "socket1.xml" in your top level RunUO directory and execute the command "[xmlloadhere socket1.xml"
It creates several bags of augmentations and various socketed and socketable items. The dragon can be socketed after it is tamed.
Commands/Control Items:
[addsocket - To add a socket to a socketable object the player issues the "[addsocket" command and targets an object. If the target is an item, then the item must be in the players backpack. If the target is a creature, then the creature must be under the players control. If socketing is successful, you will see the new socket in the socket gump. On each failure resources will still be consumed and there is a 10% chance that the target will be destroyed (this probability can be set by the static DefaultDestructionProbability variable in XmlSocket.cs).
The difficulty of adding a socket depends on the minimum skill required by the object, the skill level of the player, and the existing number of sockets.
The chance of succeeding in adding a socket can be displayed by using the Item Identification skill on a socketable object.
SocketHammer - an item that provides the same functionality as the [addsocket command. Just double-click to use and target the object to be socketed. It can be given either limited (set UsesRemaining to a value > 0) or unlimited number of uses (set UsesRemaining to a value < 0).
Adding sockets to items/mobs
Manually to individual item/mobs
- the xmlSockets attachment can be added to objects in several ways. It can be manually attached to any existing object with the "[addatt" command.
For example
"[addatt xmlsockets 4"
will add 4 sockets to a targeted object.
To scripts
- Sockets can also be added to scripted objects. See the included script TestSocketedWeapon.cs for an example of this.
To spawned objects
- To add sockets to spawned objects use the ATTACH keyword in spawn entries such as this
katana/ATTACH/xmlsockets,4
which would spawn a katana with 4 sockets.
or
orc/ADD/<katana/ATTACH/xmlsockets,4>
would spawn an orc carrying the socketd katana.
To try out the included example spawner .xml file, place the file "socket1.xml" in your top level RunUO directory and execute the command
"[xmlloadhere socket1.xml"
Making items/mobs socketable by players
Manually to individual item/mobs
- the xmlSocketable attachment can be added to objects in several ways. It can be manually attached to any existing object with the "[addatt" command.
For example
"[addatt xmlsocketable 4"
will flag the target object as socketable and supporting a maximum of 4 player-added sockets.
To scripts
- Socketability can also be added to scripted objects. See the included script TestSocketedWeapon.cs for an example of this.
To spawned objects
- To add sockets to spawned objects use the ATTACH keyword in spawn entries such as this
katana/ATTACH/xmlsocketable,4
which would spawn a katana supporting a maximum of 4 player-added sockets.
buckler/ATTACH/xmlsocketable,2,Tinkering,115,gold,2000
which would spawn a buckler supporting a maximum of 2 player-added sockets that require a minimum of 115 Tinkering and 2000 gold to add.
Installation:
For 1.0.0
STEP 1:
Install the latest XmlSpawner2 package. You can find it here XmlSpawner2. Make sure that you perform installation step 8 from that thread. I would also strongly suggest performing step 11 from that thread to allow socket properties to be automatically displayed.
STEP 2:
Place the scripts from this package into your custom scripts directory, or into the XmlAttachments area of your XmlSpawner2 installation. (anywhere in your Scripts folder is fine, these locations are suggested for organizational purposes only).
Place the optional .xml example in the top level of your RunUO installation directory if you would like to try it out.
If you have also installed the custom attacks/defenses system (XmlCustomAttacks) then you can extract the runeaugments.cs file. If you do not have that system, then remove runeaugments.cs from the Augments folder.
STEP 3: (optional)
To automatically add sockets and socketability to dropped weapons and armor and tamable creatures with some probability, you can make these changes to BaseArmor.cs, BaseWeapon.cs, BaseJewel.cs, and BaseCreature.cs. If you make this modification, all weapons/armor/tamable creatures will have some chance of having sockets when they are made. If you would rather put the modifications somewhere else, such as in LootPack.cs, or in scripts for specific weapons/armor/creatures/jewelry/etc. that would work as well.
You could have random sockets/socketability automatically added to anything such as jewelry or any custom items that you have by adding in the XmlSockets.ConfigureRandom call into their constructors in the same way it is illustrated below.
First, place the following line at the beginning of the files BaseArmor.cs, BaseWeapon.cs, BaseJewel.cs, and BaseCreature.cs

CODE
using Server.Engines.XmlSpawner2;

then
at the end of the BaseArmor constructor around line 1121 in Scripts/Items/Armor/BaseArmor.cs
change this

CODE
m_AosSkillBonuses = new AosSkillBonuses( this );

to this

CODE
m_AosSkillBonuses = new AosSkillBonuses( this ); // mod to randomly add sockets and socketability features to armor. These settings will yield // 2% drop rate of socketed/socketable items // 0.1% chance of 5 sockets // 0.5% of 4 sockets
// 3% chance of 3 sockets
// 15% chance of 2 sockets
// 50% chance of 1 socket
// the remainder will be 0 socket (31.4% in this case)
// uncomment the next line to prevent artifacts from being socketed
// if(ArtifactRarity == 0)
XmlSockets.ConfigureRandom(this, 2.0, 0.1, 0.5, 3.0, 15.0, 50.0);

at the end of the BaseWeapon constructor around line 2525 in Scripts/Items/Weapons/BaseWeapon.cs
change this

CODE
m_AosSkillBonuses = new AosSkillBonuses( this );

to this

CODE
m_AosSkillBonuses = new AosSkillBonuses( this ); // mod to randomly add sockets and socketability features to weapons. These settings will yield // 2% drop rate of socketed/socketable items // 0.1% chance of 5 sockets // 0.5% of 4 sockets
// 3% chance of 3 sockets
// 15% chance of 2 sockets
// 50% chance of 1 socket
// the remainder will be 0 socket (31.4% in this case)
// uncomment the next line to prevent artifacts from being socketed
// if(ArtifactRarity == 0)
XmlSockets.ConfigureRandom(this, 2.0, 0.1, 0.5, 3.0, 15.0, 50.0);

at the end of the BaseJewel constructor around line 93 in Scripts/Items/Jewels/BaseJewel.cs
change this

CODE
Layer = layer;

to this

CODE
Layer = layer; // mod to randomly add sockets and socketability features to weapons. These settings will yield // 2% drop rate of socketed/socketable items // 0.1% chance of 5 sockets // 0.5% of 4 sockets
// 3% chance of 3 sockets
// 15% chance of 2 sockets
// 50% chance of 1 socket
// the remainder will be 0 socket (31.4% in this case)
// uncomment the next line to prevent artifacts from being socketed
// if(ArtifactRarity == 0)
XmlSockets.ConfigureRandom(this, 2.0, 0.1, 0.5, 3.0, 15.0, 50.0);

make this change in the BaseCreature class around line 743 in Scripts/Engines/AI/Creature/BaseCreature.cs. Change

CODE
public override void OnBeforeSpawn( Point3D location, Map m ) { if ( Paragon.CheckConvert( this, location, m ) ) IsParagon = true; base.OnBeforeSpawn( location, m );
}

to this

CODE
public override void OnBeforeSpawn( Point3D location, Map m ) { if ( Paragon.CheckConvert( this, location, m ) ) IsParagon = true; // mod to randomly add socket features to tamable creatures. These settings will yield
// 2% drop rate of socketed/socketable items
// 0.1% chance of 5 sockets
// 0.5% of 4 sockets
// 3% chance of 3 sockets
// 15% chance of 2 sockets
// 50% chance of 1 socket
// the remainder will be 0 socket (31.4% in this case)
// Adding new sockets will require a minimum of 100 Veterinary skill and 30 emeralds
if(Tamable)
XmlSockets.ConfigureRandom(this, 2.0, 0.1, 0.5, 3.0, 15.0, 50.0, SkillName.Veterinary, 100.0, typeof(Emerald), 30);
base.OnBeforeSpawn( location, m );
}

STEP 4: (optional)
I have added modified distro RunUO 2.0 versions of Loot.cs and LootPack.cs that will give random lootpack drops of augmentations. The frequency of drop is low (about the same as instruments), and the definitions include the rune augmentations (if you dont have runeaugments.cs installed then comment out the sections referring to the runes). To use them, either replace the distro Scripts/Misc/LootPack.cs and Scripts/Misc/Loot.cs with the versions in the SocketsLootMod.zip file (always make backups of your original scripts), or just look in those files for the changes marked "ARTEGORDONMOD", and incorporate them into your existing lootpack.cs and loot.cs files.
Files:
SocketsLootMod-20-v105.zip (optional)