-
June 30th, 2020, 00:41 #11
Trying to modify this extension to pull in the character token instead of the .png tokens and I can't figure out how to get it to work.
I think it should be possible but I am not sure on how to reference the "linkToken" from the manager_action_attack.lua file onto the extensions.xml file; trying to replace the <icon name="roll_attack_hit" file="roll_attack_hit.png" /> with the character token.
Any help would be appreciated.
-
June 30th, 2020, 05:35 #12
- Join Date
- Aug 2009
- Posts
- 261
Not sure if I understand what you want. Something like this?
If so, that uses the character portrait (not the character token) for the icon. Just add this code in the extension in the file "scripts/manager_actions_attack_roll_fonts.lua" right before the call to "outputResult"
Code:if (rSource["sType"] == "pc") then local charsheet = DB.findNode(rSource["sCreatureNode"]); rMessageGM.icon = "portrait_" .. charsheet.getName() .. "_chat"; rMessagePlayer.icon = "portrait_" .. charsheet.getName() .. "_chat"; end
-
June 30th, 2020, 06:30 #13
Thanks Valeros! I removed
rMessageGM.icon = "portrait_" .. charsheet.getName() .. "_chat";
-
June 30th, 2020, 06:41 #14
Thank you Valeros. That is exactly what I was trying to accomplish. During our games, sometimes there is a lot going on and it is easy for an attack roll to get lost in the shuffle.
This is for FGC 5E so it should solve my issue quite nicely.
Edit:
I can say that it did work. Thank you again.Last edited by DragonsDen13; June 30th, 2020 at 07:07.
-
June 30th, 2020, 07:07 #15
- Join Date
- Aug 2009
- Posts
- 261
DragonsDen13, actually "outputResult" is also called for damage and saves. So if you don't want the icon overwritten with the character portrait for damage and saves, then nest that code under each of the three sections (i.e., in each of the "if" clauses.)
-
June 30th, 2020, 07:42 #16
Thank you.
I did notice it is doing it for those as well and I think I like it that way; again, because it makes it easier for me to see who is being affected, etc.
I do wish the icons for npc's would show as well but since it is pulling in the icons you added in, it is still easy to see when it is not a PC doing the action.
Learning this stuff is a very slow process; especially for someone who does not speak any of this language. lol.
-
June 30th, 2020, 21:23 #17
- Join Date
- Aug 2009
- Posts
- 261
So you could still put something for the NPC, it would just be static. Two ways I can think of would be to use and existing icon (like the code below) or define a new Icon in the extension that you want to use instead. Below is an example of using the existing "foe" icon.
Code:if (rSource["sType"] == "pc") then local charsheet = DB.findNode(rSource["sCreatureNode"]); rMessageGM.icon = "portrait_" .. charsheet.getName() .. "_chat"; rMessagePlayer.icon = "portrait_" .. charsheet.getName() .. "_chat"; else rMessageGM.icon = "ct_faction_foe"; rMessagePlayer.icon = "ct_faction_foe"; end
-
November 17th, 2020, 03:51 #18
- Join Date
- Nov 2019
- Posts
- 19
Fgu?
[QUOTE=valeros;496687]
Does this extension work in FGU?
-
November 17th, 2020, 04:03 #19
- Join Date
- Nov 2019
- Posts
- 19
Valeros,
I might be doing something wrong but the file you have available to DL is the .ext file but FGU isn't finding it after I dragged it into the extensions folder
-
November 17th, 2020, 04:28 #20
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks