Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Using the new XML information  (Read 967 times)

Mephansteras

  • Bay Watcher
  • Forger of Civilizations
    • View Profile
Using the new XML information
« on: April 22, 2010, 05:34:26 pm »

So, I'm working on upgrading my DF Log parser script to the new version. Which doesn't take much by itself since not much has changed in the basic log files.

However, I've also been poking around in the new XML dumps you can do from the legends screen. It doesn't give a whole lot of information, but I think I'll be able to at least get some diplomatic history out of it so that we can easily see which nations have battled each other during the history of the world.

Has anyone done anything with the new XML yet? Anything I should know about before I dive into this?

Also, do people have any preferences on how the data is displayed?

My current script dumps out a file that gives info on civs like this:
Spoiler (click to show/hide)

I could probably put the diplomatic information in it under the population section.

Another idea I've been kicking around is an option to stick everything in HTML files. Nothing fancy, but I'd be able to make all of the civilizations hyperlinked to one another.

Thoughts?
Logged
Civilization Forge Mod v2.80: Adding in new races, equipment, animals, plants, metals, etc. Now with Alchemy and Libraries! Variety to spice up DF! (For DF 0.34.10)
Come play Mafia with us!
"Let us maintain our chill composure." - Toady One

Mephansteras

  • Bay Watcher
  • Forger of Civilizations
    • View Profile
Re: Using the new XML information
« Reply #1 on: April 22, 2010, 06:47:33 pm »

Looks like this will be doable!

Small example of what I've been able to pull out:

In the year 40, The Climactic Ink met The Unseen Musics on the field of battle!
In the year 45, The Ivy Of Will met The Climactic Ink on the field of battle!
In the year 328, The Hermitic Empires met The Mines Of Wiping on the field of battle!

I can't do quite as much as I'd have liked. Things like Peace treaties and such are mentioned but don't give any information on who made the offer or who accepted/refused it. But it's a start!
Logged
Civilization Forge Mod v2.80: Adding in new races, equipment, animals, plants, metals, etc. Now with Alchemy and Libraries! Variety to spice up DF! (For DF 0.34.10)
Come play Mafia with us!
"Let us maintain our chill composure." - Toady One

JoRo

  • Bay Watcher
    • View Profile
Re: Using the new XML information
« Reply #2 on: April 22, 2010, 07:09:18 pm »

I was hoping somebody would figure out something like this.  Looking forward to it!
Logged
You have been struck down.
The giant cave spider spits out your head.

Mephansteras

  • Bay Watcher
  • Forger of Civilizations
    • View Profile
Re: Using the new XML information
« Reply #3 on: April 22, 2010, 07:51:33 pm »

Ok, here is a partial dump from one of my worlds of everything really useful that I could glean and put into some sort of useful form. (apparently the full dump was too big)

Spoiler (click to show/hide)

Next I'll need to link this up with the log files and figure out how to display it all in a useful fashion. But I'm happy with what I've got so far! I'll finally be able to learn who destroyed various civilizations without slogging through endless legends screens.
Logged
Civilization Forge Mod v2.80: Adding in new races, equipment, animals, plants, metals, etc. Now with Alchemy and Libraries! Variety to spice up DF! (For DF 0.34.10)
Come play Mafia with us!
"Let us maintain our chill composure." - Toady One

Eduren

  • Bay Watcher
  • A new theme!
    • View Profile
Re: Using the new XML information
« Reply #4 on: April 22, 2010, 08:07:44 pm »

Woah. I didn't think Toady got around to this.

I'll have to check it out.
Logged
I don't know.  Duke wants me to stop playing mafia.
That's the sign of an abusive boyfriend, Toony... you don't have to listen to him.

Eduren

  • Bay Watcher
  • A new theme!
    • View Profile
Re: Using the new XML information
« Reply #5 on: May 19, 2010, 09:42:17 pm »

Necro!

So I decided to have a look at the xml dumps to see if work could be done there, but with zero real experience with this stuff and only textbook knowledge of Python, I had a real hard time.

The dumps themselves are pretty straightforward but I just could not figure out how to extract information from them.

But hot damn it would be fun to have linked legends generators.
Logged
I don't know.  Duke wants me to stop playing mafia.
That's the sign of an abusive boyfriend, Toony... you don't have to listen to him.

Mephansteras

  • Bay Watcher
  • Forger of Civilizations
    • View Profile
Re: Using the new XML information
« Reply #6 on: May 19, 2010, 11:46:26 pm »

Yeah, I haven't finished my work on this yet. Too busy with other stuff.

Sadly, a lot of info is missing. Even info on who destroyed a site. But I still think I can do something useful with it.
Logged
Civilization Forge Mod v2.80: Adding in new races, equipment, animals, plants, metals, etc. Now with Alchemy and Libraries! Variety to spice up DF! (For DF 0.34.10)
Come play Mafia with us!
"Let us maintain our chill composure." - Toady One