Character has too many items

Information and updates for the "Le Royaume des Ombres" mod by Xaphan. If you have any questions or suggestions for these mods, please post them here.

Moderator: Xaphan

broccoli
Posts: 58
Joined: Thu Feb 27, 2014 8:22 am

Character has too many items

Post by broccoli » Sun Mar 02, 2014 7:54 pm

Here is my experience with the infamous "character has too many items" assertion failure.

This crash started to happen to me when I was around the end of act I. I had PlugY enabled and I used both the personal and shared stashes (around 1-1 page was full in both). After I got the assertion failure, I read about it and moved all my items from the personal stash to the shared one. This seemed to fix things.

As my items became more and more advanced, I started to get the error again. This time I disabled PlugY and only enabled it when I wanted to move stuff to my shared stash. I kept the personal stash completely empty. This also seemed to work.

Around the end of act II, my items are all heavily enchanted and socketed and I have a lot of unique and set items on my char. I started to get the error again. My personal stash is completely empty, PlugY disabled, my inventory is also empty, apart from the equipped items. The .d2s file is 7.95 kB. If I pick up a healing potion for example, I get the assertion failure. I see no way around this issue now.

I know it is hard to fix this bug, but I'll just throw out ideas, maybe they'll help.

1, It seems weird that the .d2s file grows so big so early. The number of item stats on my char now resembles that of an endgame character in vanilla LOD (roughly). In vanilla however, I always had an inventory full of charms. Even with those, the .d2s never grew this big (3 kB is typical). This suggests to me that something else is happening here. Maybe you have many invisible item stats? Is there a way to look into what's causing the .d2s to grow this much? Can some of the item stats be redesigned so that they are more efficient in terms of data storage? Are skills stored in the .d2s as well? Can the number and complexity of skills have an effect on the frequency of this crash?

2, Is it possible to save some of the char item data to a separate file to avoid the 8 kB .d2s crash? I mean, PlugY does it with the shared stash as the shared stash data is not saved in char .d2s files, but separately. Could this be done with inventory items or other character data as well?

3, I guess the last option is to redesign your items so that they use less memory by reducing the number of stats they give. Also maybe to reduce inventory and stash sizes. I suspect that this can be avoided by identifying the cause of the "leak" in .d2s files.

4, Am I doing something wrong? Does anyone else have the same problem?

User avatar
Xaphan
Hosted Forum Moderator
Arch-Angel
Posts: 1113
Joined: Fri Oct 08, 2010 10:55 am
France

Re: Character has too many items

Post by Xaphan » Sun Mar 02, 2014 11:08 pm

Well I already did my best to reduce how often this error apear, so I can't really do anything more. And everything I could try would mean a total characters wipe, so as I don't want that, I'm pretty much stuck :s

I know it is possible to remove this dumb limit, but that's not an easy task, and I tryed but failled completely. If, one day, I can solve this issue, you can be sure I will do it, but for now, I can't really do anything else.

broccoli
Posts: 58
Joined: Thu Feb 27, 2014 8:22 am

Re: Character has too many items

Post by broccoli » Mon Mar 03, 2014 4:39 am

Yes, I understand that you did your best.

However, this error will put a hard limit on your mod by preventing players to pass a certain point in the game (for me it's act 2). So I wouldn't worry about a full wipe (or wipes), as it seems better to fix the problem now while your mod is still in the early stages of development.

I know nothing about mod making or code editing so I can't suggest anything else other than the above. But maybe there is someone in these forums who can help.

I would really welcome input from other players who could find a way around this bug.

User avatar
AlphA - The Real One
Hosted Forum Moderator
Champion of the Light
Posts: 300
Joined: Sat Oct 31, 2009 12:28 pm
Location: China
Germany

Hand-picked

Re: Character has too many items

Post by AlphA - The Real One » Mon Mar 03, 2014 12:51 pm

@Xaphan:I suggest asking Seltsamuel. As far as I know he was also working on that kind of issue. Best would be to ask @ Snej Board. He´s kinda busy right now because he´s moving again. So don´t expect a quick reply.

Cheers

Elafar
Junior Member
Paladin
Posts: 142
Joined: Sat Jun 01, 2002 9:38 pm
Location: Norway

Re: Character has too many items

Post by Elafar » Tue Mar 04, 2014 2:30 pm

Ok,
Here is what I use to to do and it helps me. (almost no crashes at all ) I, however, use Plugy always.
So in addition to having empty both first pages I always leave town and stash open on some empty page (after you have done with storage / crafting ). I also clear quite often my personal inventory from to many small 1x1 items.

I hope this will help

User avatar
Xaphan
Hosted Forum Moderator
Arch-Angel
Posts: 1113
Joined: Fri Oct 08, 2010 10:55 am
France

Re: Character has too many items

Post by Xaphan » Tue Mar 04, 2014 3:07 pm

Yes this should help :)

