Wesnoth Bestiary

General feedback and discussion of the game.

Moderator: Forum Moderators

Post Reply
User avatar
pauxlo
Posts: 1047
Joined: September 19th, 2006, 8:54 pm

Re: Wesnoth Bestiary

Post by pauxlo »

ancestral wrote:Now you might say “why not make a php template and just load the raw data?” and you’d be correct. But, even better, I think we can take this a step further.

The goal here is to have pages load dynamically and have JavaScript change the content of the page (for example, switching from "Vampire Bat" to "Skeleton Archer,” after clicking on the link, the page will change the monster’s name, statistics and pictures with that of the new unit). This has two benefits (and assuming I’m not overlooking something grievous). Firstly, it’s faster for the user, as s/he doesn’t have to wait for the whole page to load over again when clicking to view a new unit’s page. Secondly, it should (hopefully) take a small burden off of the server, as most of the commands will be done on the user’s computer and it will only have to serve up pieces of information instead of entire pages.
I don't know about the techniques to use here, but please ensure that it keeps possible to bookmark/link any individual unit.
User avatar
Icarusvogel
Posts: 177
Joined: March 16th, 2010, 1:55 pm

Re: Wesnoth Bestiary

Post by Icarusvogel »

This ideais truly great. I love the work that has been done till now.
You are a Necromancer - Intelligent and powerful, yet reclusive and misunderstood, you dabble in dark arts that everyone else can only dream of.
User avatar
ancestral
Inactive Developer
Posts: 1108
Joined: August 1st, 2006, 5:29 am
Location: Motion City

Re: Wesnoth Bestiary

Post by ancestral »

pauxlo wrote:I don't know about the techniques to use here, but please ensure that it keeps possible to bookmark/link any individual unit.
Absolutely, this would be important!

Okay, I’ve got a minor update.
  • Only the headers will display in Palatino and not the rest of the text since people are still having rendering issues (Booooo!)
  • Resistances have been updated to better take into account impassable terrain
  • Description text is no longer italicized
Wesnoth BestiaryPREVIEW IT HERE )
Unit tree and stat browser
CanvasPREVIEW IT HERE )
Exp. map viewer
User avatar
Zarel
Posts: 700
Joined: July 15th, 2009, 8:24 am
Location: Minnesota, USA
Contact:

Re: Wesnoth Bestiary

Post by Zarel »

w.r.t. fonts, try Georgia? It's one of the Web Core Fonts (which means you should have a fairly well-hinted version with you), and it looks fairly similar to whatever font you're using.
Proud creator of the :whistle: smiley | I prefer the CC-0 license.
User avatar
King_Elendil
Posts: 250
Joined: February 26th, 2010, 4:54 am

Re: Wesnoth Bestiary

Post by King_Elendil »

For the male/female variation portraits, would something like this be possible :hmm: ?
I used the font Georgia for this pic.
I used the font Georgia for this pic.
Bestiary.png (65.08 KiB) Viewed 4093 times
I'm finally admitting that this will be a very long (if not permanent) Wesbreak. Thank y'all for the great times, and may Wesnoth rise to become one of the most popular games on the planet.
User avatar
ancestral
Inactive Developer
Posts: 1108
Joined: August 1st, 2006, 5:29 am
Location: Motion City

Re: Wesnoth Bestiary

Post by ancestral »

King_Elendil wrote:For the male/female variation portraits, would something like this be possible :hmm: ?
Yes, I could do that. However, the Dwarven Fighter has two male portraits, and the Goblin Spearman has his share, too.
Zarel wrote:w.r.t. fonts, try Georgia? It's one of the Web Core Fonts (which means you should have a fairly well-hinted version with you), and it looks fairly similar to whatever font you're using.
Although it may be well hinted, and although Georgia isn’t a bad font, it does have old style numbers which I think doesn’t work quite as well when displaying percentages.

I think, unfortunately, I’ll be using Times.
Wesnoth BestiaryPREVIEW IT HERE )
Unit tree and stat browser
CanvasPREVIEW IT HERE )
Exp. map viewer
User avatar
King_Elendil
Posts: 250
Joined: February 26th, 2010, 4:54 am

Re: Wesnoth Bestiary

Post by King_Elendil »

I used Times New Romans font for this pic, because of the numbers. Would something like this work?
anotherBestiary.png
anotherBestiary.png (58.78 KiB) Viewed 4087 times
By the way, I love what you have done so far! :D
I'm finally admitting that this will be a very long (if not permanent) Wesbreak. Thank y'all for the great times, and may Wesnoth rise to become one of the most popular games on the planet.
User avatar
Zarel
Posts: 700
Joined: July 15th, 2009, 8:24 am
Location: Minnesota, USA
Contact:

Re: Wesnoth Bestiary

Post by Zarel »

ancestral wrote:w.r.t. fonts, try Georgia? It's one of the Web Core Fonts (which means you should have a fairly well-hinted version with you), and it looks fairly similar to whatever font you're using.
Although it may be well hinted, and although Georgia isn’t a bad font, it does have old style numbers which I think doesn’t work quite as well when displaying percentages.[/quote]
I dunno, I still think it could work. Give it a try?
Proud creator of the :whistle: smiley | I prefer the CC-0 license.
Sangel
Moderator Emeritus
Posts: 2232
Joined: March 26th, 2004, 10:58 pm
Location: New York, New York

Re: Wesnoth Bestiary

Post by Sangel »

ancestral wrote:
King_Elendil wrote:For the male/female variation portraits, would something like this be possible :hmm: ?
Yes, I could do that. However, the Dwarven Fighter has two male portraits, and the Goblin Spearman has his share, too.
I'm generally of the opinion that adding "Male" or "Female" in front of the portrait numbers is unnecessary. They're easy enough to flip through, after all.
"Pure logic is the ruin of the spirit." - Antoine de Saint-Exupéry
User avatar
thespaceinvader
Retired Art Director
Posts: 8414
Joined: August 25th, 2007, 10:12 am
Location: Oxford, UK
Contact:

Re: Wesnoth Bestiary

Post by thespaceinvader »

If the variants are male/female, like the elves and mages, use male/female. If they are simple variants, like the Dwarf Fighter and Goblin Spearman, use numbers. It makes most sense this way.

I don't think there are many current units which have large numbers of variants, apart from the orcish grunt line.
http://thespaceinvader.co.uk | http://thespaceinvader.deviantart.com
Back to work. Current projects: Catching up on commits. Picking Meridia back up. Sprite animations, many and varied.
User avatar
ancestral
Inactive Developer
Posts: 1108
Joined: August 1st, 2006, 5:29 am
Location: Motion City

Re: Wesnoth Bestiary

Post by ancestral »

I'm still not convinced that male/female/1/2/3 is even the best approach, and I'm leaning towards some sort of symbols or shapes to represent the chosen picture. From a functional standpoint, it really doesn't matter what picture you're seeing — in fact, it's more like a slideshow in that it's just giving you different views into who the unit is.

Phase Two needs to start.

Phase Two is actually two parts:
  • Writing Perl code to extract the pages from the unit files into a JSON formatted file(s)
  • Writing JavaScript code to link the pages together
You can run wmlparser by supplying the path to the data folder and the path to the file. For example:

Code: Select all

python ~/trunk/data/tools/wesnoth/wmlparser.py -p ~/trunk/ -j ~/trunk/data/core/units/elves/Archer.cfg > ~/Desktop/elves.Archer.json
This will output the information to a file on the desktop called "elves.Archer.json". -j is a recent addition — outputting the information to JSON format. Thus, all that is needed is a small script to run wmlparser on all the unit files and units.cfg, store the contents, and move on to part 2.

Phase Three is integrating and working on the unit tree. (I think how this will happen is via a tab interface. We'll see.)

Also I have a solution for the defenses and movement, which is creating a split vertical table. It'll look a little better than it does currently. :)
Wesnoth BestiaryPREVIEW IT HERE )
Unit tree and stat browser
CanvasPREVIEW IT HERE )
Exp. map viewer
AI
Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: Wesnoth Bestiary

Post by AI »

Unfortunately, this line isn't quite sufficient:

Code: Select all

python ~/trunk/data/tools/wesnoth/wmlparser.py -p ~/trunk/ -j ~/trunk/data/core/units/elves/Archer.cfg > ~/Desktop/elves.Archer.json
Try it on the marksman and you'll find it doesn't have that weapon special. That's because data/core/macros/abilities.cfg isn't parsed.
You can run it like this:

Code: Select all

python ~/trunk/data/tools/wesnoth/wmlparser.py -p ~/trunk/data -j ~/trunk/data/core/_main.cfg > ~/Desktop/everything.json
You'll get *everything* in core that way, all on a single, very long line. If you want the JSON to be formatted differently, I can change wmlparser's output. Splitting it into one file per unit however, is beyond the scope of wmlparser, though it shouldn't be difficult to write a separate script to achieve that.
User avatar
Icarusvogel
Posts: 177
Joined: March 16th, 2010, 1:55 pm

Re: Wesnoth Bestiary

Post by Icarusvogel »

Maybe this design would be better:

Male Female

(portrait 1) (portrait 1)

(portrait 2) (portrait 2)

(portrait 3)

In a slightly table-like design.

EDIT: Oh no, it doesn't show well. I'll try again with a picture example.
Last edited by Icarusvogel on April 14th, 2010, 4:30 pm, edited 1 time in total.
You are a Necromancer - Intelligent and powerful, yet reclusive and misunderstood, you dabble in dark arts that everyone else can only dream of.
Yoyobuae
Posts: 408
Joined: July 24th, 2009, 8:38 pm

Re: Wesnoth Bestiary

Post by Yoyobuae »

pauxlo wrote:
ancestral wrote:Now you might say “why not make a php template and just load the raw data?” and you’d be correct. But, even better, I think we can take this a step further.

The goal here is to have pages load dynamically and have JavaScript change the content of the page (for example, switching from "Vampire Bat" to "Skeleton Archer,” after clicking on the link, the page will change the monster’s name, statistics and pictures with that of the new unit). This has two benefits (and assuming I’m not overlooking something grievous). Firstly, it’s faster for the user, as s/he doesn’t have to wait for the whole page to load over again when clicking to view a new unit’s page. Secondly, it should (hopefully) take a small burden off of the server, as most of the commands will be done on the user’s computer and it will only have to serve up pieces of information instead of entire pages.
I don't know about the techniques to use here, but please ensure that it keeps possible to bookmark/link any individual unit.
Also, I've heard about (and occasionally experienced myself) issues with dynamic web content using javascript (see AJAX) about error handling. It's all too easy for Javascript to fail silently and completely mess up a page, without any errors being reported to the user. To him it seems like the page is broken altogether.
User avatar
Elvish_Conquerer
Posts: 51
Joined: July 16th, 2009, 3:23 pm
Location: Canada

Re: Wesnoth Bestiary

Post by Elvish_Conquerer »

Great Idea. Keep up the good work, Can't wait to see it when it's finished. It Looks a lot better than the trunk (no offence to any of the hardworking developers who made the trunk). Thanks a lot!


Elvish Conquerer
"Not only that! He made the AI so smart that, it changes the RNG without affecting statistical analysis! So even if you calculate the probability of getting what you got, it seems reasonable, even though it isn't. We've uncovered a massive conspiracy!"
Post Reply