.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Dominions 3: The Awakening (http://forum.shrapnelgames.com/forumdisplay.php?f=138)
-   -   Guide: Spell database - Web interface (http://forum.shrapnelgames.com/showthread.php?t=40200)

Snoddasmannen August 14th, 2008 10:00 AM

Spell database - Web interface
 
Hi all!

I thought it was time to start a thread about the web interface I made for the Dom3DB. A lot of people know about it, some may even use it, but it's a good idea to start a thread so new people can find it easier and so on.

So, I've made a little web interface for the Dom3DB which in turn was assembled by DrPraetorious. Kudos for that work!

It is available online here:

http://www2.onyx.nu/pb/dom3/spells.html

So just fill in the magic paths available and you will get a nice list of the spells you can cast.

A major caveat is that it is not usable in Internet Explorer or its ilk. You can either blame IE for not supporting XSLT properly, or me for not choosing a more well established technical solution. It does work with Opera 9.5+ or Firefox 2+, and should work on Safari with a bit of luck (can anybody confirm?). It looks nicest with a browser that supports the nth-of-type() CSS selector and SVG, which I know Opera 9.5 does and I suspect FF does or soon will.

I actually just added a new feature, the ability to filter the results in some (by me) predermined ways. Specifically you can search for summons, buffs and/or others. I welcome suggestions for additional categories!

I had another purpose in mind with this post too. I want to get some input on how I could add the ability to discuss or add information/comments on the spells. My first idea was to add a new column to the results list with a link to wiki page corresponding to that spell. I know there is a dom3 strategy wiki out there, which seems to fit the job description. Anybody in here know much/maintain that? For this to work we will require a lot of active participation or most of the links will point to empty pages, and nobody will bother using it. Any feedback on whether this is a good approach, or does somebody have a better idea? I'd rather not go and implement a commenting system myself (been there :)).

Alright, have fun everybody! Let me know if you want me to add more features - you may inspire me :D

Known issues: I have not updated to the 3.17 version of the DB, so a few spells are missing, notably the nationals for Hinnom et al.

llamabeast August 14th, 2008 10:11 AM

Re: Spell database - Web interface
 
Amazing tool!

One comment: It's not currently possible to differentiate national spells from normal ones (so far as I can see), which is a little confusing.

ano August 14th, 2008 10:23 AM

Re: Spell database - Web interface
 
Wow! It looks very, very nice, but probably there should be some detailed spell description including, of course, nation, in the case it is nation specific.

Snoddasmannen August 14th, 2008 10:31 AM

Re: Spell database - Web interface
 
Thanks guys!

Yes it's unfortunately true that it's not currently possible to differentiate national from non-national spells. The original database does contain this information, but I have not imported it to the web version.

There's a bit of grunt-work required to determine which nation each spell belongs to, but to just add that it is a national spell is less work.

The original database does not contain any detailed descriptions, so this is what I'm hoping we can use a wiki for.

Ming August 14th, 2008 10:56 AM

Re: Spell database - Web interface
 
Don't think it works with safari.

vfb August 14th, 2008 11:00 AM

Re: Spell database - Web interface
 
Very cool!

How difficult would it be to add a radio button to select combat spells or rituals? Right now Summon Summer Lions and Summon Fire Elemental are both just listed as a Summon.

And I did notice one weird entry:

Fires from Afar Evocation3 Stygian Paths

Also Flames from the Sky appears to be just missing.

Snoddasmannen August 14th, 2008 12:08 PM

Re: Spell database - Web interface
 
Quote:

Originally Posted by vfb (Post 630986)
How difficult would it be to add a radio button to select combat spells or rituals? Right now Summon Summer Lions and Summon Fire Elemental are both just listed as a Summon.

That was such a good idea that I had to add it right away :) Now supported.

Quote:

And I did notice one weird entry:

Fires from Afar Evocation3 Stygian Paths

Also Flames from the Sky appears to be just missing.
The Stygian Paths thing is straight from the original database, not sure what that is all about :) I'll see what I can do to figure out what happened to flames from the sky.

Ironhawk August 14th, 2008 12:50 PM

Re: Spell database - Web interface
 
I'm sure its a good tool, but honestly - how useful is it to post it to the forums if it doesnt support IE? With all respect to the work you've done, it not functioning on IE means that the majority of viewers will not be able to use it.

llamabeast August 14th, 2008 01:02 PM

Re: Spell database - Web interface
 
