I've make a quest with autoreward. I give a bag with a random WEAPON,0,0. It generates a weapon with a random bonus. How can i generate a random weapon or armor(or other item types) _without_ any bonuses?
I use XmlSpawner v3.18 and RunUO 2.0 svn 156.
Please, sorry for my english.
this is due to the method that calculates random AOS stats in BaseCreature.cs that sets the min attribute count to 1 instead of zero. Make this mod to allow zero stats around line 3700 in basecreature.cs
QUOTE |
public static void GetRandomAOSStats(int minLevel, int maxLevel, out int attributeCount, out int min, out int max) { int v = RandomMinMaxScaled(minLevel, maxLevel);
if (v >= 5) { attributeCount = Utility.RandomMinMax(2, 6); min = 20; max = 70; } else if (v == 4) { attributeCount = Utility.RandomMinMax(2, 4); min = 20; max = 50; } else if (v == 3) { attributeCount = Utility.RandomMinMax(2, 3); min = 20; max = 40; } else if (v == 2) { attributeCount = Utility.RandomMinMax(1, 2); min = 10; max = 30; } // ARTEGORDONMOD // allow zero attributes else if (v == 1) { attributeCount = 1; min = 10; max = 20; } else { attributeCount = 0; min = 0; max = 0; } }
|
This should allow you to set zero attributes for armor, weapons, jewelry, and anything else that gets random AOS stats by specifying a level of zero.
So
WEAPON,0,0
would give random weapons with no attributes,
WEAPON,0,1
would give random weapons with 0 or 1 attribute, etc.
Great (:. Thanks for your help and patience to newbies. And sorry if i post it in a wrong subforum.
no, it was the right place to post. I only moved it to Member tips because I thought that the mod might be of general interest to others wanting to do the same thing.