-
May 26th, 2021, 03:48 #1
- Join Date
- Mar 2020
- Posts
- 496
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.
-
May 26th, 2021, 04:14 #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
-
May 26th, 2021, 04:29 #3
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,564
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
-
May 26th, 2021, 04:49 #4
- Join Date
- Mar 2020
- Posts
- 496
-
May 26th, 2021, 06:18 #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.
-
May 27th, 2021, 03:31 #6
- Join Date
- Mar 2020
- Posts
- 496
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".
-
May 27th, 2021, 08:05 #7
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.
-
May 27th, 2021, 08:17 #8Private 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