Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
kkerwin
Beginner


Joined: 19 Jun 2007
Posts: 23

PostPosted: Wed Jan 09, 2008 5:46 pm   

Map Database Format Question
 
Hi, I'm attempting to write a mapper to use with my Linux client. I took an old database from ZMud, and converted it straight to XML. I'm now parsing the XML files into my mapper, but I'm confused about a few of the database fields, and would like some explanation of the fields, please (I'm assuming that the fields were preserved through the conversion). Here are samples of the tables that I'm working with:

Code:

<ObjectTbl>
   <ObjectTblItem>
      <ObjId type='Number'><![CDATA[1]]></ObjId>
      <Name type='Text'><![CDATA[Serpentis Boulevard.]]></Name>
      <IDName type='Text'><![CDATA[]]></IDName>
      <Hint type='Text'><![CDATA[]]></Hint>
      <Desc type='Memo'><![CDATA[The buildings making up this part of Serpentis Boulevard are markedly different from the others that line this wide, paved avenue. Tall granite buildings border the road at this point - taverns and brothels being the main constituent. Around a small bend in the road to the east, you can make out the busy intersection known as the Crossroads. While to the west, the brothels and taverns common in this area, give way to elegant houses.]]></Desc>
      <KindID type='Number'><![CDATA[0]]></KindID>
      <IconID type='Number'><![CDATA[-1]]></IconID>
      <RefNum type='Number'><![CDATA[1]]></RefNum>
      <fKey type='Number'><![CDATA[0]]></fKey>
      <X type='Number'><![CDATA[240]]></X>
      <Y type='Number'><![CDATA[0]]></Y>
      <Z type='Number'><![CDATA[-1]]></Z>
      <Dx type='Number'><![CDATA[0]]></Dx>
      <Dy type='Number'><![CDATA[0]]></Dy>
      <ExitX type='Number'><![CDATA[0]]></ExitX>
      <ExitY type='Number'><![CDATA[0]]></ExitY>
      <ExitZ type='Number'><![CDATA[0]]></ExitZ>
      <Cost type='Number'><![CDATA[0]]></Cost>
      <Color type='Number'><![CDATA[10061943]]></Color> What format is this color in?
      <MetaID type='Number'><![CDATA[-1]]></MetaID>
      <StyleID type='Number'><![CDATA[-1]]></StyleID>
      <LabelDir type='Number'><![CDATA[11]]></LabelDir>
      <Enabled type='Boolean'><![CDATA[True]]></Enabled>
      <Script type='Memo'><![CDATA[]]></Script>
      <Param type='Text'><![CDATA[]]></Param>
      <UserStr type='Text'><![CDATA[]]></UserStr>
      <UserInt type='Number'><![CDATA[0]]></UserInt>
      <Content type='Memo'><![CDATA[]]></Content>
      <Flags type='Number'><![CDATA[0]]></Flags>
      <Deleted type='Boolean'><![CDATA[False]]></Deleted>
      <UserID type='Number'><![CDATA[0]]></UserID>
      <Modified type='DateTime'><![CDATA[4/7/2006 5:45:28 PM]]></Modified>
      <DateAdded type='DateTime'><![CDATA[4/7/2006 5:45:28 PM]]></DateAdded>
      <ServerID type='Number'><![CDATA[0]]></ServerID>
      <ZoneID type='Number'><![CDATA[1]]></ZoneID>
   </ObjectTblItem>
</ObjectTbl>

<ZoneTbl>
   <ZoneTblItem>
      <ZoneId type='Number'><![CDATA[49]]></ZoneId>
      <Name type='Text'><![CDATA[Granite Hills]]></Name>
      <ZoneFile type='Text'><![CDATA[]]></ZoneFile>
      <UserID type='Number'><![CDATA[0]]></UserID>
      <Modified type='DateTime'><![CDATA[4/13/2006 12:44:25 PM]]></Modified>
      <Script type='Memo'><![CDATA[]]></Script>
      <Desc type='Memo'><![CDATA[]]></Desc>
      <X type='Number'><![CDATA[-2880]]></X>
      <Y type='Number'><![CDATA[-3360]]></Y>
      <Z type='Number'><![CDATA[-1]]></Z>
      <Dx type='Number'><![CDATA[1400]]></Dx>
      <Dy type='Number'><![CDATA[0]]></Dy>
      <MinX type='Number'><![CDATA[-540]]></MinX>
      <MinY type='Number'><![CDATA[-5280]]></MinY>
      <MinZ type='Number'><![CDATA[-6]]></MinZ>
      <MaxX type='Number'><![CDATA[5700]]></MaxX>
      <MaxY type='Number'><![CDATA[3480]]></MaxY>
      <MaxZ type='Number'><![CDATA[0]]></MaxZ>
      <Background type='Text'><![CDATA[]]></Background>
      <XScale type='Number'><![CDATA[1]]></XScale>
      <YScale type='Number'><![CDATA[1]]></YScale>
      <XOffset type='Number'><![CDATA[-1260]]></XOffset>
      <YOffset type='Number'><![CDATA[-5640]]></YOffset>
      <Divisor type='Number'><![CDATA[1]]></Divisor>
      <Multiplier type='Number'><![CDATA[100]]></Multiplier>
      <DefSize type='Number'><![CDATA[120]]></DefSize>
      <DefSizeY type='Number'><![CDATA[120]]></DefSizeY>
      <Res type='Number'><![CDATA[0]]></Res>
      <Color type='Number'><![CDATA[536870911]]></Color>
      <GridXInc type='Number'><![CDATA[120]]></GridXInc>
      <GridYInc type='Number'><![CDATA[120]]></GridYInc>
      <GridXOff type='Number'><![CDATA[0]]></GridXOff>
      <GridYOff type='Number'><![CDATA[0]]></GridYOff>
      <GridCol type='Number'><![CDATA[0]]></GridCol>
      <Flags type='Number'><![CDATA[0]]></Flags>
      <Parent type='Number'><![CDATA[-1]]></Parent>
   </ZoneTblItem>
</ZoneTbl>


Thank you for your help.


Last edited by kkerwin on Wed Jan 09, 2008 6:07 pm; edited 1 time in total
Reply with quote
kkerwin
Beginner


Joined: 19 Jun 2007
Posts: 23

PostPosted: Wed Jan 09, 2008 5:49 pm   
 
Also, in the ObjectTbl, the X, Y, and Z fields -- are those relative to the entire world map, or just to the local zone map?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Jan 09, 2008 11:48 pm   
 
The plain X, Y, Z fields are relative to the entire world map. You can see this in action by creating a few rooms in a zone, then sending one to a second zone, then drawing a few more rooms in that second zone, then moving the last-drawn room back to the first zone.

Obviously, the ExitX, ExitY, and ExitZ fields are relative to the room they are attached to.
_________________
EDIT: I didn't like my old signature
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Jan 10, 2008 12:02 am   
 
The format for the color is directly how Windows uses it $BBGGRR. A value of -1 or $FFFFFFFF is used to signifiy no color defined, use default.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net