Author Topic: PC inventory limits cause "Save Character" export to fail ?  (Read 385 times)

Legacy_MrZork

  • Hero Member
  • *****
  • Posts: 1643
  • Karma: +0/-0


               

(This isn't strictly an NWScript question, but I ran across it whilst mucking with a scripting project to sort items in bags in the PC's inventory and I am guessing scripters are as likely to know this as anyone... And, honestly, though I try to give a bit of detail below, this may be an FAQ.)


 


I have encountered an issue when using the "Save Character" feature (from the Options Menu) when a player has a PC logged on a server. If the PC has too much stuff in his inventory, the save seems to fail. The "Export request sent. Waiting for reply..." message shows in the log, but the "Your character was exported successfully." message never appears and the BIC never appears in the client's localvault. I have attempted the export and waited several minutes with no luck.


 


As far as I can tell, aside from the export not finishing, the game is mostly working fine at both ends. E.g. the client and server seem okay; all of the items in inventory are usable, barter-able, etc. and the player can log off and relog and not lose anything. But, since a player can't open inventory while the export is working, if he ever closes his inventory, eventually the client crashes when the player tries to open it.


 


The failed export seems very much related to the number of items in the inventory, though I cannot be sure if it is also related to the number of bags/containers (and likely how many items are in those bags) or just the total number of items. The testing PC had many bags/containers which were mostly full. At somewhere between 40 and 50 bags, the export failed. I didn't do a total count of inventory items, but the number of items in 45 bags was about 900 when the export succeeded and there were over 1000 items in about 51 bags when it failed. Given that there were about 70 other items (not bags and not in bags) in the inventory, suspicion naturally turns to a 1024 item limit somewhere in the mix.


 


But, that could be a red-herring. There could be some other limit. Or, it could just be a timeout causing the export to fail. Or. something else entirely.


 


BTW, I should clarify that there doesn't seem to be any issue with the PC in question being stored on the server vault, at least not that I saw. The same PC whose export failed with 50ish bags didn't lose any items when re-logging.


 


So, does anyone know what the "Save Character" export limit is, as is relates to inventory? Any knowledge or pointers about this are appreciated.



               
               

               
            

Legacy_ehye_khandee

  • Hero Member
  • *****
  • Posts: 1415
  • Karma: +0/-0
PC inventory limits cause "Save Character" export to fail ?
« Reply #1 on: May 28, 2015, 02:25:39 am »


               

When a PC exits a server or is saved, iirc, all equipped gear is un-equipped. If you do not have room in the PCs inventory for these items they may 'vanish' from your PC. This _may_ be related to your question (since you mention inventory in your post).


 


I would suggest you see if the PC has space in inventory to store the equipped gear and see if this makes any difference.


 


IN GAME, too much gear makes lag. We do in-game things to discourage hoardering.


 


Best wishes.



               
               

               
            

Legacy_MrZork

  • Hero Member
  • *****
  • Posts: 1643
  • Karma: +0/-0
PC inventory limits cause "Save Character" export to fail ?
« Reply #2 on: May 28, 2015, 03:34:40 am »


               

Hmm, good idea. I will have to double check on that. I was pretty sure the PC in question had enough room to unequip all of his gear to his inventory. But, it easily could be that the order of unequippage left insufficient room the tower shield to be unequipped last or something. I will have to test that again with the original inventory items and see if tidying up first allows the export to proceed.


 


BTW, if all of a PC's gear is unequipped when the PC exits or is saved, how are the spell slots from items with "bonus spell slot" properties not lost?



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
PC inventory limits cause "Save Character" export to fail ?
« Reply #3 on: May 28, 2015, 06:26:50 am »


               


 


BTW, if all of a PC's gear is unequipped when the PC exits or is saved, how are the spell slots from items with "bonus spell slot" properties not lost?




because its not true, i was able to export character witj 20 bags full of items with no space in inventory at all, this is not the problem why you cant export, not sure what it might be though


               
               

               
            

Legacy_MrZork

  • Hero Member
  • *****
  • Posts: 1643
  • Karma: +0/-0
PC inventory limits cause "Save Character" export to fail ?
« Reply #4 on: May 29, 2015, 11:50:08 pm »


               

My additional test confirms Shadoow's finding. I logged the PC as he was, after having previously removed a bag at a time from him until he could be exported. Then I gave him a bag with 20 items in it and manually unequipped all of his gear. There was still room in his inventory for at least another armor and tower shield. I then attempted an export via Save Character again and it failed. That and some other tests have me thinking that lack of inventory space needed to unequip equipped items isn't the issue.


 


The number of items actually in bags does not seem to matter. When I am close to the limit, I can add items to the PC's inventory and observe the same failure. It also doesn't matter if the extra item is added to main inventory or equipped. As most of us know, that is potentially relevant as the BIC stores the main inventory in a separate list from the equipped items.


 


Which leads me to consider that the BIC file for a toon with so many items is exceeding a file size limit somewhere. I have added items right up until adding one more would result in the export not working. The BIC file for that last exportable toon is 1,048,404 bytes and that toon had 40 bags and a total of 2910 items in main inventory (2787 of those in bags, though I am now doubting that matters) and another 12 equipped items, for a total of 2922 items. Of all of those numbers, I am thinking that the file size is the most significant. 1 megabyte (base 2) is 2**20 bytes = 1,048,576 bytes, which is just 172 bytes over the size of the largest BIC I could export. I know the UTI sizes for the extra items that tip the toon into the export failure area are over 172 bytes.  It's possible that the underlying issue is that the game won't export a character whose BIC is over 1 MB.


 


Has anyone encountered this before? I see BIC size mentioned before (http://forum.bioware...her-mysql-tale/), but whether or not there was a limit on BIC size was not directly addressed. I suppose I could run some other tests  that increase the BIC size in order to determine if the issue is the BIC file size or something actually specific to inventory (I am doubting the latter at this point). It's also possible that this isn't really the game at all and it has something to do with the client (or server) firewalls or an OS limit or some other issue. The reason I wonder about the latter is that there doesn't seem to be any trouble in storing a toon with items that would put him over the export limit. Of course, the game may internally store a toon's data using something more compact than the BIC format. But, I am pretty sure that the server vault files are still just BICs and I know that I have logged and re-logged that particular toon without losing any items or noticing any other oddities. I have only noticed an issue when exporting.



               
               

               
            

Legacy_MrZork

  • Hero Member
  • *****
  • Posts: 1643
  • Karma: +0/-0
PC inventory limits cause "Save Character" export to fail ?
« Reply #5 on: May 30, 2015, 01:59:57 am »


               

Confirmed: the servervault can have BICs larger than 1 MB. Not sure why there seems to be a lower limit on localvault BICs. Is this something determined by an INI setting?



               
               

               
            

Legacy_kwik129

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
PC inventory limits cause "Save Character" export to fail ?
« Reply #6 on: July 29, 2016, 02:23:33 am »


               

Sorry for writing to this old thread but i really need help. I have one stock of bags with random numbers of items in them. When i trying to export game crashed it's more like space/item limit, cause to the specific number of items i can export normal, but beyond it's crashing. I don;t really want my collection to get lost also my highest value in bic file is 4096 kb and it's not the latest export. My latest export have 4095 kb.