PF2E Playlist
  1. #1

    Edit formatted text link tags in lua

    Hello,

    Is there a way to get/set the attributes of link tags in formattedtext from the exposed lua API? When looking at getValue() for formattedtext-type DB nodes, it looks like the complete link does not correlate 1:1 with the representation of formattedtext in the xml.

    Looking at the 5E SRD Data module for an example:

    • In client.xml: <link type="windowreference" class="reference_classability" recordname="reference.classdata.barbarian.abilitie [email protected] SRD Data">Path of the Berserker</link>
    • From API node.getValue(): "<linklist>Path of the Berserker</linklist>"


    Thanks for the guidance,

  2. #2
    bmos's Avatar
    Join Date
    Jun 2019
    Location
    Maine, USA
    Posts
    798
    try referencing node.recordname
    or node.linklist

    EDIT: didn't realize you wanted to edit, not sure how do do that.
    Last edited by bmos; July 30th, 2020 at 19:54.
    bmos' pathfinder 1e extensions
    Discord Tag: wil.thieme#3396

  3. #3
    You can only get or set the full value. Look at the story_template_generate.lua script in the CoreRPG ruleset for one example where a script is modifying formatted text.

    Regards,
    JPG

  4. #4
    Quote Originally Posted by bmos View Post
    try referencing node.recordname
    or node.linklist

    EDIT: didn't realize you wanted to edit, not sure how do do that.
    Where can I learn more about the definition for node. I'm not seeing a 'recordname' or linklist' mentioned in the reference documentation: https://www.fantasygrounds.com/refdoc/

  5. #5
    Quote Originally Posted by Moon Wizard View Post
    You can only get or set the full value. Look at the story_template_generate.lua script in the CoreRPG ruleset for one example where a script is modifying formatted text.

    Regards,
    JPG
    Ah yes this is a step in the right direction. Thank you. But is seems that the functional bits of information that I'd care to edit, like the target database address of the reference ("reference.classdata.barbarian.abilitie [email protected] SRD Data" in the example above) are not stored in text form within a formattedtext node type. It makes me think that this information is read in from xml upon load and then handled differently. Any idea where I can find more information on how these references are handled?

    Thanks

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Joshua Stream Pre

Log in

Log in