Plan for differentiating PA: Classic mods from PA: Titans mods?

Discussion in 'Mod Discussions' started by DeathByDenim, August 29, 2015.

  1. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    I was just wondering what the plan is for differentiating PA: Classic mods from PA: Titans mods. I saw a sort of plan somewhere by @stuart98 to put the information in the description of the mod. I am pretty sure people don't read those ever though.

    I am personally in favour of adding a new flag to the modinfo.json, simply called "product", which can have the values "classic", "titans", or "all" with the default value being "all" to remain compatible with old mods. This would require an update to PAMM by @Mereth though I can create a pull request for that. I think PA can be detected through the presence of a pa_ex1 directory, as Uber pulled that one from classic, I think.

    Thoughts or other ideas?
    lokiCML, burntcustard and stuart98 like this.
  2. dfanz0r

    dfanz0r Active Member

    Messages:
    150
    Likes Received:
    47
    Def needed, and I agree it would be a a good idea to include the info in the modinfo.json file vs the description. Then PAMM could be updated to take advantage of the new value.
  3. Mereth

    Mereth Active Member

    Messages:
    330
    Likes Received:
    164
    As far as I can tell, any Titan license detection from PAMM is clunky at best.

    While the pa_ex1 directory is missing in PA Classic on Steam, the Uber Launcher seems to download it anyway (it's the same manifest for everyone).
    While you can see pa_ex1 beeing mounted in the log file on Windows, you don't on OSX/Linux.

    I hope I am missing something :(
  4. burntcustard

    burntcustard Post Master General

    Messages:
    699
    Likes Received:
    1,312
    While I am generally thinking "I don't give a **** I'm just gonna make mods for Titans", because it encourages sales of Titans (you're welcome Uber), and is easier to only make one version of a mod, and most people who use mods are enthusiasts and will have Titans anway, I can understand why some clarification on PAMM would be good.

    So I'm not actually contributing to this thread at all ¯\_(ツ)_/¯
    Nicb1, proeleert and dom314 like this.
  5. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    Ah, that sucks. I was only able to test with Titans for the launcher. Well, I suppose you could make a setting that would default to Titans, right? The auto-detection would have failed for people changing from Titans to Classic in the PA settings anyway.

    Or maybe burntcustard is right and all mod users will be on Titans anyway. That would be a shame for mods like Galactic War though. In any case, how do you feel about a new field:
    Code:
    product: ["Classic", "Titans"]
    This is different from what I post in the OP because I later realized we could get even more expansions in the future. The absence of the product field (or an empty array) would just mean that the mod is compatible with all versions of PA.
    dom314 likes this.
  6. dfanz0r

    dfanz0r Active Member

    Messages:
    150
    Likes Received:
    47
    Well some thoughts I wonder if one could try to dig into uber's web api's any to try and detect if a user has titans or classic. The game has to detect it somehow? This would require a user to login to detect things though.

    Even so, I think it would be a good field to add even if PAMM has no way of enforcing it. Just for finding mods etc.
  7. dom314

    dom314 Post Master General

    Messages:
    896
    Likes Received:
    1,196
    Added this field to my mod anyway xD.
    DeathByDenim likes this.
  8. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    Oh, yeah. Good idea! It turns out you can by querying this link:
    https://uberent.com/GC/UserInventory?CatalogVersion=1

    If you're logged into the forum with the UberID you also use for the game, you can actually click the link right now. Otherwise it needs authentication of course. But you've already figured that part out with your custom patcher. :)

    It also lists the badges and the commanders you have for bonus fun.
  9. dom314

    dom314 Post Master General

    Messages:
    896
    Likes Received:
    1,196
    That doesn't work for me :(. Got 401 error (unauthorised).
  10. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    Hmm, try logging into store.uberent.com as well?
  11. Mereth

    Mereth Active Member

    Messages:
    330
    Likes Received:
    164
    Regarding the "product" attribute, why not, I just asking myself if we should not store "pa" and "pa_ex1" instead, but that's just a loose idea.

    To access https://uberent.com/GC/UserInventory?CatalogVersion=1 from your mod, you have to find your SessionTicket and add it has header "X-Authorization" to your request. It was available in your localStore as far as I remember a year ago.
  12. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    Well, if you want to access it from a mod, you can just use api.content.usingTitans() (or api.content.ownsTitans() if you just want to see if they own it.).

    What do you mean with storing "pa" and "pa_ex1"? You mean as the field values for "product" in the modinfo.json?
  13. dom314

    dom314 Post Master General

    Messages:
    896
    Likes Received:
    1,196
    All I got was this: {"UberId":"<id>","Inventory":[],"VirtualCurrency":{}}
    I do have titans, but I am just wondering how this would give you that information?
  14. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    Huh, I get the same too now. It gave much more info when I first found it. Curious...
  15. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    Actually, it still works if you don't use cookies like the web browser does, but you use Uber's X-Authorization header field instead. I guess it was a fluke that it worked earlier somehow. Anyway, the output should look like this:
    Code:
    {
      "UberId": "###################",
      "Inventory": [
        {
          <stuff>
        },
        {
        "ObjectName": "PAExpansion1",
        "ItemUnitId": "#################",
        "ClassName": "Content",
        "CatalogVersion": "1",
        "BundleParent": "##############"
        },
        {
          <stuff>
        },
        <more stuff>
      ],
      "VirtualCurrency": {
        "KS": 0
      }
    }
    
    dfanz0r, stuart98 and dom314 like this.
  16. dfanz0r

    dfanz0r Active Member

    Messages:
    150
    Likes Received:
    47
    Well it worked when I clicked it from the forums as well.
    (Also wow I have a lot of stuff from the kickstarter in that thing lol)
  17. dfanz0r

    dfanz0r Active Member

    Messages:
    150
    Likes Received:
    47
    Might as well add support for getting info from the user inventory on into my launcher code.
  18. dfanz0r

    dfanz0r Active Member

    Messages:
    150
    Likes Received:
    47
    edit:
    wrong thread

Share This Page