Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: RAW format  (Read 1809 times)

Cobbler89

  • Bay Watcher
  • Cobbler cancels celebrate Caesar: mending soles
    • View Profile
RAW format
« on: December 25, 2012, 01:47:41 pm »

A question: is the actual parsing of Toady's raw files just something he came up with, or is there some library out there he's using or building off of?

I have a utility I've been working on (er, was working on earlier this year...) that needs something similar, and I just read a thread here about making a better raw editting tool (better inasmuch as it translates the options the raws can have into a user interface form instead of just helping you browse and see syntax while you edit the text yourself)...

...And I thought, if this raw thing happened to have a certain well-defined way to parse it, I'm sure that would help people like us handle them -- and build our own configurations using the same syntax, so DF modders who aren't as used to XML as they are to the raws will find our configurations easy to work with. In either case it would make it easier for us to make the parsing safe and correct.
Logged
Quote from: Mr S
You've struck embedded links. Praise the data miners!
Quote from: Strong Bad
The magma is seeping under the door.

Quote from: offspring
Quote from: Cobbler89
I have an idea. Let's play a game where you win by being as quiet as possible.
I get it, it's one of those games where losing is fun!
I spend most of your dimension's time outside of your dimension. I can't guarantee followup or followthrough on any comments, ideas, or plans.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: RAW format
« Reply #1 on: December 25, 2012, 01:50:24 pm »

It is selfmade. The actual DF code is C++.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: RAW format
« Reply #2 on: December 25, 2012, 02:21:49 pm »

The raws are definitely easily parsable. DF has to parse them, after all.

MiamiBryce

  • Bay Watcher
    • View Profile
Re: RAW format
« Reply #3 on: December 25, 2012, 03:23:03 pm »

Wewt!  I think I won a convert!

What is your language of choice?  I know we're up to at least three .Net programmers, we probably have java programmers too.

I think we could all put our heads together and develop a pseudo-code that can be translated into whatever language we want to use and would always work the same.  Hmmm, actually if I remember correctly, there was already an existing psuedocode out there...somewhere...but then again I'm often wrong.

Cheers,
Logged

lxnt

  • Bay Watcher
    • View Profile
    • pm:full_graphics
Re: RAW format
« Reply #4 on: December 25, 2012, 06:09:56 pm »

Here : https://github.com/lxnt/fgtestbed/blob/master/lib/python/fgt/raw.py

Among other things, a df raws parser that parses most interesting raws there are.