Newest PTE build, no server mods?

Discussion in 'Planetary Annihilation General Discussion' started by squishypon3, June 6, 2014.

  1. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    my bad.
  2. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    Copied directly from mod manger's generated file in the client mods folder:

    {
    "mount_order": [
    "com.pa.raevn.rpamm"
    ]
    }

    I am assuming you fill up the mount order with the reference from the modinfo.json set up for the individual mod.

    What mod manager does, is mounts all of the mods in those "mount_order" brackets. I copied that when PAMM had all mods disabled, as most people done in last few builds.

    If you enabled a few PAMM mods, and see what it changes in your directory, you can figure it out ;)
  3. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    also in PTE the anti air bot got removed s that might explain things....
  4. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    You should know that if you follow the info threads on server mods. I recommend you to read them completely :p
  5. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    My calculus class recommended I read all my references completely as well. I skimmed. I passed.

    I did the same here, and still came up with how to mod.json. I don't think. I feel. #brucelee.
    squishypon3 likes this.
  6. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    I didn't, in fact I even just stuffed my mods into the stock_mods folder because meh. :p
  7. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    *gasps* Oh no! My pot shot AA bot no longer has a model... Good thing I have like 3 different PA versions... :D
    websterx01 likes this.
  8. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    The same model I believe is used for the artillery bot that replaces it.

    So, just change the pathing for the model to what it is now.

    Or, include the model in the folder with it, but either way you must change file path to model.
  9. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    I might use the old grenadier bot model instead, attach the firing sprites and weapons to the new muzzles, and such.
  10. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    It does look like a flak max tbh. Lol.
  11. evilebob

    evilebob New Member

    Messages:
    9
    Likes Received:
    2
    I managed to get server mods working again on my PTE client (current build).
    As much as I searched the forums I couldn't find this explained very clearly so here's what I did that worked.
    I copied the mods and mods.json in just about every directory I could think of and tracked the logs located in (AppData\Local\Uber Entertainment\Planetary Annihilation\log) for potential progress or updates on each test launch. From the errors in the logs I found it was looking for a folder server_mods.
    Since no such directory previously existed I created (\AppData\Local\Uber Entertainment\Planetary Annihilation\server_mods) and placed the current test server mods provided.
    IE:
    \AppData\Local\Uber Entertainment\Planetary Annihilation\server_mods\cheat_allow_change_control
    \AppData\Local\Uber Entertainment\Planetary Annihilation\server_mods\cheat_allow_create_unit

    Also setup the mods.json
    \AppData\Local\Uber Entertainment\Planetary Annihilation\server_mods\mods.json
    *mods.json content

    {
    "mount_order": [
    "com.uberent.pa.mods.stockmods.server.cheat.allow_change_control",
    "com.uberent.pa.mods.stockmods.server.cheat.allow_change_vision",
    "com.uberent.pa.mods.stockmods.server.cheat.allow_create_unit",
    "com.uberent.pa.mods.stockmods.server.cheat.allow_mod_data_updates",
    "com.pa.raevn.rpamm"
    ]
    }


    Maybe somebody could setup a modding wiki for this? It seems a lot of this kind of information that would be great in a first post ends up on page 9 of a 15 page thread assuming you have read 6 other threads to cobble all that information together and when somebody asks how the response is "use the search". /rant
    Sorry... it's just that launching the PTE 30 some times later just to figure out how to load the server mods felt kinda ridiculous when it could be explained a little more clearly in one post.
    squishypon3 likes this.
  12. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
  13. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    It would be a good time for me to pull out ye ole poor quality screen recorder, and try out my larger ram in a "how to" video, and maybe increase my subscribers :p Also, maybe The Realm will share my videos.
  14. chargrove

    chargrove Uber Alumni

    Messages:
    107
    Likes Received:
    350
    Were people really not using mods.json before, and just letting mods load in an arbitrary order? Or were they just counting on PAMM to handle all that stuff and now server mods are just a bit more raw by comparison? I'm just trying to get a sense of which steps are particularly new/difficult.

    Regardless, it looks like I'll need to update/concentrate some of the reference material into a simpler form, and/or do a little video tutorial or something.

    In the meantime, here's the flow from the engine point of view, so you know what you're dealing with and can cross-reference it with the various modding threads for more details.

    The game has a user data folder. On Windows this should be %localappdata%\Uber Entertainment\Planetary Annihilation, and on OSX it should be ~/Library/Application Support/Uber Entertainment/Planetary Annihilation. Can't remember on Linux off the top of my head.

    Immediately underneath this user data folder, you can make two folders, one for client mods and one for server mods. The client mods one is called "client_mods", but it will use "mods" instead if the client_mods one doesn't exist (this is for fallback behavior since we used to only have the one mods folder). The other one is "server_mods" which is specifically for server mods.

    The game also has "stock mods" folders for both client and server. For Windows and Linux the game assets include a media folder, underneath which is a "stockmods" folder and then subfolders for client and server. On
    OSX the equivalent is under PA.app/Contents/Resources.

    For both the mods in the user data folder and the mods in the stockmods folder, each mod is in its own subfolder and has a "modinfo.json" file describing the mod: its name, description, author etc., and most importantly a thing called an "identifier". Every individual mod has one of these.

    Now let's talk about the difference between "loading" and "mounting" a mod. When the game starts up, it will "load" every mod underneath stockmods/client and (game user data folder)/client_mods (or /mods as a fallback, as mentioned above), into its client mod collection. It will also "load" every mod underneath stockmods/server and (game user data folder)/server_mods, into its server mod collection.

    These "loaded" mods are not yet in use. It just means the game can see them and they are available for use. If you have a badly formatted modinfo.json or something, your mod might not get this far, but otherwise it'll be available.

    Now actually using any of these mods requires that they be "mounted". That's where the mods.json files come in. For both client_mods and server_mods in your game local app data folder, you need a mods.json file which has a mount_order array of strings. Those strings are the "identifier" strings from the modinfo.json files in the various mods you want to use, and in the order of priority that you want the mods to shadow the game's original content files. For example,

    Code:
    {
        "mount_order":[
            "com.uberent.pa.mods.stockmods.server.cheat.allow_change_control",
            "com.uberent.pa.mods.stockmods.server.cheat.allow_change_vision"
        ]
    }
    
    There is one special string you can choose to use in the mount_order array, and that's "*", which is interpreted as "every available mod that I haven't mounted yet". In other words, if you had a mods.json file that was just this:

    Code:
    {
        "mount_order":[
            "*"
        ]
    }
    
    It would take every client mod or server mod respectively, and mount it. This is almost equivalent to the previous behavior if you didn't have a mods.json file at all, but I don't like it because it forces you to mount the stockmods too, and that includes cheats. There may be an easy alternative syntax I could add to work around this, but really I'd like it if we just let tools handle the mount order stuff instead, and I'm trying to move us in that direction.

    So in summary, the various mod folders (both user data and stock mods) with their individual modinfo.json files determine the mods that are loaded and available for use, while the mods.json files contain a mount_order array that determines which of those loaded mods you actually want to play with.

    It may seem a bit cumbersome, but it's all in preparation for things like better tooling, mod interdependency checks, etc.

    Hope that helps. :)
    nanolathe, philoscience and wondible like this.
  15. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    Yeah, I never used the mods.json, I just let it most by itself, I honestly miss that simplicity but it's alright, I also put all my mods in the stock mods folder for ease of access. :p
  16. evilebob

    evilebob New Member

    Messages:
    9
    Likes Received:
    2
    This is awesome information and very much appreciated for playing around with mods so early in development. Could all this be a page 1 stickied post or maybe modified to the current page 1 on the PTE Modding thread?
    I only ask because I would hate for the next person to have to look into a "server mods are gone!?" thread for so much excellent info on the whole server client mod setup and load information.
  17. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    People have been able to rely on one of the variants of PAMM since I discovered the game and tried mods. Which means that the load order was essentially arbitrary - there just weren't a lot of conflicts.
  18. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    pamm allows mods to set a priority. So the mount order was not arbitrary. Frameworks could be loaded first.
    This, clicking some checkbox in pamm is just much easier than copying around identifiers to have them in some json file.

Share This Page