PDA

View Full Version : GServer + NPCServer updates


Admins
06-04-2004, 04:29 AM
Tomorrow all servers will be restarted. It will fix some bugs and improve the speed of gmaps.

Bug fixes:
- adding server flags by script works again (before it was blocked after some hours of uptime)
- the script command setplayerprop and setcharprop can only set valid color values (max 19), it was possible before to set more colors but that could possibly crash the client
- getnearestplayers(searchx,searchy,searchcondition) is sorting the player indices correctly (it's returning an array of player indices, starting with the closest player)
- a memory leak in the npcserver has been removed

Gmap optimizations:
To speed up the loading of gmaps, the parts of the gmaps are not loaded at startup anymore. They are only loaded when a player enters it or an npc accesses things on the map part. After a few minutes when all player left the map part and npcs don't do timeouts anymore, the map part will be removed from memory again. So the server can load gmaps faster and takes less memory, also you have less npcs on the gmap which should make some npc scripts faster.
The drawback is that npcs of those map parts (local npcs saved in the .nw file) are not loaded at startup, so when they do important things then there would be problems. To avoid that there are two new options for the gmap, which you need to specify in the .gmap file:

LOADFULLMAP
is loading all map parts at startup and is not removing them from memory, this would be the old behaviour

LOADATSTART
levelname, levelname, ...
levelname, levelname, ...
LOADATSTARTEND
is loading the specified levels at startup and is not removing them from memory, this way you can enforce the loading of important map parts without losing the advantages of the optimizations.

Normally you don't need to use the LOADFULLMAP flag, things should work quite smoothly without it since the map parts are loaded into memory as needed. Following npc functions/variables are enforcing the loading of map parts: onwall,onwall2,getareanpcs,testnpcs,putnpc2,npcsco unt,tiles[]

Loriel
06-04-2004, 04:32 AM
LOADFULLMAP, LOADATSTART, LOADATSTARTEND
Already got that :P (http://vanadium.web.its-toasted.org/graal/howto/gmap.txt)

LegendaryTsukasa
06-04-2004, 04:59 AM
Special ^^

matt8891
06-04-2004, 05:13 AM
Tomorrow all servers will be restarted. It will fix some bugs and improve the speed of gmaps.

Bug fixes:
- adding server flags by script works again (before it was blocked after some hours of uptime)
- the script command setplayerprop and setcharprop can only set valid color values (max 19), it was possible before to set more colors but that could possibly crash the client
- getnearestplayers(searchx,searchy,searchcondition) is sorting the player indices correctly (it's returning an array of player indices, starting with the closest player)
- a memory leak in the npcserver has been removed

Gmap optimizations:
To speed up the loading of gmaps, the parts of the gmaps are not loaded at startup anymore. They are only loaded when a player enters it or an npc accesses things on the map part. After a few minutes when all player left the map part and npcs don't do timeouts anymore, the map part will be removed from memory again. So the server can load gmaps faster and takes less memory, also you have less npcs on the gmap which should make some npc scripts faster.
The drawback is that npcs of those map parts (local npcs saved in the .nw file) are not loaded at startup, so when they do important things then there would be problems. To avoid that there are two new options for the gmap, which you need to specify in the .gmap file:

LOADFULLMAP
is loading all map parts at startup and is not removing them from memory, this would be the old behaviour

LOADATSTART
levelname, levelname, ...
levelname, levelname, ...
LOADATSTARTEND
is loading the specified levels at startup and is not removing them from memory, this way you can enforce the loading of important map parts without losing the advantages of the optimizations.

Normally you don't need to use the LOADFULLMAP flag, things should work quite smoothly without it since the map parts are loaded into memory as needed. Following npc functions/variables are enforcing the loading of map parts: onwall,onwall2,getareanpcs,testnpcs,putnpc2,npcsco unt,tiles[]

Nice work stefan :p

zokemon
06-04-2004, 09:46 AM
- a memory leak in the npcserver has been removed
OMG YES!
(About time, but thank you ^^)

Loriel
06-04-2004, 12:36 PM
Read the damn netiquette or something and stop quoting in full you have not even anything to add.

Curt1zzle
06-06-2004, 09:14 AM
OMG YES!
(About time, but thank you ^^)
Damn I second that, hehe. Thank you!