Unless they download the free and shiny Firefox!

lch August 14th, 2008 01:11 PM

Re: Spell database - Web interface
 
Software like Firefox and Opera runs everywhere and is widely used, so I think it's natural to develop for them first. There's no Internet Explorer for Linux, and if you're on a Mac then you probably use Safari which is built on the same HTML engine like KDE's Konqueror, I think. The MSIE gets bad credit for a history of security issues and not being as portable.

Snoddasmannen mainly used this as a learning project to web technologies, too.

BTW, should I move this post to the "Maps & Mods" subsection, maybe?

Johan K August 14th, 2008 02:24 PM

Re: Spell database - Web interface
 
Nice page!

Snoddasmannen August 14th, 2008 03:11 PM

Re: Spell database - Web interface
 
Quote:

Snoddasmannen mainly used this as a learning project to web technologies, too.
Yes that's right. I boldly state it's one of the very few pages on the internet which uses client side XSLT. I have no research or statistics to back that up - so prove me wrong :)

But as I said it's a known major issue that it doesn't work with IE. One day I may create a very basic version of it that works in all browsers, feel free to lobby for it.

Quote:

Originally Posted by lch (Post 631048)
BTW, should I move this post to the "Maps & Mods" subsection, maybe?

Well it's not really a map or a mod imho :) I thought it would be interesting for the general audience.

(editing quote tags ...)

JimMorrison August 14th, 2008 03:29 PM

Re: Spell database - Web interface
 
Quote:

Originally Posted by Snoddasmannen (Post 631118)
Yes that's right. I boldly state it's one of the very few pages on the internet which uses client side XSLT. I have no research or statistics to back that up - so prove me wrong :)


You sly dog! That would require statistical analysis of millions of webpages..... inconceivable! :happy:

lch August 25th, 2008 11:08 AM

Re: Spell database - Web interface
 
Yes, I know that this should be done on the user's page, but then who else would view it?

So, I noticed the cake, so lemme say: Happy birthday, Snoddasmannen!

Kristoffer O August 25th, 2008 11:47 AM

Re: Spell database - Web interface
 
I get the following error message:

'Exception while loading: TypeError: Null value'

Regardless of what numbers I enter.

Snoddasmannen August 25th, 2008 01:34 PM

Re: Spell database - Web interface
 
Haha - thanks lch :) Yes indeed, cake for breakfast and the day off work, life is pretty good!

Kristoffer, did you really try entering all possible permutations of magic levels and spell filters? ;) What browser are you using? It won't work in IE I'm afraid :(

Kristoffer O August 25th, 2008 03:34 PM

Re: Spell database - Web interface
 
I'm on a mac atm. Safari. I have a firefox on my linux box IIRC. I'll take a look.

lch August 25th, 2008 04:28 PM

Re: Spell database - Web interface
 
Yeah, the only thing supported right now is Firefox and maybe Opera, I think. :) If I remember right then I wrote in that other thread how to get support for Safari relatively easy since the model is not THAT different, and since Safari and Konqueror use the same HTML engine it would be nice to have this. But then again you'd really be waving the stick in front of the MSIE crowd which might be one of the largest factions.

Snoddasmannen August 25th, 2008 05:36 PM

Re: Spell database - Web interface
 
It's really a shame that it's not working in Safari, I was hoping it might but here's confirmation from apple that we're not there yet:

http://developer.apple.com/internet/....html#anchor21

So I guess Opera and FF are the only supported browsers after all, but you can find both of those on basically any platform including Mac. It actually works in Opera Mini as well which is pretty neat, check your spells on your low end cellphone :)

As I said in the old thread, if I decide to focus on browser compatibility I will probably just switch to server side XSLT processing and give the results as plain HTML. That's really the only sane approach in the first place :) That way it will work in IE7, Safari, Lynx, IE3 etc.

But the next thing I'd like in is forgable items, that should be pretty good.

Jarkko August 27th, 2008 01:46 AM

Re: Spell database - Web interface
 
Very nice tool! :)

Quote:

Known issues: I have not updated to the 3.17 version of the DB, so a few spells are missing, notably the nationals for Hinnom et al.
I believe there are some other spells also missing. Like Charm for example. Or am I doing something wrong?

Snoddasmannen August 27th, 2008 10:53 AM

Re: Spell database - Web interface
 
Thanks Jarkko!

The original database is missing descriptions for some of the spell types (including fires from afar and charm), and thanks to how I joined stuff in my sql query those spells were simply dropped.

