Hiya PIB00
Right first the bad news. I have figured out where in the decoded items the sockets are and if they have items in them. I have added items and extra sockets using a Hex editor. Unfortunately when the item is loaded into the game the extra sockets go missing . I think that the item files that control the game are loaded when the game loads and any item that doesn't match this gets reset.
However saying that I know that some items have a "Chance to improve sockets" or "Chance for extra sockets" (something like that anyway). There must be a switch in the item Hex values to turn off default settings. I haven't been able to find that yet as I have not found 2 of the same item with different sockets.
The only way I have found of increasing the points or percentages is by increasing the level of the item or by increasing the colour value (e.g. white to gold) of the item.
Right the good news now, what you want can be done with a bit of hacking. This will involve editing a file in the Deep Silver\Sacred 2 - Fallen Angel\scripts\server directory.
MAKE A BACKUP OF THE "BLUEPRINT.TXT" FILE BEFORE DOING ANYTHING.
Exit the game completly before making changes as I don't think they will show up if you are in the game as I am pretty sure this is loaded at the start.
Inside this file (blueprint.txt) there is the stuff that sets the attributes of the item. So far I have only added extra sockets. Find the item id of the item that you want to improve using the Item Editor. Open up the blueprint.txt file in some type of text editor and search through till you find the item you are wanting. It should look something like this in the file:
newBlueprint = {
id = 1552,
name = "unlock_sword_glaive_1h_atherton",
palettebits = "1111111111111111",
dmgvariation = 100,
minconstraints = {1,13,0},
lvljump = 1,
usability = 0,
allotment_pmfpi = {500,0,500,0,0},
uniquename = "unique",
specialuseonly = 0,
bonusgroup0 = {522,1300,1,9,0},
bonusgroup1 = {876,1200,1,2,0},
bonusgroup2 = {860,1000,1,2,0},
bonusgroup3 = {859,1000,1,2,0},
bonusgroup4 = {751,1000,1,2,0},
itemtypes = {9520,},
wearergroups = {'WEARGROUP_DEFAULT',},
}
mgr.createBlueprint(1552, newBlueprint);
The bits in bold are what we are interested in. Each of these is an attribute of that item. Looking at one line individually
bonusgroup4 = {751,1000,1,2,0}
This line gives a gold socket to the sword. The important bit is the first number after the { which in this case is 751.
Searching further down the file we find:
newBonusgroup = {
id = 751,
name = "SB_neut_slot_gold1",
bonuslist = { 758,},
}
mgr.createBonusgroup(751, newBonusgroup);
Which tells us that it a gold socket. Further on down we can find the bonus list for that attribute which looks like:
newBonus = {
-- name = "sb_neut_slot_gold",
rating = 10,
basedonskill = "SKILL_INVALID",
type = "BONUS_SLOT",
spez = "SLCAT_GOLD",
spez2 = "",
usagebits = 65535,
minconstraints = {10,7,0},
difficultyvaluerange0 = {0,1,1},
difficultyvaluerange1 = {1,1,1},
difficultyvaluerange2 = {2,1,1},
difficultyvaluerange3 = {3,1,1},
difficultyvaluerange4 = {4,1,1},
}
mgr.createBonus(758, newBonus);
I don't think for sockets the values in the bonus list can be edited but it maybe that changing these values (the ones for difficultyvaluerangeX = {X,X,X}) for something like fire damage or chance to disregard armour etc will alter the stats you see on the item.
If you want to add extra sockets then we need to insert another line in after the bold lines. Our weapon would now look like this:
newBlueprint = {
id = 1552,
name = "unlock_sword_glaive_1h_atherton",
palettebits = "1111111111111111",
dmgvariation = 100,
minconstraints = {1,13,0},
lvljump = 1,
usability = 0,
allotment_pmfpi = {500,0,500,0,0},
uniquename = "unique",
specialuseonly = 0,
bonusgroup0 = {522,1300,1,9,0},
bonusgroup1 = {876,1200,1,2,0},
bonusgroup2 = {860,1000,1,2,0},
bonusgroup3 = {859,1000,1,2,0},
bonusgroup4 = {751,1000,1,2,0},
bonusgroup5 = {751,1000,1,2,0},
itemtypes = {9520,},
wearergroups = {'WEARGROUP_DEFAULT',},
}
mgr.createBlueprint(1552, newBlueprint);
This should give you an extra socket to play with.
WARNINGS
MAKE A BACKUP OF THE BLUEPRINT.TXT FILE
CHANGING THIS WILL CHANGE EVERY ONE OF THE ITEM THAT YOU HAVE OR GET IN THE FUTURE
IF YOU UPGRADE OR REINSTALL THE GAME MAKE A BACKUP OF THE BLUEPRINT.TXT FILE (IT WILL BE OVERWRITTEN WITH A SHINY NEW ONE THAT WILL GET RID OF ALL YOUR EXTRA SOCKETS AND ANY ITEMS IN THEM) YOU WILL NEED TO CHANGE THE NEW FILE TO MATCH THE CHANGES IN THE OLD ONE OR YOU WILL LOSE ITEMS.
DON'T GET TOO EXCITED AND ADD LOADS OF SOCKETS, THEY EITHER WILL NOT APPEAR OR YOU WILL START LOSING BONUSES OFF THE FRONT OF THE LIST.
MAKE A BACKUP OF THE BLUEPRINT.TXT FILE
That said good luck with it and if anything does go wrong just restore the old blueprint file. You did make a backup didn't you?
[Edited by jimbouk, 4/15/2010 12:03:49 AM]