[GUIDE] Getting your mod on PAMM

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

  1. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Please see https://wiki.palobby.com/wiki/Planetary_Annihilation_Modding

    (I've split this into a separate guide as I've hit the character limit in the first post on the PAMM thread)
    Updated with changes for Atom-Shell PAMM by @Mereth.

    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:
    {
      "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.

    • 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.

    Locale Codes
    PAMM currently supports 4 languages:

    en - English
    fr - French (FRANÇAIS)
    nl - Dutch (NEDERLANDS)
    de - German (DEUTSCH)

    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
    Last edited: October 31, 2014
  2. swizzlewizzle

    swizzlewizzle Active Member

    Messages:
    216
    Likes Received:
    56
    Isn't there a more free wiki-style way to do this instead of requiring you guys to manually add in mods? What about if you encounter mods that you don't like? I wish you would follow a more direct upload -> automatically added process similar to what filefront and the bevy of other mod repositories use instead of this direct apple-like "approval" process. :/
  3. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    There could be, of course. But there are security and other concerns with allowing this. This way, someone can confirm the mod is legit before including it.

    We are not "approving" mods in the apple sense, we don't choose whether legitimate mods make it in or not. We are purely trying to protect against malware or badly configured mods.

    Did you know it's possible to write a 1-line PA mod that downloads malware to your computer, or redirects you to illegitimate sites? If people could upload at will, they could replace one of the popular mods with such a mod, or simply make a new mod with an enticing name. Believe me, we'd love to make it open, it would save time and effort on our part. But we want people to trust the Mod Manager, and this is the safest way.
    lulamae, Pendaelose and LavaSnake like this.
  4. swizzlewizzle

    swizzlewizzle Active Member

    Messages:
    216
    Likes Received:
    56
    Thanks for explaining. I hope it doesn't turn out to be too much work for you guys approving everything
  5. sebs303

    sebs303 New Member

    Messages:
    22
    Likes Received:
    6
    Oh, I will take this into my JSON Validator tool.
  6. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Updated the following attributes for PAMM v3.1.1:
    • display_name
    • description
    • icon
  7. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Updated for PAMM v3.4.0
    • Added additional scene names
    • Added new scenes attribute
    • Marked <scene name> attributes as deprecated.
  8. rayzzll

    rayzzll New Member

    Messages:
    2
    Likes Received:
    0
    don't download

    it has virus
    Suspicious.Cloud.9
    Suspicious.Cloud is a destructive Trojan, which will attempt to compromise your system and will make your life a living hell! This malicious application’s creators are not interested in your system’s security or personal privacy, and will implement every tool to reveal your confidential data. So, unless you remove Suspicious.Cloud, this cunning Trojan will make sure to compromise your computer’s functionality, gradually turning it into a useless box, and will gravely endanger your personal space.
  9. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    See my response here: https://forums.uberent.com/threads/rel-pa-mod-manager-v4-0-3.50726/page-38#post-955575
  10. trialq

    trialq Post Master General

    Messages:
    1,295
    Likes Received:
    917
    The OP needs to be updated with:
    • id deprecated
    • requires -> dependencies using identifier
    • Recommend that mods get a github and use the zip from that instead of using user_mods (I don't know if people on raevn's PAMM have transitioned to Mereth's PAMM yet to really recommend it for client mods yet?)
    • Context field
    proeleert likes this.
  11. reallexx

    reallexx New Member

    Messages:
    19
    Likes Received:
    2
    Suspicious.Cloud is just the generic cloud warning lol as well as that information (i guess its on norton that your getting this warning from, but sure norton does not but living hell in there)

    trust me if you get a virus/malware your antivirus will not tell you (as they know how to bypass detection by making a new version for every 1000 computers for who gets the malware/virus, even Basic thing like making the exe file have an word or excel icon makes antivirus give a file be it bad or good file a Low trusted rating witch is enough to allow the file to run which is silly)
  12. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    I can't figure out where to place server mods, I have NavalRedux and NavalReduxIcons ready to sync to PAMM otherwise.
  13. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    Try the server mod folder? ;)
  14. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    If they are on github, you can use the archive feature (copy link from button in lower right, best to select a version tag first), assuming the repo root is the mod and you don't have a lot of extra stuff checked in. Otherwise, any web server or something like S3 would do.
  15. Mereth

    Mereth Active Member

    Messages:
    330
    Likes Received:
    164
    You can store custom releases on github too. You just need to tag your project, then you can attach any file though the github interface.

    eg.: https://github.com/atom/atom-shell/releases
  16. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    Oh so it has to be a seperate github linked? Man I hate github :/

    Also, if I have a client and server mod, do I keep them both on an external github, or can the client one go to PAMM github? Also, can their "dependencies" on each other still work through the atomshell interface if they are seperate? I would imagine they could.

    EDIT: @wondible I have a github, where do server mods go in the mod listing for PAMM? The one on the front seems to be only for client mods, and I didn't see a seperate for servers.
    Last edited: August 11, 2014
    Fr33Lancer likes this.
  17. Mereth

    Mereth Active Member

    Messages:
    330
    Likes Received:
    164
    Making a dependency between server & client mod is a bit meaningless, because the client mod will not be sent to other players. It will probably works in PAMM at least, I don't remember adding some constraint about that. But you must only make the server mod depending on the client mod, or the other way, but not a cyclic dependency like I see currently.

    I can help you to release it to PAMM and we can store the "client" mod as an additional release item. It's quite an easy operation. (but it's time to me to go to bed sorry XD)
  18. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    Well I looked, and didn't see an immediate problem with cyclical dependency. But if there is one I am not aware of, then I suppose it makes sense to make the icons require the server mod *shrug*, it could go either way but it is shamelessly advertizing on client mods if it required a server mod (lol).

    I am changing it as we speak, and you can post it into PAMM, but I still want to know where is the text document you would edit to add a server mod to it, because I seriously don't see one >.<
  19. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    modlist2.json has both client and server mods (there are a lot less server mods, so they may be easy to miss) I use ListGenerator.exe to maintain things; for me thats

    Code:
    mono ListGenerator.exe add com.pa.thetrophysystem.mycoolmod http://path/to/file.zip
    Windows can obviously drop the mono part.
  20. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    Many thanks, I will get started.

    @wondible I just generated a modslist.json but I am still nearly certain it is missing mods. modslist2 sounds complete, but it generates based on user_mods folder from github and I am certain that isn't the full list. I am not about to submit a definitely broken list. If I had a copy of modslist2 (isn't at pamods.io github) then I would manually add mine to it.

    Edit: Am I using the old PAMM github? I am aren't I? I think I figured out my problem... No, it IS the right github I think, I just cannot find modslist2.
    Last edited: August 12, 2014

Share This Page