Welcome to Gaia! :: View User's Journal | Gaia Journals

 
 

View User's Journal

Lanzer's Journal
Inventory Arranger - The Never Ending Story
The last 8 hours was quite an adventure...

First I found that item stacking as a feature was added on as kind of a hack. Items stack after they're read from the database and paginated. If stacking doesn't play well with pagination, then the whole thing falls apart. Time to add stacking as a part of the database handler. Now a "page with 25 stacks of items" will actually show 25 different items.

Next thing I found was that there's no grouping when items are stacked. 4 items can be found in page 2 while another 5 can be in page 10. When they're finally grouped together, the slot numbers are not grouped together consecutively. Time to write a new sorting function that respects stacking.

There comes a point where I needed to decide what happens if a user gets a an item that he/she already owns. Do the full stack of items now appear at the end of inventory, or would the item join the existing stack, preserving the sort order? I'll probably make that a user defined option later. For now, I'll respect the original sort order. The down side is that when you receive an item, it might not show up at the end of your inventory as it joins an existing stack.

All these things are actually not difficult in concept, but it's the fact that one need to read through someone else's code, spend hours understanding how it works and how not to break it, which is the real effort.

Just when I thought all the back end work is done, I found another bug responsible for placing stacked items in weird places. This time it's the frontend Javascript code again! gonk

I hope to wrap everything up before 3AM so I can answer some PM before heading to bed.

[4AM]
Well turns out the last bug is a backend bug after all. When inserting a stack of items from temp storage, we need to split the inventory to make space for the new items. There was a bug with splitting the inventory properly. Hopefully with this fix, the inventory arranger will work properly. 3nodding

Off to bed! whee






User Comments: [15]
Yuekazehime
Community Member





Mon Jan 23, 2017 @ 10:01am


Deciphering the code of others is always pretty crazy stuff, but glad you're sorting through!

...Please make sure you document well yourself, though <3

And sleep.


AstraSage
Community Member





Mon Jan 23, 2017 @ 01:22pm


Document everything as well as you can and rest your hands before tackling anything else.

It was interesting to see the reduction in pages in my Special Tag even though I can't seem to open anything there with a "Choose your Item" or a RIG behaviour at the moment without getting get stuck in a Infinite Loading Screen; Unpacking Bundles with a static selection is okay, though EDIT: Hiccups were cured...


True Karma
Community Member





Mon Jan 23, 2017 @ 03:15pm


I hope you are trying to write in comments so next time someone needs Togo into this code isn't not just a hot mess like it seems to be now >< good that you found out the issue is backend just because XD the java front end business's isn't your friend.

I hope your dog is still doing well n.n


Arashisora
Community Member





Mon Jan 23, 2017 @ 09:49pm


Many thanks for improving the inventory arranger; it's so MUCH better! Please, don't sacrifice your sleep for this, though. sweatdrop

{{more healing vibes for Bionic Strider}}


Star Re Sky
Community Member





Mon Jan 23, 2017 @ 11:35pm


thank you for everything Mr. Lanzer!


Lustful Toxin
Community Member





Mon Jan 23, 2017 @ 11:53pm


I was half way to complete my exchange thread with all coding by following the pages- and you fix the bug- Yay, but that made everything changed- I have to start all over again- it took me 1.5 months to have half done. Pain in a**. sad

Gotta re-do it all over again.


this_chick25
Community Member





Tue Jan 24, 2017 @ 12:45am


My HERO!! heart heart


Castiel Lover
Community Member





Tue Jan 24, 2017 @ 01:44am


Thank you for the auto-sorting duplicate items feature! I've been wanting this for years. My inventory has gone from 30 pages to 11. A little worried some of the items are gone, but it's probably just that I had so many duplicate items. I see that it's been disabled, and a lot of people don't know why. You might want to put a staff notice out about it to calm them. Again, thank you!


Wing Zero Flame Feder
Community Member





Tue Jan 24, 2017 @ 01:52am


thank you for the continued hard work i have been arrange my inventory but ty for this update my work is less 3nodding


Anamosa Valentine
Community Member





Tue Jan 24, 2017 @ 02:09am


It was fun to read this entry. whee I don't understand coding in contrast to my medical knowledge, but I do know it takes long time to read all the codes and edit them properly.

Once again, thank you for your hard work for Gaia! heart


Elegant Rarity
Community Member





Tue Jan 24, 2017 @ 03:25am


Thanks for all you do! heart


Divine Mother
Community Member





Tue Jan 24, 2017 @ 06:06am


99 bugs in the code, take one out, patch it around. ...105 bugs in the code. e-e...


.Arriana.
Community Member





Tue Jan 24, 2017 @ 06:09am


I just want to say, the inventory looks amazing. About hte only thing I'm "missing" is where Special items would stack. Regardless though, it's awesome! THank you!!


raggedy grrl
Community Member





Tue Jan 24, 2017 @ 12:19pm


4:00 AM?! eek

You're doing amazing amounts of work, but please, please be careful!!! Do not get sick or burned out, OK? emotion_hug


________________________

// I receive oddly appropriate captchas for messages, like this one:


User Image - Blocked by "Display Image" Settings. Click to show.


User Image
True Karma
Community Member





Tue Jan 24, 2017 @ 08:28pm


Maybe you should get a QA team back XD
You were just a little too excited for rolling out the changes.


User Comments: [15]
 
 
Manage Your Items
Other Stuff
Get GCash
Offers
Get Items
More Items
Where Everyone Hangs Out
Other Community Areas
Virtual Spaces
Fun Stuff
Gaia's Games
Mini-Games
Play with GCash
Play with Platinum