[GUIDE] Getting your mod on PAMM

Discussion in 'Released Mods' started by Raevn, December 30, 2013.

  1. Mereth

    Mereth Active Member

    Messages:
    330
    Likes Received:
    164
    So use dropbox or whatever system giving you legit direct link url ...
  2. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    Well, my 2 ideas were github link, and forum link. I don't have any other hosting sites, tsk, man I wish I had more...

    I dug up my old dropbox, had a few UE3 records of SMNC hackers, well I put NavalRedux on it and it STILL doesn't install through PAMM. ..."not found in this archive". @stuart98 You have any clue why? I don't see what the deal was, but I never submitted a server mod and there are no real good instructibles for server mods (I got the clientside mod to work perfectly)
    Last edited: August 14, 2014
  3. Mereth

    Mereth Active Member

    Messages:
    330
    Likes Received:
    164
    @stuart98 fucked up completely is recent git push ... huge mess to fix now, yeah.
  4. Mereth

    Mereth Active Member

    Messages:
    330
    Likes Received:
    164
    Fixed. The identifier mismatch was back because of a bad merge from stuart.

    And next time, don't edit the modlist2.json manually, use the ListGenerator.exe
    eg.: listgenerator.exe add com.uberent.pa.mods.stockmods.server.NavalRedux https://www.dropbox.com/s/m8uzea2zw7wyjhd/NavalRedux.zip
  5. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    Well, I did twice just to see the difference >.< But you are saying it downloads now? In the commits I saw a problem with headers. I assumed, as the commit title'd, that it was a github senile derp, github can work one day with certain syntax and not work the next day, that is why I hate it, not the user unfriendliness.

    The headers or whatever was wrong, it wasn't my fault was it? :oops:

    EDIT: Grr, it still doesn't download. What in sam hell could be the problem with my download link?
  6. Mereth

    Mereth Active Member

    Messages:
    330
    Likes Received:
    164
    Roar ! :) In fact the link doesn't work, it's not a "direct link" download. What I have fixed previously was the identifier mismatch, the one in the modlist was different from the one in your archive.

    This, bring you to some html page, it can't be used in PAMM/ListGenerator:
    https://www.dropbox.com/s/m8uzea2zw7wyjhd/NavalRedux.zip

    This, seems to simulate the "Download" button:
    https://www.dropbox.com/s/m8uzea2zw7wyjhd/NavalRedux.zip?dl=1

    I have modified the url in the modlist, but I have to fix an issue with the cache management in PAMM.
  7. Mereth

    Mereth Active Member

    Messages:
    330
    Likes Received:
    164
    I have fixed the PAMM cache issue, you should now be able to install your mod through PAMM.
  8. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    Oh, in that case I hate github AND dropbox. You mean the url clearly ending in a file extension .zip is NOT right and the one ending in random numbers IS right? I wish there was a common sense file storage with a common sense file link...

    Okay, so, I will try to run listgenerator.exe again with that... are you sure that dropbox link will even work?... that new download link...

    Well, actually, you already did it, and I guess it DOES work...
    Last edited: August 15, 2014
  9. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
  10. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Perhaps reference information should start migrating to the one of the wikis?
    Raevn likes this.
  11. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    hm, good idea. GitHub is another option though and it might work a little better.
  12. Mereth

    Mereth Active Member

    Messages:
    330
    Likes Received:
    164
    Creating the mod
    The first step to getting your mod in PAMM is to ensure it is packaged correctly.
    You first need to choose an "identifier" for your mod - a unique string that does not contain any spaces. Examples include "com.pa.myubername.client.myawesomemod".
    You then need to create a folder for this mod.

    Inside this folder, place your mod files, remembering that the root folder is mounted as the media folder, and all files are then relative to this (see this post for more information).
    For example, to place a file in the existing mods folder, you would create a folder called "ui", then a folder within that called "mods", and place your file inside that.

    The modinfo.json file
    Also in your folder, create a file called modinfo.json, which contains a json object describing your mod. An example modinfo.json is shown below.
    Code:
    Code:
    {
      "context": "client",
      "identifier": "com.pa.myubername.client.myawesomemod",
      "display_name": "Commander Health Display",
      "description": "Adds a display to the UI that tracks your commander's health",
      "author": "raevn, danzel, burntcustard",
      "version": "2.7.2",
      "build": "58772",
      "date": "2013/12/26",
      "signature": "not yet implemented",
      "forum": "https://forums.uberent.com/threads/rel-commander-health-display-v2.50584/",
      "category": [
      "in-game",
      "ui"
      ],
      "priority": 100,
      "scenes": {
      "live_game": [
      "coui://ui/mods/rCommanderHP/rCommanderHP.css",
      "coui://ui/mods/rCommanderHP/rCommanderHP.js"
      ],
      "settings": [
      "coui://ui/mods/rCommanderHP/rCommanderHP_settings.js"
      ]
      },
      "dependencies": [
      "com.pa.john.client.anothermod",
      "com.pa.doe.client.anothermod2"
      ]
    }
    
    There are a number of attributes within this file, these are as follows. Attributes in blue are PAMM specific, and not used natively by PA.

    context [specific values] [mandatory]
    Must be "client" or "server"
    identifier [text] [mandatory]
    A unique string in reverse-domain-name style syntax. This must be globally unique, and is recommended to be fairly verbose. You can use the format "com.pa.<author>.<context>.<id>"
    display_name [text] [mandatory]
    The human-readable name of your mod. To add different languages, add additional display_name attributes, but add "_<locale code>" to the end, where <locale code> is the 2 letter code for that language (for example, "display_name_nl"). The base display_name will be used if a locale specific name is not provided.
    description [text] [mandatory]
    A brief description of your mod. To add different languages, add additional description attributes, but add "_<locale code>" to the end, where <locale code> is the 2 letter code for that language (for example, "description_nl"). The base description will be used if a locale specific name is not provided.
    author [text] [mandatory]
    Who authored this mod.
    version [text] [mandatory]
    The version number of this mod. Following semantic versioning style is recommended (http://semver.org/)
    build [text]
    The build number of PA this mod was written for
    date [text]
    The creation/updated date, in "yyyy/mm/dd" format.
    signature [text] [mandatory]
    Not yet implemented by Uber
    forum [text - url]
    A URL to a forum post for this mod.
    category [array(text)]
    An array of category labels, for example
    icon [text - url]
    The URL to an image for the mod. This should be 100x100 pixels. It can be stored on imgur anonymously, but you have to use the i.imgur.com domain.
    priority [number]
    A number that determines the mod load order. 100 is default, lower numbers load first. Unless your mod depends on other or others depend on it, it is recommended to leave this at 100.
    dependencies [array(text - identifier)), optional.
    An array of mod identifiers that this mod requires to be installed and enabled for this to be enabled. These will be automatically downloaded if not present when this mod is installed, and automatically enabled if this is. This mod will be disabled if any of it's dependencies are.
    scenes [map]
    This contains a mapping of scene names to arrays of files to include in that scene. This allows arbitrary scene names to be included.

    Package & publish your mod

    You can either publish your mod sources on github and use the "Download ZIP" URL, or make a ZIP archive of your mod directory manually and publish it on some dedicated hosting service (Dropbox, binntray, etc...).

    eg.:
    https://github.com/myuser/modpa-awesome/archive/0a732397ac5f5b9ec87e992687afd347a4fbdb7f.zip
    https://github.com/myuser/modpa-awesome/archive/v1.0.0.zip
    https://www.dropbox.com/s/gn0DFSDFhvyfdndhw/com.pa.ubername.client.myawesomemod_v1.0.0.zip?dl=1

    Make your mod available on PAMM

    Provide the direct download link to your mod archive at http://pamm-mereth.rhcloud.com/mod
    Raevn and Fr33Lancer like this.
  13. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    ok, @raevn can you make your OP link to Mereth's post here?
    Raevn likes this.
  14. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    I did one better; OP updated with @Mereth's changes.

    http://pawiki.net/ :)

    I really want to spend some serious effort moving and updating all the reference posts (and fleshing out the rest of the wiki), but, time :(
    LavaSnake and Mereth like this.
  15. Maldor96

    Maldor96 Active Member

    Messages:
    213
    Likes Received:
    196
    @Mereth I keep getting an unexpected string error when I try to submit my mod, is there something I'm doing wrong?
  16. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    There is most likely a syntax error in your modinfo.json. Post it and we can see what's wrong.
  17. Maldor96

    Maldor96 Active Member

    Messages:
    213
    Likes Received:
    196
    Here, I copied it from Custards boom bot wars modinfo and changed what I needed to change

    Attached Files:

  18. Fr33Lancer

    Fr33Lancer Well-Known Member

    Messages:
    595
    Likes Received:
    288
    Missing the comma between "version" and "priority"
    And there's one after "priority" which shouldn't be there

    Replace :
    Code:
        "version": "1.0"
        "priority": 100,
    with
    Code:
        "version": "1.0",
        "priority": 100
  19. Maldor96

    Maldor96 Active Member

    Messages:
    213
    Likes Received:
    196
    thanks, it works
  20. emraldis

    emraldis Post Master General

    Messages:
    2,641
    Likes Received:
    1,843
    Ok, I've gotten my mod up on PAMM, that was really nice and easy... How do I update it though? It doesn't seem to register a quick test change I made to the build number...

Share This Page