Full Version : Sockets to crafted items
xmlspawner >>XMLSockets Discussion >>Sockets to crafted items
<< Prev | Next >>
AdminArcanum- 02-28-2006
How would ya add a random chance of getting sockatable on crafted items? Like a tailor makes a studded tunic they have a small chance of the crafted item having the socetable thing?
ArteGordon- 02-28-2006
if you follow installation step 3 and make the suggested modifications to the basearmor or baseweapon constructors then all dropped or crafted weapons/armor will have the same chance of being socketed.
If you wanted to add a chance of being socketed specifically to crafted items, you could go into CraftItem.cs around line 990 and add code like this

QUOTE
if ( item != null ) { if( item is ICraftable ) endquality = ((ICraftable)item).OnCraft( quality, makersMark, from, craftSystem, typeRes, tool, this, resHue ); if ( item.Hue == 0 )
item.Hue = resHue;
if ( maxAmount > 0 )
item.Amount = maxAmount;
if(item is BaseArmor)
{
// mod to randomly add sockets and socketability features to armor. These settings will yield
// 2% drop rate of socketed/socketable items
// 0.1% chance of 5 sockets
// 0.5% of 4 sockets
// 3% chance of 3 sockets
// 15% chance of 2 sockets
// 50% chance of 1 socket
// the remainder will be 0 socket (31.4% in this case)
// uncomment the next line to prevent artifacts from being socketed
// if(ArtifactRarity == 0)
XmlSockets.ConfigureRandom(item, 2.0, 0.1, 0.5, 3.0, 15.0, 50.0);
}
from.AddToBackpack( item );
//from.PlaySound( 0x57 );
}