DICE PACKS BUNDLE

Thread: Location Damage

  1. #1

    Location Damage

    Good morning, I haven't posted here much but I have been using fantasygrounds for a couple years now and I love it. I backed the kickstarter and am now trying my hand at making rulesets and modules. I am having a little problem with location damage. I have made armor with different values for different parts of the armor. I have read them into the character sheet and now I would like to be able to target the individual pieces of armor. I have been trying to figure out how to "pick" where to deal the damage but I can't figure it out. Does anyone know how to make a "choice window" pop up? I know how to read the character to find the armor pieces I just can't figure out how to make a "choice window" pop up to choose where to do the damage. Any help would be appreciated.

  2. #2
    LordEntrails's Avatar
    Join Date
    May 2015
    Location
    -7 UTC
    Posts
    17,147
    Blog Entries
    9
    What ruleset?

    I know the earlier versions of Runequest had hit locations. Don't have any idea if any of the FG rulesets perform location damage, but I would look for game systems that use hit locations and go from there.

    Problems? See; How to Report Issues, Bugs & Problems
    On Licensing & Distributing Community Content
    Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
    Note, I am not a SmiteWorks employee or representative, I'm just a user like you.

  3. #3
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,361
    The usual standard in FG is to drag/drop damage to a specific location - if that might work in how you've setup the GUI. Otherwise, you'd need to construct a combobox control in a window (defined via a windowclass). Search in some of the standard rulesets for examples of <combobox> control - these are usually populated by the addItems function - see the CoreRPG common/scripts/combobox.lua file for the code that provides the functionality for this control.

    An example of using it is the language dropdown at the bottom of the chat window - this control (called "language" in the "chat" windowclass) is populated with data in the scripts\manager_language.lua file - specifically the refreshChatLanguages function.
    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!

  4. #4
    Thanks for the responses. I am making this for the core rpg ruleset so it can be modified to work with any ruleset if someone wanted to. I am trying to figure out how to pop up a window class when you choose a target to strike that will have the armor values listed in it. then using the ondoubleclick handler to set the location of the damage to that piece. I will look into the languages combobox and see where it takes me. Thank you for your help.

  5. #5
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,361
    Quote Originally Posted by gnujak View Post
    I am trying to figure out how to pop up a window class...
    User Interface.openWindow - https://www.fantasygrounds.com/refdo...xcp#openWindow
    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!

  6. #6
    Thank you again for you help. I have made an xml file with the windowclass and stuff in it but I can't figure out the datasource for it. I have added the xml file to the base.xml but don't know how to open it. I have looked athe the openWindow() calls in the ruleset but I can't find anything that works. What I am trying to do is open the windowclass in the xml file in a lua script not an xml sheet. My code looks like this
    <root>
    <windowclass name="armour_locations">
    <frame>location</frame>
    <placement>
    <size width="650" height="500" />
    </placement>
    <sizelimits>
    <minimum width="650" height="400" />
    <dynamic />
    </sizelimits>
    <softclose />
    <nodelete />
    <sheetdata>
    </sheetdata>
    </windowclass>
    </root>

    I have tried using openWindow("armour_locations","") but nothing opens so I'm guessing I need the datasource but I can't figure out what that is. My xmlfile is named ct_armour_locations.xml
    Last edited by gnujak; June 18th, 2019 at 01:32. Reason: forgot somthing

  7. #7
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,361
    Open the console window (using the /console chat command) before calling the Interface.openWindow API function - this might show you some warnings, if there are any.

    Also try /openwindow armour_locations in the chat window to see if this opens anything. Info on this chat command here: https://www.fantasygrounds.com/wiki/..._and_Debugging
    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!

  8. #8
    Thank you that worked fine. now off to figure out how to either add the armour locations to the combat tracker or how to pass the target from the armour locations window to the combat tracker target. Than you guys for all your help

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