unique items drop with random amount of sockets

Post here about all aspects of D2 mod making whether it's information, problems or whatever. Please specify whether your post is relating to Classic D2 or the Expansion.

Moderator: Nizari

Post Reply
Posts: 13
Joined: Tue Jan 22, 2019 1:08 pm
United States of America

unique items drop with random amount of sockets

Post by shawnmick » Tue Sep 01, 2020 5:17 am

Trying to find a post or aquire information about how i would mod d2 to allow the random unique items in the game to drop with sockets from 0 to item limit defined in item.txt i have done some text file editing in automagic.txt and in armor.txt and weapon.txt to allow for items to roll the mods however i don't believe this does it for uniques as well. im trying to figure out what it would take for example to have Skin of the viper magi drop. and when i identify it. it could have as few as 0 or as many as 4 sockets on identification. Thanks for any and all help, information, comments, etc... Links to any relevant posts are also so so so much appreciated.

User avatar
Junior Member
Posts: 146
Joined: Sun Nov 11, 2012 9:46 am

Re: unique items drop with random amount of sockets

Post by jessedazebra » Tue Sep 01, 2020 9:53 am

It's either adding sock property with a range of 0-6 to any socketable item in uniqueitems.txt or editing D2Game.dll, so automagic could apply to unique quality.

Posts: 23
Joined: Thu Jul 30, 2020 10:06 am

Re: unique items drop with random amount of sockets

Post by Devangell » Tue Sep 01, 2020 9:56 am


As fas as I know, automagic.txt is only used by weapons.txt and armor.txt, which can be entered in the 'autoprefix'-column of these files.
To add sockets to uniques it's rather simple and you should use UniqueItems.txt. Here you can add 1-12 properties on any item. So basically, if you want to have every unique item the possibility to have sockets between 0-4, you should add the property 'sock' with min and max values 0 & 4, respectively.

So in your example for the Skin of the Vipermagi, you should have this line for it in you UniqueItems.txt (see last property):

Code: Select all

Skin of the Vipermagi	100	1		1	1	40	45	xea	SerpentSkin Armor			1	20	dblu	dblu				12		ac%		120	120	res-all		20	35	cast3		30	30	red-mag		9	13	allskills		1	1	sock		0	4																									0
So whenever this item drops, upon identification, it will either spawn with 0, 1, 2 ,3 or 4 sockets.
The maximum allowed sockets an item can have is based on ItemTypes.txt, Weapons.txt and Armor.txt, depending on what values you put in the columns regarding socketing.

You can always check the Knowledge Base on this forum and check the file guides. There you will find all the information for modding and editing the .txt files you need.

I hope this will you any further.

Post Reply

Return to “General Mod Making”