Does anyone know of an easy method to disable a particular AOS attributes? I mean, from spawning, imbuing, runic reforging or any other method an AOS property can be added to an item by/for a Player.

I'm using XMLSpawner2 so I assume spawning is somewhere there, but will I also have to remove all references to an AOS Attribute, e.g. "UseBestSkill" in Runic Tools, Runic Reforging, Imbuing? Is there an easier way to disable it in one place?
 
Look in Scripts/Misc/AOS.cs
Lines 1160 & 1545 to 1556
Commenting those out should stop the AOS Weapon Attribute "UseBestSkill".
 
thanks Hammerhead, but I think we have different AOS.cs. I assume you meant commenting out
Code:
[CommandProperty(AccessLevel.GameMaster)]
        public int UseBestSkill
        {
            get
            {
                return this[AosWeaponAttribute.UseBestSkill];
            }
            set
            {
                this[AosWeaponAttribute.UseBestSkill] = value;
            }
        }
That won't let me compile ServUO. Returning "0" should do the trick, but I imagine item spawner will still roll a non-working UseBestSkill prop instead of another, working property.

Ideally, I'd allow staff to add a "disabled" property to an item, but remove any ways a Player can get an item with that prop (magic loot, inbuing, runic reforging and runic tools).



I'd appreciate any help with this, there's no other info on this around the forums, if someone knows a better way of disabling some of the props please chip in. What I found so far:

XMLSpawner2 magic loot - uses ApplyAttributesTo from BaseRunicTool.cs


imbuing - in Imbuing.cs find method LoadImbuingDefinition() - comment out any lines containing magical properties you want to remove rom Imbuing


runic tools - around line 148 in BaseRunicTool.cs should be:
Code:
m_Props.SetAll(false);
Now you can disable a property with
Code:
m_Props.Set(X, true);
where X is the corresponding index of the property in the property list (look further down in the code to check what the number is for a particular property). I want to remove all spell hits, so I'll add
Code:
m_Props.Set(1, true);
That will block the whole "1" group in the switch - all spells on hit.
Some properties are grouped, like UseBestSkill with MageWeapon. I want to keep MageWeapon but remove UseBestSkill - I'll have to edit the code for that group, change it to:
Code:
case 2:
                        {
                            //switch ( Utility.Random(2) )
                            //{
                            //    case 0:
                            //        ApplyAttribute(secondary, min, max, AosWeaponAttribute.UseBestSkill, 1, 1);
                            //        break;
                            //    case 1:
                                    ApplyAttribute(secondary, min, max, AosWeaponAttribute.MageWeapon, 1, 10);
                            //        break;
                            //}

                            break;
                        }
That will keep MageWeapon being rolled for magic items, but will block UseBestWeapon. Note: Armour has an offset for magical properties before the swtich-case, the index for disabling and the switch-case number do not match. Check Night Sight on elf armour to see what I mean with the offset, e.g. NightSight is further along in switch-case, but it's index is '7' when disabling.


runic reforging - modify RunicReforging.cs - near the end of the file, around line 2144 there are Lists with possible magic properties. Comment out lines with magic properties you don't want in Runic Reforging
 
Last edited:
Back