Modding Help Is anyone else struggling with loading mods in a certain order?

Discussion in 'Starbound Modding' started by Shadow Wolf TJC, Sep 25, 2016.

  1. Shadow Wolf TJC

    Shadow Wolf TJC Spaceman Spiff

    Those who know of me or my mods may know that I prefer to structure my mods in a modular manner. That is, some of the mods that I create were designed for the sole purpose of providing a foundation for other mods to build off of, such as with my Satellites Pack.

    Unfortunately, lately, I've been having problems getting to load my mods in the proper order. The game no longer seems to use mods that are "required" or "included" by other mods as mods that should be loaded before the other mods. I've had to resort towards renaming my mods with prefixes like, say, "00a" to get them to load 1st (which are typically the foundation-building mods), or "zza" to get them to load last (which are typically addons to existing mods).

    I'm just wondering what exactly has changed since I was last around during Glad Giraffe, and I'm also wondering if others are having this same problem, as well as a possible solution to it.
     
  2. Errors4l

    Errors4l Spaceman Spiff

    If you're still using the modinfo files, go look up how to use the _metadata files. Modinfo files are no longer used.

    You're looking for the "priority" parameter. A higher number is loaded later than a lower number.
    Requires and includes should still work, though note that Steam mods are ALWAYS loaded after /mods/. There's no way around this even with the priority tag. I'm not entirely sure how requires and includes work together with priorities, but I think a list of mods is created based on their priorities (same priority = sorted by name). After that, the results are reordered as little as needed for the requires and includes tags.
     
  3. Shadow Wolf TJC

    Shadow Wolf TJC Spaceman Spiff

    Unfortunately, I'm not able to find any tutorials about how they work.
     
  4. Errors4l

    Errors4l Spaceman Spiff

    I googled Starbound metadata.
    http://community.playstarbound.com/threads/how-do-we-format-metadata-files.118150/

    That's the base format, dependencies are just the same as in the old modinfo files. "requires" and "includes" are arrays of mod names that should load prior to your mod. Mods in the "includes" array don't have to be present, whereas mods in the "requires" array do have to be present for the game to boot.
    "priority" is a number representing the load order prior to the 'shuffling' needed for the required and included mods.

    Here's a metadata file I use for one of my tech mods to ensure it's loaded last (assuming no other mod has my mod added to their require or include parameter): https://github.com/Silverfeelin/Starbound-WEdit/blob/master/.metadata
    It ensures Manipulated UI is always loaded before this mod by including it, though the mod will work fine even without the included mod. I do not know the exact way mods are ordered when priorities conflict with required and/or included mods.

    -Several edits made to add information-
     
    Last edited: Sep 27, 2016
  5. Shadow Wolf TJC

    Shadow Wolf TJC Spaceman Spiff

    Thanks! Will try to implement priorities to see if they will work.

    Update: Seems like priorities, as well as requirements and inclusions, will only work with files that are simply called "_metadata". While I'll have to make some format changes, I won't have to add these silly prefixes (like 00a-, a0a-, or zza- to name a few) before my mod names anymore.
     
    Last edited: Sep 28, 2016

Share This Page