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!

Help with Virtue Armor Set (+5 Resist)

Wis Weed

Sorceror
Hello.
I have found the old graphics to the Virtue Armor Set and I have modified the set to reflect it's original OSI attributes (found here: http://www.uoguide.com/Virtue_Armor_Set). I am planning on releasing the set to the public, but I am struggling to figure out how to add the final +5 armor resistances when the set is put together as a whole. As you can see I have figured out how to add self repair 5 and I have figured out how to remove the tarnish and return the armor to it's original color once the set is complete, but I am now trying to add +5 to every resistance once the set is complete.

This set is a very nostalgic and fun set of armor. It makes you look like RoboCop and is easily tweakable!!! I'd like it to be perfect, though. Does anyone have the time to point me in the right direction of adding +5 to all resistances once the set is complete?

Here is the Helm of Spirituality as an example: is this txt getting smaller is it just me?
Code:
using System;
using Server;
using Server.Mobiles;

namespace Server.Items
{
    [FlipableAttribute(0x2B10, 0x2B11)]
    public class HelmOfSpirituality : BaseArmor
    {
        public override int BasePhysicalResistance { get { return 8; } }
        public override int BaseFireResistance { get { return 8; } }
        public override int BaseColdResistance { get { return 7; } }
        public override int BasePoisonResistance { get { return 9; } }
        public override int BaseEnergyResistance { get { return 8; } }

        public override int InitMinHits { get { return 255; } }
        public override int InitMaxHits { get { return 255; } }

        public override int AosStrReq { get { return 25; } }
        public override int OldStrReq { get { return 25; } }

        public override int ArmorBase { get { return 30; } }

        public override ArmorMaterialType MaterialType { get { return ArmorMaterialType.Plate; } }

        [Constructable]
        public HelmOfSpirituality()
            : base(0x2B10)
        {
            Name = "Helm of Spirituality";
            Weight = 3.0;
        Hue = 0x45B;
        }

    public override bool OnEquip( Mobile from )

        {

            if( from.FindItemOnLayer( Layer.Gloves) != null && from.FindItemOnLayer( Layer.Gloves) is GauntletsOfValor
              && from.FindItemOnLayer( Layer.Arms) != null && from.FindItemOnLayer( Layer.Arms) is ArmsOfCompassion
              && from.FindItemOnLayer( Layer.Shoes) != null && from.FindItemOnLayer( Layer.Shoes) is SolaretesOfSacrifice
              && from.FindItemOnLayer( Layer.Cloak) != null && from.FindItemOnLayer( Layer.Cloak) is CloakOfHumility
              && from.FindItemOnLayer( Layer.Neck) != null && from.FindItemOnLayer( Layer.Neck) is GorgetOfTruth
              && from.FindItemOnLayer( Layer.Pants) != null && from.FindItemOnLayer( Layer.Pants) is LegsOfHonor
              && from.FindItemOnLayer( Layer.InnerTorso) != null && from.FindItemOnLayer( Layer.InnerTorso) is BreastplateOfJustice

                )
            {

            Hue = 0;
            ArmorAttributes.SelfRepair = 5;

            }
        return base.OnEquip( from );
        }

        public override void OnRemoved( object parent )
        {
            if (parent is PlayerMobile)
            {
                Hue = 0x45B;
            }
        return;
        }

        public HelmOfSpirituality(Serial serial)
            : base(serial)
        {
        }

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write((int)0);

            if (Weight == 1.0)
                Weight = 3.0;
        }

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();
        }
    }
}

This is where I need to add the +5 to all resistances, but I am baffled on what term I should type here:
Code:
          {

            Hue = 0;
            ArmorAttributes.SelfRepair = 5;

            }
 

Hammerhand

Knight
There are 12 armor "sets" in ML. The Virtue Armor Set is one of them. Does the tarnish remove when all 8 pieces are equipped as well as the stats. The change is handled by the SetItem.cs thats with them. Lord_Greywolf also did a set of armor a while back that changed & added stats. That one didnt use a 2nd script if I remember correctly. Should be in the releases section.
 

Wis Weed

Sorceror
Thx for the reply. I think I found the post you were mentioning http://www.runuo.com/community/threads/runuo-2-0-svn-osi-mondains-legacy.81237/

I found these 8 files here: http://www.runuo.com/community/threads/armor-of-the-shrines.80709/ and I built up from there to make the virtue armor set (including the helm I posted above). There is no second file. I wrote the hue change into the item file.

When I searched for the virtue armor set on the forums I only found one file aside from the file in the previous paragraph. It was non-compatible with 2.0, but I did get the rust colored hue from it.

When I searched for the set on my server (Run UO 2.0 - 2.2 ? idk which really I downloaded it a month ago from the Run UO home page ) I couldn't find it on the "[add" menu.

When I search "Posted by Lord Grey Craft" "Armor" in advanced search I find one relative link:http://www.runuo.com/community/threads/progressive-combat-armor.84448/#post-721812
but his resistances are fixed and I am trying to figure out how to add a +5 bonus to each resistance once the armor set is completed. Everything works fine, I just don't understand how to add +5 resist to a piece of armor. I see how to do it on a ring (the ring of vile: Resistances.Poison = 20 ) and on weapons ( the serpents fang: WeaponAttributes.ResistPoisonBonus = 20 ) but I can't seem to find an example for armor and everything I try doesn't compile.

This compiles, but crashes my server:
Code:
HelmOfSpirituality helmet = from.FindItemOnLayer( Layer.Helm ) as HelmOfSpirituality;
helmet.PoisonBonus = 25;

About the rust coloring and stats on the pieces I programed.....
They stay rust colored and unstatted unless you equip the final piece of the set. That piece will turn to it's original shine and take on the stats, but the other pieces will stay rust colored until you removed them and re-equip the remaining armor pieces as well. This allows for players to have, for example; a white cape, white gloves, white boots, but a rusty helm, rusty chest, etc... Or the whole set can be nice and clean if they choose. Once you remove the piece of armor it will return to it's original rust color.
 

Hammerhand

Knight
This is the armor set I was talking about. Its found in Callandor2k's SVN w/ML.
 

Attachments

  • Virtue Armor Set ML.rar
    14.4 KB · Views: 17

Wis Weed

Sorceror
Man, thanks a ton Hammerhand. That is a sweet file. Inside the file they change the resistance bonuses by using the term "SetFireBonus = 5;". I couldn't get that to compile, but I found a set of armor posted by Warmaster that uses the term "FireBonus = 5;" So I tried it and it finally worked.

Here is the method:
Code:
            Hue = 0;
            ArmorAttributes.SelfRepair = 5;
            ColdBonus = 5;
            FireBonus = 5;
            PhysicalBonus = 5;
            EnergyBonus = 5;
            PoisonBonus = 5;

Now I will post my version of the virtue set on the custom scripts release thingy. Thanks for all the help, Hammerhand.
 
Top