Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Stackable Items Guide

Newbie Spellweaver
Joined
Aug 15, 2011
Messages
30
Reaction score
24
Someone PMed me on here, and since ive had help from this community im willing to share back some usefull infromation and will continue too...

So without further or do here is my second guide for allowing stackable items on your servers:

you need to change the stacks values in two places, server side and media side. If you do just 1 you will see the stack effect but it will cause crashing and DC too players.

In this guide i will show you how to change the stack limit off a item that currently doesnt stack "Weapon Elixir"

Ok first off in SQL open up your Refobjcommon table and find the item you want to make stackable or increase its stack limit.

Code:
1 3679 ITEM_ETC_ARCHEMY_REINFORCE_RECIPE_WEAPON_B ?? ????(??) xxx SN_ITEM_ETC_ARCHEMY_REINFORCE_RECIPE_WEAPON_B SN_ITEM_ETC_ARCHEMY_REINFORCE_RECIPE_WEAPON_B_TT_DESC 0 0 3 3 10 1 180000 3 0 1 1 1 255 3 1 0 0 0 0 100000 0 0 0 600 20000 -1 0 -1 0 -1 0 -1 0 -1 0 0 0 0 0 0 0 100 0 0 0 xxx item\etc\drop_reinforce_recipe.bsr item\etc\archemy_reinforce_recipe_weapon_b.ddj xxx xxx 2029

If you look on the far right coloumn there is a number in this case "2029" this is the "Link" coloumn number. You will need this number so write it down!

Now that you have this number open on your Refobjitem table and go to the id of the number you just wrote down, in our case it was "2029"

You will see a coloumn named "MaxStack" if you are doing a weapon elixir and not modified this before it will be set to "1" by default. Change this to the value you wish, i have mine on Atomix set too 1000, i wouldnt advise going much higher than 10000 for any item you modify stack wise.

Ok now thats everything done DB side, we now need to do it Media side.

ok so using your pk2 tool extract the itemdata5000 too itemdata45000 files.

I STRONGLY adivse you use a good txt editor such as Notepad++ this is very very uesfull for alot of things related to editing the medias.

With notepad++ open up all the documents and hit Ctrl+F. Since we got our DB still open go back to the RefObjCommon to tab and copy the "codename128" for the item stack you are changing, for this example its "ITEM_ETC_ARCHEMY_REINFORCE_RECIPE_WEAPON_B". Paste this in the search box and hit "Find In All Opened Documents" you will have the results at the bottom so just double click in the result and it will auto load the document for you. you should now have a line like this:

Code:
1	3679	ITEM_ETC_ARCHEMY_REINFORCE_RECIPE_WEAPON_B	?? ????(??)	xxx	SN_ITEM_ETC_ARCHEMY_REINFORCE_RECIPE_WEAPON_B	SN_ITEM_ETC_ARCHEMY_REINFORCE_RECIPE_WEAPON_B_TT_DESC	0	0	3	3	10	1	180000	3	0	1	1	1	255	3	1	0	0	0	0	100000	0	0	0	600	20000	-1	0	-1	0	-1	0	-1	0	-1	0	0	0	0	0	0	0	100	0	0	0	xxx	item\etc\drop_reinforce_recipe.bsr	item\etc\archemy_reinforce_recipe_weapon_b.ddj	xxx	xxx	1	2	0	0	2	0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0	0	0	0	0	0	0	0	0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	0.0	100663296	??????	841489939	1,2,3,4	286331153	5,6,7,8	286002188	9,10,11,12	0	??????	0	??????	-1	xxx	-1	xxx	-1	xxx	1	[??]	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	0	0

This is the bit of that line we need:

Code:
xxx	item\etc\drop_reinforce_recipe.bsr	item\etc\archemy_reinforce_recipe_weapon_b.ddj	xxx	xxx	1

The max stack limit is the end number after the 2 sets of "xxx". Change this to how you have just chaneged the limit, for our example we set it too "1000". Save the txt, put it back into your media.pk2, restart your server and you now have stacble weapon elixirs. Please note there are two types of weapon elixirs A and B, i simply did both A and B of all elixirs. just follow the guide again.

Enjoy now stackable items :)

Kellogz - Atomix SRO
 
Joined
Jul 18, 2007
Messages
1,054
Reaction score
1,039
Re: [Guide] Stackable Items Guide

Woot! Old news! I stole atomix's method loong time ago!! ~~ Kidding...

love the release bro! i was always wondering how the Media calculated the max limits... thought it was interface xD
 
