Page 2 of 3

Re: Calling all PHP Programmers

Posted: Fri Mar 02, 2012 3:59 pm
by cairdazar
I poked around a bit more in battlelog and I can get the soldier id [1] of the players on a server.
Using the same api call as the browser make, then one clicks the see all players link on a server page.

That should be unique and good enough for your purposes. This way we don't have to put any extra load on your servers.

The only obvious cases I can think of where there will be problems is if a player have multiple soldiers and/or account or if some one changes there account . But that will happen with the guid as well.

Will log the soldier id from now on.

--
Cair

[1] as in http://battlelog.battlefield.com/bf3/soldier/<username>/stats/<soldierid>/
the username is irrelevant, any string will do, for the link to work

Re: Calling all PHP Programmers

Posted: Fri Mar 02, 2012 4:02 pm
by styphon
Unfortunately not. The soldier ID is simply a number from 1 - 64 assigned to a player on the server at the time. It has no correlation to the player once they leave the server and can't be used to track stats across time. It has to be the PB or EA GUID.

Re: Calling all PHP Programmers

Posted: Fri Mar 02, 2012 4:23 pm
by cairdazar
styphon wrote:Unfortunately not. The soldier ID is simply a number from 1 - 64 assigned to a player on the server at the time. It has no correlation to the player once they leave the server and can't be used to track stats across time. It has to be the PB or EA GUID.
I think we are talking of different soldierIds.

The id I get from battlelog (also called personaId) is bound to a particular soldier (persona), and that is in turn bound to a battlelog/ea/origin account.

My soldierid is 367699479 and my userid is 2832660143776972894 for example, nether is a proper guid, but still unique.

Is that any clearer?

Re: Calling all PHP Programmers

Posted: Fri Mar 02, 2012 4:25 pm
by styphon
Yea, that's clearer. Can people find out their own soldier ID easily?

Re: Calling all PHP Programmers

Posted: Fri Mar 02, 2012 4:32 pm
by cairdazar
styphon wrote:Yea, that's clearer. Can people find out their own soldier ID easily?
Yes, by clicking a stats link on battlelog (while logged in) the soldier id is the numbers at the end.

My stats link is http://battlelog.battlefield.com/bf3/soldier/cairdazar/stats/367699479/ and my soldier id is 367699479

Re: Calling all PHP Programmers

Posted: Fri Mar 02, 2012 5:31 pm
by Ash2Dust
cairdazar wrote:
styphon wrote:Yea, that's clearer. Can people find out their own soldier ID easily?
Yes, by clicking a stats link on battlelog (while logged in) the soldier id is the numbers at the end.

My stats link is http://battlelog.battlefield.com/bf3/so ... 367699479/ and my soldier id is 367699479
People can easily find their Origin name. They just need to make sure they spell it exactly like they do in game. That would allow the database to attach their soldier id to them. What happens when they change Origin ID? Have it merge the old id into the new one? dunno, but would be more of a wish list item?

Re: Calling all PHP Programmers

Posted: Fri Mar 02, 2012 6:09 pm
by styphon
Ash2Dust wrote:
cairdazar wrote:
styphon wrote:Yea, that's clearer. Can people find out their own soldier ID easily?
Yes, by clicking a stats link on battlelog (while logged in) the soldier id is the numbers at the end.

My stats link is http://battlelog.battlefield.com/bf3/so ... 367699479/ and my soldier id is 367699479
People can easily find their Origin name. They just need to make sure they spell it exactly like they do in game. That would allow the database to attach their soldier id to them. What happens when they change Origin ID? Have it merge the old id into the new one? dunno, but would be more of a wish list item?
Names can be changed, but the ID is fixed to the account (or should be, the GUID is so if the soldier ID isn't use the GUID). We need to use the most unique and permanent ID possible.

Re: Calling all PHP Programmers

Posted: Fri Mar 02, 2012 8:45 pm
by Ash2Dust
Could also take the PB logs from each server and put them thru some sort of filter.
It associates each name with a PB GUID when they connected and when they disconnected.

Re: Calling all PHP Programmers

Posted: Sat Mar 03, 2012 5:13 am
by styphon
That's not a bad idea. Are they available via FTP? If not someone would have to do it manually.

Re: Calling all PHP Programmers

Posted: Sat Mar 03, 2012 10:43 pm
by cairdazar
First try on automatic roster, http://bf3.herokuapp.com/gc/roster

Its a list of origin usernames that was on the eu and/or the new york server during the battleday hours (5 min, resolution).

Currently it is hit, ki and ta mixed, will try to split the users up later.

I have the ki users in a google docs spreadsheet, is there any corresponding list for hit?

Appreciate if some one can look at it for any errors.

Re: Calling all PHP Programmers

Posted: Sat Mar 03, 2012 10:48 pm
by BRUMMIE
Sorry, I was so in awe of the first name on the list I couldn't look at the others. Interesting :) Glad to see you guys working at this though and thanks.

Re: Calling all PHP Programmers

Posted: Sat Mar 03, 2012 11:22 pm
by madcow
That's awesome Cairdazar!

Being able to poll the servers to see who's playing is certainly useful for ABC.

Re: Calling all PHP Programmers

Posted: Sun Mar 04, 2012 7:10 am
by Shrapnel
Great work Cair! This will certainly help with some of the HC admin stuff. Thank you. :)

Re: Calling all PHP Programmers

Posted: Sun Mar 04, 2012 12:18 pm
by Shrapnel
Just went through your list and compared it to our scoreboard screenshots last night. I'm not sure how often you polled the server but I found three names were missing from KI's attendance. I didn't do a compare to see if anyone was on there that we didn't have in screens.

Just FYI for troubleshooting.

Re: Calling all PHP Programmers

Posted: Sun Mar 04, 2012 5:04 pm
by Ash2Dust
We need to poll every 15 minutes or so without spamming servers. People could possibly slip thru if they are on less than that time frame.

I'm not on the list either, I was on the NA server all day to keep an eye on NY server performance.

Can do server logs, but that would need manual interaction each week.

We should probably avoid scrapping TS. The TS server was spiking 100% CPU usage every few minutes.