thanks Hammerhead, but I think we have different AOS.cs. I assume you meant commenting out
[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:
Now you can disable a property with
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
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:
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