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!

[Source] Increase Bag-Pack space NOOB FRIENDLY

Junior Spellweaver
Joined
Jul 31, 2010
Messages
148
Reaction score
31
Hi 'Zoners!,

Aspire here with my first tutorial, since I haven`t found this posted here I tought I`ld 'release' it(Please tell me if not. (I`m not on e*pvp,Gamerzn**ds or anything else so I didn`t check there. )).

So in this tutorial we are going to increase the space in your (Extra) bag-pack to any size you want, which normaly adds 24 slots.

Go to your source and go into *\_Common and open-up 'Pocket.h'.

Hit CTRL+F and shearch for
Code:
#define	MAX_POCKET	3

OR

Go to line 31 :3 (If not touched before:rolleyes:)

You`ld see this:

// Operations
void Serialize( CAr & ar );

private:
BOOL m_bExpired;
time_t m_tExpirationDate;
};


#define MAX_POCKET 3 // This is the maximum ammount of bag-packs players can have, don`t change this unless you know what you`re doing.
#define POCKET_SLOT_SIZE_0 6 // This is the ammount of slots in the FIRST bag-pack.
#define POCKET_SLOT_SIZE_1_2 24 // This is the ammount of slots in the TWO EXTRA-BAG-PACKS.

// -legend- \\
Red = Explaination
Blue= Editable numbers , mostly slot ammounts
Green= Numbers we won`t use in this tutorial, in this case number of maximum ammounts of bag-packs.
Orange = Unnecessary, we won`t use this.

Now, you can change the last 2 numbers to whatever you want, but I`ld recommend not to go over 96 slots 'cuz this would cause bugs:thumbdown:.

Ex.
#define MAX_POCKET 3 // Didn`t touch this one
#define POCKET_SLOT_SIZE_0 6 //Left this one for what it was, since it`s just one line scrolling which is really anoying.
#define POCKET_SLOT_SIZE_1_2 90 //chanched this to 90, just a random number for this tutorial.

After you`ve done everything, just hit save and build THE WHOLE SOLUTION!!!



My inventory after editing(with 90 slots, a nice number):
MikeDecibel - [Source] Increase Bag-Pack space NOOB FRIENDLY - RaGEZONE Forums


Hope I learned you something ^_^

~Aspire


Edit: Make sure you can divide it by 6, else it will get bugged.
ex.
60/6=10 rows, with each 6 slots (=1 row).
Edit2: Remember that if you change #define POCKET_SLOT_SIZE_1_2 it will change BOTH of the two extra bag-packs, so you`ll increase your inventory-space ALOT if you make it over +- 48 = a total of 96 slots in both extra bag-packs, including the first row make`s 102 Slots in your Bag-Pack.
 
Last edited:
Flyff Developer
Loyal Member
Joined
Apr 6, 2009
Messages
1,873
Reaction score
384
Are you sure this works without bugs? I've experimented with increasing the normal inventory space, using other people's suggestions, and it caused a weird bug. Sometimes, when there's enough in your inventory, an item would 'duplicate' into 2 inventory slots, but they'd be the same item still. You could drop one and both would leave your inventory.
 
One word! Im Fawkin Pro!
Loyal Member
Joined
Jul 1, 2010
Messages
1,254
Reaction score
359
Actually you can change it up to 96, havent found any bugs so far with my 96 space bag inventories shadowD, but then again, I didnt try it out a lot...
 
Junior Spellweaver
Joined
Jul 31, 2010
Messages
148
Reaction score
31
Are you sure this works without bugs? I've experimented with increasing the normal inventory space, using other people's suggestions, and it caused a weird bug. Sometimes, when there's enough in your inventory, an item would 'duplicate' into 2 inventory slots, but they'd be the same item still. You could drop one and both would leave your inventory.

I`ve tested it just a few minute`s ago, worked perfectly for me. As Xakzi said, don`t go over 96.

@Xakzi , you`re right, I forgot about the 96 thing, updated it, thanks for pointing me on that :)
 
Newbie Spellweaver
Joined
Oct 18, 2008
Messages
81
Reaction score
18
Actually you can change it up to 96, havent found any bugs so far with my 96 space bag inventories shadowD, but then again, I didnt try it out a lot...

Where does the 96 Come from? Is the space limited by the Database or just a number where its getting laggy when syncing with the client?

Btw. Nice tutorial, well readable and helpful.
 
One word! Im Fawkin Pro!
Loyal Member
Joined
Jul 1, 2010
Messages
1,254
Reaction score
359
I`ve tested it just a few minute`s ago, worked perfectly for me. As Xakzi said, don`t go over 96.

@Xakzi , you`re right, I forgot about the 96 thing, updated it, thanks for pointing me on that :)

Where does the 96 Come from? Is the space limited by the Database or just a number where its getting laggy when syncing with the client?

Btw. Nice tutorial, well readable and helpful.


Ive done some calculation with my new calculator (I say new since I havent used the one I got on my computer until now)

But I have counted that, if you changed it to 75 (No counting really needed) Then the inventory will be bugged, since a full inventory goes 6x4 = 24..

and 24 x 4 = 96.. which is where I got my 96 from, it will enlarge your 1x bag with 3 more..

now you count it, 24 + 24 + 24 = 72, which means 75 got 3 extra space that you probably not will be able to see.. It might just convert itself to 78 (an extra row) but I dont know that per say,

so it depends what size of inventory you would like, and.. since your adding more space, I'm guessing the database is also expanding somehow, so if you add too many spaces in the bag, it could make your mssql work really slow (if you now have alot of players and low on RAM), so either 24 (which is original) 48 (2x) 72 (3x) 96 (4x) would be more then enough.. since there is 2 bag's in that inventory, which makes it to 8x more inventory space... just something for ya'll to think about =D
 
Newbie Spellweaver
Joined
Oct 18, 2008
Messages
81
Reaction score
18
Ive done some calculation with my new calculator (I say new since I havent used the one I got on my computer until now)

But I have counted that, if you changed it to 75 (No counting really needed) Then the inventory will be bugged, since a full inventory goes 6x4 = 24..

and 24 x 4 = 96.. which is where I got my 96 from, it will enlarge your 1x bag with 3 more..

now you count it, 24 + 24 + 24 = 72, which means 75 got 3 extra space that you probably not will be able to see.. It might just convert itself to 78 (an extra row) but I dont know that per say,

so it depends what size of inventory you would like, and.. since your adding more space, I'm guessing the database is also expanding somehow, so if you add too many spaces in the bag, it could make your mssql work really slow (if you now have alot of players and low on RAM), so either 24 (which is original) 48 (2x) 72 (3x) 96 (4x) would be more then enough.. since there is 2 bag's in that inventory, which makes it to 8x more inventory space... just something for ya'll to think about =D

Alright, I was just wondering if its some sort of limitation.
Thanks for the explanation.
 
Junior Spellweaver
Joined
Jul 31, 2010
Messages
148
Reaction score
31
and 24 x 4 = 96.. which is where I got my 96 from, it will enlarge your 1x bag with 3 more.
now you count it, 24 + 24 + 24 = 72, which means 75 got 3 extra space that you probably not will be able to see.. It might just convert itself to 78 (an extra row) but I dont know that per say,

You don`t need to multiply it, it only needs an full row, since one row has only 6 spaces you need to divide your number by 6. So let`s say '75' 75/6= 12,5 , so this isn`t posible (In some sources it update`s indeed to a new row, as it did in mine, but updated it to prevent mistake`s). As long as you make full line`s , and don`t go over that 96 it should work properly.:thumbup:
 
Flyff Developer
Loyal Member
Joined
Apr 6, 2009
Messages
1,873
Reaction score
384
You don`t need to multiply it, it only needs an full row, since one row has only 6 spaces you need to divide your number by 6. So let`s say '75' 75/6= 12,5 , so this isn`t posible (In some sources it update`s indeed to a new row, as it did in mine, but updated it to prevent mistake`s). As long as you make full line`s , and don`t go over that 96 it should work properly.:thumbup:

Although most of that information is correct, there's one inconsistency with what I know. By default, the bank inventory size doesn't fill every row, the last row only uses the first 2 and the rest it ignores =P I don't know if that would work here, but it does there.
 
Junior Spellweaver
Joined
Jul 31, 2010
Messages
148
Reaction score
31
Although most of that information is correct, there's one inconsistency with what I know. By default, the bank inventory size doesn't fill every row, the last row only uses the first 2 and the rest it ignores =P I don't know if that would work here, but it does there.

I actualy never looked into the banks-source, but what I know is that the bank only use`s slots, and not rows, this bag-pack use`s rows and slots, they communicate with each other (Ammount of slots need to fit into the rows).

Off-topic:
100 posts! :thumbup:
 
One word! Im Fawkin Pro!
Loyal Member
Joined
Jul 1, 2010
Messages
1,254
Reaction score
359
I actualy never looked into the banks-source, but what I know is that the bank only use`s slots, and not rows, this bag-pack use`s rows and slots, they communicate with each other (Ammount of slots need to fit into the rows).

Off-topic:
100 posts! :thumbup:


haha first, Congrats :p

second, the bank can also be edited,, MAX_BANK 42 , change that and your bank got more spaces :) Even thought it actually removes the 2 last for some reason I dont really want to know about :lol:
 
Junior Spellweaver
Joined
Jul 31, 2010
Messages
148
Reaction score
31
haha first, Congrats :p

second, the bank can also be edited,, MAX_BANK 42 , change that and your bank got more spaces :) Even thought it actually removes the 2 last for some reason I dont really want to know about :lol:

OffTop:
thanks Xakzi :)

OnTop:

haha lol XD , I`ll try that out later, and try out something. As I said I never really looked into the banks-source :3
 
Newbie Spellweaver
Joined
Dec 3, 2011
Messages
5
Reaction score
0
Hi,

First, thx for this but...

when we make this it's impossible to connect char when Extra bag pack is acttivate :(

Why ?
 
Experienced Elementalist
Joined
Apr 30, 2011
Messages
255
Reaction score
90
Hi 'Zoners!,

Aspire here with my first tutorial, since I haven`t found this posted here I tought I`ld 'release' it(Please tell me if not. (I`m not on e*pvp,Gamerzn**ds or anything else so I didn`t check there. )).

So in this tutorial we are going to increase the space in your (Extra) bag-pack to any size you want, which normaly adds 24 slots.

Go to your source and go into *\_Common and open-up 'Pocket.h'.

Hit CTRL+F and shearch for
Code:
#define	MAX_POCKET	3

OR

Go to line 31 :3 (If not touched before:rolleyes:)

You`ld see this:

// Operations
void Serialize( CAr & ar );

private:
BOOL m_bExpired;
time_t m_tExpirationDate;
};


#define MAX_POCKET 3 // This is the maximum ammount of bag-packs players can have, don`t change this unless you know what you`re doing.
#define POCKET_SLOT_SIZE_0 6 // This is the ammount of slots in the FIRST bag-pack.
#define POCKET_SLOT_SIZE_1_2 24 // This is the ammount of slots in the TWO EXTRA-BAG-PACKS.

// -legend- \\
Red = Explaination
Blue= Editable numbers , mostly slot ammounts
Green= Numbers we won`t use in this tutorial, in this case number of maximum ammounts of bag-packs.
Orange = Unnecessary, we won`t use this.

Now, you can change the last 2 numbers to whatever you want, but I`ld recommend not to go over 96 slots 'cuz this would cause bugs:thumbdown:.

Ex.
#define MAX_POCKET 3 // Didn`t touch this one
#define POCKET_SLOT_SIZE_0 6 //Left this one for what it was, since it`s just one line scrolling which is really anoying.
#define POCKET_SLOT_SIZE_1_2 90 //chanched this to 90, just a random number for this tutorial.

After you`ve done everything, just hit save and build THE WHOLE SOLUTION!!!



My inventory after editing(with 90 slots, a nice number):
MikeDecibel - [Source] Increase Bag-Pack space NOOB FRIENDLY - RaGEZONE Forums


Hope I learned you something ^_^

~Aspire


Edit: Make sure you can divide it by 6, else it will get bugged.
ex.
60/6=10 rows, with each 6 slots (=1 row).
Edit2: Remember that if you change #define POCKET_SLOT_SIZE_1_2 it will change BOTH of the two extra bag-packs, so you`ll increase your inventory-space ALOT if you make it over +- 48 = a total of 96 slots in both extra bag-packs, including the first row make`s 102 Slots in your Bag-Pack.

yes its already released in Pvpers but as you said you dont go in other dev forum, so nice release

but, as shadow posted that it has an error, i agree with that, the bug is after you close the server, all items in bag 1/2 will be deleted... hope you better check it also after closing the server...

thank you
 
Flyff Developer
Loyal Member
Joined
Apr 6, 2009
Messages
1,873
Reaction score
384
yes its already released in Pvpers but as you said you dont go in other dev forum, so nice release

but, as shadow posted that it has an error, i agree with that, the bug is after you close the server, all items in bag 1/2 will be deleted... hope you better check it also after closing the server...

thank you

hadn't thought about it til just now, but if that's the only bug, it's pretty easy to fix it. What's happening is that when it tries to save, the query doesn't complete because there's not enough space in the database. Increasing size of the database fields for it and/or splitting it into multiple fields will fix this.
 
Not working on UnitedFlyf
Loyal Member
Joined
Apr 21, 2009
Messages
1,385
Reaction score
934
hadn't thought about it til just now, but if that's the only bug, it's pretty easy to fix it. What's happening is that when it tries to save, the query doesn't complete because there's not enough space in the database. Increasing size of the database fields for it and/or splitting it into multiple fields will fix this.

It's not a bug, if you increase the size of the field and/or raise the limit of items held, there will be performance costs as well as storage costs. It's easy to fix, but I wouldn't recommend storing that many items per character unless necessary/important.
 
Back
Top