I'm also going to remove many otems in version 3.02 (mainly crafting ones) so that you will need to store less different items overall, and that should help too :)

broccoli
Posts: 58
Joined: Thu Feb 27, 2014 8:22 am

Re: Character has too many items

Post by broccoli » Tue Mar 04, 2014 7:09 pm

Elafar, where are you in the game and what character do you use?

Xaphan, that sounds like a good idea. Would it also be possible to look into what's causing the .d2s files to grow this much? If you do the math, do the numbers make sense to you? I'm sure you have already done this, I'm just curious about how it works.

Elafar
Junior Member
Paladin
Posts: 142
Joined: Sat Jun 01, 2002 9:38 pm
Location: Norway

Re: Character has too many items

Post by Elafar » Tue Mar 04, 2014 10:17 pm

I am in act 2 not a single crash so far (playing with sorc )

broccoli
Posts: 58
Joined: Thu Feb 27, 2014 8:22 am

Re: Character has too many items

Post by broccoli » Sun Mar 09, 2014 11:54 pm

OK, so based on all these, the game plays OK if you do some or all of the following:

1, Do not use the personal stash at all or use only the pages following the first page.
2, Always leave open your shared stash on an empty page before you leave town. This means that you do your storage, click to an empty page of the shared stash or click back to the empty personal stash, then click to close the stash or hit Esc.
3. If you play in windowed mode, you can easily monitor the size of the .d2s file while playing. If it grows beyond 7 kB or so, start to be cautious about picking up items. At 8 kB, the game will crash when it tries to autosave or you try to save and exit.
4. With an empty personal stash and following advice #2, it is still possible to crash the game by picking up many small items. This is why it is helpful to monitor your save file size.
bonus: be careful when you have a .d2s file size above 6 kB and opening the shared stash on a busy page. It may happen that the game tries to autosave when you are taking care of storage and a crash will occur.

Based on my testing, the following affect the size of the .d2s:

- number of items you carry, both equipped and unequipped
- number and complexity of item stats you have (yes, if you fully pimp your char with enchants/sockets/upgrades, your .d2s will grow)
- items and item stats on your merc
- number of items and item stats on the 1st page of your personal stash
- number of items and item stats on the page of your shared stash you leave it open (see #2)

By following the "rules" listed above, I was able to finish act 3 with a fully enchanted/pimped huntress with a typical .d2s size of 4 kB (was 2.5 kB before pimping). Had no unintended crashes. PlugY always enabled, as Elafar suggested. This should work for every player I think.

Thanks for all your input.

User avatar
Xaphan
Hosted Forum Moderator
Arch-Angel
Posts: 1113
Joined: Fri Oct 08, 2010 10:55 am
France

Re: Character has too many items

Post by Xaphan » Mon Mar 10, 2014 1:09 am

While I can't really remove this limit of 8kb (I've read it's possible but even if done, other problem will occur after that), I will see and look if I can remove some invisible stats here and there, without losing the related fuctionnalities. This probably won't be simple, but I will do my best.

At the same time and as stated before, I'm going to reduce the number of items you have to collect, here again without losing fuctionnalities they are used for. Crafting is a good exemple but there is probably some others things that can be affected.

Return to “Le Royaume des Ombres”