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 1816 times)

Mephansteras

  • Bay Watcher
  • Forger of Civilizations
    • View Profile
Legends as HTML
« on: May 29, 2008, 12:16:00 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.

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.

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

Draco18s

  • Bay Watcher
    • View Profile
Re: Legends as HTML
« Reply #1 on: May 29, 2008, 03:20:00 pm »

That'd be really neat, though I'm not sure how easy it'd be.  Every individual file would have to exist when you're looking at it, and I think these are exported one at a time, though I could be wrong.
Logged

Neonivek

  • Bay Watcher
    • View Profile
Re: Legends as HTML
« Reply #2 on: May 29, 2008, 03:26:00 pm »

It would be easier to read...

Im all for it as long as it doesn't take too long to set up.

Logged

Dasleah

  • Bay Watcher
    • View Profile
Re: Legends as HTML
« Reply #3 on: May 29, 2008, 05:35:00 pm »

I'm for it. I shouldn't imagine that it would be too difficult to do - simply append the current Legends output with HTML tags and rename the file from .txt to .html - shouldn't be too much hassle.

Plus, it means it'd be far easier to spread the 'omg-they-actually-put-that-in-a-game?!' appeal that DF has, because it'd be easy to put such things up on the web to impress the hell out of everyone.

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.

Tahin

  • Bay Watcher
    • View Profile
Re: Legends as HTML
« Reply #4 on: May 30, 2008, 12:00:00 am »

I like this idea. Shouldn't be too difficult to do, and would fit in nicely with the presentation arc.
Logged

Neonivek

  • Bay Watcher
    • View Profile
Re: Legends as HTML
« Reply #5 on: May 30, 2008, 12:03:00 am »

But isn't the Presentation Arc one of the arcs the furthest away?
Logged

Karlito

  • Bay Watcher
    • View Profile
Re: Legends as HTML
« Reply #6 on: May 30, 2008, 12:18:00 am »

Its up next.
Logged
This sentence contains exactly threee erors.

Mohreb el Yasim

  • Bay Watcher
  • ♫♪♫♫♪♫♪♪♫♪
    • View Profile
Re: Legends as HTML
« Reply #7 on: May 30, 2008, 08:47:00 am »

i think it is not hard to do and it is not only Toady how could make it ... i mean if you know how is the legends txt at the moment it is easy to make a translator to make it html like ... we should just decide how should it look like and it is easy to do ...
Logged
Mohreb el Yasim


GENERATION 24:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experime

umiman

  • Bay Watcher
  • Voice Fetishist
    • View Profile
Re: Legends as HTML
« Reply #8 on: May 30, 2008, 08:54:00 am »

Mohreb: While my understanding of HTML is on the same level as this box of Excel breathmints on the table, I think the OP is referring more to the ability to link the names of all the characters involved, much like Wikipedia, rather than just simple formatting.

That's a bit more difficult methinks, since it would involve a LOT of pages... or so my silly amount of HTML knowledge tells me.

I support the idea though. The legends screen is hard to browse through currently without getting completely lost.

mickel

  • Bay Watcher
    • View Profile
Re: Legends as HTML
« Reply #9 on: May 30, 2008, 09:20:00 am »

It could have pages dynamically generated from a relational database of everything that has happened. Another great advantage of hypertext is the hyperlinks. This and that artifact was stolen by Orgud the Tonguescrape? Who was that? Just click the link and find out.
Logged
I>What happens in Nefekvucar stays in Nefekvucar.

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: Legends as HTML
« Reply #10 on: May 31, 2008, 08:00:00 am »

I think I can do the HTML, but it might not be very practical in a standard-sized world, if you are talking about creating files you can view out of play.  If there are a million historical events, each with a description say 60 characters long, then you'd have a minimum of 60 megs being dumped, and they occur in more than one place.  Right now it generates the text when you click on the object you're interested in, and it would have to do that a hundred thousand times if you have that many historical figures.  In a world where you haven't discovered very many things, this isn't really a problem, but if I add an init option to have the entire thing revealed (so you can play around with the new world gen), I'm not sure this could work there.

Of course, the main idea was to just allow you to click on names in legends mode and make the text viewer more user friendly.  If that's more what you mean, that'll happen eventually.

Logged
The Toad, a Natural Resource:  Preserve yours today!

Mephansteras

  • Bay Watcher
  • Forger of Civilizations
    • View Profile
Re: Legends as HTML
« Reply #11 on: May 31, 2008, 10:53:00 am »

Yeah, my thought was basically to have all the links and whatnot generated when you looked at the Legends listing in-game, which sounds like it might be more feasible. Although I didn't know how it all worked exactly, so I left the idea pretty open-ended as far as implementation goes.

Thanks for the response, Toady!

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

Ixoran

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

This is slightly off-topic, but might XML be easier to use? All you'd really have to do is wrap everything in tags, and the link all names/ events. (Or just make the name itself a tag.

For example the events:
In 197, Olng” Reinedmonstrous happened upon Thaynkin.
In 197, Olng” struck down Thaynkin in Granitemaligned.
In 250, Olng” Reinedmonstrous happened upon Srungin.

In 197, Olng” Reinedmonstrous happened upon Thaynkin.
Would get the tags:

code:
 <Year>
<Olng> <Thaynkin> <Stuck><Death>

etc...

And then a simple snazzy xml parser and searcher.
My xml is quite rusty, but i think it could be way easier than html, and could all be genererated in one xml file.
Size would still be a bit of an issue though.
Thoughts?
EDIT: So a search for Olng" or Olng” Reinedmonstrous would yeild:
In 197, Olng” Reinedmonstrous happened upon Thaynkin.
In 197, Olng” struck down Thaynkin in Granitemaligned.
In 250, Olng” Reinedmonstrous happened upon Srungin.
Thaynkin would yield:
In 197, Olng” Reinedmonstrous happened upon Thaynkin.
In 197, Olng” struck down Thaynkin in Granitemaligned.

[ June 02, 2008: Message edited by: Ixoran ]
Edit again:
Stepmania uses an XML catalogue to track machine statistics, it creates at least 10-20 tags for each song, and I have ~1,200 songs, and it's XML dump is only 1960kb, so as long as the tags don't get too crazy... It's still be a pretty big file I imagine. Maybe it could be an init option for people without a lot of space?

[ June 02, 2008: Message edited by: Ixoran ]

Logged

Ixoran

  • Bay Watcher
    • View Profile
Re: Legends as HTML
« Reply #13 on: June 02, 2008, 03:11:00 pm »

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.
Logged

mickel

  • Bay Watcher
    • View Profile
Re: Legends as HTML
« Reply #14 on: June 02, 2008, 03:49:00 pm »

Good idea. We have a whole lot of clever programmers in the community that could do a lot of interesting stuff with the history data as a text file. Toady might not have to spend any time on the problem at all.  :)
Logged
I>What happens in Nefekvucar stays in Nefekvucar.
Pages: [1] 2