View previous topic :: View next topic :: Hide signatures |
Author |
Message |
dreamin' Hero
Joined: 11 Nov 2002 Posts: 625
Level: 22
|
Posted: Sun Apr 20, 2003 8:33 pm Post subject: Scripting - Items - Lag- Help? |
|
|
I'm writing a persistant player shop system at the moment. It'll allow players to sell items via a npc merchant/containers.
It uses nwnx/mysql to store the items and their owners.
Now I have to make a design decision:
Lag-wise, would it be better to
a) spawn all items the players want to sell in the merchants containers on module load, meaning that the merchant area would have lots of containers with lots of items during the whole uptime of the server
b) spawn the items only when a player enters the area and destroy them again when no player is left in the area
On a server like Dyso, i think we'd be talking about 10-20 containers with about 10 items each.
Thanks for your input
Last edited by dreamin' on Mon Apr 21, 2003 12:06 am, edited 1 time in total |
|
Back to top |
|
 |
Conrad Hollows Har-Rhun Project Leader

Joined: 07 Sep 2002 Posts: 2161
Level: 38
|
Posted: Sun Apr 20, 2003 9:47 pm Post subject: |
|
|
Hmmm ... you tried to ask me about this in game and I was buried in stuff.
I am of a mind to think that spawning/destroying upon entry/exit would be the better way to go ... so long as it is actually clearing out the item footprints. If not, then it may just be easier to go the first route. _________________ Envision something suitably witty here. |
|
Back to top |
|
 |
dreamin' Hero
Joined: 11 Nov 2002 Posts: 625
Level: 22
|
Posted: Mon Apr 21, 2003 1:35 am Post subject: |
|
|
I chose the middle route for now, spawning the items when the first player enters, and destroying them after a certain time of inactivity.
But now I'm wondering whether containers have limited inventories, or if there'll just pop up new pages when i add new items.
Not that I want to build containers with 100 pages of inventory, but it'll make things easier if I wouldn't have to worry about it wether or not the 22nd sword will still fit in the container...
bah, i shouldn't be thinking about stuff like that at 3:36am, I'll go to sleep now. Or I'll log on to dyso  |
|
Back to top |
|
 |
Jase
Mon 04/21/03 1:41am
|
i dont know... I just use Mojo's Tradeskil One..... |
|
|
 |
Marine436 Lamer

Joined: 26 Jan 2003 Posts: 1687
Level: 34
|
Posted: Mon Apr 21, 2003 2:25 pm Post subject: |
|
|
Destory them on exit and load on enter, But may i suggest you kill the items and the merchent, and reload the items and merchents...
I know a PW witch did away with the NWN merchents, due to the Lag and made there own chest system and table's _________________ PHEAR DA CORD ! |
|
Back to top |
|
 |
|