DICE PACKS BUNDLE
  1. #1

    DB.findNode() that searches module path?

    Is there a way to do a DB.findNode() that also searches loaded module paths for the same? I've been trying to figure it out but no joy. I know getChildrenGlobal will load all the nodes in a node for all loaded modules but I need to search for a specific id-XXXXXX but I don't care if it's in a module or not.

    For example I have a record id-e10993 located in root node "audio" . So what I am looking for is audio.id-e10993 or audio.id-e10993@SomeModule. However unless I append the @SomeModule name findNode won't find it. I'd rather search across all of loaded modules (and local node entries).

    The source of my problem is that I store audio URLS and then build triggers from them. When you do this the records in the triggers are not @Module as the records placed into the trigger are not from a module but a record. So what I have been doing is if the "trigger" has a @module I would pre-pend that to the audio record lookup. However this causes problems when they start "customizing" my sample triggers.

    A work around would probably be to make the modules separate. The exported audio URLS as one and the triggers and collections in another. When creating the sound entries in triggers use the exported module.
    Last edited by celestian; December 19th, 2021 at 18:25.
    ---
    Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
    Documentation for AD&D 2E ruleset.
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
    Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.

  2. #2
    Harpo in discord suggested adding "@*" to the node name (DB.findNode(id-e10993 .. "@*")) and... it works for me. Thanks!
    ---
    Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
    Documentation for AD&D 2E ruleset.
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
    Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.

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
  •  
5E Product Walkthrough Playlist

Log in

Log in