-
March 15th, 2017, 13:15 #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...)?
-
March 15th, 2017, 13:44 #2
Archangel
- 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?
-
March 15th, 2017, 13:56 #3
-
March 15th, 2017, 16:23 #4
- Join Date
- Jan 2017
- Location
- Tacoma (UTC -7)
- Posts
- 73
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.
-
March 15th, 2017, 16:31 #5
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...tContainerNodePrivate 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!
-
March 15th, 2017, 23:26 #6
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.
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