PDA

View Full Version : Format of the spawnlog.txt



Nobody
05-15-2002, 02:41 PM
I'm trying to optimized my spawnlog parsing in prep for getting that 2.2 gig file. One thing I'm looking at is there are multiple lines for each "mob". The main difference is the first field which is generally a +, -, x or z.

Is there a key somewhere that states what each means? If I can cut down the data earlier I can handle it alot easier and faster. I didn't see anything in the source or documentation I've dug through and I'm not proficient in c/c++, just perl.

Nobody
05-15-2002, 02:59 PM
Double post.

Nobody
05-15-2002, 03:05 PM
Ok, just found logger.cpp and some relevant lines:

SpawnLogger::logZoneSpawn(const spawnStruct *spawn)
{
logSpawnInfo("z",spawn->name,spawn->spawnId,spawn->level,
}

void
SpawnLogger::logNewSpawn(const spawnStruct *spawn)
{
logSpawnInfo("+",spawn->name,spawn->spawnId,spawn->level,
}

void
SpawnLogger::logKilledSpawn(const Spawn *spawn, const char *killedBy, int kid)
{
logSpawnInfo("x",(const char *) spawn->rawName(),spawn->id(), }

void
SpawnLogger::logDeleteSpawn(const Spawn *spawn)
{
logSpawnInfo("-",(const char *)spawn->rawName(),spawn->id(),spawn->level(),
}


It appears that z and + are the ones I need. My question though...

Is every mob in the zone going to have an entry for z or +? If I can grep out just lines starting with "z:" that cuts down the redundant garbage alot.

Cryonic
05-15-2002, 03:06 PM
+ means added to zone
z I think means added during zone in
x I think means killed
- means removed from zone

Nobody
05-15-2002, 05:02 PM
Thats what I was thinking. I'm currently keying off z and +, but if z covers 100% of the mobs in the zone I can save alot of memory by only getting z's...

Cryonic
05-15-2002, 05:04 PM
No, z only covers mobs that are present at the time you zone in. Other mobs still spawn after that (or else the zones would get depopulated pretty quickly).