DICE PACKS BUNDLE
  1. #1

    Sound Sets and Lua Pattern

    I am trying to get some sound working for particular NPCs, like dogs, mutant hounds, and feral ghouls. Problem is that some of them have attack names that are just the same, like bit or unarmed. So I thought why not add their npc name to the lua regex, but that does not seem to be working.

    For example, feral ghoul, in the chat window, we get
    Feral Ghoul:
    [ATTACK] Unarmed (vs. TN 8)
    [LOCATION: Right Arm]
    [SUCCESSES: 1]

    The following individual regex works (one example per line):
    (Unarmed)(.*)(SUCCESS)
    (Unarmed)(.*)

    But, any unarmed attack then gets the feral ghoul sound effect, even if it is an unarmed from a PC or a npc raider. So I tried this: (Feral Ghoul)(.*)(Unarmed)(.*)
    This combined a working regex, with an addition at the front to look for the type of npc. No dice, I even tried just the feral ghoul part: (Feral Ghoul)(.*)
    Still, no dice.

    Anyone got any ideas? At the moment, it would seem like the regex is completely ignoring the first line of the chat box output.

    For context, all my sound sets for weapons work, since all of those are just in the second line on of the chatbox output.

  2. #2
    Zacchaeus's Avatar
    Join Date
    Dec 2014
    Location
    Scotland
    Posts
    20,922
    I think what you'd need to do here is create an item - called Ghoulclaws or something similar and then create a sound set for that item. You would also need to edit the attack action in the Ghoul to Ghoulclaws (or whatever you called it).

    The trigger doesn't look for the name of the creature that is making the attack - only what action the creature made (attack, damage, cast) and what the result of that attack was (hit, miss, damage type, spell).
    If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php

  3. #3
    I was afraid of that. I did that for a dog companion one of my players has. I was hoping to avoid that with NPCs, will end up with a custom copy of the ghouls, or any others I do this for, that wont get updated if new updates come out. Oh well..

    Thanks for the reply!

    Any idea why the trigger does not look at the line that has the name of the character?

  4. #4
    Zacchaeus's Avatar
    Join Date
    Dec 2014
    Location
    Scotland
    Posts
    20,922
    Quote Originally Posted by banesorka View Post
    I was afraid of that. I did that for a dog companion one of my players has. I was hoping to avoid that with NPCs, will end up with a custom copy of the ghouls, or any others I do this for, that wont get updated if new updates come out. Oh well..

    Thanks for the reply!

    Any idea why the trigger does not look at the line that has the name of the character?
    I dunno. Might have something to do with the fact that you can have things like Ghoul 1, Ghoul 2 etc.
    If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php

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
  •  
STAR TREK 2d20

Log in

Log in