Breakfast Stat Sig (new)

Mmmm... What's cookin in the kitchen?

Moderator: Lucifer

User avatar
Lucifer
Project Developer
Posts: 8742
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Breakfast Stat Sig (new)

Post by Lucifer »

Ok, if you want something that looks like this:


Image


Use this code:

Code: Select all

[url=http://breakfast.servegame.com/index.php?option=com_aastats&Itemid=41]
[img]http://breakfast.servegame.com/statsig.php?player=YOURPLAYER&server=SERVER&pic=PICTURE[/img]
[/url]
Use + for spaces, and you'll have to pretty much figure out what your player name is. Color codes aren't supported because they don't exist in the stat files anymore, so don't sweat it. Best way to figure out what to put for your player is to just plug in the url into your browser and then hit return. Then copy the part of the url that is your name.

For servers, you only have "swampland" or "hell" or just leave it blank.

For pic it must be a complete url, and if it's too small you'll get errors.

If you want/need help, let me know. The script doesn't yet interoperate with the breakfast website, but it will. ;)

Here's some examples:

http://breakfast.servegame.com/statsig. ... =root+down

Image


http://breakfast.servegame.com/statsig. ... =swampland

Image


http://breakfast.servegame.com/statsig. ... CKTRON.png

Image


You can also change some of the fonts used by using these directives:

pfnt : player font
servfnt : server font
cfnt : caption font (mattches, rounds, ladder)
sfnt : score font (the numbers themselves)

http://breakfast.servegame.com/statsig. ... t=dienasty

Image

Available fonts are: (please omit the ".ttf")

actionis.ttf creature.ttf electroh.ttf fontrstc.ttf indigo.ttf
bazaroni.ttf davis.ttf eli5.0-.ttf goldengi.ttf VeraMono.ttf
betadance.ttf demon.ttf embargo2.ttf hydrogen.ttf Vera.ttf
betsy.ttf densmore.ttf fadgod.ttf ikarrg.ttf
binary.ttf dienasty.ttf failed.ttf ikart.ttf
brandnew.ttf distortia.ttf fakerece.ttf ikarv.ttf
CaptainPodd.ttf edgewater.ttf flubber.ttf independ.ttf

Please submit new truetype fonts to this thread that you'd like included in the statsig, and make sure you have the rights to give me to distribute them! Post relevant info as you do so.

You can also ordinalize the rankings by passing "ord=yes"

http://breakfast.servegame.com/statsig. ... er&ord=yes

Image

Note: Alpha quality stuff right now. Eventually it'll interoperate with the very script that it's linked to so that all servers on that page will be available for stat boxes here.
Last edited by Lucifer on Thu Apr 21, 2005 9:30 am, edited 1 time in total.
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
ishAdmin
Match Winner
Posts: 625
Joined: Sun Jul 04, 2004 12:11 am
Contact:

Post by ishAdmin »

The font I used was trebuchet.ttf, which I just nicked from windows as I recall.

The pic I used was here: http://armagetron.imagenook.com/statsbackground.gif (which you could probably guess from the code) If you want one without any type in it, let me know. The type already in the pic was something called MetaPlus, which is a commercial font that I couldn't give it away legally. It's your basic sans serif font although it's a bit on the skinny side. Nothing special.

I think where this should go (and I think you are inclined this way, did you say it before?) is to have a form style options page, where people can enter what they want for fonts etc. They hit submit and it returns the code. You could even make the form smart enough to read the dir of all .ttf's to build the a popup list in the options. And I bet you could even make a simple enough point and click system for where you want type to show up. I spent the most time tweeking positions and sizes when I do one of these. Anyway, I'm sure I'll have other ideas for stuff to add if you release your source.

You know, it also just occured to me. I could write a php parser to convert my 2.6 stats to be the same as 2.7 stats. Then I could use the same system if I end up running 2.6 after my server upgrade. Others could do the same. Perhaps someone could post a sample of the ladder, matches and rounds files. My only two assumptions at this point are that they are tab delimited (not sure if the order of the fields is the same, are there new fields?) and that the colour codes are removed. My parser would also have to add the match and rounds stats together for names with and without colour codes. That should actually make players happy. What about the ladder? Should it be averaged? Doing this would mean the stats don't match what the game reports. I could rebuild the old stats too I guess. hmmm. sounds like an hourly cron.

eh, i'd rather just run 2.7
Image
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6712
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

Actually, I think it's exactly the same in 0.2.7.0... I personally didn't change any of the code involved in writing the files out, and color code management is handled in all cases on the spot right before display to the screen, or sending to the clients, so I don't think that effects the score files either. I'll take a look tho...
Image
User avatar
Lucifer
Project Developer
Posts: 8742
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

ishAdmin wrote:The font I used was trebuchet.ttf, which I just nicked from windows as I recall.
Then I probably can't distribute it. :( We can probably find something similar available for Free.
The pic I used was here: http://armagetron.imagenook.com/statsbackground.gif (which you could probably guess from the code) If you want one without any type in it, let me know.
If it's not too much trouble, I'd like one without type as well. The idea is to eventually have the thing flexible enough to display the stats just about any way someone would want them shown.
I think where this should go (and I think you are inclined this way, did you say it before?) is to have a form style options page, where people can enter what they want for fonts etc. They hit submit and it returns the code. You could even make the form smart enough to read the dir of all .ttf's to build the a popup list in the options. And I bet you could even make a simple enough point and click system for where you want type to show up. I spent the most time tweeking positions and sizes when I do one of these. Anyway, I'm sure I'll have other ideas for stuff to add if you release your source.
I'm doing some restructuring, now that the thing has grown beyond a single source file. What I need to make a formal distribution is a generic background not associated with any server (the one I have is obviously for Breakfasters :) ). If someone wants to volunteer it I could probably finish the restructuring and throw up the latest version. Point and click is just a matter of doing the old imagemap thing. Actually, I think you just make a certain kind of button (I forget, I could google it) and when you submit the form the coordinates you clicked would be submitted with it. You could also use your onClick handler to grab the coordinates and store them. Really, the client should generate the code. It's achievable, and no reason to go back to the server for it. :)

The "right" way to do this next is to factor it into a class that's capable of returning all of the information you need. So it should have a method that returns all available fonts, for example. Another method would set options, and another one return the completed image. All the logic is currently tangled up everywhere. ONe thing that has to go is the usage of default php fonts, now that it supports truetype fonts. I just need a courier truetype font to replace it. :) Anyway, yeah, I want a form that'll give users a way to configure it, and I want it to work two different ways.

1. When you point your browser at the base script you should get a form that generates the URL, just like you've suggested.

2. It should integrate with a portal (Mambo at first, since that's what I have) so that registered users of the portal can set their preferencess, have them stored in a database, and the script should retrieve them.
Perhaps someone could post a sample of the ladder, matches and rounds files. My only two assumptions at this point are that they are tab delimited (not sure if the order of the fields is the same, are there new fields?) and that the colour codes are removed. My parser would also have to add the match and rounds stats together for names with and without colour codes. That should actually make players happy.
The stat files were different somehow, I learned thsi the first time I tried to hook up eggcozy's server into the stats page. The parser I'm using isn't generic enough, it's still based on code Decompyler threw together in 5 minutes to make a generic stats page. The last archive I threw up of the statsig (in the other thread) has the aastats class in its current form, I haven't changed anything since then. So if you wanted to download and look at how to make the parser work with 2.6 files, I'd really appreciate it. The aastats class is intended to be the be all, end all of parsing aa stat files. :) (it also needs to have caching repaired, it doesn't cache stats right now like it should)
What about the ladder? Should it be averaged? Doing this would mean the stats don't match what the game reports. I could rebuild the old stats too I guess. hmmm. sounds like an hourly cron.
Better to make the parser support the 2.6 files. It might be helpful to make the aastats class capable of outputting stat files for any of the versions it can read, then it could be used as a converter. If you do the upgrade to 2.7, you could convert the ladder before starting the new server and you have no loss of data. So yeah, it could be very helpful for you to make the aastats class do a little bit more work. :)

It woudl be best if the next version of AA coudl read the two previous version's stat files, so you could start it with the old stat files and it would just convert them immediately. ;)

And oh yes, that I will release it is a certainty. :) If we had that meta-project n54 suggested, the latest changes would already be in CVS. I'm just that way, you know?
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
ishAdmin
Match Winner
Posts: 625
Joined: Sun Jul 04, 2004 12:11 am
Contact:

Post by ishAdmin »

um, ok, dumb question time. Where is your aastats code?
Image
User avatar
Lucifer
Project Developer
Posts: 8742
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Your_mom
Match Winner
Posts: 653
Joined: Sun Jun 06, 2004 1:45 am

Post by Your_mom »

Nifty, now im all pimped out with my stats displayed, my horrible horrible stats.
User avatar
n54
MVP
Posts: 1587
Joined: Sun Dec 21, 2003 12:40 pm

Post by n54 »

just a generic armagetron-related background i had that can be changed (the original is small though but easy to make longer)
Attachments
armagetroncross.png
Anumeric
On Lightcycle Grid
Posts: 10
Joined: Thu Dec 02, 2004 3:34 am
Location: cali
Contact:

hmmm...

Post by Anumeric »

something looks wrong w/ my stats...
woot...

Image
User avatar
Your_mom
Match Winner
Posts: 653
Joined: Sun Jun 06, 2004 1:45 am

Post by Your_mom »

howd u get negative survival points lol i thought it only went to 0
Anumeric
On Lightcycle Grid
Posts: 10
Joined: Thu Dec 02, 2004 3:34 am
Location: cali
Contact:

well...

Post by Anumeric »

im pretty good at being at the bottom of the ladder.... its an art really...


** oh and my stat prob is worked out.... fyi, dont use the binary font in your sig stats...
woot...

Image
User avatar
Lucifer
Project Developer
Posts: 8742
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas

Post by Lucifer »

ishAdmin wrote:um, ok, dumb question time. Where is your aastats code?
Here ya go, here's the whole thing.

AS FAR AS I KNOW, I can distribute these truetype fonts. I could really be wrong, though.... Hope not.
Attachments
statsig.zip
The whole statsig, unzip it, change a few things, and go.
(664.19 KiB) Downloaded 329 times
Check out my YouTube channel: https://youtube.com/@davefancella?si=H--oCK3k_dQ1laDN

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
n54
MVP
Posts: 1587
Joined: Sun Dec 21, 2003 12:40 pm

Post by n54 »

OT about breafast stats: the really nice thing imo is that you can be 2nd one minute and 344th the next, its really dynamic and i think the server settings have a lot to do with it (if one isn't having a good hour/day you immediately start to drop). i like it.
User avatar
root down
Round Winner
Posts: 344
Joined: Fri Jun 11, 2004 8:46 am
Location: closer
Contact:

Post by root down »

kinda rough, i fixed the template for it. couldn't get a gif to work, but the current one looked bad anyways. not a fan of the shadow on the fon't, i'd rather have a black font with no shadow. i'll fool aorund with this later.
Image[/img]
stakes is high
User avatar
root down
Round Winner
Posts: 344
Joined: Fri Jun 11, 2004 8:46 am
Location: closer
Contact:

Post by root down »

i'm reasonably happy with what i have now
stakes is high
Post Reply