5E Product Walkthrough Playlist
Page 1 of 2 12 Last
  1. #1

    Load order of extensions

    Hi

    I might have a question which is probably already asked before but I only found very old threads about that subject such that I do not know how actual the answers are

    My problem is that some of my extensions for 3.5e/PF1 are incompatible with other ones, I normally then provided combined extensions to make them compatible but, although it is often straightforward to merge the code, it is tedious and when one is not careful then one copies some part of the code to the wrong file etc. Especially when there is a new bigger update for FG or when I make updates on my own extensions then I have to redo this merging more or less and I try to reduce this work. On one hand I could simply just make one big extension but not everyone does want to use all provided extensions and so I still want to provide the possibility to choose which extensions are loaded. Adding options in the option menu might clutter the options, so I am not sure if that would be suitable

    I've seen in the enhanced images extension of Trenloe and Zeus that there is some loadorder tag. Is it "easy" to use or should one be careful when using it (when searching the forums I just found a lot of warnings about playing with the load order of extensions, but it were old threads and it was not really clear to me what the procedure is and where the problems are)? And is there information about how this tag is used? I would like to use it in such a way that my extensions are loaded at the end such that my changes are not overwritten and my code is then adjusted by if-clauses which measure if some other extension is loaded (and I hope that this is possible somehow); when the other extension is loaded then the code looks like the merged code, otherwise just the standard code with my adjustments. In that way I hope to avoid package-extensions in the future

    Thanks in advance

    Best,

    Kelrugem
    Last edited by Kelrugem; October 6th, 2019 at 01:57.

  2. #2
    The loadorder tag simply specifies the order in which the extensions are loaded. Extensions with a lower number are always loaded before a higher number. If they have the same number (such as the default of zero), then there is no guaranteed load order.

    It's a pretty simple feature, and there is no "standard" of what load order tags should be used. It's basically a mechanism to allow extension creators to work with others to fine tune load order.

    Regards,
    JPG

  3. #3
    And for the record, all of the DOEs have a LoadOrder of 50 (as per the DOE documentation) - except for the DOE:Base, which *must* be loaded first, and it has a LoadOrder of 40.
    Dulux-Oz

    √(-1) 2^3 Σ Π
    ...And it was Delicious!


    Alpha-Geek
    ICT Professional
    GMing Since 1982
    NSW, Australia, UTC +10
    LinkedIn Profile: www.linkedin.com/in/mjblack

    Watch our games on Twitch: www.twitch.tv/dulux_oz

    Support Me on Patreon: www.patreon.com/duluxoz

    Past Games, etc, on my YouTube Channel: www.youtube.com/c/duluxoz

  4. #4
    Aaah, okay, thank you very much both for your answers, that sounds indeed simple I thought as such but I rather wanted to ask first, not that I miss something crucial

    Thanks a lot, then I play with that a bit

  5. #5
    LordEntrails's Avatar
    Join Date
    May 2015
    Location
    -7 UTC
    Posts
    17,242
    Blog Entries
    9
    It seems to me that even a very rough recommended list would be helpful. Maybe something like;
    Ruleset modifications 10-39
    Enhanced functionality 40-79
    Themes 80-99

    Would that make sense in a majority (Not all!) cases?

    Problems? See; How to Report Issues, Bugs & Problems
    On Licensing & Distributing Community Content
    Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
    Note, I am not a SmiteWorks employee or representative, I'm just a user like you.

  6. #6
    Quote Originally Posted by LordEntrails View Post
    It seems to me that even a very rough recommended list would be helpful. Maybe something like;
    Ruleset modifications 10-39
    Enhanced functionality 40-79
    Themes 80-99

    Would that make sense in a majority (Not all!) cases?
    Well, there's no need to stick to a 2-digit number. In the past I've recomended Devs who work with me to put Themes above 100. But yeah, something like that might work - but only if every Dev sticks to the eventual agreed ranges.
    Dulux-Oz

    √(-1) 2^3 Σ Π
    ...And it was Delicious!


    Alpha-Geek
    ICT Professional
    GMing Since 1982
    NSW, Australia, UTC +10
    LinkedIn Profile: www.linkedin.com/in/mjblack

    Watch our games on Twitch: www.twitch.tv/dulux_oz

    Support Me on Patreon: www.patreon.com/duluxoz

    Past Games, etc, on my YouTube Channel: www.youtube.com/c/duluxoz

  7. #7
    Okay, I got that working with picking loadorder of 39 (for a loadorder of 5 I couldn't assure that my extension is loaded after some other extension for some reason; am I right that extensions without any loadorder are loaded first (in random order but before extensions with defined loadorder) or do they get a random loadorder in the range/interval of the number of loaded extensions?).

    I then wanted to use this function here https://www.fantasygrounds.com/refdo...#getExtensions, but
    Code:
    Extension.getExtensions();
    just results into an error
    Code:
    Script Error: [string "scripts/manager_action_attack.lua"]:24: attempt to index global 'Extension' (a nil value)
    Am I using this function somehow wrong? When I understood it correctly then one has to add the name (here "Extension") of the package in front of the function name, so I wonder what my mistake here is
    Last edited by Kelrugem; October 7th, 2019 at 05:32.

  8. #8
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,402
    Quote Originally Posted by LordEntrails View Post
    It seems to me that even a very rough recommended list would be helpful. Maybe something like;
    Ruleset modifications 10-39
    Enhanced functionality 40-79
    Themes 80-99

    Would that make sense in a majority (Not all!) cases?
    The loadorder is really not based on the functionality, it's based on what gets modified, what other extensions that extension needs to override (if any) and what the likelihood of other extensions modifying that code will be. The extension that loads last overwrites earlier loaded extensions.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  9. #9
    LordEntrails's Avatar
    Join Date
    May 2015
    Location
    -7 UTC
    Posts
    17,242
    Blog Entries
    9
    Quote Originally Posted by Trenloe View Post
    The loadorder is really not based on the functionality, it's based on what gets modified, what other extensions that extension needs to override (if any) and what the likelihood of other extensions modifying that code will be. The extension that loads last overwrites earlier loaded extensions.
    What would be a better recommendation? Obviously there will be many exceptions, but a starting point seems beneficial.

    Problems? See; How to Report Issues, Bugs & Problems
    On Licensing & Distributing Community Content
    Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
    Note, I am not a SmiteWorks employee or representative, I'm just a user like you.

  10. #10
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,402
    Quote Originally Posted by LordEntrails View Post
    What would be a better recommendation? Obviously there will be many exceptions, but a starting point seems beneficial.
    Keep the load order low, so that other extensions could override it easily if need be, unless you need to override another extension - in which case, make your load order a little higher than the extension you're overriding (maybe 10 higher).
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
FG Spreadshirt Swag

Log in

Log in