Full Version : stealable artifacts difficulty mod
xmlspawner >>XMLSpawner Mods and Tips >>stealable artifacts difficulty mod
<< Prev | Next >>
ArteGordon- 07-04-2006
while RunUO 2.0 comes with a built-in system to place stealable artifacts, you may want to continue to use the xmlspawner versions to get around the problem of maintained spawner control of rares (see end of xmlspawner2.txt for explanation of problem).
I used to have a mod to scale the stealing difficulty based on artifact rarity rather than weight included as part of the standard mod to stealing.cs, but because of the inclusion of the built-in RunUO system, I decided to take it out and make it optional.
Here is the mod
in stealing.cs around line 252
change this

CODE
else { int iw = (int)Math.Ceiling( w ); iw *= 10; if ( m_Thief.CheckTargetSkill( SkillName.Stealing, toSteal, iw - 22.5, iw + 27.5 ) )
stolen = toSteal;
}

to this

CODE
else { int iw = (int)Math.Ceiling( w ); iw *= 10; // ARTEGORDONMOD
// Begin mod for ArtifactRarity difficulty scaling
// add in an additional difficulty factor for objects with ArtifactRarity
// with rarity=1 requiring a minimum of 100 stealing, and rarity 12 requiring a minimum of 118
// Note, this is completely independent of weight
Type ptype;
string value = BaseXmlSpawner.GetBasicPropertyValue(toSteal, "ArtifactRarity", out ptype);
if (ptype == typeof(int) && value != null)
{
int rarity = 0;
try
{
rarity = int.Parse(value);
}
catch { }
// rarity difficulty scaling
if (rarity > 0)
{
iw = (int)Math.Ceiling(120 + rarity * 1.5);
}
}
// End mod for ArtifactRarity difficulty scaling
if ( m_Thief.CheckTargetSkill( SkillName.Stealing, toSteal, iw - 22.5, iw + 27.5 ) )
stolen = toSteal;
}

Theoderic- 07-15-2006
Greatings.. good work..