![]() |
New NPC-option: newnpcstorage=true
We have added a new option for optimized storage of npcs (putnpcs2).
By default those npcs are all stored in the same folder and loaded at startup. The problem is that some servers started to use huge amounts of those npcs or storing tons of data in them. That makes the startup take a lot of time, and the server takes a lot of memory. But many of those npcs don't need to be loaded at startup and don't need to sit in the memory all the time. They are like local npcs, but want to store additional data. For that there is now a new option: Server-options: newnpcstorage=true NPC-variable: this.savelocally = true; If the new npc storage is enabled, and you set the flag savelocally = true, then the npc is saved into a subfolder (uses the level name as folder name) and is only loaded when that level is loaded (when a player enters the room). On N-Pulse that reduced the memory from 300 MByte to 35 Mbyte, on Unholy Nation from 400 MByte to 110 MByte, so it should be less laggy now. Important things to keep care of: - by default npcs don't use that storage system, you need to set savelocally = true, e.g. like that: PHP Code:
PHP Code:
- to actually benefit of the lower memory usage you eventually need to restart the npcserver again, you will see a lower number of dbnpcs in /stats then. - if you set savelocally = true; then the npc is not loaded before a player enters the level, and the npc is also removed from memory when there is no player for a few minutes, so don't use it for npcs which you want to access from everywhere and where you want to have the script running forever - if you want to see the npcs in the filebrowser then add "r npcs/*/*" to your rights - this thing will also be used by the future online level editor to store npcs - it is currently only enabled for Unholy Nation and N-Pulse, but will also be available for the other servers soon (or on request) |
Sounds great. Maybe you could enable it on Rudora sometime. :)
|
Wicked!
|
Would like this enabled for Ol' West when you have time, Stefan.
|
Ok enabled on Rudora and Ol-West.
I've also uploaded the new npcserver to all machines, to watch the new npcs folder on other servers you will need a complete server-restart though (to support folders like "npcs/mylevel.nw/") |
| All times are GMT +2. The time now is 12:55 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.