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!

XmlCustomAttacks/Defenses - custom weapon/shield abilities system [RunUO 2.0]

ArteGordon

Wanderer
XmlCustomAttacks/Defenses - custom weapon/shield abilities system [RunUO 2.0]

XmlCustomAttacks/Defenses
v1.03
RunUO 2.0 version
updated 6/19/06
ArteGordon

Latest News:
updated 6/18/06
- identified a compatibility issue with the OnArmorHit method under RunUO 2.0 which requires a small update of both this addon and xmlspawner. Update to the latest 3.12 version of xmlspawner when updating this addon as well.

Summary:

This set of attachments provides a system for adding custom special attacks to weapons and defenses to shields including combos that require a series of specific special moves to be executed in a timed sequence. Any number of special moves can be enabled on a given weapon/shield, and combos can be made up of sequences of arbitrary length and complexity.


Recent Updates:

New to v1.03
updated 6/19/06

- small RunUO 2.0 compatibility change to the OnArmorHit method. Update to XmlSpawner version 3.12 as well for this fix.


New to v1.02
updated 11/29/04

- added support for the new XmlSockets system.


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 a full drop-and-play system with a full complement of attacks and combos. While I have included some attacks and combos in the package, they are largely intended to illustrate its features, and are not necessarily balanced for drop-and-play use (although you could certainly do that if you wanted to). Add, fiddle, and most importantly, have fun.

Features:

When a weapon with this attachment is equipped, a gump containing icons for the special attacks that it has available will be displayed.
Attacks can be selected by pressing one of the attack icons. When selected, the icon will turn red until it is activated by a successful hit.
The description and requirements for an attack can be viewed by pressing the small blue button to the right of the attack selection button.
Secret combination attacks can be unleashed by executing the proper sequence of special moves.

The special defense icons will appear when a shield with this attachment is equipped. When selected, the icon will turn red until the special defense is activated by a successful block.

Several special attacks and combos have been added to illustrate how to configure moves, but the system can be extended with any number of additional moves.

Examples of included special attacks/combos:

Gift of Health - Restores attacker to full health
Requires - 30 int, 60 Healing
Uses - 40 mana, 20 stamina, 2 ginseng, 2 mandrake, 50 gold.

Puff of Smoke - Makes the attacker invisible
Requires - 40 dex, 50 Stealth, 50 Hiding
Uses - 20 mana, 40 stamina, 2 spiderssilk.

Paralyzing Fear - Paralyzes the target then causes it to flee
Requires - 40 int, 30 Necromancy
Uses - 10 mana, 10 stamina, 5 hits, 10 karma, 1 Head

Thunder Strike - a combo attack activated by the following sequence of custom attacks
TripleSlash + MindDrain + ParalyzingFear + TripleSlash + StamDrain


Customizable special attacks:

- user-definable special attacks can be designed and added to weapons in any combination and number.

- special attacks can be given requirements that include minimum str, dex, int, and skills.

- executing an attack can be defined to consume mana, stamina, hits, karma, and any number and type of reagent.


Customizable combo attacks:

- special combo attacks can be created that are executed when a definable sequence of special attacks has been carried out in the proper order and without interruption.

- The custom attacks gump has an indicator at the top of the gump that signals when a combo sequence has been started and is still in progress. When it goes out, that means that it has been interrupted either due to executing a special move out of sequence, or taking too long between moves.

- Because the end of one combo could be the beginning of another, it is possible to chain multiple combos together.
Combos that share moves can even be executed together for multiple simultaneous combos.


Adding custom attacks to weapons:

Manually to individual weapons

- the custom attacks attachment can be added to weapons in several ways. It can be manually attached to any existing weapon with the "[addatt" command, which is the general command from the XmlSpawner2 package for adding attachments.

For example

"[addatt xmlcustomattacks random 4"

will attach 4 randomly selected custom attacks to a targeted weapon.

"[addatt xmlcustomattacks tartan"

Will add a predefined custom attack configuration that was named "tartan" in the attachment constructor in XmlCustomAttacks.cs

To weapon scripts

- Special attacks can also be added to scripted weapons. See the included script TestCustomWeapon.cs for an example of this.

To spawned weapons

