[WIP] Optimise User Tag Map Mod to improve startup

Discussion in 'Work-In-Progress Mods' started by mikeyh, September 8, 2014.

  1. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    UPDATE: Now available on the PA Mod Manager (PAMM):

    https://forums.uberent.com/threads/rel-pa-mod-manager-cross-platform.59992/

    UPDATE: Add votes to this task: PA#4068

    This is quick fix mod for optimising the user tag map.

    No warranty provided so use at your own risk.

    For anyone who has played a lot of games with a lot of users this will reduce startup time and the ever increasing list of network connections to /GameClient/UserName?UberId= for every new user encountered.

    This is a destructive change to your user tag map stored on playfab that will only keep users that have at least one of the following properties:
    • FRIEND
    • PENDING_FRIEND
    • ALLOW_CHAT (users you can chat with)
    • SEARCH (users you searched for)
    Up to 10 backups of your user tag map are saved in local storage. If you think something went wrong then don't keep clicking and contact me.

    EDIT: removed manual modinfo.json
    Last edited: September 13, 2014
  2. DeadMG

    DeadMG Member

    Messages:
    217
    Likes Received:
    8
    No description of *how* to manually install it?
  3. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    On OS X using PAMM (Atom version):
    • create a folder called gOptimiseUserTagMap containing modinfo.json in ~/Library/Application\ Support/Uber\ Entertainment/Planetary\ Annihilation/mods/
    • launch / reload PAMM then enable
    Last edited: September 8, 2014
  4. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    Don't forget to mention the editing of mods.json, eh? Otherwise the mod will be read, but not enabled. And for completeness:
    Windows: %LOCALAPPDATA%\Uber Entertainment\Planetary Annihilation\mods
    On a typical install %LOCALAPPDATA% will be C:\Users\<username>\AppData\Local

    Linux: ~/.local/Uber Entertainment/Planetary Annihilation/mods

    @mikeyhp: See also this post about manually installing mods.
  5. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    Thanks was just searching for that post...
  6. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    If you reload PAMM it should detect the manually installed mod and automatically add to mods.json when you enable?

    EDIT: grammar
  7. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    Yeah, it should. That would be semi-manually. ;)
    If it doesn't you can disable and then re-enable the mod.
  8. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    This works almost perfectly.

    The only thing that should be stated is that you need to restart PA after you click "optimize user tag map"

    Other than that this is really good, nice job man. I had 1898 connection before, maybe i play too much :oops:

    PS. I am playing on steam.
  9. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
  10. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    Now available on PAMM.
  11. warrenkc

    warrenkc Active Member

    Messages:
    542
    Likes Received:
    191
    Wow! Mine said 1680. After clicking it, it said 14. Thanks!
  12. domii894

    domii894 New Member

    Messages:
    12
    Likes Received:
    1
    Hey mikeyh!

    I just tested your mod on the steam version on a windows 8.1 system. But sadfully it didn't work.

    Maybe I am doing something completely wrong. So let me explain you the steps I made before:

    - Started PA with the new mod
    - Pressed the button on the left bottom corner to reduce the connections from ~1400 to 8
    - Waited a bit
    - Closed PA
    - Restarted it but got all 1400 connections back

    Is that a bug or I am just too stupid for that?

    Thanks :)

    EDIT: Well, I restared some more times and repressed the buttons and then it worked. Thank you for the great mod :D
  13. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    Not sure why it didn't work the first time.

    I'm just updating model.userTagMap with a filtered version and that should automatically update to playfab.

    Have you tried the faster server browser?
    Last edited: September 9, 2014
  14. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    Actually it's possible you quit too quickly and your 1,400 connections were still being processed.
    Last edited: September 10, 2014
  15. Quitch

    Quitch Post Master General

    Messages:
    5,884
    Likes Received:
    6,045
    What is the user tag map?
  16. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    It's the list of every user you have encountered over time.

    At startup the display name is queried for every one of those users with a separate network request to: /GameClient/UserName?UberId=

    For some people with 1,500+ users in their user tag map that means 1,500+ network connections at startup with a limit of 8 concurrent connections.

    eg no games appear in the lobby for several minutes.

    See the following:
    wondible and Quitch like this.
  17. domii894

    domii894 New Member

    Messages:
    12
    Likes Received:
    1
    I saw it but I didn't install it because you said that you will stop this thing until it is fixed.

    But the improvement of the other mod, you published, already gave me such a high improvement, so that I don't need it. Thank you for your fast answers ;)
  18. domii894

    domii894 New Member

    Messages:
    12
    Likes Received:
    1
    Do I need to update the mod manually or what do I need to do, if you publish a new update? (It's my first mod)
  19. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
  20. domii894

    domii894 New Member

    Messages:
    12
    Likes Received:
    1

Share This Page