The World of Layonara  Forums

Author Topic: Lagging the server through bad inventory management  (Read 2582 times)

Filatus

Re: Lagging the server through bad inventory management
« Reply #20 on: August 15, 2006, 11:09:30 am »
I wasn't really thinking off implementing any sort of system to address this issue when posting. I don't know what is possible with scripting. All I was really saying is that it is something the players can prevent themselves.

You can't expect scripting to be the answer for everything.
 

EdTheKet

Re: Lagging the server through bad inventory management
« Reply #21 on: August 15, 2006, 11:10:12 am »
Quote
doesn't that seem to indicate an ongoing problem?

Yep, as it's hardcoded within NWN, it checks every item in a player's inventory, there's no fix for that. It's NWN :(

Making the prices higher will only make people collect more stuff and give everyone insane amounts of gold form collecting, let's say, skullcap leaves from the swamp. It won't make people clear their inventories, they'd just collect more, log off while collecting and log in to continue.

Quote
so if thats not a viable option, do you have any opinion regarding the inventory/storage - lag problem

Removing bags and boxes from the game would be an option as that would reduce the amount of items a player could carry in inventory...

And for everyone who wonders if he's lagging the server because of the number of items. If you're somebody who has like 20 bags/boxes full of items, then you probably are...
 

Leanthar

Re: Lagging the server through bad inventory management
« Reply #22 on: August 15, 2006, 11:13:06 am »
"...so if thats not a viable option, do you have any opinion regarding the inventory/storage - lag problem?..."

In addition to what Ed suggested the only other real option is to use a different system/game engine for PW's. Not much else we can do/say because it is an NwN hardcoded situation.

In addtion when Ed stated 20 bags/boxes I would like to state if you have more than 5 or so then it is cause at least some sort of overhead problem.
 

darkstorme

RE: Lagging the server through bad inventory management
« Reply #23 on: August 15, 2006, 11:13:29 am »
Quote
Faldred - 8/15/2006  11:54 AM

Gem dusts -- why only 10 in a stack instead of 99?  Ditto for scrolls or sandpaper.  Shouldn't star dusts, berries, leaves, herbs, etc., be stackable?  Right now each takes a separate inventory slot, making them stack should make them easier to store in the limited spaces available.  (Or does stacking add to lag?)


Agreed on all counts.  It would alleviate a ton of inventory clutter (particularly with things like berries, aloe, and the like), and, (though correct me if I'm wrong), a stacked item becomes a "single" item with a variable indicating how many of it there is, no?  Now, CONVERTING items to be stackable may be a bit trickier, though I recall a hak that does it somewhere.  *searches Vault*  Ah, here it is.

Quote


As for temple donations, not everyone has easy access to their deity's temples (Vorax has a temple on Mistone, but not even Zug is dumb enough to make the trip there on his own) -- perhaps creating a generic donation center in major towns and cities (Hlint Town Hall, for example) where a character can donate to the deity or relief effort of his/her choice would increase the donations and remove the extra items from the game while still giving the crafter (or finder, in the case of dropped items) some kind of IC "good feeling" for doing so.


This not only would be a lovely sink for extra craftable items, but could be RPed nicely as well - even characters without a deity might make a small donation; to Deliar before an arduous journey, perhaps, in the hopes of gaining the favour of The Protector on their trek; to Vorax or Toran after a virtuous battle (though not an epic one) that the character survived; to Mist before a sea voyage; to Shadon if they seek the blessing of the Trickster on some bit of skullduggery (or, quietly, to Branderback).  The prescence of a nondenominational shrine would allow for these quick tithes to take place before departing on a quest - without making the donation an arduous task.
 

Stephen_Zuckerman

Re: Lagging the server through bad inventory management
« Reply #24 on: August 15, 2006, 11:15:54 am »
Great ideas, DS. I'm wondering what the Team's opinion on making rentable storage available is, though?

Any input on how that could be done with the code would be great, too; I don't know enough about how it works to make real suggestions in that regard.
 

Dorganath

RE: Lagging the server through bad inventory management
« Reply #25 on: August 15, 2006, 11:32:18 am »
Guys...inventory clutter is NOT the problem.
  I can pretty much guarantee that if we made more things stackable, people would carry more because they have more room. Making things stackable essentially multiplies the amount you can carry. It's the theory that states that clutter expands to fill the space available....also known as the "Oh look! I have more room" effect.
  The problem is the sheer number of items people carry in their inventories.
  Perhaps my own perspective is skewed, but instead of coming up with ideas for complex systems or other ideas that would generate lots more work for a development team that already has plenty to do as it is, why not take a moment and ask yourselves if you can do things a bit differently to help alleviate the problems caused by excessive inventories? That is the simplest solution, and it can happen today, with no development time. I guarantee you...carrying less can be done. My own character did it for quite a while out of neccessity. I'm sure it can be done for reasons that help the server.
 

Guardian 452

Re: Lagging the server through bad inventory management
« Reply #26 on: August 15, 2006, 11:36:15 am »
More code (for storage or anything) = more lag.

When we used to have player vendors they worked awesome untill Layo got bigger and everyone and their brother had a player vendor filled with 327 salts and 125 cotton puffs. and a bazzilion stire wings.

It got to the point when some one accessed a player vendor we would have up to a minute or more of a lag spike.


The Player vendors were removed from layonare because people could not manage them themselves.



The storage issue has come up numerous times ( like L said you can almost set your watch to it).


How is opening up a storage deal full of lord knows what not going to cause lag?


The real answer here is the one no one seems to want to hear or listen to.


We have passed the limits of what NWN can handle and unless we give something back. Or find a new game engine. This issue will never go away.


Adding this or adding that will not fix this...... its time to take away.
 

EdTheKet

RE: Lagging the server through bad inventory management
« Reply #27 on: August 15, 2006, 11:39:55 am »
Quote
darkstorme - 8/15/2006  8:13 PM  
Quote
Faldred - 8/15/2006  11:54 AM  Gem dusts -- why only 10 in a stack instead of 99?  Ditto for scrolls or sandpaper.  Shouldn't star dusts, berries, leaves, herbs, etc., be stackable?  Right now each takes a separate inventory slot, making them stack should make them easier to store in the limited spaces available.  (Or does stacking add to lag?)
 Agreed on all counts.  It would alleviate a ton of inventory clutter (particularly with things like berries, aloe, and the like), and, (though correct me if I'm wrong), a stacked item becomes a "single" item with a variable indicating how many of it there is, no?  Now, CONVERTING items to be stackable may be a bit trickier, though I recall a hak that does it somewhere.
 
  Read this:
 
Quote
Let me throw some numbers at you. Take a large chest that can be bought for housing.  You can store 30 items in that chest.  If the item is stackable, like gem dusts, then that number increases to 300 right off.  Increase the stack size to 20 and now that's 600 items.  Item/object creation in NWN is one of the most "expensive" operations in terms of CPU usage, which of course contributes to lag.

  Stacking adds lag. Unstacking things would be a better solution instead of stacking.
 

SquareKnot

RE: Lagging the server through bad inventory management
« Reply #28 on: August 15, 2006, 12:02:38 pm »
I've read through 100's of posts on this topic over the time I've been here, and I'm wearied by the endless debate as well. But this got me thinking:

Quote

You can store 30 items in that chest.  If the item is stackable, like gem dusts, then that number increases to 300 right off.  Increase the stack size to 20 and now that's 600 items.  Item/object creation in NWN is one of the most "expensive" operations in terms of CPU usage, which of course contributes to lag.


If part of the problem is item creation (you open a persistent chest, and suddenly 30+ items need to created and put into the chest, creating a CPU load spike), and part of the problem is keeping track of those items in inventories of one sort or another, what if we didn't create the items until they were needed? What if they didn't exist anywhere in NWN?

The trick is keeping them only in the on-disk database. Suppose we had an NPC with a dialog script that would tell you what you had in the "safety deposit box" that he was keeping behind the counter for you. You could go through his dialog just like a CNR dialog/menu. When you got to, say for instance, item 23 -- stack of 10 topaz dusts, you would select it and he would get it for you (remove it from the database, create the item, and put it into your inventory). Unless you requested the item, it would never be created in NWN.

This method would still require DB accesses to get the items' names. I don't know anything about how much the DB/NWNX/mySQL/CodeBase accesses cost in terms of CPU load, so maybe that would be even worse for lag. And maybe the way the items are stored makes it difficult to get only their names. Maybe it's hard to set up the DB tables to support this idea. Can you tell I don't know much about databases?

But if the database works (or could be made to work) like I imagine, this idea might be a way to get objects out of the NWN model (including oxen/persistent chests/housing chests/character inventories) but still have them be available to characters when they (eventually) need them.

Just a thought. And yes, I'm willing to script up as much as I can and test it myself (including running a mock-up DB connected to a mock-up module) if someone will let me know what DB access methods are used on Layonara. But if those who know the system know this is a stinker of an idea, or just something that isn't going to happen, I'll drop it right now.

 

Fian Bearsark

RE: Lagging the server through bad inventory management
« Reply #29 on: August 15, 2006, 01:24:48 pm »
This is almost sounding like global warming debates. What can you do to combat CNR lag?  :)

I took note of a couple of Dorganath's responses, because I have found myself doing it - carry less stuff. I used to walk all over Layo, picking up every catnip, elderberry, vine (!) and angelica root I came across. Why? Because I thought I would use it someday, or sell it someday. Usually I didn't. Drawna has been carrying a box of aloe around for 2 weeks now and I still am trying run into somebody who will buy it. With 10 STR, every single pound makes a difference, and that box at 4.5 pounds is killing me. I never should have collected it without a buyer.

I draw maps on graph paper as I explore Layo. In fact, I've had to edit them on coming back after almost 2 years because things changed. Now when I come across new CNR, I make a note of its location - and walk away. I don't pick it up. Its hard to do sometimes, but ultimately its for the better. Look at every item in your inventory and ask yourself if you ~need~ it. Really need it. Gem dusts are the worst I think. I used to have a lot, but when I started back on this server I sold the whole box to somebody, probably for too low a price, but i got rid of it all and I don't miss it.

I will say the thought of a little extra rented storage would be nice, even another bank chest with ten more item slots. I also think the idea of a deposit box menu is an excellent idea by darkstorme. Don't have the items made until they are called up by the character.

Oh and, somebody tell me if i lag the server when I log in!
 

Guardian 452

Re: Lagging the server through bad inventory management
« Reply #30 on: August 15, 2006, 01:32:43 pm »
West and Centrals bank vaults are not connected.

so thats 40 things on an Ox. 10 on West and 10 on Central.

Granted not eveyone thinks they can make it to Central server...

For 600 (or maybe 700) coin you can round trip to North Point, using the portal North of Hlint. bank there and come back.


 

jrizz

Re: Lagging the server through bad inventory management
« Reply #31 on: August 15, 2006, 02:33:48 pm »
I think the best suggestion here has been that we (the players) manage our personal inventories better. The one thing that can be done by the team is to set a limit on the number of boxes and bags a character can carry or even harsher is to set a limit on the number (in total) of items a character can carry. I have always (for years) had issue with the amount of stuff a character can carry and still function. I know it is both a programmatic and game rules issue. When I ran PnP I never let a character carry more then 2 large weapons for instance. I own a large collection of weapons from around the world and let me tell you if you tried to strap 3 staffs, 2 axes, 4 long swords to your back and run around you would not get far. It is not the weight really it is that it is cumbersome. Have you ever seen how a set of full plate armor packs up if you did you would think twice about running around with two or three sets. I know this has all been brought up before and that this is not RL but a game (although the RL argument gets rolled out quite a bit) but I would be fine with some limits set on what a character can carry. After all, we all hate lag so we should all be willing to help here. I am off to count how much stuff my character is carrying and see what I can dump right now.
 

Etinfall

Re: Lagging the server through bad inventory management
« Reply #32 on: August 15, 2006, 06:18:19 pm »
I have about 6 bags on my character, so I am guilty to. But if you were to role play, how on earth(err Layonara) can someone carry that many large bags? I just got back from a weeks worth of camping and hiking, and canoeing. We had to carry everything on our backs. Our portages were horrible. If I had as much stuff with me as my character has, my brother and father would have left me to rot.

When I log back into Layonara, I will empty my inventory to be more reasonable. Granted none of my bags are full, but it might help a little. If each of us help out "a little", then we might just help in this situation. Leaving other things for the busy gm team. If Leanthar was making millions running this server I would say, hey, help us out. But since we are the ones earning here, we should fix this ourselves. If we can help here, then it might show us, we as a player base, can do plenty more things to make this world even better. And just think of the advancements the team can make if they did not have to worry about these things. Kudos to Filatus for bringing up that we (the players) need to police ourselves here. That has been said many, many times, but we need to just do it.
 

Varnart

  • Jr. Member
  • **
    • Followers of Aragen
    • Followers of Lucinda
    • Followers of Rofirein
  • Posts: 228
    • View Profile
Re: Lagging the server through bad inventory management
« Reply #33 on: August 16, 2006, 01:12:34 am »
I understand the lag problems, but Etinfall, IRL you don't have bags that magically reduce the weight of stuff you put in them.
And jrizz, the problem with reallism is that the point at which you are heavily encumbered in NWN according to your strength is actually when you're carrying as much as you can in PnP. For example, for 10 str, I believe we get to carry 100 lb before we are encumbered. In PnP, with 10 str, you can carry up to 33 lb without being encumbered, 34 to 66 lb encumbered, and 67 to 100 lb heavily encumbered. It's just that Bioware decided that, since in PnP you are usually a 4-man team and in NWN you are alone, you have to carry everything yourself(remember that in the original NWN you couldn't control your henchmen's inventory).
I think the best way to prevent this is to alter the encumberance system to resemble that of PnP.
Thisis where the table for encumberance is at, in ase anyone wants to check it.
 

Dorganath

Re: Lagging the server through bad inventory management
« Reply #34 on: August 16, 2006, 05:46:37 am »
Quote
Varnart - 8/16/2006  3:12 AM   I think the best way to prevent this is to alter the encumberance system to resemble that of PnP.  This is where the table for encumberance is at, in ase anyone wants to check it.
 Altering encumberance wouldn't help things in this case, because those items which are the biggest problem (fine gems and gem dusts) are weightless. Due to NWN engine limitations, we can either make them weightless or make them 0.1 pounds each (meaning a stack weights 1.0 pound). The weight of dusts, arrows and a few other things was set to be like that so that they weren't overly cumbersome. We could add weight to them, as described, in which case changing encumberance would not matter, as one's weight would be way up already.
  Changing encumberance to more tightly follow PnP rules would really just hurt casters, as they tend to be weaker in general, need to carry spell components, etc. Engine limitations on weight don't allow for very realistic weights in a lot of cases, and so many things end up being heavier than they should be.
 

Etinfall

Re: Lagging the server through bad inventory management
« Reply #35 on: August 16, 2006, 07:26:32 pm »
Aye, I didn't mention real life in that post. But I do understand what you are saying. Somethings should follow "real life" in some way and some things shouldn't of course. The point I was trying to make is that this could be something we as players can work on. I thought it was a good idea.
   Etinfall
 
  Oh...an isea. Put some sort of restriction on magic bags. Have to have a set spellcraft level to utilize the magic in them. This would help spellcasters while limiting them to others. I really don't play spellcasters, but I could definitely live with that.
 

Vyris

Re: Lagging the server through bad inventory management
« Reply #36 on: August 20, 2006, 10:03:13 pm »
I think one way to stop this would be to say that NONE of the CNR items in your inventory save with your character when you log out.
You need something, got get it, and use it. If you need 3 and you only have one get two more and use them, or log out and lose the one.

At the very least that would encourage people to collect items and put them in chests in houses or in the bank and use the items they have.

And this isn't a high-horse kind of comment, I'm sure Berdin probably has 200 gem dusts, aloe leaves, cut gems and alchemy vials on his person right now, but... if it were all gone when I logged in to play next it would just give me a reason to go mine some alexandrite or something.


Vyris
 

Gulnyr

Re: Lagging the server through bad inventory management
« Reply #37 on: August 21, 2006, 04:59:03 am »
Quote
Vyris - 8/21/2006  1:03 AM

I think one way to stop this would be to say that NONE of the CNR items in your inventory save with your character when you log out.
You need something, got get it, and use it. If you need 3 and you only have one get two more and use them, or log out and lose the one.


I like the 'perishable CNR' idea, but I don't think it would work.  Gum Arabic is CNR.  It is used to make sandpaper.  It is also a material component for spells.  Topaz Dust is CNR.  I'm sure there must be a potion or something that requires it.  It is also a material component for spells.

I'm not sure it's fair to constantly strip the mages of their material components, and I'm not sure there is any logical, non-frustrating reason that things like Gum Arabic, Topaz Dust, or even Iron Ingots should 'spoil' and need to be thrown out (aka automatically removed).

Also, gathering the CNR is sometimes an evening's work all on its own.  Not everyone can spend hours at a time playing, and it would be extrememly frustrating to spend that limited time gathering CNR only to have real life interrupt and set the character back to square one.
 

Dorganath

RE: Lagging the server through bad inventory management
« Reply #38 on: August 21, 2006, 05:51:37 am »
Yeah, not to completely shut down that idea Vyris, but that is not practical.
  The reasons Gulnyr stated are important ones. But also consider that it's very, very, very unforgiving in the cases like server crashes, client crashes/disconnections and if someone dies and has to respawn to another server....not to mention personal emergencies that may require one to log out before they can spend an hour or more getting to a craft hall and processing the items.
  To add to that....there are some resources which simply are not available on West or Central, and there's a conspicuous lack of craft halls on East.
 

Faldred

RE: Lagging the server through bad inventory management
« Reply #39 on: August 21, 2006, 08:34:27 am »
After further consideration...  Clearly, for the time being, this is an issue (I hesitate to call it a problem) that requires the players to police themselves, and to exercise the associated restraint.  Zug was certainly something of a pack-rat, especially considering that he works in virtually every craft (except those not available by reasons of class or alignment), and I must have dropped his inventory items by 70%, most of which were small stackable items such as gem dusts.  No matter what the dev team does decide to do (or not do), now, in the future, or in V3, players still need to exercise a fair bit of inventory management themselves, so that even if a helpful management mechanism is in place, the players use it.  The flip side of this, though, is that perhaps there should be (eventually) some in-game assistance for inventory management that the players can use to save crafting items -- especially hard-to-acquire items -- so that they will be later available without clogging up the charatcer's inventory and causing the associated lag issues.  So, taking into account some of the other ideas and suggestions floating around, let me suggest The Crafting Bankā„¢:
    Operates as a dialouge-based system inside of crafting halls

      Pro: Items are removed from game when deposited, only created on withdrawal
      Con: Scripting overhead, requires variables to be kept/queried for each player
      [/list]
      Only certain items will be allowable to be "banked"

        Renewable resources (raw CNR)
        Certain byproducts (e.g., gem dusts)
        No other intermediate products or any finished products
        [/list]
        Can limit the number of different items each player may bank (e.g., only 10 or 15 different types of item at any given time)
        Can impose a maximum number of items per type stored in the "bank" (e.g., player may only store 99 of any given item)
        Could even implement some sort of fee system to pay for storage, though not so high as to discourage use
        [/list] When I say "type" above, I mean very specifically, i.e., "greenstone dust" would be a type, not "gem dust" in general.  The maximum number of "types" and amounts per type would have to be tweaked by the team via playtesting to be efficient and useful, but not abusable.  As far as fees go, one idea would be that rather than a transaction-based fee, have a periodic charge accrue if the player has anything at all in the bank -- if the player is unable to pay the fee, the assets are frozen (and crafter's badge disabled) until payment can be made.  The most important part of the system is that, being dialog-based, the items "banked" would only be created on withdrawal, not on merely viewing the bank.  Edit: typo