Page 1 of 1

Which format would be best?

Posted: Fri Oct 03, 2003 8:40 pm
by Amadeus
I am thinking of adding functionality to the tray icon that would allow for right click options to write out to a file various types of information that MQ "knows". In other words, it could write out everything about your character into a "character sheet", etc...

So...

Posted: Mon Oct 06, 2003 11:26 am
by Zeus
Considered XML? Easy to incorporate to html for browser viewing and with .NET is EXTREMELY easy to dump data into an xml file.

Posted: Mon Oct 06, 2003 11:29 am
by prh
Was about to say XML till i saw Zeus had already written it... Maybe incorporate a simple xslt file to convert the xml to html :)

Posted: Mon Oct 06, 2003 12:49 pm
by Amadeus
I don't know xml ;) ...it would be simple html though, surely there is a converter out there somewhere that would convert SIMPLE html to xml.

Posted: Mon Oct 06, 2003 2:15 pm
by MacroFiend
Amadeus, if you are interested in doing it XML, it is pretty simple to write the data out. The XSLT could be made by someone else (that is what transforms the "data" in to something pretty). If the concensus is for XML, I'd be willing to help you write the output routine to properly form the XML data. Someone suggested using the .NET XML writer which is a good idea but would change the minimum requirements to compile and run MQ to be VS.NET or newer, eliminating VS6/VC++6 as a platform.

XML is a superset of HMTL. An example of a possible way to represent character details below.

Code: Select all

<CharInfo>
  <Name>MacroFiend</Name>
  <MOBClass>NPC</MOBClass>
  <Stats>
    <AGI>75</AGI>
    <STR>110</STR>
    <DEX>75</STR>
    <WIS>90</WIS>
    <INT>75</INT>
  </Stats>
  <StatModifiers>
    <STR>45</STR>
    <AGI>-70</AGI> <!-- I'm very overweight -->
  </StatModifiers>

  <Inventory>
    <Bag num=0>
      <Slot num=0>
        <Item name="Rusty Dagger">
          <ItemID>2342</ItemID>
        </Item>
      </Slot>
     </Bag>
  </Inventory>
</CharInfo>

Posted: Tue Oct 07, 2003 5:48 pm
by blueninja
XML is nice for sure but it seems a bit overkill for this. Parsing a text file with a single variable=value pair on each line is generally a lot easier than XML. Keep it simple.