Jump to content

Max Storage Cap


Dori

Recommended Posts


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  332
  • Reputation:   15
  • Joined:  12/11/11
  • Last Seen:  

Is max storage capped at 600 now? cuz I tried reducing it to 400, but the change didn't take place after re-compiling..


Anyone????

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  63
  • Reputation:   3
  • Joined:  07/12/12
  • Last Seen:  

May I ask why the reduction?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  332
  • Reputation:   15
  • Joined:  12/11/11
  • Last Seen:  

it was to test. cuz at first i raised it to 650 and that didn't work. so i reduced to see if that'll work. can anyone please confirm this??

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  332
  • Reputation:   15
  • Joined:  12/11/11
  • Last Seen:  

Is there anybody in this forum that can confirm this? because i need to know if my mmo.h is being recompiled or not for some weird reason. my max storage is not taking effect in-game. it stays at 600.

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

still?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

Kinda, we still need to rewrite map<=>char item saving, cause this is what limiting now.

Since increasing the MAX_STORAGE too much will increase the size of mmo_charstatus, when this one is superior to 0xFFFF, 1 packet can't hold all the information.

So I'm thinking it would be better to remove storage from mmo_charstatus and make their onw packet so the limitation would be removed.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

when I read the source, it seems we added VIP system

#ifdef VIP_ENABLE

#define MIN_STORAGE 300 // Default number of storage slots.

#define MIN_CHARS 3 // Default number of characters per account.

#define MAX_CHAR_VIP 6 // This must be less than MAX_CHARS

#define MAX_CHAR_BILLING 0 // This must be less than MAX_CHARS

#else

#define MIN_STORAGE 650 // If the VIP system is disabled the min = max.

#define MIN_CHARS 9 // Default number of characters per account.

#define MAX_CHAR_BILLING 0

#define MAX_CHAR_VIP 0

#endif

try tackle around with these as well

yeah I change the red setting and recompile, now it becomes 650

so need to set in 2 places ...

... weird ... it shouldn't be like this ...

@Lighta

no wonder

when I tried with this script

prontera,155,188,5	script	kjdhfksdhfjs	100,{
//	freeloop 1;
	for ( .@i = 500; .@i < 32768; .@i++ ) {
		if ( getitemname( .@i ) != "null" )
			getitem .@i, 1;
		getinventorylist;
		if ( @inventorylist_count == 100 )
			atcommand "@storeall";
	}
	end;
}
the error pops up like this

[Error]: WFIFOSET: Maximum write buffer size for client connection 3 exceeded, m
ost likely caused by packet 0x00af (len=6, ip=127.0.0.1).
Edited by AnnieRuru
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

Let me work on this, but the error you quote is a map<=>client errors,

Do you have suggestion about the MIN_STORAGE to not have 2 config ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

I also start to think this is a bug

	sd->storage_size = MIN_STORAGE; //default to min
	if(battle_config.feature_banking)
		chrif_req_login_operation(sd->status.account_id, sd->status.name, 7, 0, 1, 0); //request Bank data
#ifdef VIP_ENABLE
	sd->vip.time = 0;
	sd->vip.enabled = 0;
	chrif_req_login_operation(sd->status.account_id, sd->status.name, 6, 0, 1, 0);  // request VIP informations
#endif	
I change it into sd->storage_size = MAX_STORAGE; //default to min

I not sure if this will break anything, you guys should do the full testing =/

I got a feeling some code is missing here

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

na the code is fine here.

you could simplify by this :

when VIP disable {

MIN_STORAGE = MAX_STORAGE;

sd->storage_size = MIN_STORAGE;

so you have max_storage

} all good

 

now VIP enable {

sd->storage_size = MIN_STORAGE; //300
chrif_req_login_operation will request() => that will ask char-serv and login-serv if he's in vip state

char-serv will reply by :

chrif_parse_ack_vipActive(){

sd->storage_size = MAX_STORAGE

} //your storage is updated in new value

} so your storage is updated wheater you're a vip member or not

 

Now about the

[Error]: WFIFOSET: Maximum write buffer size for client connection 3 exceeded, most likely caused by packet 0x00af (len=6, ip=127.0.0.1).

I think clif_storagelist still have some issue, wich I start debuging it a bit.

http://upaste.me/1b8589

 

I also added a

sleep2 500;

into your script so it won't flood as much.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  332
  • Reputation:   15
  • Joined:  12/11/11
  • Last Seen:  

oh thank lord you guys are onto it..
I made a topic in bug report regarding this (didn't see all the replies from Lighta and AnnieRuru)

Bug report: http://rathena.org/board/tracker/issue-8369-warnings-and-mmoh-issue-storage/

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

you are right

 

you could simplify by this :

when VIP disable {

MIN_STORAGE = MAX_STORAGE;

sd->storage_size = MIN_STORAGE;

so you have max_storage

} all good

+1 to this

but where is the MIN_STORAGE = MAX_STORAGE; ?

I couldn't find it anywhere in my \src\ folder

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

hmm yeah there a possible desync here, the association is in config/core.h with the :

 

#else
#define MIN_STORAGE 650 // If the VIP system is disabled the min = max.
#define MIN_CHARS 9 // Default number of characters per account.
#define MAX_CHAR_BILLING 0
#define MAX_CHAR_VIP 0
#endif

 

where that MIN_STORAGE should have been MAX_STORAGE but core.h doesn't know map stuff so eh couldn't read the value... they have the same value but it would be better to have something more linked to avoid errors.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

AnnieRuru your issue should be fixed in https://github.com/rathena/rathena/commit/4212080bd98a687df108195011073436f26cd6d7

altough I didn't get why some item still couldn't be dropped even with full permission and you may still receive the message if you openup the storage too frequently.

Here my npc I had for testing.

prontera,155,188,5    script    storagelist_test    100,{
    freeloop 1;
    for ( .@i = 500; .@i < 1500; .@i++ ) {
        if ( getitemname( .@i ) != "null" )
            getitem .@i, 1;
        getinventorylist;
        if ( @inventorylist_count == 100 || Weight > ((MaxWeight)*90)/100 )
            atcommand "@storeall";
        sleep2 200;
    }
    end;
}
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

1st ... I can't read all those WFIFOHEAD(fd .. .stuff lol ... I usually ask ai4rei or ultramage to fix them ... long time ago

and my source editing isn't very good either, still learning

well, you did good to fix this bug

 

I didn't get why some item still couldn't be dropped even with full permission

the permission is in rathena\db\re\item_trade.txt

make sure don't mix up the \re and \pre-re folder lol

and yeah, item ID 1173 is one of them ... just blank out that file should make everything trade-able

 

you may still receive the message if you openup the storage too frequently

forget about this lol

nobody uses a npc script to store items

so don't worry about the 1/5 seconds to store items bug ... not going to happen in a live server

you can probably mark this as solved, I guess

http://rathena.org/board/tracker/issue-8369-warnings-and-mmoh-issue-storage/

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

WFIFO stuff ain't really hard to get it.

Most of it is define in doc/packet_struct_notation.txt

but in short you'll have

WFIFOHEAD(file descriptor, xsize); //reserve/allocate xsize on the socket

WFIFOx(file descriptor,offset) = y; //assign the file descriptor at offset position the value of y, (x represent the data len W=short, L=long, B=char, Q=64b)

WFIFOSET(file descriptor xlen); //sent xlen bite to file descriptor

 

y = RFIFOx(file descriptor,offset); //assign y the value of file descriptor at offset position, (x represent the data len W=short, L=long, B=char, Q=64b)

 

about the storelist openup too frequently yeah I guess the only real fix I could done for this would be to attach like a tick timer and prevent open it more then twice a second, wich should be plently enough.

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...