Unit DB

Post here if you want to help developing something for FAF.

Unit DB

Postby arkitect » 16 May 2014, 13:00

Hi All,

I started playing faf recently, and having not played FA for years, and wanting to learn unit stats, costs etc I hit the Unit DB. I have found it a bit slow to find units, so I have whipped up a concept which I think makes the DB a lot easier to use and would appreciate any feedback on it.

It's by no means completed, not all the units are in there (some 503 errors on current unitdb, haven't got proper data access or anything) and I've intentionally left a lot of the details out for proof of concept.


the main things are:
- Unit data in popup rather than separate page
- Units grouped by type rather than race, I think this makes them easier to find.
- Compare function which does basic stats comparisons. nothing fancy.


so if you have a few minutes check out unitdb.solarflare.co.nz and post constructive feedback here.
(won't let me post links)
arkitect
Avatar-of-War
 
Posts: 134
Joined: 08 May 2014, 13:40
Has liked: 23 times
Been liked: 81 times
FAF User Name: arkitect

Re: Unit DB

Postby pip » 16 May 2014, 13:32

Hi Solarflare, it looks very handy. Do you absolutely need the current unit DB or would you be able to directly use units blueprints (bp) to generate your DB?

As for feedback, I would advise to use the blue colour (or another colour) when you compare units costs, because green is already use to indicate the production output in FA (+2 in green = it produces 2 mass per second).

Also, is it easy to add some additonal infos (like tooltip to describe a unit's role)?
pip
Supreme Commander
 
Posts: 1826
Joined: 04 Oct 2011, 15:33
Has liked: 191 times
Been liked: 86 times
FAF User Name: pip

Re: Unit DB

Postby arkitect » 16 May 2014, 13:40

good point about the blueprint files - it was faster to grab some data off the current db so I just did that. But of course using the bps would be better...

If the data is available there's no reason it can't be included
arkitect
Avatar-of-War
 
Posts: 134
Joined: 08 May 2014, 13:40
Has liked: 23 times
Been liked: 81 times
FAF User Name: arkitect

Re: Unit DB

Postby pip » 16 May 2014, 13:53

The current FAF DB is very handy because it accurately computes the DPS from the blueprints, which is not a data provided directly by the bp. Aside from beam weapons, the DPS are acurate in the current DB, so only the code for beam DPS needs an update.

In my opinion, the main shortcoming of the current DB, beside the fact it's not as user friendly as yours, is that it lacks the tooltip presentation of the units, which are contained in another file. That's why, if the presentations of the units can be added, it would definitely be good for newcomers. Icedreamer made a mod with improved tooltips to better reflect the role of units, so I guess your DB would be the perfect place to add them.

Also, if you can generate your DB from the bp, you would be able to add the Nomads units. We had our own DB for Nomads, which contained other factions too for comparison purposes, but the guy who hosted it stopped paying for the server / online provider, so the DB is gone and lost.
pip
Supreme Commander
 
Posts: 1826
Joined: 04 Oct 2011, 15:33
Has liked: 191 times
Been liked: 86 times
FAF User Name: pip

Re: Unit DB

Postby Adraius » 16 May 2014, 19:55

I really like your DB's layout, but some analogue to the current DB's ability to compare multiple units would be very handy. :) I use that functionality almost every visit to the DB.
Adraius
Avatar-of-War
 
Posts: 92
Joined: 03 Jul 2012, 08:11
Has liked: 5 times
Been liked: 3 times
FAF User Name: Adraius

Re: Unit DB

Postby pip » 16 May 2014, 20:00

Adraius wrote:I really like your DB's layout, but some analogue to the current DB's ability to compare multiple units would be very handy. :) I use that functionality almost every visit to the DB.


You can do it : you have to drag the units you want to compare at the bottom of the page.
pip
Supreme Commander
 
Posts: 1826
Joined: 04 Oct 2011, 15:33
Has liked: 191 times
Been liked: 86 times
FAF User Name: pip

Re: Unit DB

Postby sasin » 16 May 2014, 21:04

solarflare_nz wrote:Hi All,

I started playing faf recently, and having not played FA for years, and wanting to learn unit stats, costs etc I hit the Unit DB. I have found it a bit slow to find units, so I have whipped up a concept which I think makes the DB a lot easier to use and would appreciate any feedback on it.

It's by no means completed, not all the units are in there (some 503 errors on current unitdb, haven't got proper data access or anything) and I've intentionally left a lot of the details out for proof of concept.


the main things are:
- Unit data in popup rather than separate page
- Units grouped by type rather than race, I think this makes them easier to find.
- Compare function which does basic stats comparisons. nothing fancy.


so if you have a few minutes check out unitdb.solarflare.co.nz and post constructive feedback here.
(won't let me post links)


Hey,

It looks great! I'd recommend adding in the range and speed of the units on the comparison, as I think those are pretty important (and under appreciated imho) stats.
sasin
Priest
 
Posts: 368
Joined: 11 Feb 2013, 04:09
Has liked: 26 times
Been liked: 43 times
FAF User Name: sasin

Re: Unit DB

Postby nine2 » 17 May 2014, 05:11

It looks a lot more organized and I like it, but

- if you dont generate it from the blueprints then it will be out of date (and useless) soon

- if you do generate it from the blueprints then it will be hard for you to give it your customized formatting. Of course you can do it but might be too tricky
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: Unit DB

Postby arkitect » 17 May 2014, 06:01

thanks all,

the importing of data is separate to the display - currently it pulls and can re-pull from the unitsdb so updating isn't a problem this way, but I don't have control over the dps calculations etc. I'll likely write/borrow a bp parser for it... won't be too tricky at all - didn't take long to throw it together so modifying it will be no problem.
arkitect
Avatar-of-War
 
Posts: 134
Joined: 08 May 2014, 13:40
Has liked: 23 times
Been liked: 81 times
FAF User Name: arkitect

Re: Unit DB

Postby arkitect » 17 May 2014, 15:20

awesome. turns out the bp files are structured very similar to json. half a dozen regex transforms and json deserializer is converting bp file contents into objects. If I add a calculated properties for dps etc it'll feed straight off the blueprints.
arkitect
Avatar-of-War
 
Posts: 134
Joined: 08 May 2014, 13:40
Has liked: 23 times
Been liked: 81 times
FAF User Name: arkitect

Next

Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest