STAR TREK 2d20
  1. #1

    Structure architecture document for nodePC and nodeNPC?

    Is there a 5E reference document that describes those two types of database nodes?

    If not is the best way to learn to just start using Debug.chat to print getChildren(...) and work my way down the trees?

    I am trying to retrieve all actor melee attacks with their listed reach or range for PCs and NPCs to help improve the ranged attack in melee to be more accurate and to be 3D.

  2. #2
    First, nodePC and nodeNPC are variables in many cases. They get filled based on what fills them. I could code with nodePC = window.getDatabaseNode() and it would fill the database node of one level higher than my current element's position within the database as an example. As for what you are trying to accomplish, it depends on where you are starting. If it's from the combat tracker (CT), then you can use the ActorManager functions to help grab the database node of the actor in question and then navigate down through the node. Since 5e migrates NPC actions to the CT, you could just grab the CT node (using the ActorManager to get that node) and get it's attacks. PCs would be a bit more problematic as you would have to navigate to the character sheet itself and get the actions from the actions tab.

    MOD: Moved to Workshop as this pertains to coding and not the 5e system.
    Dominic Morta
    Ruleset Developer
    Smiteworks

    How to zip up your campaign if the Developers ask for it-How to zip up your campaign if the Developers ask for it

    How to provide an Unity Connection issue?-Connection Issues and What to Provide

    Unity Updater issue?-Updater Issues

    Classic and Unity Port Forwarding?-Fantasy Grounds Connections Explained

    Comcast or Cox ISP User?-Comcast XFinity and Cox Users

    Have a suggestion?-Feature Request

  3. #3
    The easiest way to see what database children link to which PC records is to make PCs and export them to see what the fields map to.

    You can also pull apart the ruleset code; but that can be spread over many files and control templates.

    Regards,
    JPG

  4. #4
    Quote Originally Posted by Moon Wizard View Post
    The easiest way to see what database children link to which PC records is to make PCs and export them to see what the fields map to.

    You can also pull apart the ruleset code; but that can be spread over many files and control templates.

    Regards,
    JPG
    That is a great idea. Thank you!

  5. #5
    I've also looked at a sample db.xml (my local character generator for PF1e) to see what fields were listed where for PCs and NPCs.

  6. #6
    For NPCs I need the CT node for actor <space> and <reach>, then under <actions><desc> I will get the "Melee...reach x ft." phrases.

    For PCs need the <combattracker> node for actor <reach> and <space> then I need the <charsheet> DB node from which I enumerate the <weaponlist> looking for ones with <properties> containing the string "reach".

  7. #7
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,649
    Blog Entries
    1
    Create a PC and 3 NPCs, one small, one medium and one large.
    Add them to the CT.
    Close fantasy grounds and open the db.xml for that campaign and look at the data therein.

  8. #8
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    Quote Originally Posted by damned View Post
    Create a PC and 3 NPCs, one small, one medium and one large.
    Add them to the CT.
    Close fantasy grounds and open the db.xml for that campaign and look at the data therein.
    Yup. That's the way to do it!
    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
  •  
DICE PACKS BUNDLE

Log in

Log in