Starfinder Playlist
  1. #1
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,685
    Blog Entries
    1

    Help with Dead Markers on CoreRPG

    Hola good people.
    Im trying to implement something akin to dead markers in MoreCore.
    Switching the tokens/portraits in the Combat Tracker when wounds exceed health but Im having a lot of trouble trying to work out how to trigger/change the portraits/tokens on the map.
    The map tokens/images are stored as <prototype> but Im a little lost as to how to reference the correct image/map to make the changes.
    There is a dynamic link between the actors names in the CT and the Map but the tokens/portraits are only set on adding them to the map. Changing them after you add them to the map will change them in their entry and in the CT but not on the map...
    Anyone got any clever suggestions for me (other than pointing me at Ikaels code...)?

  2. #2

    Join Date
    Apr 2008
    Location
    Virginia Beach
    Posts
    3,096
    Respectfully, why are you doing this in morecore? This should be in core. Unless the goal is to get it worked out in morecore and then backport to core?

  3. #3
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,685
    Blog Entries
    1
    Quote Originally Posted by Bidmaron View Post
    Respectfully, why are you doing this in morecore? This should be in core. Unless the goal is to get it worked out in morecore and then backport to core?
    CoreRPG has neither Health nor Wounds so you cant do it in CoreRPG.

  4. #4
    Hi damned, celestian was talking about a similar function in this thread and although it was for a different ruleset, he may have some insight that could help you out.

    FG Con 10 – Fantasy Grounds Online RPG Convention - April 7-9 2017
    Register at www.fg-con.com for all the latest info.

  5. #5
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,411
    Quote Originally Posted by damned View Post
    There is a dynamic link between the actors names in the CT and the Map but the tokens/portraits are only set on adding them to the map. Changing them after you add them to the map will change them in their entry and in the CT but not on the map...
    Ikael's approach, I believe, is to use a tiny 1x1 100% transparent token as the placeholder and then to put the blood graphic as a bitmap widget tied to the essentially invisible and non-interactive token placeholder: https://www.fantasygrounds.com/refdoc/bitmapwidget.xcp

    I believe these are not tied to the NPC/PC record, they are placed at the same point that the original PC/NPC token was, with that original token being removed from the map.

    To get the image window you'll need the windowclass and the database node the window is anchored to then use Interface.findWindow: https://www.fantasygrounds.com/refdo...xcp#findWindow Thix will only work if the window is open.

    Get the window datasource from a tokeninstance object using getContainerNode: https://www.fantasygrounds.com/refdo...tContainerNode
    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
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,685
    Blog Entries
    1
    Quote Originally Posted by Spin-Man View Post
    Hi damned, celestian was talking about a similar function in this thread and although it was for a different ruleset, he may have some insight that could help you out.
    Yeah celestians prompt is what made me start attempting this. His ruleset is a heavily modded version of 5e so it contains an enormous amount of code not present in CoreRPG. I would peek at it but its not yet available.

    Quote Originally Posted by Trenloe View Post
    Ikael's approach, I believe, is to use a tiny 1x1 100% transparent token as the placeholder and then to put the blood graphic as a bitmap widget tied to the essentially invisible and non-interactive token placeholder: https://www.fantasygrounds.com/refdoc/bitmapwidget.xcp

    I believe these are not tied to the NPC/PC record, they are placed at the same point that the original PC/NPC token was, with that original token being removed from the map.

    To get the image window you'll need the windowclass and the database node the window is anchored to then use Interface.findWindow: https://www.fantasygrounds.com/refdo...xcp#findWindow Thix will only work if the window is open.

    Get the window datasource from a tokeninstance object using getContainerNode: https://www.fantasygrounds.com/refdo...tContainerNode
    Thanks Trenloe. I am working my way through Ikaels code. I believe that he does it this way because the dead marker can then remain in place after you remove the dead from the tracker which is very neat. I was attempting to swap the token out for a skull or similar but it would disappear when the actor was removed from the CT.

    I will follow those pointers - much appreciated.

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