I've been planning a new MOB file format (I already switched from the flat-data style, to a tagged-ddata style). I'm looking at an object-oriented/container -data style database format. My current plan for the new format is this: .- Type Identifier (optional? Necessary for mixed-type DB/streams) | MOB <#vnum> "<namelist>" { short = <short>~ long = <long>~ desc = <desc>~ race = <race>; sex = <sex>; level = <#level> position = <pos>:<dpos>; // Debatable points { str = <#str>; int = <#int>; agi = <#agi>; per = <#per>; con = <#con>; }; clan = <#vnum>; triggers { <comma-seperated # list> }; hp = <#numDice>d<#sizeDice>+<#bonus>; dam = <#numDice>d<#sizeDice>+<#damroll>; hitroll = <#hitroll>; armor = <#armor> attack = <attack>; dodge = <#dodge>; flags { <comma-seperated list> }; affects { <comma-seperated list> }; opinion ["fear"|"hate"|"like"|"trust"|"distrust"|"ignorant"] = { /* Multiple instances allowed */ race { <comma-seperated list> }; sex { <comma-seperated list> }; vnum = <#vnum>; }; prog { <mprog parse-out> }; } The parsing would allow for unlimited white-space, and no white space required (with the exception of mobprog parse out - which is insignificant, because I'm in the process of phasing out mobprogs by slowly making them stop working, since my recommendation to "convert mobprogs to scripts" was pretty much ignored by my builders). I know I could eliminate = and ; by using a minimum-1-white-space rule, and its also something I'm considering. The purpose for this format is at least two-fold: a more readily expandable and easier to work with database, and a streamable mob format, for storing special streamable mobs in files for run-time loading (non-prototyped, RNum -1, true NPCs). Plan also involves actually parsing \r\n's in descriptions into a special escape-character, so there would be no need to worry about \n's when reading in the description. The parser would actually look for \ escape sequences in the string being read and replace them with appropriate character(s), thus: \n = \r\n \r = (nothing) \~ = ~ (builders would love this ;-) \\ = \ ---- On a simliar topic, I've also been debating about going back to flat-data style mobfiles. As the MUD expands, more time would be spent parsing/saving, and the overall effect would be detrimental speedwise - a key-data style database is far slower than a flat-data style database, but an object-oriented/container style database is several magnitudes slower than that! ---- Having a 4000 room area (yes, thats a single worldfile - 1.8 megs!), that is just "repetetive" data, takes a long time to read in, so I'm considering taking the code I used to generate the worldfile itself, and changing it to build the zone at runtime (its basically a 20x20x10 grid of space that wraps completely, with room name being the [##-##-##]) Anyone else used a run-time/boot-time generator for rooms, perhaps for a gridded forest or large amount of land? - Chris Jacobson +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST