ArteGordon
Wanderer
XmlSockets v1.04
XmlSockets
v1.04
updated 12/26/04
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.
INSTALLATION:
This thread is no longer updated. GO HERE for the latest version
http://www.runuo.com/forum/showthread.php?t=49925
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.
XmlSockets
v1.04
updated 12/26/04
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.
INSTALLATION:
This thread is no longer updated. GO HERE for the latest version
http://www.runuo.com/forum/showthread.php?t=49925
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.