Need help with a program that gathers stats

Making or wanting help making your own asset? Check in here
Post Reply
Darman1138
Posts: 569
Joined: 2013-02-01 03:50

Need help with a program that gathers stats

Post by Darman1138 »

So I have an ambitious idea for PR but I want to make sure it works before I show anything off or make a huge deal about it. Basically I need to make/find a program that would gather the ticket losses at the end of a PR match. If anyone's played cRPG's Strategus mode you might be able to see where this is going. Is there any way anyone knows of that I can do this with a program instead of having to input the ticket losses manually at the end of a round?
piepieonline
Retired PR Developer
Posts: 433
Joined: 2009-07-22 00:41

Re: Need help with a program that gathers stats

Post by piepieonline »

Sorry, not quite sure what you mean... Do you want to record the amount of tickets left for each team at the end of the round, or?

If yes to that, python can record that, and do whatever you want with it (E.g. save to a file, send via the internet, whatever)
Image
Darman1138
Posts: 569
Joined: 2013-02-01 03:50

Re: Need help with a program that gathers stats

Post by Darman1138 »

Yeah. What would have to happen in the end is that the ticket losses would have to get from PR to a web based program. The ticket losses would then be subtracted from a starting ticket number. So if a team's starting ticket number is 1000 and they lose 300 tickets in a match, the program would automatically subtract 300 from 1000. If they lose a subsequent 200 tickets in the next match, they would go from 700 to 500.
piepieonline
Retired PR Developer
Posts: 433
Joined: 2009-07-22 00:41

Re: Need help with a program that gathers stats

Post by piepieonline »

I would suggest not using a web based program at all, that will complicate things horrendously.

I'm not sure if you know python at all, but just in case you do:

Look into:

Code: Select all

host.registerGameStatusHandler(pythonEventHandler)
bf2.gameLogic.getTickets(team)
bf2.gameLogic.setTickets(team, value)
BF2 Technical Information Wiki for reference.
Image
Post Reply

Return to “PR:BF2 Community Modding”