Wesnoth Bestiary
Moderator: Forum Moderators
Re: Wesnoth Bestiary
I don't know about the techniques to use here, but please ensure that it keeps possible to bookmark/link any individual unit.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.
- Icarusvogel
- Posts: 177
- Joined: March 16th, 2010, 1:55 pm
Re: Wesnoth Bestiary
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.
Re: Wesnoth Bestiary
Absolutely, this would be important!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.
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 Bestiary ( PREVIEW IT HERE )
Unit tree and stat browser
Canvas ( PREVIEW IT HERE )
Exp. map viewer
Unit tree and stat browser
Canvas ( PREVIEW IT HERE )
Exp. map viewer
Re: Wesnoth Bestiary
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.
- King_Elendil
- Posts: 250
- Joined: February 26th, 2010, 4:54 am
Re: Wesnoth Bestiary
For the male/female variation portraits, would something like this be possible ?
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.
Re: Wesnoth Bestiary
Yes, I could do that. However, the Dwarven Fighter has two male portraits, and the Goblin Spearman has his share, too.King_Elendil wrote:For the male/female variation portraits, would something like this be possible ?
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.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.
I think, unfortunately, I’ll be using Times.
Wesnoth Bestiary ( PREVIEW IT HERE )
Unit tree and stat browser
Canvas ( PREVIEW IT HERE )
Exp. map viewer
Unit tree and stat browser
Canvas ( PREVIEW IT HERE )
Exp. map viewer
- King_Elendil
- Posts: 250
- Joined: February 26th, 2010, 4:54 am
Re: Wesnoth Bestiary
I used Times New Romans font for this pic, because of the numbers. Would something like this work?
By the way, I love what you have done so far! 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.
Re: Wesnoth Bestiary
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]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.
I dunno, I still think it could work. Give it a try?
Proud creator of the :whistle: smiley | I prefer the CC-0 license.
-
- Moderator Emeritus
- Posts: 2232
- Joined: March 26th, 2004, 10:58 pm
- Location: New York, New York
Re: Wesnoth Bestiary
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.ancestral wrote:Yes, I could do that. However, the Dwarven Fighter has two male portraits, and the Goblin Spearman has his share, too.King_Elendil wrote:For the male/female variation portraits, would something like this be possible ?
"Pure logic is the ruin of the spirit." - Antoine de Saint-Exupéry
- thespaceinvader
- Retired Art Director
- Posts: 8414
- Joined: August 25th, 2007, 10:12 am
- Location: Oxford, UK
- Contact:
Re: Wesnoth Bestiary
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.
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.
Back to work. Current projects: Catching up on commits. Picking Meridia back up. Sprite animations, many and varied.
Re: Wesnoth Bestiary
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: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.
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)
- Well… things got a heck of a lot easier. Thank you AI for adding in support to output JSON in wmlparser!
- Writing JavaScript code to link the pages together
Code: Select all
python ~/trunk/data/tools/wesnoth/wmlparser.py -p ~/trunk/ -j ~/trunk/data/core/units/elves/Archer.cfg > ~/Desktop/elves.Archer.json
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 Bestiary ( PREVIEW IT HERE )
Unit tree and stat browser
Canvas ( PREVIEW IT HERE )
Exp. map viewer
Unit tree and stat browser
Canvas ( PREVIEW IT HERE )
Exp. map viewer
Re: Wesnoth Bestiary
Unfortunately, this line isn't quite sufficient:
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:
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.
Code: Select all
python ~/trunk/data/tools/wesnoth/wmlparser.py -p ~/trunk/ -j ~/trunk/data/core/units/elves/Archer.cfg > ~/Desktop/elves.Archer.json
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
- Icarusvogel
- Posts: 177
- Joined: March 16th, 2010, 1:55 pm
Re: Wesnoth Bestiary
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.
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.
Re: Wesnoth Bestiary
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.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.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.
- Elvish_Conquerer
- Posts: 51
- Joined: July 16th, 2009, 3:23 pm
- Location: Canada
Re: Wesnoth Bestiary
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
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!"