Directory construction for mod zip file

Discussion in 'Mod Support' started by lulamae, November 29, 2017.

  1. lulamae

    lulamae Planetary Moderator

    Messages:
    796
    Likes Received:
    307
    Based on "Example Mod: Custom Skybox"
    https://wiki.palobby.com/wiki/Example_Mod_Custom_Skybox


    I would expect to package my skybox mod .zip file as

    Code:
    com.pa.you.your-skybox-name.ZIP
    
        modinfo.json
        pa
            terrain
                sky
                    textures
                        multiple .papa files

    But reading "Creating Your First Planetary Annihilation Mod"
    https://wiki.palobby.com/wiki/Creat...Annihilation_Mod#Submitting_Your_Released_Mod

    it indicates that the "identifier directory" (my term) gets built below the modinfo.json file.
    Doesn't make sense to me. What am I missing?

    Code:
    com.pa.mikeyh.some-mod-name.zip
    
        modinfo.json
            ui
                mods
                    com.pa.mikeyh.some-mod-name
                        new_game.js
  2. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    Shadow vs non shadow.
  3. grandhomie

    grandhomie Active Member

    Messages:
    173
    Likes Received:
    188
    For some type of mods you need to add your mod files to a new directory / namespace for some you don't (I don't really know the rule but it's what Mikey was referring to).

    Here are my local mods (not published, I just have them in my client_mods directory, just like where I would do for local testing):

    - the air scout mod modifies (overwrites) an existing unit so it doesn't have a directory with the mod name "below the modinfo.json file".
    - my map templates / local tests however are in the "homies_templates" directory (different than the mod name; it doesn't need to match).
    - same for the "systems_backup" mod, the file modifies the "load_planet" scene but they are in a different directory ("systems_backup", under ui/mods).

    Screen Shot 2017-11-30 at 8.10.04 AM.png Screen Shot 2017-11-30 at 8.10.10 AM.png

    A thing I would suggest is to look in your "downloads" directory (in your PA data directory https://wiki.palobby.com/wiki/Planetary_Annihilation_Data_Directory), there you'll find all the mods you have installed as zips, you can take a look at the custom skybox / darker sky mods to see how they're made.
    You can also take a look at existing mods on github: https://github.com/grandhomie , https://github.com/pietervanh , etc
    lulamae likes this.
  4. lulamae

    lulamae Planetary Moderator

    Messages:
    796
    Likes Received:
    307
    Thanks for the additional references. I'm not a programmer so I am trying to learn how to make/publish custom skybox mods through brute force. :) I do want to understand what I'm doing though, in case I find another area to tackle.

    I really like your maps btw.

Share This Page