aTi|Sanders
Hold your Fire, I forgot my gun!
+0|6977
I think they were idiots when they made BF2. Alot of people havnt read this but i saw somewhere they use screenshots of games to record data. Basicly not allowing name changes without losses. I still think they could update useing PID and easyly correct the Screenshot reading script. I understand that would be hard but it seems if they can do prefixs then it shouldnt be an issue. I also understand the mass query they run. So requireing more queries to keep the PID correct with the Nickname. Though i think they are being lazy.

Inturn it can be done and they are just being lazy.

Also....they promised name changes in 1.03....anyone here see that?!?!?!
midgetspy
Member
+3|7038
snapshot != screenshot

Nic
NM156
The H4xor Mod
+161|7057|North Texas
Holy hell! I didn't mean for the thread to get highjacked! Sorry 'bout that guys. I was merely making a point, about certain decisions at the dev level. Bleh

Continue with XML discussions please!
Viper007Bond
Moderator Emeritus
+236|7015|Portland, OR, USA

Man you rock, chuy!

Definetly gonna have to use this to throw some stats together for the clan I'm in.

Keep us the awesome work, dude. *thumbs up*
https://bf3s.com/sigs/044900892044e7fc95e599e832a086ae9bcd7efb.png
V@no
Member
+-1|6957
Hello!
As I understand the xml feed is only usefull for clan sites, and NOT suitible for displaying some basic statistics of each player playing on a specific server at the moment...

In my case, all I needed is get one byte of information about a player - rank, so I could display their rank image next to their name. Since in BF2 the highest rank is 12, the information sent from the server could be limited to 1 byte, plus the headers auto created by the server...The request also could be limited to 40-50 bytes (including player's PID)

Anyone know where I can get this information? (dont metter in what format)

Thank you.
V@no
Member
+-1|6957
Ok, never mind. I managed to sniff pockets that BF2 sends to gamespy server when requesting stats, now if I could get some info about the aword codes they use, that kind of stuff...
Fraggel
Member
+0|6956

V@no wrote:

Ok, never mind. I managed to sniff pockets that BF2 sends to gamespy server when requesting stats, now if I could get some info about the aword codes they use, that kind of stuff...
And you have asked gamespy for permission ??? I don't think so ...

Well there are enough tuts about it in the www but I doubt that anyone will help you here. Most of us already know that GameSpy does not allow it. It's simply illegal to grab the data from their server without their permission. There are many websites that already did it, but they got trouble with EA/GameSpy and they got IP banned etc.

The problem is: Same right for all. If you are allowed to get data from their, they have to allow it everyone. But it's slowing down the BF2 Auth Servers and there were already many days where no one could play BF2 because auth servers were totally overloaded by all those websites that 'attack' the gamespy server. That's why EA/GameSpy started to ban all those guys, they log IP Addresses and all this stuff and tak actions against all guys that use this server for their homepage / signature stuff.

And by reading gamespy rules you will know that you are not allowed to do what you are doing right now.

So good luck with your illegal actions And please don't slow down auth server. I hated that time where I could not play BF2 because every webmaster on this planet tried to load their data from gamespy server.

Also....they promised name changes in 1.03....anyone here see that?!?!?!
Where did you hear that?? Maybe in your dreams but all I heared is that they will allow you to add prefixes infront of your name so that you can add/change clantag. Never heared about a name change feature and I don't think EA ever promised that.

Last edited by Fraggel (2005-11-07 06:03:05)

B.Schuss
I'm back, baby... ( sort of )
+664|7051|Cologne, Germany

V@no wrote:

Ok, never mind. I managed to sniff pockets that BF2 sends to gamespy server when requesting stats, now if I could get some info about the aword codes they use, that kind of stuff...
you better be careful with that. As Fraggel has said, EA/Dice wasn't very happy about all those little ( or not so little ) private stats sites that suddenly started to grab stats from the stats server, because it slowed down the stats system considerably. As a result, updates were slowing down in BFHQ.

Therefore, EA/Dice started to ban IPs from those who queried stats a lot ( like bf2s.com did ). In the end, they set up a xml feed for a couple of privately owned stats sites with some significance ( bf2s.com being one of them ).

I don't know what their policy towards small stats sites with little users is. Maybe chuy can tell you if they make a difference.

But chances are you are violating some kind of EULA by grabbing stats from gamespy.
V@no
Member
+-1|6957
Oh, I didnt know that!
Thank you for the warning!

Well, luckily I was not going to use this service too much, only at the time I'm plaing BF2 online (most of my site get closed while I'm playing so I can get as much bandwidth as possible) and ofcourse I was going to use caching, like get info about same player ones in 24 hours or something like that...Well, I guess I'd better continue searching for a public service that would provide that one byte of info I needed...

Thanks again guys.

Last edited by V@no (2005-11-07 15:02:53)

KaZaMa
Member
+0|7040|Asturias
Someone have the NM156 code in a phpnuke module? im getting problems trying to do it.

Btw chuwy can you add to the xml the K/D ratio? i think is more usefull than the SPM.

Thanks for the xml.

Last edited by KaZaMa (2005-11-08 05:56:14)

KaZaMa
Member
+0|7040|Asturias
Solved

Last edited by KaZaMa (2005-11-08 21:19:32)

aTi|Sanders
Hold your Fire, I forgot my gun!
+0|6977
Hey Chuy, i have a new site up "Switched Hosting" and when i brought my stats script up it said it was blocked. I have it set to 120. I also have all the credits to you on the script. I dont understand whats going on here.


N/M its working all the sudden....

Last edited by aTi|Sanders (2005-11-08 09:48:28)

k-mouse
Member
+0|7037
Hi,

been trying to get this thing up and running now. I'm just wondering if there is some easy way to get the Kill:Death ratio?

Currently, I'm using a modded version of aTi|Sanders's example.
Located here: http://www.tlvclan.com/diverse/member_stats/index.php
Source: http://www.tlvclan.com/diverse/member_stats/index.phps
BF2S-MLB source: http://www.tlvclan.com/diverse/member_stats/bf2s-mlb.phps
(Sorry, slow host)


So, any ideas how to do this?
aTi|Sanders
Hold your Fire, I forgot my gun!
+0|6977
I think Chuy has said he doesnt store the K|D ratio before. Overall i think EVERYONE has asked the wrong question. The real question you should all ask is; can we have kills and deaths. Chuy produces his own K|D ratio in the script he did for the site. Notice your K|D ratio isnt in-game...


So it would have to be done with Kills and Deaths.

Last edited by aTi|Sanders (2005-11-09 08:51:37)

aTi|Sanders
Hold your Fire, I forgot my gun!
+0|6977
that would be done something like this:

if ($kills > $deaths) {
$kd =  number_format($deaths/$kills, 2);
} else if ($kills == $deaths) {
$kd = "1.0";
} else if ($kills < $deaths) {
$kd =  number_format($kills/$deaths, 2);
} else {
$kd = "Captain Somethings Wrong in Kansas This Year";
}

Last edited by aTi|Sanders (2005-11-09 09:04:36)

midgetspy
Member
+3|7038
Thank you for explaining how to calculate k:d, we've all been wondering for so long!

Nic
chuyskywalker
Admin
+2,439|7058|"Frisco"

aTi|Sanders wrote:

that would be done something like this:

if ($kills > $deaths) {
$kd =  number_format($deaths/$kills, 2);
} else if ($kills == $deaths) {
$kd = "1.0";
} else if ($kills < $deaths) {
$kd =  number_format($kills/$deaths, 2);
} else {
$kd = "Captain Somethings Wrong in Kansas This Year";
}
Uhm... no.

Kill : Death == Kill / Death  (AKA, a ratio)

Thusly,

Code:

$kd_ratio = $kills / $deaths
That's it. We're done. Go home with number_format() if you must.

Also, I will be changing the XML feed this weekend. So be on the lookout.
aTi|Sanders
Hold your Fire, I forgot my gun!
+0|6977
You cant divide a large number into a smaller one and come out with the correct answer. Thats a just incase messure. No afence to any person but Some NOOBS out there have less kills than deaths.
midgetspy
Member
+3|7038
He's got you there chuy... better go fix your code!

Nic
chuyskywalker
Admin
+2,439|7058|"Frisco"

Ok, you're a little new to ratios.

A "ratio" is a multiplier used between to values. In our case, kills and deaths.

For example:
If I have 2 kills, 1 death. I have a 2:1 ratio. As an 'real' number, that ratio would be 2.
If I have 200 kills, and 100 deaths, I have a ratio of 200:100. Reduced, that is 2:1, which as a real number is still 2.

As you can see, so far, taking the 'real' number, multiplying by the deaths, you end up with the kills. 2x1 = 2 and 2x100 = 200.

Let's try it the otherway...

I have 100 kills, 300 deaths. This is reduced to 100:300, 1:3. Now, can you tell me what you have to multiply 3 by to end up at 1? The answer is .333333333333(etc)

This means that an EVEN ratio, is 1. 1 kill, 1 death.  1/1 == 1
A "positive" ratio is over 1 (more kills than deaths) (n+1) / 1 > 1
A "negative" ratio is less than 1 (less kills). (n-1)/1 < 1


If the divisor (deaths, in our case) is 0, then you have a problem. You can't divide by zero. But NO ONE has 0 deaths, so its not a problem. (If they do have zero deaths, I tell them to go play more because 2 minutes of game time isn't enough to earn you a stats page.)


At the heart of this issue is the fact that you are changing the forumula you're using depending on the range of your variables. This means that the end result is innaccurate when compared among other members of the given dataset. How can I compare two K:D ratios when the forumulas used to create them are completely different? Simple: you can not.

My fancy formula of "A divided by B = ratio" is also quoted elsewhere (aka, every math book every where.)

You're gonna have to take a loss on this one.
tF-voodoochild
Pew Pew!
+216|7058|San Francisco

Ouch, time to go back to remedial math 101.
THA
im a fucking .....well not now
+609|6980|AUS, Canberra

tF-voodoochild wrote:

Ouch, time to go back to remedial math 101.
yes not even any smiles at the end of chuy's post....
B.Schuss
I'm back, baby... ( sort of )
+664|7051|Cologne, Germany

guess he is quite serious about his coding abilities, which is understandable, considering he makes his living on them...

I'd say it's a good thing that I know nothing of PHP, XML and all that...
midgetspy
Member
+3|7038
I hate to point it out but I guess I'm a stickler for correctness (in math, at least):

positive ratio should be (n+1)/n
negative should be (n-1)/n

And FYI Sanders, a simpler way to check for 0 is:

$kd = $kills / $deaths == 0 ? 1 : $deaths;

Nic
chuyskywalker
Admin
+2,439|7058|"Frisco"

midgetspy wrote:

positive ratio should be (n+1)/n
negative should be (n-1)/n
I knew something was wrong with those when I wrote them. Oh well, ya'll get the point (I hope).

Also:

Code:

$kd = $kills / $deaths == 0 ? 1 : $deaths;
Doesn't look like it would work in PHP. If you did that and deaths was 0, you'd still be doing division by zero which throws a big fat ugly error.

Code:

$kdr = ($deaths == 0) ? 0 : $kills / $deaths;
That most certainly would (ternary operations rule!) ( <-- haha, nerd! )

Board footer

Privacy Policy - © 2024 Jeff Minard