Use the In-Game Community Mods - Original PA Mod Manager (PAMM) is Obsolete

Discussion in 'Released Mods' started by Raevn, August 17, 2013.

Thread Status:
Not open for further replies.
  1. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Good catch, added! I've also separated out rModsList, it's now in a file called mods_list.js in the ui/mods folder. Not sure how useful a copy of mods.json would be though, since all the info needed for that is in mods_list.js anyway. If you think you'll need it I can do it though.
  2. dfanz0r

    dfanz0r Active Member

    Messages:
    150
    Likes Received:
    47
    grep is a useful tool :p

    Also the reason i wanted the mods.json was because of this:

    Otherwise there would be no way to tell what mods are specifically enabled. Since im going to be loading all information directly from these json files on startup.

    edit:
    That is unless you are not including mods in the mod_list which arnt enabled.

    Which after thinking about it makes more sense because thats what pamm did in the past. The only thing is if we get engine calls for the data im thinking it will be all of them and not just the enabled ones.

    edit 2:

    would still like all of that data to be not stored in a js file but within a json file.

    So here is my current code which loads all of it from json files instead of javascript files.

    It should be pretty easy to switch your code over to save in json.

    All you should need to do is:
    JSON.stringify(objectToMakeJSON, null, 4)
    then pass that into whatever you use to save to the disk.

    https://dl.dropboxusercontent.com/u/37405488/uimodmerger.zip

    That is the current code i have done which loads mods from coui://mods/mod_list.json instead of coui://ui/mods/ui_mod_list.js.

    This is the file i was testing with:
    https://dl.dropboxusercontent.com/u/37405488/mod_list.json
    Last edited: December 21, 2013
  3. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    I've included all mods (enabled & disabled) in mod_list; I figure its better to have the information and let the mods filter on enabled = true than not have the information at all :)

    Also note that mods.json only lists identifiers, which can't be converted to file paths without additional information anyway.
  4. dfanz0r

    dfanz0r Active Member

    Messages:
    150
    Likes Received:
    47
    Good to know. But like what i quoted said the "prefered way" of enabling and disabling mods is by mounting them. The enabled option may go away in the future.

    All the information you need is in the json files for that mod, and if its not put it there. For the loading side of things with the code i posted above you dont need to worry about the file paths. as long as the mod creator set their paths correctly in their modinfo.json file everything just works.

    On the downloading and installing side of things. So really that only matters when you are downloading extracting and looking through the files for the config files.
    Last edited: December 21, 2013
  5. FXelix

    FXelix Active Member

    Messages:
    368
    Likes Received:
    116
    This could have been asked before, but has this mod manager an automatically update system or do I must download every single version?
  6. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Is there a specific reason you want mods_list.js as a .json file? The data inside is still JSON (just inside an array), and by being a JS I've made it into a global mod so it's immediately available without having to load and then parse it.

    So instead of
    Code:
    var data = loadModJSON(loadJSON('coui://mods/mod_list.json'))
    function loadJSON(src) {
      console.log(src, "loading json");
      var o = new XMLHttpRequest();
      try
      {
      o.open('GET', src, false);
      o.send('');
      }
      catch( err )
      {
      console.log("error loading " + src)
      return;
      }
      var jsonData = decode(o.responseText);
      return jsonData;
    }
    It should just become

    Code:
    var data = loadModJSON(rModsList);
    with a small modification to the loadModJSON function, as rModsList is an array instead of a map.

    Even if the enabled attribute no longer determines whether a mod is loaded , it will still reflect whether PAMM has made the mod available, so you can still use it within PA for that purpose. If enabled does get completely deprecated, it can be easily worked around with mods.json - in fact, remove the "*" entry, and PAMM would be ok right now, but there's reasons for including that for the time being.

    In short, you can trust the value of <mod>.enabled to reflect whether the mod is enabled or not, even in PA stops using that parameter.

    Yep, anything that was needed in <mod>.ini is now in the respective modinfo.json.

    I mentioned file paths because I thought you were saying you were using mods.json as a lookup to see what mods were running, then trying to access that mods' modinfo.json, but that's not the case - this was just a misunderstanding.
    Last edited: December 21, 2013
  7. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    PAMM will prompt you to install new versions if they are available, and will indicate if new mod versions are available. They don't automatically install though, you have to agree/select to update PAMM/mods.

    Note this was only introduced in PAMM v2.0.0, so if you have an older version than that you'll need to manually update.
    FXelix likes this.
  8. dfanz0r

    dfanz0r Active Member

    Messages:
    150
    Likes Received:
    47
    I'm on my phone currently, but one reason for me makeing that was to remove all modification of JavaScript files in weird hacky ways in mod managers.

    But see what you don't see is that mod I posted completely removes support for ui_mod_list.js so anything you have put in there to load the new is file you added.
  9. dfanz0r

    dfanz0r Active Member

    Messages:
    150
    Likes Received:
    47
    All the "*" does is mount all mods which havent been mounted so far. I mean it might be useful if your having each mod in its own mod folder then going through after that and loading the mods via the modloading mod.

    But even in that case that isnt really all that useful, because things are mounted way before coherent is started.
    Last edited: December 22, 2013
  10. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    The issue with "*" is that it cant be used if uber turns off the enabled parameter (or all mods would always be on). But for now its handy to keep in case people want to use non-pamm mods.
  11. FXelix

    FXelix Active Member

    Messages:
    368
    Likes Received:
    116
    Could i now use the mod manager with steam or must i use the non-steam version to use the mods like PA stats?
    (and could i change the security that i musnt write my password every time when i open it? how?)
  12. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    PAMM should work with both the steam and non-steam version.
    With security, if you are referring to Windows UAC, there's not really a way around it with the old modding system. The next version of PAMM does not need it though, as the mods are now stored outside of program files.
  13. proeleert

    proeleert Post Master General

    Messages:
    1,681
    Likes Received:
    1,656
    Raevn is there anything I can already do for preparing the move to new PAMM ?
    Except making the modinfo.json file ?
    Is there any code on github of new PAMM so I can maybe check some things out ?
  14. dfanz0r

    dfanz0r Active Member

    Messages:
    150
    Likes Received:
    47
    hmm so everything seems fine so far. Just trying to decide what to do with that little mod i wrote

    I guess ill need to go work on my own mod manager some more :p
  15. teflontony

    teflontony New Member

    Messages:
    1
    Likes Received:
    0
    When i run the application I get the following error:

    network error: response code 403


    Never mind that was my virus scanner thinking your domain hosted mallware.
    I should have got the hint that 403 was a http error code ;)...
    Last edited: December 23, 2013
  16. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
  17. rtvestey79

    rtvestey79 New Member

    Messages:
    21
    Likes Received:
    4
    i tried to dl the mod file on page 1, and norton 360 says its a trojan? wtf? is this safe?
  18. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Which Virus Scanner are you using? I'd like to see why they have my domain blacklisted :confused:

    It probably thinks its a trojan because it contains code to download files from the internet (ie., the mods), but it is safe.
    rtvestey79 likes this.
  19. stormingkiwi

    stormingkiwi Post Master General

    Messages:
    3,266
    Likes Received:
    1,355
    Correct.

    Bitdefender does the same thing, it is why I told you about a certain 403 error. The program is treated as malware, and it is blocked, and you need to go to the forums to get it unblocked.
  20. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Bitdefender has an option to upload a file for a false positive, but that means I'd probably need to do that for every version I release o_O
Thread Status:
Not open for further replies.

Share This Page