Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: Legends as HTML  (Read 1814 times)

Dasleah

  • Bay Watcher
    • View Profile
Re: Legends as HTML
« Reply #15 on: June 02, 2008, 04:58:00 pm »

quote:
Originally posted by Ixoran:
<STRONG>Sorry for the double post, but it's a seperate idea.
Toady, if you do enable an init option to reveal all the history of a world, could you make it so that it can dump all that history to a text file if asked?
That could let us play with the data a lot, and I've got myself interested an making an XML parser to sort and link all the data. Or we could just ctrl+F through the text.</STRONG>

Quoted For Truth. I mean, it's nice and interesting and all to wander around aimlessly in Adventure Mode discovering everything, but just like some people only play DF for Adventure, some of us play it only for Fortress. A way to 'dump' the history of a world into a number of text files would be wonderful.

Logged
Pokethulhu Orange: UPDATE 25
The Roguelike Development Megathread.

As well, all the posts i've seen you make are flame posts, barely if at all constructive.

Zemat

  • Bay Watcher
  • Zemat, programmer, cancels coding: Too insane.
    • View Profile
Re: Legends as HTML
« Reply #16 on: July 14, 2008, 02:21:53 pm »

Just a thought while reading the legends posted today. It'd be really cool to have an HTML version of the legends to browse. That way you could have links to the different people and whatnot referenced in the legend, so as you read the story of one Megabeast you could go look up some adventurer who fought them and managed to escape. Or look up the ones who killed them, or died to them.<P>Not sure how hard that'd be to actually set up, but it'd be a good way to browse through the history of the world.

Hey, after testing the legends in the new version I would like to QFT this suggestion. If the Fortress Mode already has this on the relationships page I don't see how difficult would be to implement something similar in the legends page that would at least turn into links the related sites and entities for further reference.
Logged
You too can help bring to life the RogueLife Project!

AltF8

  • Bay Watcher
    • View Profile
    • PeriodicGames
Re: Legends as HTML
« Reply #17 on: July 14, 2008, 02:29:58 pm »

I'm not terribly familiar with Legends mode, but this piqued my interest. Can these Legends be dumped to a straight text file, with some consistent formatting? If so, building an app that would parse that file and create a relational DB with associated browsing pages wouldn't be too hard, I wouldn't think.
Logged
Goblin pricking does not sound like it could pay well enough.

Andir

  • Bay Watcher
    • View Profile
Re: Legends as HTML
« Reply #18 on: July 14, 2008, 04:21:12 pm »


When you work on the presentation arc, maybe you could build in a web server to serve the legends pages from DF.  Instead of dumping them to text, you just return it as HTML.  I'd help you out since I've done several home grown web servers for different things but two things keep me from volunteering my time.  1: No source interface  2:  I always volunteer to help with things in my spare time and I end up not having any spare time.
Logged
"Having faith" that the bridge will not fall, implies that the bridge itself isn't that trustworthy. It's not that different from "I pray that the bridge will hold my weight."

Granite26

  • Bay Watcher
    • View Profile
Re: Legends as HTML
« Reply #19 on: July 14, 2008, 05:34:44 pm »

I love this idea... It would be a big boon to the legends mode players (A.K.A. the people who don't play but read legends for the stories)

Is 60 megs really that big anymore?  There are 1 terrabyte harddrives out right now.  Say an average world is 200 megs.  That's .2% of the hard drive space.

Although it seems like an XML flatfile with a light ASP/.net front end would be the way to go.  The DF code could continue to use the XML flat file 'in game' while the front end could generate a live click to browse interface.  Nothing would be duplicated.  As a side note, people could also tweak their legends ;) (as an unsupported savescum level type thing)

Anyway, if the dump is XML I'm sure community people would pick up the interface.  There's enough students out there in need of a school project.

Andir

  • Bay Watcher
    • View Profile
Re: Legends as HTML
« Reply #20 on: July 14, 2008, 06:30:37 pm »

I love this idea... It would be a big boon to the legends mode players (A.K.A. the people who don't play but read legends for the stories)

Is 60 megs really that big anymore?  There are 1 terrabyte harddrives out right now.  Say an average world is 200 megs.  That's .2% of the hard drive space.

Although it seems like an XML flatfile with a light ASP/.net front end would be the way to go.  The DF code could continue to use the XML flat file 'in game' while the front end could generate a live click to browse interface.  Nothing would be duplicated.  As a side note, people could also tweak their legends ;) (as an unsupported savescum level type thing)

Anyway, if the dump is XML I'm sure community people would pick up the interface.  There's enough students out there in need of a school project.
I'd actually vote for JSON over XML if he went to a data dump route.  It's quicker to parse, smaller, and works with everything... There's even free code on JSON.org to use it in C/C++ or whatever Toady's using here.  Also, you don't need a heavyweight ASP server to do any of this.  It can all be done with simple HTTP client communication.
Logged
"Having faith" that the bridge will not fall, implies that the bridge itself isn't that trustworthy. It's not that different from "I pray that the bridge will hold my weight."

Granite26

  • Bay Watcher
    • View Profile
Re: Legends as HTML
« Reply #21 on: July 15, 2009, 02:54:46 pm »

I have added this to the Eternal Suggestions board here: as Create XML dump of Legends

This express goal of the voting is:

To allow the player to create a filedump of all/known legends in a single parsed file that could be either read raw or a mod written to parse the information for.

Ideally, the format would be extremely similar to what DF uses already, with a preface of message texts (I.E. the long data, so the parser could construct the messages as they are loaded).
Something like :
Code: [Select]
<eventtypes>
<eventtype no=23423>In YEAR, TARGET1 became a LISTJOBSVAR</eventtype
<events>
<lists>
<list = jobs>
<job>Butcher</job>
<job>Baker</job>
<job>Candlestickmaker</job>
</list>
</lists>
<event no=345434><year = 1220></year><target no=1>234234</target><eventtype no=23423 var=3></eventtype></event>
</events>
<units>
<unit no= 234234> <Name>Urist</name></unit>
</units>

and the parser would read event number 345434 and output "In 1220, Urist became a Candlestickmaker"
A good parser would be able to search for all instances of a number in all tags, or just target tags, or whatever.

Yes, I know the example is crap, but it's the concept that's important.  Just close your eyes and imagine a program that creates simple HTML files for you to click through your legends at ease.
Pages: 1 [2]