- To add special attacks to spawned weapons use the ATTACH keyword in spawn entries such as this

katana/ATTACH/xmlcustomattacks,random,4

which would spawn a katana with 4 randomly selected custom attacks.

or

orc/ADD/<katana/ATTACH/xmlcustomattacks,random,4>

would spawn an orc carrying the katana with custom attacks.

To try out the inlcuded example spawner .xml file, place the file "customattacks.xml" in your top level RunUO directory and execute the command

"[xmlloadhere customattacks.xml"

Adding custom defenses to shields:

Manually to individual shields

- the custom defenses attachment can be added to shields in several ways. It can be manually attached to any existing shield with the "[addatt" command.

For example

"[addatt xmlcustomdefenses random 4"

will attach 4 randomly selected custom defenses to a targeted shield

"[addatt xmlcustomdefenses brogan"

Will add a predefined custom defense configuration that was named "brogan" in the attachment constructor in XmlCustomDefenses.cs

To shield scripts

- Special defenses can also be added to scripted shields. See the included script TestCustomShield.cs for an example of this.

To spawned shields

- To add special defenses to spawned shields use the ATTACH keyword in spawn entries such as this

buckler/ATTACH/xmlcustomdefenses,random,4

which would spawn a buckler with 4 randomly selected custom defenses

or

orc/ADD/<buckler/ATTACH/xmlcustomdefenses,random,4>

would spawn an orc carrying the buckler with custom defenses.



Installation:
for 1.0.0

The XmlSocket addon system that supports addition of special moves via socket augmentations can be found here XmlSockets system

STEP 1:
Install the latest XmlSpawner2 package. You can find it here XmlSpawner2. Make sure that you perform installation steps 7, 9, and 10 from that thread, and optionally step 8 (if you dont do step 8, everything will work except for the ability to use the item identification skill to view special attacks on a weapon). Optional step 11 is also strongly recommended to allow available special attacks to be displayed on the properties list of weapons/armor.

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.
 

Attachments

  • XmlCustomAttacks-20-v103.zip
    20.6 KB · Views: 151

ArteGordon

Wanderer
updated to version 1.03

from the changelog


New to v1.03
updated 6/19/06

- small RunUO 2.0 compatibility change to the OnArmorHit method. Update to XmlSpawner version 3.12 as well for this fix.
 

TheNorthStar

Sorceror
Is anyone else having problems with this? Or am I just doing this totally wrong?
The system seems to work, but the gump never comes up when I equip and item.
The socket system also doesn't create the gump when I use the identify skill on it. Though it does create the gump when I remove a item from the socket. If I'm the only one having this problem it's probably just some script of mine messing it up.
Thanks for any help.
 

ArteGordon

Wanderer
TheNorthStar said:
Is anyone else having problems with this? Or am I just doing this totally wrong?
The system seems to work, but the gump never comes up when I equip and item.
The socket system also doesn't create the gump when I use the identify skill on it. Though it does create the gump when I remove a item from the socket. If I'm the only one having this problem it's probably just some script of mine messing it up.
Thanks for any help.

you missed an installation step.

STEP 8: (recommended but not required)
To allow the ItemIdentification skill to be used to reveal attachments on items/mobs, one line must be added to ItemIdentification.cs (Scripts/Skills/ItemIdentification.cs) as described below. (note, you dont have to make this mod if you dont want to, the spawner and other items will work just fine without it, players just wont be able to see what attachments are on an item/mob using this skill).

around line 50 of ItemIdentification.cs change
Code:
else if ( o is Mobile )
{
	((Mobile)o).OnSingleClick( from );
}
	else
{
	from.SendLocalizedMessage( 500353 ); // You are not certain...
}
to
Code:
else if ( o is Mobile )
{
	((Mobile)o).OnSingleClick( from );
}
	else
{
	from.SendLocalizedMessage( 500353 ); // You are not certain...
}
//allows the identify skill to reveal attachments
Server.Engines.XmlSpawner2.XmlAttach.RevealAttachments(from,o);
 

TheNorthStar

Sorceror
Oh man, I'm sorry to waste your time. I'm usually a lot more attentive than that I swear :)
Thanks for the help though, I'm really not sure how I missed that one :)
 
Top