[REL] PA Stats (Decommissioned)

Discussion in 'Released Mods' started by cola_colin, August 15, 2013.

  1. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    updated the page to show build efficiency and have a slider to zoom as well as a hover value overlay. No changes to the mod.
  2. infuscoletum

    infuscoletum Active Member

    Messages:
    606
    Likes Received:
    37
    1 question, prolly quite off topic but what the hell: If not parsing the html from the page that lists the games, how do? Like I said, I'm a hobbiest, mostly self taught, back when a 1Mbps connection was actually awesome. Hence my lack of net code ability.

    On a side note, I feel like i've wasted enough time on this project, and just figured I'd post it up in case someone besides me wants it. I mostly just want to be able to download my games, and pair the file up if I've recorded that game. If you change the page, you change it. No biggie.:cool:

    It requires JSoup for html parsing, but here's the source, including the other libs I managed to find for stuff like downloading, menu scrolling, and json parsing. If someone else wants to run with it, go ahead:)

    Attached Files:

  3. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    By parsing the result of a JSON call instead. I could easily provide you with a webservice call i.e. /games/jsonlist that returns a json encoded list of all game id's or whatever data you want. Unlike html json is meant to be used for communication between different systems like this, hence you could use some library to quickly parse it and be done with it. Me changing the page would no longer affect your program, as the json stays the same.
    Also don't say you wasted time on this. Learning is never wasted time :)
  4. infuscoletum

    infuscoletum Active Member

    Messages:
    606
    Likes Received:
    37
    Well, if you could provide a link to a json used to create the table, I could just have the prog dl it, and parse it. It would be easier to get the number of games listed, and refresh the list. It would also no longer require the JSoup lib.
  5. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    I'll provide it by the weekend.
  6. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Updated the tracker to fight off inaccuracy caused by bad local user times.
    Also added experimental APM capturing, but it's definitely still rough, basically it needs better averaging.
    You need to update the mod for this version, just download the new version and overwrite, no need to change anything else.
  7. infuscoletum

    infuscoletum Active Member

    Messages:
    606
    Likes Received:
    37
    Got multiple graphs/color selection in my viewer. Still not sure why I keep doing this, or even if there's any interest beyond myself.........

    Took a screen showing the potential for color selection....... also, to share the pain o_O:eek::confused::(

    EDIT: oh, and I guess next up is additive stats like metal wasted showing as additive, if you want.....

    BTW, Cola, how did you calc efficiency?

    Attached Files:

  8. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Efficiency = Math.max(1, gross income / outcome);

    EDIT: Thinking about it, that's actually not a value that interesting, it probably should take into consideration if the player still has resources stored or not. So I'll probably change it to be like this soon:
    Efficiency = stored > 0 ? 1 : Math.max(1, income/outcome);

    EDIT2:
    Changed it. Now i.e. in this game http://www.nanodesu.info/pastats/chart?gameId=127 it really shows how bad I hurt myself by getting negative energy in the buildefficiency by energy chart.

    Also note that if you are interested in the javascript behind the chart page you can find it here:
    http://www.nanodesu.info/pastats/static/js/chartpage.js
    Last edited: August 22, 2013
  9. infuscoletum

    infuscoletum Active Member

    Messages:
    606
    Likes Received:
    37
    Small update to my viewer:

    * now shows mouseover data as a color coded list. Glass panes = awesome.
    * all stats now have the option of showing the raw data or summed it over time

    Attached Files:

  10. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    updated, see first post for changes. To update your mod, delete the old folder PA/media/ui/mods/pa_stats and replace it by the new mod. No further changes are required.
  11. zihuatanejo

    zihuatanejo Well-Known Member

    Messages:
    798
    Likes Received:
    577
    I really think this mod/system should be integrated into the final game!
  12. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    as far as I can tell it keeps working in 52512.
  13. infuscoletum

    infuscoletum Active Member

    Messages:
    606
    Likes Received:
    37
    I know I keep taking up space in this thread, but here's the latest version of my viewer/downloader that uses the game id/info json generously provided by cola:):cool:

    Now jSoup free (~270 kb smaller) :p

    EDIT: Here's what I consider to be a mostly final version of the downloader. Added some icons (hope you don't mind me stealing the website icon @cola_colin :oops:) so things like download items should be obvious.

    Also, searches! File->Search opens up a new window, or brings the existing one forward. Put your search in "s for exact matches. It even works for game numbers. So if you wanna find game 245, if it exists you can!

    I'm tempted to do an android version. You think the game graphs you have in javascript would work in an android webview?

    Attached Files:

    Last edited: August 27, 2013
  14. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    After the database has grown a bit games with stats like this one showed up: http://www.nanodesu.info/pastats/chart?gameId=365

    This is because due to a few stupid mistakes I made it got really slow with processing incoming data. Should be fixed now.
  15. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    big update, read the bottom of the first post in this thread for update information and changelog
  16. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    released a quick update of the mod that fixes 2 bugs, see initial post
  17. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    ss.jpg
    could you fix the new part with the "Send data to PA Stats" tick box popping in and out when nothing is selected in-game and getting cut before game launches?
    f.jpg
    Last edited: September 1, 2013
  18. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    I have never seen that behavior. Can you describe it further?

    EDIT:
    Do you have the option for the UI active regions still enabled? Maybe the new part is outside of the "active" region.
    Last edited: September 1, 2013
  19. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
  20. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221

Share This Page