Rather than fix all the missing types of spells, I simply changed the query, so all spells should be there now - but some with empty spell types. Some day I will come up with names for them instead :)

Dedas August 28th, 2008 08:57 AM

Re: Spell database - Web interface
 
Thanks Snoddas for a very nice tool! (or should I say "tack"?)

Oh, and don't worry about not supporting IE as there is no good reason (laziness not counting) to run that browser anyway. :)

Snoddasmannen October 5th, 2008 04:58 AM

Re: Spell database - Web interface
 
Varsågod Dedas :)

I've now added forgeable items as well. I made a real mess of the xml/xslt imo, but at least it seems to work. Rather than spend a day redesigning the whole thing in a sane way I spent two hours hacking stuff in. But it's a suitable thing to do with a slight hangover :)

I also changed around some stuff. Made the colors a bit less depressing in browsers without support for nth-of-type() for one.

I guess fixing up national spells is the next thing to do. And still the dream of being able to hotlink the spells to some page where people can comment and describe them ... Anybody got ideas for that one?

Sombre October 6th, 2008 04:50 AM

Re: Spell database - Web interface
 
Quote:

Originally Posted by Dedas (Post 634833)
Thanks Snoddas for a very nice tool! (or should I say "tack"?)

Oh, and don't worry about not supporting IE as there is no good reason (laziness not counting) to run that browser anyway. :)

I surmise from your avatar that you may be slightly biased. I would also think the fact it's the most popular web browser by far would be a good reason to support it.

Ballbarian October 6th, 2008 08:00 AM

Re: Spell database - Web interface
 
Quote:

Originally Posted by Sombre (Post 643248)
Quote:

Originally Posted by Dedas (Post 634833)
Thanks Snoddas for a very nice tool! (or should I say "tack"?)

Oh, and don't worry about not supporting IE as there is no good reason (laziness not counting) to run that browser anyway. :)

I surmise from your avatar that you may be slightly biased. I would also think the fact it's the most popular web browser by far would be a good reason to support it.

"most popular" might be misleading. "most used" would probably fit better. I have found that many users simply use IE because it is what came installed on their Windows PC. I myself used IE for years before discovering FF. :)

llamabeast October 6th, 2008 11:29 AM

Re: Spell database - Web interface
 
Yes, I can't think that very many people use IE by considered choice. It's simply a default for most people.

Snoddasmannen October 18th, 2008 02:12 AM

Re: Spell database - Web interface
 
Database updated according to the 3.20 update by DrPraetorious. Have fun! :)

Jarkko October 18th, 2008 03:47 AM

Re: Spell database - Web interface
 
Quote:

Originally Posted by llamabeast (Post 643316)
Yes, I can't think that very many people use IE by considered choice. It's simply a default for most people.

Generalisation for the win, eh?

I have IE, FF and Lynx installed. I've used Lynx as far as I can remember, and nothing is as fast as that one when reading forums etc, no nasty popups, no cookies, just a feeling of ultimate speed and ease of use; sadly for example this new Shrapnel forum is incomprehensible in Lynx :(

When Lynx is not a possibility I use IE. IE7, despite what many claim, is easy to use and fast. FF has a crap load of all sorts of options and whatnots, and my brain starts to hurt when I try to figure it out; hence I use FF only when Lynx or IE7 are not possible (like using the spell database).



Btw, thanks again for this excellent tool :) Thumbs up!

JimMorrison October 18th, 2008 04:24 PM

Re: Spell database - Web interface
 
I don't think that your example actually goes against his point - that given a clear choice, IE is very rarely #1 pick for anyone. But is in fact mostly used by people who haven't explored other options yet.

Snoddasmannen October 19th, 2008 03:05 AM

Re: Spell database - Web interface
 
Good thing I started this thread so that finally there is a place on the internet where people can discuss amongst themselves which browser is the best one :)

Going off-topic for a bit, I gave up about two hours of solid dom3 gaming time (those pesky Eriu will have to wait) to add distinctions between national and non-national spells on the site. Right now, there's just a red or white circle to indicate whether they are national or not (well they are also actually sorted by which nation they belong to). I intend to replace those images with the corresponding in-game national flags, but only if somebody can tell me where to find them :)

An interesting side-effect of sorting things by the national flag in the database is that the site searching spells are just below the proper nationals. I'm sure our friends in Lund are more than happy to explain why :P


All times are GMT -4. The time now is 06:43 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.