How do I upload a map pack to the mods section in PA: Titans?

Discussion in 'Mod Support' started by wallacengineering, January 21, 2018.

  1. wallacengineering

    wallacengineering New Member

    Messages:
    4
    Likes Received:
    1
    I have spent a lot of time on these systems I have created and I would like to upload them to the game in a way similar to Metapod's map pack so I can list details and descriptions of the maps alongside the download as he did. Does anyone know how to accomplish this since the mod manager is now obsolete and mod managing is now built into the game?
  2. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    Take a look at:
    Will move that to wiki.
  3. grandhomie

    grandhomie Active Member

    Messages:
    173
    Likes Received:
    188
    Check out the wiki:
    - https://wiki.palobby.com/wiki/Planetary_Annihilation_Mod_Structure
    - https://wiki.palobby.com/wiki/Planetary_Annihilation_Maps
    - https://wiki.palobby.com/wiki/Planetary_Annihilation_Modding#New_Mod_Submission_Offline)

    An easy way to see how to create a map pack is to look at an existing one, here's mine: https://github.com/grandhomie/com.pa.grandhomie.maps/archive/release.zip

    modinfo.json

    You'll need to have a valid modinfo.json file (you can edit it with any text editor but you need to make sure that the data is in the right JSON format, copy paste the content of your file to https://jsonformatter.curiousconcept.com/ to make sure it is valid).
    You can copy paste my modinfo.json but you'll have to change the following values:
    - identifier: maybe com.pa.wallacengineering.maps
    - display_name
    - description
    - author
    - version
    - date
    - forum to point to a thread where you list infos about your maps
    - icon: points to a logo for your mod, I point it to my avatar
    - load_planet : points to the file that lists all your maps (note that the path coui://ui/mods/grandhomie/maps.js has to match the directory structure of your mod)
    - searchable : list of keywords to search for your map pack

    maps.js

    The maps.js is self explanatory:
    cShareSystems.load_pas("Grand Homie's 2v2 NS", [
    "coui://ui/mods/grandhomie/systems/la_somme_2v2.pas",
    "coui://ui/mods/grandhomie/systems/theia_4v4_ns.pas"
    ]);

    "Grand Homie's 2v2 NS" is the name of the tab in which the maps listed will appear. And "coui://ui/mods/grandhomie/systems/la_somme_2v2.pas" is the path of one of the map (again, make sure it matches your directory structure).

    Add metadata to your maps (.pas)

    When you export your maps you'll have almost everything in it but you can edit them with a text editor to add a description, version, creator and number of players supported (open any of my maps to see an example).

    Release / update process

    I have my mods on my github https://github.com/grandhomie/com.pa.grandhomie.maps because it makes it easy to track the changes and I just sent mikey the link to the "Download ZIP" (archive) of my "release" branch:

    Screen Shot 2018-01-21 at 10.53.50 AM copy.png

    You need to look into Github if you're not familiar with it (https://guides.github.com/activities/hello-world/), I use this workflow:
    - edit my maps locally
    - push them to my master branch
    Once I'm happy with the modifications and I want to release the new version to the community
    - I update the version of the mod, push it to master
    - then switch to the release branch (you'll have to create it the 1st time) and merge master into it (more or less means copy what's on master to the release branch)

    Note that some people don't use github and just send a link to a dropbox archive, that works too, it's just not as easy to keep track of the files. Also if you don't want to deal with the 2 branches and merging, you can send the link to the master branch (the default branch) to mikeyh but you'll have to make sure that you just push your files to github once you're ready.

    The directory structure of a map pack:
    Screen Shot 2018-01-21 at 11.03.06 AM copy.png
    Clopse, lulamae and killerkiwijuice like this.

Share This Page