| Message |
Vnums on my MUD (and indeed basically all Dikurivatives) are quite simply identifiers for rooms (and object/mob prototypes) that happen to be numbers. There are no requirements of adjacency or contiguity. They are irrelevant to path finding. Vnums, as numbers, are allocated in chunks, so that you can say things like "vnums 100 through 300 belong to the 'elf village' area". (This is organizational, really, and doesn't have other consequences.)
Basically, vnums, like any identifier, are just convenient way of referring to things. They are particularly useful for rooms, which are guaranteed to be unique, referring to mobs/objects by vnum can be ambiguous as there can be several copies of a given entity.
Vnums as numbers are really not that great, because as you allocate them in chunks you eventually find that your chunk is too small, but then you can't grow it because you have adjacent chunks. You can't distribute the areas, because other people might have things with those numbers already. They've been historically implemented as signed short integers, meaning that you only have ~32k of them (which is really not that much). Also, I personally find vnums rather hard to remember. String identifiers are somewhat more robust to things changing internally; the name "darkhaven.townsquare" will always refer to a place even if that room is deleted and recreated somewhere else. With vnums, you have to be careful that you recreate things at the same number.
Most games in Dikuland do not expose vnums to the clients, so mappers don't use them. (I think it's generally considered to be extra information that the client can "cheat" with, by seeing for example that two rooms with the same description are in fact different rooms.) |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | top |
|