5E Product Walkthrough Playlist
Page 4 of 5 First ... 2345 Last
  1. #31
    Valarian's Avatar
    Join Date
    Mar 2007
    Location
    Worcestershire, UK
    Posts
    2,567
    Has anyone figured out how to get the cascade skill description displaying in the automatic die roll? I get the skill name, but not the entered description for cascade skills.
    Using Ultimate license - that means anyone can play.
    Valarian's Fantasy Grounds Rulesets

  2. #32

    Join Date
    Jun 2007
    Location
    Zeist, Netherlands
    Posts
    286
    I have no idea what you're talking about.... what do you mean by cascading skill descriptions?

  3. #33
    Valarian's Avatar
    Join Date
    Mar 2007
    Location
    Worcestershire, UK
    Posts
    2,567
    The additional descriptions for Knowledge, Profession, Craft etc.
    The bit that you type in.
    Using Ultimate license - that means anyone can play.
    Valarian's Fantasy Grounds Rulesets

  4. #34
    Hi,

    I tried to add the call to d20Check on the ChatManager at a higher level.
    So I added the following function at the bottom of the scripts/template_linkednumber.lua

    Code:
    function onDoubleClick(x,y)
    	if self.description == nil then
    		ChatManager.d20Check("d20", getValue(), "Not Identified");
    	else
    		ChatManager.d20Check("d20", getValue(), self.description[1].text[1]);
          end
    	return true;
    end
    so this adds the double click event to every linked number. Since a modifiernumber is also linked number this covers quite a bit. ability modifiers, saving throws, intiative, melee..

    however for some reason the skill check total modifiers are not 'linked numbers' so it doesn't work there.

    Some numbers don't have a description that's why there's an extra if statement.

    Anyway .. it's only marginally useful....

    cheers,
    maarten

  5. #35
    Valarian's Avatar
    Join Date
    Mar 2007
    Location
    Worcestershire, UK
    Posts
    2,567
    I found the code I needed for the cascade skills in the drag and drop functionality. This produces a roll description of, for example, Knowledge (Culture) instead of just Knowledge.

    [EDIT]
    In the charsheet_skills.xml file, add the following under the script section for the <numberfield name="total">

    Code:
    function onDoubleClick(x,y)
       local label = window.getDatabaseNode().getChild("label").getValue();
       local sublabel = window.getDatabaseNode().getChild("sublabel").getValue();
    						
       local desc = label;
       if not sublabel or sublabel ~= "" then
          desc = label .. " (" .. sublabel .. ")";
       end
                            
       ChatManager.d20Check("d20", getValue(), desc);
       return true;
    end
    Last edited by Valarian; October 1st, 2007 at 12:08.
    Using Ultimate license - that means anyone can play.
    Valarian's Fantasy Grounds Rulesets

  6. #36
    @valarian
    Where do you put this new code ?
    thank you

  7. #37
    Valarian's Avatar
    Join Date
    Mar 2007
    Location
    Worcestershire, UK
    Posts
    2,567
    Sorry ... this replaces the code in the charsheet_skills.xml file, under the script section for the <numberfield name="total">, posted by Joshuha in his original posting.
    Using Ultimate license - that means anyone can play.
    Valarian's Fantasy Grounds Rulesets

  8. #38
    @valarian
    Thank you

    Edit:
    Work well, thank you
    Last edited by zifnab69_fr; October 3rd, 2007 at 10:12.

  9. #39
    Valarian's Avatar
    Join Date
    Mar 2007
    Location
    Worcestershire, UK
    Posts
    2,567
    An enhancement for the chatmanager.lua to add functionality to roll multiple dice. Add it under the d20Check function.
    Code:
    function dieCheck(number, type, bonus, name)
        if control then
            local dice = {};
    	for i = 1, number, 1 do
    	    table.insert(dice, type);
            end
    	control.throwDice("dice", dice, bonus, name);
        end
    end
    This can be called as follows in the script sections.
    Code:
    <script>
        function onDoubleClick(x,y)
           ChatManager.dieCheck(2, "d6", getValue(), window.influence.getValue());
           return true;
        end
    </script>
    Using Ultimate license - that means anyone can play.
    Valarian's Fantasy Grounds Rulesets

  10. #40
    Hello
    in witch file must we add
    <script>
    function onDoubleClick(x,y)
    ChatManager.dieCheck(2, "d6", getValue(), window.influence.getValue());
    return true;
    end
    </script>
    In the chatmanager.lua
    or in In the charsheet_template.xml, the charsheet_skills.xml file,...
    Thank you

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
  •  
DICE PACKS BUNDLE

Log in

Log in