Manipulating Sockets: Softcoded 7 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
User avatar
Cypress
Moderator
Champion of the Light
Posts: 465
Joined: Fri Dec 01, 2017 2:08 am

Manipulating Sockets: Softcoded 7 Sockets

Post by Cypress » Fri Jun 02, 2023 1:24 am

This is a brief guide describing a way of cheating the socket system. How it works is simple: make a new stat in itemstatcost.txt and give it op=1 and op stat1=item_numsockets. Something like this:

Itemstatcost.txt:

Code: Select all

item_socketmultiplier	383		1														1024				10	100			1			item_numsockets																								0
Properties.txt:

Code: Select all

sock%	1			1	item_socketmultiplier																														0
Save bits are set to 10 since the max safe effective value is +600 (which converts a 1 socket item into a 7 socket item). Save add is set to 100 since -100 will apply the minimum safe effective value, producing a bizarre Socketed (0) item. Some notes on this stat:
(1) Allows you to have up to 7 sockets on an item (any past that and the save file will be corrupted).
(2) You can extend sockets well past the normal size limit of an item. I made a 6 socket Biggin's Bonnet (a 2x2 item which is normally size-limited to 4 sockets).
(3) The ilvl/item socket limits are also of course being bypassed, you can arbitrarily bypass socket limits with this method.
(4) Runewordable bases are not allowed to have any more than 6 sockets, so no 7 rune runewords. You can still extend item sockets to 6 for runewordable items that it would be unusual, like a 6 socket superior wand.
(5) Can be given as a set bonus, but isn't useful since the removed sockets will still be populated with whatever socketables you put into it before losing the set bonus. So if you have a Cleglaw's Tooth with no sockets, but 7 upon equipping the full set, the 7 sockets placed into it will exist even when you take off the other items.

Some example applications:
Making it so Blade of Ali Baba can finally spawn with 3 sockets without changing the max sockets of the base weapon.

A low level unique item that can spawn with way more sockets than it would normally be limited to (like an ilvl=1 Quilted Armor that can have 4 sockets).

Making big runewords in small items, like a 6 socket runeword in a wand.

As a random affix, a magic/rare helm that can spawn with +100 sock% will always be safe since helms are capped to 3 sockets in vanilla (so if your helm spawned with no sockets, you can socket it via Larzuk and get 2 sockets instead; Mechanic's +100 sock% would be quite powerful, granting up to 4 sockets on a helm, 1 more than normally possible; and if the +sock% affix is a suffix then you could allow for the fantastic combination of Artisan's prefix + 100 sock% for a whopping 6 sockets on a magic helmet).

As a cube recipe that is applied selectively based on item's regular socket limits so as to prevent exceeding the crash/corruption limits, such as a recipe that gives +100 sock% to wands for up to 4 sockets.

A very powerful unique that gets 7 sockets, like a kind of uber Rune Master.

Allows you to remove sockets from items without hardcoding: you can reduce an item to Socketed (0).

aasa0001
Posts: 17
Joined: Mon Aug 05, 2002 11:55 am

Re: Manipulating Sockets: Softcoded 7 Sockets

Post by aasa0001 » Sat Mar 23, 2024 7:47 pm

How to avoid wrap-around beyond -100? (-100 is the fixed wrap-around point, irrelevant to 'Save add')
I only tested cube recipe mod, but if: input: sock%=100; mod=-101; output: sock%=2^N-101 :(
I am using D2R, but I would guess it is same to lod.

User avatar
Cypress
Moderator
Champion of the Light
Posts: 465
Joined: Fri Dec 01, 2017 2:08 am

Re: Manipulating Sockets: Softcoded 7 Sockets

Post by Cypress » Sun Mar 24, 2024 1:30 am

Hi aasa0001, that's not exactly the same in LOD. You won't be seeing numbers that large in LOD ever, in LOD it underrolls to 255 sockets, although either way it's a problem. Although with careful design, you shouldn't ever end up with less than -100 socket multiplier.

Post Reply

Return to “General Mod Making”