[Tutorial]How to make any item stackable/change max stack

09/29/2009 15:25 Zombe#1
I have seen 4 threads asking about this now, so I decided to make a tutorial.

We will work with items in itemetc.csv here, but it works with any items.
Ok, so let's go data/share/item/itemetc.csv
Now, let's examine the columns.

Name Rank Type Code Attribute Description Quality Job Appraisal Value Weight ReqLv Price Width Height StackNumber AutoStack StackDrop_Min StackDrop_Max Has_Durability Can_Repair Durability_Low Durability_Normal...

Ok, I think We know what we are looking for. So let's take a look at the very 1st item, a Health Potion, index 3801.

StackNumber = 5
AutoStack = 1
StackDrop_Min = 1
StackDrop_Max = 1

As we know, they can be stacked to an amount of 5, right? Ok, so we understand the 1st value now.
Note: StackNumber = 0 is no stack at all, like weapons. StackNumber = 1 is a max stack of 1, really useless, just a number saying "1" on the item, without an ablility to stack.

AutoStack... well, pretty much self-explanatory, right? No autostack = you have 3 potions in your inventory, you pick up 1, they have 3 potions in 1 pile, 1 potion in another pile.
To stack, you must take 1 pile and put in over another to make a 4 potions pile. That's no auto-stack.
And autostack is, you have 3 potions, you pick up a potion, you have a pile of 4 potions.
This is using a binary system, 0 = off, 1 = on.

StackDrop_Min is 1 as minimum, even for unstackable items, because 1 item drops as a minimum.

StackDrop_Max is also 1 as minimum, same reason. So if min = 1 and max = 1, there will always be dropped only non-stacked items.

Note:Min must always be smaller or exact to Max, because that's how my logic says. I never tested making Min higher then Max, but I think the server just wouldn't startup...


Ok, so now that we figured out what each column does, here is a conclusion:


StackNumber = Max stack ammount.
AutoStack = Will it stack automaticly? 1 = on 0 = off.
StackDrop_Min = 1 Minimum stack dropped.
StackDrop_Max = 1 Maximum stack dropped.


So, lets go Copper Argate, index 9901 and lets change it to
StackNumber = 789
AutoStack = 1
StackDrop_Min = 7
StackDrop_Max = 10
as an example.

So, you will be able to stack 789 copper argates, they will stack automatically, and if a copper argate drops, It may be a stack of 7, 8, 9 or 10.

Also, you can't make any of those parameters over 65535 (=2 bytes), or dekaron.exe won't understand it.
Also, you can modify the stacking ammount/parameters of already stacked items.


IMPORTANT!
If you already had a server running, a lo of people would have un-stackable argates, that means item with byHeader = 0... So if you make a copper argate stackable, you should execute this query:

use character;
UPDATE user_bag
SET
byHeader = 1
WHERE wIndex = *item index here* AND byHeader = 0;

So an example with a copper argate would be
Code:
use character;
UPDATE user_bag
SET
byHeader = 1
WHERE wIndex = 9901 AND byHeader = 0;
1 more note:
I am not sure if you can make weapons/armors stackable, because usually the info column for lets say potions, holds the amount of potions in the stack and for equipment it holds whether it is magic/noble/divine or slotted, what's in the slots, the options, etc.
So doing this with equipment is not recommended, it may mes up your server, I haven't tried myself, so I can't say.



I hope I helped you with this tutorial!
09/29/2009 15:42 Bigshow107#2
mm its not very hard ...
i think i made these b4 3-4month ago xD or even mroe
09/29/2009 16:08 Zombe#3
Quote:
Originally Posted by Bigshow107 View Post
mm its not very hard ...
i think i made these b4 3-4month ago xD or even mroe
There were already 4 threads asking how to do it, so blah, what ever. ^^
09/29/2009 16:34 Bigshow107#4
Quote:
Originally Posted by Zombe View Post
There were already 4 threads asking how to do it, so blah, what ever. ^^
xD ya we got alot dumbs to lazy to open the itemetc.csv xD and figure out by them self
09/29/2009 17:22 ryufireblade#5
Quote:
Originally Posted by Bigshow107 View Post
xD ya we got alot dumbs to lazy to open the itemetc.csv xD and figure out by them self
You are right Bigshow, people do need to try to figure things out on their own. I was able to figure out how to get it to work on coppers. I assumed that I would make the same change to the other argates, but for some reason it didn't work. I then did a search to see if anyone else posted a question on this and I didn't find one. I guess I didn't search for the right question to get the info I needed. I'm not a leech like some people that post questions on this forum. It's more fun for me to figure it out on my own, but when I run into a brick wall and I'm not sure how to get around it, then I post a question. Thanks for the motivation on doing things on my own.
10/05/2009 23:40 firefox1985#6
hmm anyone got any idea why after i edit itemetc and item.csv the dekaronserver.exe crashes. i cant seem to find out the source of the problem any help is great.

edit: i set the argates to stack in 15's
10/06/2009 18:19 Zombe#7
Quote:
Originally Posted by skystar2001 View Post
thanks MAN
You can press the thanks button, instead of spamming ;)
10/07/2009 16:08 vanquish187#8
You say that this may mess up certain equip's.
What about inventory items like return scrolls ?
10/07/2009 16:27 Bigshow107#9
+#9 reported at GMT+3 : 2009 OCT 7 17:30 cause double post
also please less sig or do like me ;)
Spoiler it