[REL] Custom Skybox

Discussion in 'Released Mods' started by superouman, February 16, 2014.

  1. mikeyh

    mikeyh Post Master General

    Messages:
    1,954
    Likes Received:
    1,670
    Both the PA client and server use a memory based file system with different mount points.

    The main ones are:
    • /pa/
    • /shaders/
    • /ui/
    Files are loaded into the memory filesystem in the following order:
    • filesystem
      • media/pa/
      • expansion content eg PAExpansion1 maps to /media/pa_ex1/
      • filesystem client mods from /client_mods/ based on priority
    • zip client mods via community mods based on priority
    • manual memory mounts eg Galactic War
    When creating a non GW game server mods are bundled into a remote mod collection:
    • filesystem server mods from /server_mods/ based on priority
    • zip server mods via community mods based on priority
    The remote mod collection is then uploaded to the server, mounted over the server memory file system and then downloaded by each client.

    In most cases server mods override client mods.

    The memory file system also allows watchers that can reload content while developing. Filesystem watchers are implemented on windows only and I have implemented the macOS File System Events API in my local build.

    Some of the details are covered in:
    The actual implementation is a little more complex ;)
  2. lulamae

    lulamae Well-Known Member

    Messages:
    575
    Likes Received:
    292
    Thanks. I do not have an IT background but I am curious about the way things work.

    Tonight I expect that my best friend Google and I will be able to construct a batch file that will take the images in the Space Engine export directory, manipulate, rename and convert to .papa files in the correct place all at once.

    Probably peanuts to you pros, but pretty thrilling to me. :)

    If all goes well I may try learning how to publish custom skybox mods
  3. lulamae

    lulamae Well-Known Member

    Messages:
    575
    Likes Received:
    292
    Reviewing the Client and Server mod examples:

    https://wiki.palobby.com/wiki/Example_Mod_Custom_Skybox
    https://wiki.palobby.com/wiki/Example_Mod_Bigger_Boom_Bot

    If I decide to publish a mod, for best practice, should the "identifier" in the modinfo.json file match the directory name that the file is located in?

    For instance, for the bigger boom bot mod the .json file ontains

    Code:
    "identifier": "com.pa.you.biggerbombbot"
    and is located in the file structure

    server_mods
    • com.pa.you.biggerbombbot
      • modinfo.json
      • pa
        • units
          • land
            • bot_bomb



    I ask because the client mod example doesn't quite follow that standard

    Code:
    "identifier": "com.pa.you.skybox.name"
    client_mods
    • com.pa.demo.mycustomskybox
      • modinfo.json
      • pa
        • terrain
          • sky
            • textures


    Or am I misunderstanding something? Is the identifier in this case just generic? I see that the author= "demo" so that would make sense to replace ".you"

    Or is there no real connection between the identifier and the directory containing the modinfo.json file?
    Last edited: November 28, 2017
  4. mikeyh

    mikeyh Post Master General

    Messages:
    1,954
    Likes Received:
    1,670
    The identifier in the path makes it unique and therefore not a shadow of an existing file.
  5. lulamae

    lulamae Well-Known Member

    Messages:
    575
    Likes Received:
    292
    So for my personal, locally kept mods, there is no formatting requirement for the subfolders within the "client_mods" folder?
    Just that each local mod needs its own unique folder?
  6. mikeyh

    mikeyh Post Master General

    Messages:
    1,954
    Likes Received:
    1,670
    Just realised you mean the containing folder. I've updated the examples to match.
  7. lulamae

    lulamae Well-Known Member

    Messages:
    575
    Likes Received:
    292
    Should the value of "author" be contained within the value of "identifier"?

    For instance, at https://wiki.palobby.com/wiki/Example_Mod_Custom_Skybox

    I see the example of

    Code:
       "identifier": "com.pa.you.your-skybox-name",
       "display_name": "My Custom Skybox",
       "description": "This is a demonstration of a custom skybox",
       "author": "demo",

    In this case, shouldn't we make one of the changes below?

    Code:
       "identifier": "com.pa.demo.your-skybox-name"
    or
    Code:
     "author": "you"
    If I understand this correctly, then the author/handle value is also missing from the identifiers of the 3 examples at the bottom of https://wiki.palobby.com/wiki/Planetary_Annihilation_Mod_Structure
  8. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,363
    Likes Received:
    2,144
    The identifier merely needs to be unique; it cannot be the same as the identifier for any other mod. So while it is not required to have your name in the identifier, it's a good way of making sure that the identifier will be unique. The other possibility is using your domain name is you have your own website.

    I've adjusted the examples to be consistent now with the author name, thanks!

Share This Page