Newbie Spellweaver
Joined
Aug 15, 2011
Messages
30
Reaction score
24
Re: [Guide] Stackable Items Guide

Woot! Old news! I stole atomix's method loong time ago!! ~~ Kidding...

love the release bro! i was always wondering how the Media calculated the max limits... thought it was interface xD

NP :wink: you only had to ask me you know that :)
 
Skilled Illusionist
Joined
Dec 3, 2011
Messages
318
Reaction score
23
Re: [Guide] Stackable Items Guide

I'll be trying this soon with more stackable items.
 
Experienced Elementalist
Joined
Nov 14, 2011
Messages
260
Reaction score
54
Re: [Guide] Stackable Items Guide

great Guide.. thxxxxxxxxxxxxx
 
Experienced Elementalist
Joined
Sep 27, 2011
Messages
285
Reaction score
229
Re: [Guide] Stackable Items Guide

I made some nonsense for lazy ones regarding to the topic :)

PHP:
USE SRO_VT_SHARD
Declare @NEWMaxStack varchar(10)
Declare @ItemID int
Declare @oldStack varchar(10)



SET @NEWMaxStack = 75	/* e.g. stackable up to 75 */
SET @ItemID = 4			/* ID of the Item ofrom the itemdata.txt files */



SET @oldStack = (SELECT MaxStack FROM _RefObjItem WHERE ID like (SELECT Link FROM _RefObjCommon WHERE ID like @ItemID))
UPDATE dbo._RefObjItem SET MaxStack = @NEWMaxStack WHERE ID = (SELECT Link FROM _RefObjCommon WHERE ID like @ItemID)

/* Which Itemdata.txt is affected in the Media.pk2*/
Declare @newItemID varchar(5)
IF (@ItemID < 5000)
	SET @newItemID = 5000
else if (@ItemID < 10000)
	SET @newItemID = 10000
else if (@ItemID < 15000)
	SET @newItemID = 15000
else if (@ItemID < 20000)
	SET @newItemID = 20000
else if (@ItemID < 25000)
	SET @newItemID = 25000
else if (@ItemID < 30000)
	SET @newItemID = 30000
else if (@ItemID < 35000)
	SET @newItemID = 35000
else if (@ItemID < 40000)
	SET @newItemID = 40000
else if (@ItemID >= 40000)
	SET @newItemID = 45000
/*END which Itemdata.txr*/

Declare @CodeName varchar(74)
Declare @DDJ varchar(74)
SET @CodeName = (SELECT CodeName128 FROM _RefObjCommon WHERE ID like @ItemID)
SET @DDJ = (SELECT AssocFileIcon128 FROM _RefObjCommon WHERE ID like @ItemID)

/* Paths */
print ''
print '@ Media\server_dep\silkroad\textdata\itemdata_'+@newItemID+'.txt'
print ''
print 'Change the line within the Itemdata.txt file like stated below:'
print ''
print 'Press CTRL+F and paste '+'"'+@CodeName+'"'+' into the box and search for the line at the file.'
print 'Scroll to the right till you reach '+'"'+@DDJ+'"'+' and change the value behind the 2x "xxx" from '+'"'+@oldStack+'"'+' to '+'"'+@NEWMaxStack+'"'+'.'

Change only the values of @NEWMaxStack and @ItemID!

Will give you everything out what and where you need to change it.
 
Last edited:
Skilled Illusionist
Joined
Dec 3, 2011
Messages
318
Reaction score
23
Re: [Guide] Stackable Items Guide

I think you like doing querys. Great work!
 
Newbie Spellweaver
Joined
Dec 17, 2006
Messages
73
Reaction score
13
Re: [Guide] Stackable Items Guide

I made some nonsense for lazy ones regarding to the topic :)

PHP:
USE SRO_VT_SHARD
Declare @NEWMaxStack varchar(10)
Declare @ItemID int
Declare @oldStack varchar(10)



SET @NEWMaxStack = 75	/* e.g. stackable up to 75 */
SET @ItemID = 4			/* ID of the Item ofrom the itemdata.txt files */



SET @oldStack = (SELECT MaxStack FROM _RefObjItem WHERE ID like (SELECT Link FROM _RefObjCommon WHERE ID like @ItemID))
UPDATE dbo._RefObjItem SET MaxStack = @NEWMaxStack WHERE ID = (SELECT Link FROM _RefObjCommon WHERE ID like @ItemID)

/* Which Itemdata.txt is affected in the Media.pk2*/
Declare @newItemID varchar(5)
IF (@ItemID < 5000)
	SET @newItemID = 5000
else if (@ItemID < 10000)
	SET @newItemID = 10000
else if (@ItemID < 15000)
	SET @newItemID = 15000
else if (@ItemID < 20000)
	SET @newItemID = 20000
else if (@ItemID < 25000)
	SET @newItemID = 25000
else if (@ItemID < 30000)
	SET @newItemID = 30000
else if (@ItemID < 35000)
	SET @newItemID = 35000
else if (@ItemID < 40000)
	SET @newItemID = 40000
else if (@ItemID >= 40000)
	SET @newItemID = 45000
/*END which Itemdata.txr*/

Declare @CodeName varchar(74)
Declare @DDJ varchar(74)
SET @CodeName = (SELECT CodeName128 FROM _RefObjCommon WHERE ID like @ItemID)
SET @DDJ = (SELECT AssocFileIcon128 FROM _RefObjCommon WHERE ID like @ItemID)

/* Paths */
print ''
print '@ Media\server_dep\silkroad\textdata\itemdata_'+@newItemID+'.txt'
print ''
print 'Change the line within the Itemdata.txt file like stated below:'
print ''
print 'Press CTRL+F and paste '+'"'+@CodeName+'"'+' into the box and search for the line at the file.'
print 'Scroll to the right till you reach '+'"'+@DDJ+'"'+' and change the value behind the 2x "xxx" from '+'"'+@oldStack+'"'+' to '+'"'+@NEWMaxStack+'"'+'.'

Change only the values of @NEWMaxStack and @ItemID!

Will give you everything out what and where you need to change it.

Thanks bro! Very helpful. If only you were like 8 days earlier? T_T haha would of saved me quite a while.
 
Experienced Elementalist
Joined
Sep 27, 2011
Messages
285
Reaction score
229
Re: [Guide] Stackable Items Guide

Thanks bro! Very helpful. If only you were like 8 days earlier? T_T haha would of saved me quite a while.

I actually thought that changing the MaxStack is so easy that no one will ever need such a detailed one.. ^^
 
Joined
Oct 12, 2011
Messages
554
Reaction score
318
Re: [Guide] Stackable Items Guide

Well, i have a strange bug, i set the maxstack to 100 for elixirs like this

USE SRO_VT_SHARD
UPDATE _RefObjItem SET MaxStack=100 WHERE ID=3679
UPDATE _RefObjItem SET MaxStack=100 WHERE ID=3680
UPDATE _RefObjItem SET MaxStack=100 WHERE ID=3681
UPDATE _RefObjItem SET MaxStack=100 WHERE ID=3682

Of course i edited it at media.pk2 too,(for example i have 20 put together), but when i put that 20 on a weapon, start alchemy, it uses 19, and i have only one left. Anybody know what can cause this?

EDIT:
Working..... I used the ID instead of the Link lol
 
Last edited:
Junior Spellweaver
Joined
Oct 2, 2011
Messages
113
Reaction score
23
Re: [Guide] Stackable Items Guide

well i used a query its like this

UPDATE dbo._RefObjCommon
SET MaxStack = Number of Stack
WHERE ID BETWEEN Start from id of item AND to last item id
 
Experienced Elementalist
Joined
Nov 14, 2011
Messages
260
Reaction score
54
Re: [Guide] Stackable Items Guide

Caipi <3
 
Junior Spellweaver
Joined
Jan 4, 2012
Messages
100
Reaction score
1
Re: [Guide] Stackable Items Guide

have 5 elixier when use 1 .. all go
and when have 2 immortal and teleport it be 1 - 1
any help ?!!
 
Newbie Spellweaver
Joined
Dec 2, 2007
Messages
98
Reaction score
20
Re: [Guide] Stackable Items Guide

have 5 elixier when use 1 .. all go
and when have 2 immortal and teleport it be 1 - 1
any help ?!!

Either your database or pk2 is not edited properly. Make sure the stack column matches the value with the pk2
 
Newbie Spellweaver
Joined
Dec 22, 2009
Messages
5
Reaction score
0
Re: [Guide] Stackable Items Guide

I did it with stones and tabs and all works correctly but if i change the elixir it doesn't work. If i teleport the elixirs aren't stacked. I changed it a few times in the txt and in the db but it still doesn't work ...
 
Junior Spellweaver
Joined
Jan 13, 2012
Messages
156
Reaction score
3
Re: [Guide] Stackable Items Guide

another question i have make it to stackable 10 but when i use then 50 Cube dont work it Must put it insido only in 10 stack when i use 6 or 5 wills stop the cube and still is buggy =

Must i change anything from the cube ?
 
Back
Top