5E Character Create Playlist
Page 2 of 9 First 1234 ... Last
  1. #11
    DragonsDen13's Avatar
    Join Date
    Mar 2017
    Location
    Langley, British Columbia
    Posts
    177
    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.

  2. #12
    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
    I cannot guarantee that will work in all rulesets. I tested it with FGC with 4E and 5E rulesets and it worked.

  3. #13
    Thanks Valeros! I removed

    rMessageGM.icon = "portrait_" .. charsheet.getName() .. "_chat";


  4. #14
    DragonsDen13's Avatar
    Join Date
    Mar 2017
    Location
    Langley, British Columbia
    Posts
    177
    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.

  5. #15
    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.)

  6. #16
    DragonsDen13's Avatar
    Join Date
    Mar 2017
    Location
    Langley, British Columbia
    Posts
    177
    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.

  7. #17
    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
    Obviously what you want is the token image converted to an icon so it can be inserted there dynamically. Sorry, I do not know how to do that. But one of the super smart developers might know of a way. (The only thing I can think of is to dynamically create a new control and assign its icon. But even that is beyond my capabilities.)

  8. #18

    Fgu?

    [QUOTE=valeros;496687]

    Does this extension work in FGU?

  9. #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

  10. #20
    Quote Originally Posted by darthphoenix95 View Post
    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
    Make sure you turn it on:

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Joshua Stream Pre

Log in

Log in