Increase Inventory Problem

02/19/2018 16:13 KingKeesie#1
Hi Epvpers,

I tried increasing my inventory. I used this guide [Only registered and activated users can see links. Click Here To Register...]

Source is ok but i have problem on database.
I see columns like m_Inventory, m_apIndex, m_adwEquip and m_dwObjIndex in BASE_VALUE_TBL. For example i want to make 64 slots (40+24). What do i have to change at column dwObjIndex. Value of this looks like this.

So can someone help me what to add, And can someone tell me what the other columns i named do? do i have to change CHARACTER_STR for saving etc. Thanks in advanced!
02/19/2018 16:34 Avalion#2
Calculate longest possible str length for each column for your inv size by looking in source.

Set Column sizes to that. increase stored procedure sizes too. etc.

change m_dwObjindex, and index, to 0 -> your inv size - 1.
then MAX_HUMAN_PARTS or whatever -1's.

empty inventory. recreate base_value_tbl ingame.

????
profit.
02/20/2018 21:44 KingKeesie#3
Quote:
Originally Posted by Avalion View Post
Calculate longest possible str length for each column for your inv size by looking in source.

Set Column sizes to that. increase stored procedure sizes too. etc.

change m_dwObjindex, and index, to 0 -> your inv size - 1.
then MAX_HUMAN_PARTS or whatever -1's.

empty inventory. recreate base_value_tbl ingame.

????
profit.
What would my m_dwObjIndex be when adding 24 slots. Now its set to 40, cant figur out how this should look when having 64

44/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/46/47/52/0/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/$
02/20/2018 22:44 Avalion#4
Quote:
Originally Posted by KingKeesie View Post
What would my m_dwObjIndex be when adding 24 slots. Now its set to 40, cant figur out how this should look when having 64

44/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/46/47/52/0/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/$
Read my post. Answer is there?

Sent from my LG-H812 using Tapatalk
02/20/2018 22:48 KingKeesie#5
Quote:
Originally Posted by Avalion View Post
Read my post. Answer is there?

Sent from my LG-H812 using Tapatalk
44/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/42/46/47/52/0/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/-1/$

So this is how its looks when just adding one slot? i added the '/42' i really dont understand this part i think

bump
02/21/2018 16:53 Avalion#6
Well, what I do, is I normally count up from 0 till the max inventory size defined, minus one (because you start at zero). Then, the equips are stored as -1.
Code:
0/1/2/3/4/5/6/7/8
With increasing the size of the inventory, you need to make sure there is enough space in the column sizes for the longest possible string length based on types given to build string (personal preference over what the "max value" can be for your variable in regards to what you programmed it for Ie: + gear stored as int, but never above 20), which prevents things from not successfully saving and saving for the DB.

Most of the string lengths are fine until you start adding more and more and adding more features dealing with the inventory strings; however, you can still trim the inventory array initialization if you would want to calculate the max string length.

There are some other issues you have to solve if you go higher than X. Like, increasing your max query sizes for both reading and initialization in query.cpp, or separating it in multiple columns, or just rewriting how the Inventory is. If you increase your inventory sizes as well as some other sizes, you could run into an issue where there is too much, it will cause a stack overflow (If I remember the name correctly, could be wrong, correct me pls).

If you go too high, you will also need to code something dealing with the inventory lengths, and other "type" of inventories, and you will need to edit the inventory serialize function.